How to tell if set of numbers add together to other set of number.

Let A be a set of n integers and B be a set of K integers where n>k

Is there a general method to find if the elements of A can be added together in some combination to 1 to 1 correspond to B.

Example

2 4 6 9 5

4 8 14

4= 4

2+6=8

5+9=14

Re: How to tell if set of numbers add together to other set of number.

Quote:

Originally Posted by

**bob000** Let A be a set of n integers and B be a set of K integers where n>k

Is there a general method to find if the elements of A can be added together in some combination to 1 to 1 correspond to B.

Example

2 4 6 9 5

4 8 14

4= 4

2+6=8

5+9=14

I think this is too general: for example, if an element of B is greater than the sum of all the elements of A, or if all the elements of A are even and one element of B is odd, then you won't

succeed to do it. Also, if all the elements of A are positive and some element of B is less than the smallest element of A you cannot do it.

Nemesis