Questions: Partition and Subset Sum Problems

5 questions to test your understanding

Score: 0 / 5
Question 1 Multiple Choice

Subset Sum has a dynamic programming solution that runs in O(n·S) time, where n is the number of items and S is the target sum. A student claims this proves Subset Sum is in P. What is wrong with this reasoning?

ANothing is wrong — O(n·S) is polynomial in the input size, so it proves Subset Sum is in P
BO(n·S) is polynomial in the numeric value of S but exponential in the number of bits needed to encode S, making it pseudo-polynomial rather than truly polynomial
CThe student is wrong because dynamic programming cannot solve NP-complete problems at all
DThe student is wrong because the correct complexity is O(n²·S), which is clearly not polynomial
Question 2 Multiple Choice

Under which condition would Subset Sum instances be efficiently solvable in practice, despite being NP-complete in the worst case?

AWhen the integers are all small — bounded by a polynomial function of n — so the target sum S is also polynomially bounded
BWhen the target is exactly half the total sum (the Partition variant), which is always easier than general Subset Sum
CWhen the integers are all powers of 2, because binary representations are always easy to sum
DWhen the items are sorted in decreasing order, enabling greedy pruning
Question 3 True / False

Partition is a special case of Subset Sum where the target is exactly half the total sum of all elements.

TTrue
FFalse
Question 4 True / False

Since Partition and the 0-1 Knapsack problem are both NP-complete, they have the same approximability — any approximation scheme that works for one should work for the other.

TTrue
FFalse
Question 5 Short Answer

What does it mean for a problem to be 'weakly NP-complete' rather than 'strongly NP-complete,' and why does this distinction matter practically?

Think about your answer, then reveal below.