I got X binary numbers of length Y and want to see if they add up to a specific sum K.
I did some research on dynamic solutions for subset sum problems; however, I think this specific problem presents a twist.
Adding two binary numbers with length Y and restricting the sum's length to Y will sometimes subtract 2^(Y) from the sum (if there is overflow). Since adding two binary numbers sometimes causes overflow, such as adding:
10000000000000000000000000000000000000010
10000000000000000000000000000000000000010
Will yield the sum
00000000000000000000000000000000000000100
Therefore, in some cases adding numbers will actually lower the current sum.
At the moment, I am banging my head into a wall. Any tips or pointers how to attack this specific version of the subset sum problem?
UPDATE:
There are no real limitations to what I can use. My only goal is to produce the fastest possible run-time with ~50 binary numbers of length ~40