Here's a problem that I seem to be running into working with an accounting system.
I have a set of transactions, but their sum does not equal the amount that the accounting department thinks that it should. They are not questioning the math, just the transactions being included :p
Is there an algorithm that would help me determine which transactions in the set should not be included in order for the sum to match a given amount.
Given Set:
2
4
5
7
Given Sum Amount:
13
Result Set:
2
4
7
Edit: There's less than 100 transactions in the set. Does anyone have a C# example as there is not one on the Solving the NP-complete problem in XKCD question?
Man, I should have gotten a CS degree.