Papers
Topics
Authors
Recent
Search
2000 character limit reached

Local Postage Stamp Problem

Updated 6 February 2026
  • Local postage stamp problem is a study of representing integers as sums of elements (stamps) from a finite set with a fixed envelope capacity.
  • The problem is NP-hard in general but becomes tractable with fixed denominations via incremental dynamic programming and sliding-window techniques that improve time and space efficiency.
  • It connects classical additive number theory with the Frobenius problem, offering insights into periodicity, theoretical bounds, and practical algorithmic strategies.

The local postage stamp problem concerns the representability of integers as sums of a bounded number of elements—termed "stamps"—drawn (with repetition) from a finite set of positive integer denominations. Formally, for a finite, strictly increasing set of denominations Ak={a1,a2,,ak}A_k = \{a_1, a_2, \ldots, a_k\} with %%%%1%%%%, and an envelope capacity sNs \in \mathbb{N}, the problem is to determine the largest integer NN such that every nn with 0nN0 \leq n \leq N can be written as j=1kλjaj\sum_{j=1}^k \lambda_j a_j with j=1kλjs\sum_{j=1}^k \lambda_j \leq s where the λj\lambda_j are nonnegative integers. This maximum NN is denoted ns(Ak)n_s(A_k), and the local postage stamp problem (LPSP) is to compute ns(Ak)n_s(A_k) (or equivalently, f(Ak,s)=ns(Ak)+1f(A_k,s) = n_s(A_k) + 1, the least non-representable value) for inputs (Ak,s)(A_k, s) (Palais et al., 29 Jan 2026).

1. Formal Problem Statement and Variants

Given a set AkA_k of kk pairwise distinct positive integers 1=a1<a2<<ak1 = a_1 < a_2 < \cdots < a_k and envelope capacity ss, an integer n0n \geq 0 is said to be ss-coverable by AkA_k if there exist nonnegative integers λ1,,λk\lambda_1, \ldots, \lambda_k with j=1kλjs\sum_{j=1}^k \lambda_j \leq s and j=1kλjaj=n\sum_{j=1}^k \lambda_j a_j = n. The local postage stamp problem is then to compute ns(Ak)n_s(A_k), the largest NN such that all 0,,N0, \ldots, N are ss-coverable (Palais et al., 29 Jan 2026). Equivalently, the smallest non-coverable value is f(Ak,s)=N+1f(A_k, s) = N+1.

This is distinct from the global postage stamp problem, where for given kk and ss one seeks AkA_k maximizing ns(Ak)n_s(A_k).

A related additive basis formulation considers an order-hh additive basis for [n]={1,2,...,n}[n] = \{1,2,...,n\} as any set ANA \subset \mathbb{N} such that every x[n]x \in [n] can be written as a sum of at most hh elements of AA. The minimum cardinality of such a basis is denoted Fh(n)F_h(n). This is equivalent to the postage stamp interpretation: Fh(n)F_h(n) is the minimal number of denominations needed so that all xnx \leq n can be formed using at most hh stamps (Faust et al., 31 Jul 2025).

2. Complexity and Hardness Results

The LPSP is NP-hard under Turing reductions; this is established by reduction from the Subset-Sum and Partition problems (Palais et al., 29 Jan 2026). Specifically, the decision version asks whether f(Ak,s)f(A_k, s) exceeds a given bound, which can encode arbitrary instances of Subset-Sum in polynomial time under mild restrictions.

Despite NP-hardness, when the number of denominations kk is fixed, the problem becomes tractable by dynamic programming in time O(smaxAk)O(s \cdot \max A_k) (Palais et al., 29 Jan 2026). When both kk and ss are small or moderate, practical efficient algorithms are available.

3. Algorithmic Approaches

Recent work introduces algorithmic improvements over the traditional Mossige–Selmer O(ks2ak)O(k s^2 a_k)-time method. The primary innovation is an incremental dynamic programming (DP) algorithm that computes ns(Ak)n_s(A_k) in O(ksak)O(k s a_k) time and O(sak)O(s a_k) space (Palais et al., 29 Jan 2026). This algorithm maintains two arrays, TT and UU of length MsakM \geq s a_k:

  • T[i]T[i]: the minimal number of stamps needed to form ii (or s+1s + 1 if >s>s or "unknown").
  • U[i]U[i]: index of largest denomination used in an optimal decomposition of ii.

Processing ii from $0$ upward, for each j=U[i],...,kj = U[i], ..., k we attempt to relax T[i+aj]T[i + a_j]. If T[i+aj]>T[i]+1T[i + a_j] > T[i] + 1, both TT and UU are updated accordingly. The process halts when T[i]>sT[i] > s, at which point i1=ns(Ak)i - 1 = n_s(A_k).

A further sliding-window refinement replaces the arrays with cyclic buffers of length 2log2(ak+1)2^{\lceil \log_2(a_k + 1)\rceil}, yielding O(ak)O(a_k) space complexity. After processing each ii, its slot is invalidated to enable buffer reuse.

Table: Comparison of Algorithmic Approaches for LPSP

Algorithm Time Complexity Space Complexity
Mossige–Selmer O(ks2ak)O(k s^2 a_k) O(sak)O(s a_k)
Incremental DP O(ksak)O(k s a_k) O(sak)O(s a_k)
Sliding-Window DP O(ksak)O(k s a_k) O(ak)O(a_k)

Empirical tests indicate speedups of 2×2\times10×10\times for s10s \geq 10 over earlier methods, and the sliding-window variant typically yields an additional $20$–30%30\% improvement thanks to smaller working sets. Implementations are available at https://github.com/jgdumas/GStamps (Palais et al., 29 Jan 2026).

