Postage stamp problem
The postage stamp problem is a mathematical riddle that asks what is the smallest postage value which cannot be placed on an envelope, if the latter can hold only a limited number of stamps, and these may only have certain specified face values. For example, suppose the envelope can hold only three stamps, and the available stamp values are 1 cent, 2 cents, 5 cents, and 20 cents. Then the solution is 13 cents; since any smaller value can be obtained with at most three stamps (e.g. 4 = 2 + 2, 8 = 5 + 2 + 1, etc.), but to get 13 cents one must use at least four stamps. Source: e01 Encyclopedia. Licence: CC BY-SA 4.0.
The postage stamp problem is a mathematical riddle that asks what is the smallest postage value which cannot be placed on an envelope, if the latter can hold only a limited number of stamps, and these may only have certain specified face values. For example, suppose the envelope can hold only three stamps, and the available stamp values are 1 cent, 2 cents, 5 cents, and 20 cents. Then the solution is 13 cents; since any smaller value can be obtained with at most three stamps (e.g. 4 = 2 + 2, 8 = 5 + 2 + 1, etc.), but to get 13 cents one must use at least four stamps. ==Mathematical definition== Mathematically, the problem can be formulated as follows: Given an integer m and a set V of positive integers, find the smallest integer z that cannot be written as the sum v 1 + v 2 + ··· + v k of some number k ≤ m of (not necessarily distinct) elements of V. ==Complexity== This problem can be solved by brute force search or backtracking with maximum time proportional to |V | m , where |V | is the number of distinct stamp values allowed. Therefore, if the capacity of the envelope m is fixed, it is a polynomial time problem. If the capacity m is arbitrary, the problem is known to be NP-hard. ==See also== Coin problem Knapsack problem Subset sum problem ==External links==
Cite this
"Postage stamp problem". 1780524853. e01 Encyclopedia. CC BY-SA 4.0. https://en.wikipedia.org/w/index.php?oldid=1357672287 JSON record · API collection · BibTeX · RIS · CSL-JSON · citation policy