All elements of L should be initialized to 0 for the values of l(i,j) to be properly computed
The values of l(i, j) may be computed in a row major order or column major order of L [M, N]
The values of l(i, j) cannot be computed in either row major order or column major order of L[M, N]
L [p, q] needs to be computed before L [r, s] if either p < r or q < s
Linked Answers Questions 5 and 6
The subset-sum problem is defined as follows. Given a set of n positive integers, S = {a1 , a2 , a3 , …….., an } and a positive integer W is there a subset S whose elements sum of W? A dynamic program for solving this problem uses a 2-dimensional Boolean array, X with n rows and W-1 columns X [i, j], 1 ≤ i ≤ n, 0 ≤ j ≤ W, is TRUE if and only if there is a subset of {a1 , a2 ………., ai } whose elements sum to j.
54. Which entry of the array X, if TRUE, implies that there is a subset whose elements sum to W?