Original Post
For some reason, I can't think of a way to do this.
Say I have some numbers: (not necessarily in order)
0
1
2
3
4
and I want to find all the bit sequences that add up to a certain #. For example, if that # is 6.
I would get the bit combitions:
11110
01110
10101
00101
.. this means that, for the bit combinations 11110, the numbers:
0
1
2
3 .. all add up to 6.
For the bit combo 10101:
0
2
4 ... all add up to 6.
Etc. How could I do this?
I don't know if I explained this clearly, but thanks for any help you can give.
[edited by - Gf11speed on October 13, 2003 12:01:17 AM]