Subset Sum Demonstration
Subset sum is a classic NP-complete computation. This demonstration compares a classical
brute force tightly coded Java algorithm with a spacial recursive Resource Oriented
Computing algorithm. Progress of the algorithms is shown on the console's stdout.
Run demo - target=600, maxn=25 set=2,4,6,.... target discovered at n=24
Run demo - target=601, maxn=25 set=2,4,6,.... target never discovered (set is even target is odd)
URL Parameters
- target - the subset sum target value
- maxn - the maximum set size to auto increment to
- set - specify a comma seperated set for the sss target eg set=1,3,5,7,9 (the default set is the even integers 2,4,...,maxn*2 targeting an odd sum therefore tests the time for an exhaustive search).
- reverse - start with complete set first - default is to start with a single set member and add items
- nospacial - do not compute using the spacial recursion algorithm
- nolocal - do not compute using the local Java algorithm
Force system cache clear