Pseudo-polynomial time
ID: pseudo-polynomial-time
An algorithm has pseudo-polynomial time when its running time is bounded by a polynomial in the numerical magnitudes of input quantities, rather than necessarily in their encoded length. The dynamic programming table for the 0-1 knapsack problem uses arithmetic operations for items and capacity . A binary numeral system encoding needs only bits for that capacity, so the table bound can be exponential in the number of capacity bits. This distinction does not claim that every input requires exponential work.
Pseudo-polynomial time refers to a classification of algorithmic complexity that is related to the performance of algorithms specifically in the context of certain types of integer-based problems. An algorithm is said to run in pseudo-polynomial time if its running time is polynomial in the numeric value of the input, rather than the size of the input in terms of the number of bits it takes to represent that input.
New to topics? Read the docs here!