algorithms icon indicating copy to clipboard operation
algorithms copied to clipboard

Chap 3.9, p 117 issue in the following lines from FASTSUBSETSUM

Open hlyang1992 opened this issue 3 years ago • 0 comments

Chap 3.9, p 117 issue in the following lines from FASTSUBSETSUM,

for t <- 1 to X[i] - 1
    S[i, t] <- S[i+1, t]
for t <- X[i] to T
    S[i, t]...

But it should be,

if t < X[i]
    S[i, t] <- S[i+1, t]
else
    S[i, t]...

Because X[i] > T in some cases.

hlyang1992 avatar Apr 30 '21 12:04 hlyang1992