Subset sum (dynamic programming solution). Develop a Java program Subset Sum DP that reads integers from standard input and tries all possibilities to find a subset of the numbers that sums to 0. Use the following method: use a two-dimensional boolean array subset[][] and maintain the invariant that subset[i][j] will be true if there is a subset of the first j numbers that sum to i. What is the running time of your program? Explain why your program does not prove that P = NP.
Already registered? Login
Not Account? Sign up
Enter your email address to reset your password
Back to Login? Click here