GATE 2008 CS – Question 81
Given positive integers $S=\{a_1,\ldots,a_n\}$ and positive W, subset sum asks whether some subset sums to W. Boolean X[i, j], with n rows and W+1 columns (1≤i≤n, 0≤j≤W), is true iff a subset of the first i elements sums to j. Which entry being TRUE implies a subset sums to W?
Practise this question in The GATE Grind →
Show answer and explanation
Correct answer: (A) X[1, W]; (C) X[n, W]
Explanation
We are sorry we couldn't write detailed soluition for this, we are working on it!, please consider asking your own AI, its just 2-3 clicks with very minimum effort