What is subset sum problem?
Solving subset sum problem means finding a list that sums to a particular value. Assuming there is a list of integers (such as [1, 2, 3, 6, -9, 11]), and another integer (such as 6), subset sum problem is the question to answer the subsets that sum to the specified integer. In this case, the answer is [1, 2, 3] and [-9, 1, 3, 11].
For detail information of subset sum problem, please refer to https://en.wikipedia.org/wiki/Subset_sum_problem
What is DPSS?
DPSS provides a tool to solve this problem without any specialized math knowledge. This can be used when you know how to get ALL the different solution that adds up to the same total.
It also offers a method to solve multiple subset sum problem. For example, if you are a travel planner, and you have to allocate families to some cars, you can count on this tool to make a plan of allocation. Given each member of the family are [2, 3, 2, 4, 5, 3, 2] and the capacities of each car are [4, 5, 8, 4], you can allocate the families to the cars as follows:
And there are some questions posted on stackoverflow that can be sorted out by this tool. The questions are...
- Algorithm to find which number in a list sum up to a certain number
- Multiple subset sum calculation
- Subset Sum algorithm
How to use DPSS?
The easiest way to use this tool is the Google Colab Notebook that I made. I also explain the other ways in https://github.com/europeanplaice/subset_sum .
Or, there is a WebAssenbly implementation.
What are the applications of subset sum problem and this tool?
This tool can be used in bank reconciliation. Here is a Google Colab Notebook that shows the example of the usage of DPSS in bank reconciliation. Inside of this example, a function of solving multiple subset sum problem is used.