4. Structural and Theoretical Properties

The structure of ss-coverable numbers for given (Ak,s)(A_k, s) exhibits stabilization and eventual periodicity. For large enough NN, the set of integers not expressible as a sum of NN elements of AkA_k is determined by intrinsic properties of AkA_k and its dual bAkb - A_k, where b=akb = a_k (Granville et al., 2020).

Let A={0=a1<a2<<ak=b}A = \{0 = a_1 < a_2 < \dots < a_k = b\} with gcd(A)=1\gcd(A) = 1. For each residue class rr mod bb, define nr,An_{r,A} as the minimal nonnegative integer congruent to rr mod bb lying in P(A)={n1a1++nkak:ni0}P(A) = \{n_1 a_1 + \cdots + n_k a_k : n_i \geq 0\}, and Nr,AN_{r, A} as the least NN such that nr,An_{r,A} lies in the NN-fold sumset NAN \cdot A. Then, letting N0=max1rb1(Nr,A+Nbr,bA)N_0 = \max_{1 \leq r \leq b - 1} (N_{r,A} + N_{b - r, b - A}), it holds for all NN0N \geq N_0 that expressed sums fill [0,bN][0, b N] except for E(A)(bNE(bA))E(A) \cup (b N - E(b - A)), where E(A)=Z+P(A)E(A) = \mathbb{Z}_+ \setminus P(A) (Granville et al., 2020). The number of "holes" h(N)h(N) in [0,bN][0, b N] stabilizes to E(A)+E(bA)|E(A)| + |E(b - A)| as NN \to \infty.

These results link the LPSP to the classical Frobenius problem, specifying the structure of representable and nonrepresentable values under bounded and unbounded stamp usage.

5. Bounds and Extremal Results

The extremal function Fh(n)F_h(n), the minimal size of an order-hh additive basis for [n][n], equivalent to the number of needed stamp denominations, admits well-studied bounds (Faust et al., 31 Jul 2025):

  • Trivial lower bound: Fh(n)hh!nF_h(n)^h \geq h! n.
  • Trivial upper bound: Fh(n)hhhnF_h(n)^h \leq h^h n.

Improved bounds have been obtained for large hh:

  • Lower bound: For any ϵ>0\epsilon > 0 and all hh sufficiently large,

Fh(n)h(1/2ϵ)h!2πen.F_h(n)^h \geq (1/2 - \epsilon) h! \sqrt{2 \pi e} n.

This employs probabilistic methods and the Berry–Esseen theorem, with the constant amplified by 2πe/21.266\sqrt{2\pi e} / 2 \approx 1.266 over the trivial term.

  • Upper bound: For any ϵ>0\epsilon > 0 and all hh large,

Fh(n)h((32+ϵ)h)hn.F_h(n)^h \leq \left( \left( \frac{\sqrt{3}}{2} + \epsilon \right) h \right)^h n.

This result is obtained by lifting constructions of additive bases for cyclic groups Z/bZ\mathbb{Z}/b\mathbb{Z} (Jia–Shen) to the integers.

Table: Numerical Comparison of Bounds for h=10h=10, n=106n=10^6

Bound Type Stamp Count (Fh(n)F_h(n))
Trivial lower $17.9$
Improved lower $19.4$
Trivial upper $39.8$
Improved upper $34.5$

The gap between lower and upper bounds narrows appreciably as hh increases, with the asymptotics revealing Fh(n)c(h)n1/hF_h(n) \approx c(h) n^{1/h}, where c(h)hc(h)^h is tightly sandwiched between (2.066o(1))h!(2.066 - o(1)) h! and ((0.866h)h)((0.866 h)^h) for large hh (Faust et al., 31 Jul 2025).

6. Connections to Other Additive Problems

The local postage stamp problem generalizes and is closely related to classical results in additive number theory, notably the Frobenius problem (determining the largest integer not representable as a nonnegative linear combination of given relatively prime integers) (Granville et al., 2020). As ss \to \infty or NN \to \infty, the LPSP connects with the structure of the numerical semigroup P(A)P(A) generated by AA. The periodic stabilization of unattainable values and eventual coverage can be derived as corollaries of the constructive periodicity theorems for sumsets.

Moreover, LPSP and associated algorithmic advances have applications in secure multi-party computation, specifically in more efficient homomorphic evaluation of polynomials on encrypted values, facilitated by a more compact encoding of polynomials as sums of bounded integers (Palais et al., 29 Jan 2026).

7. Open Problems, Limitations, and Numerical Aspects

A principal open question is whether the lower and upper asymptotic bounds for Fh(n)h/nF_h(n)^h / n coincide as hh \to \infty (Faust et al., 31 Jul 2025). While the gap has been substantially narrowed, a precise determination of the best possible constants remains unresolved.

Algorithmic advancements have made computation feasible for comparatively large kk and ss, yet the underlying NP-hardness of LPSP limits exact methods for arbitrary parameters. The empirical performance of sliding-window DP shows substantial speedups but is still inherently exponential for very large kk or ss.

Finally, continued work focuses on improving both theoretical bounds (particularly for moderate hh) and practical algorithms, as well as elaborating connections to classical and higher-dimensional generalizations of the Frobenius and related additive problems. Further avenues include the development and analysis of approximation algorithms for the global postage stamp problem and analogues in higher-rank free abelian groups (Faust et al., 31 Jul 2025, Palais et al., 29 Jan 2026, Granville et al., 2020).

Definition Search Book Streamline Icon: https://streamlinehq.com
References (3)

Topic to Video (Beta)

Whiteboard

No one has generated a whiteboard explanation for this topic yet.

Follow Topic

Get notified by email when new papers are published related to Local Postage Stamp Problem.