algorithms
algorithms copied to clipboard
Chap 3.9, p 117 issue in the following lines from FASTSUBSETSUM
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.