I know that Knapsack
is NP-complete while it can be solved by DP. They say that the DP solution is pseudo-polynomial
, since it is exponential in the "length of input" (i.e. the numbers of bits required to encode the input). Unfortunately I did not get it. Can anybody explain that pseudo-polynomial
thing to me slowly ?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…