pseudopolynomialtime
Pseudopolynomial time describes a running time that is polynomial in the numeric value of the input, rather than in the length of the input’s encoding. In other words, an algorithm is pseudopolynomial if its running time is polynomial in the actual numbers appearing in the instance (such as weights or sums) but not necessarily polynomial in the size of the binary representation of those numbers.
Common examples are dynamic programming algorithms for knapsack and subset sum. The knapsack DP runs in O(nW)
Pseudopolynomial time is closely related to weakly NP-complete problems such as knapsack and subset sum; such
In practice, pseudopolynomial algorithms are useful for instances with small numerical values or when weights are