Skip to article frontmatterSkip to article content
Site not loading correctly?

This may be due to an incorrect BASE_URL configuration. See the MyST Documentation for reference.

The extension complexity of the knapsack polytope

Sebastian Pokutta
v1 2026-12-01 · last 2026-12-02
Note: Formalizes Observations 3.3 and 3.7, Theorem 3.5 and Corollaries 3.6 and 3.8 of Pokutta & Van Vyve (2013), with a direct encoding of the correlation polytope by equations in place of the 3SAT formula of the paper.

Abstract. There are knapsack polytopes whose extension complexity is exponential in the square root of the dimension. Following Pokutta and Van Vyve, this entry proves that for every N≥2N \ge 2 there are positive weights and a positive capacity for NN items such that the 0-1 knapsack polytope has extension complexity at least (3/2)⌊N/2⌋(3/2)^{\lfloor\sqrt{N/2}\rfloor}, and the same for the unbounded knapsack polytope, the convex hull of the feasible vectors of nonnegative integers. The proof embeds the correlation polytope COR⁡(n)\operatorname{COR}(n). Its vertices bb⊤bb^\top are the integer solutions of the equations bi+bˉi=1b_i + \bar b_i = 1, vij+vˉij=1v_{ij} + \bar v_{ij} = 1 and bi+bj+2zij+vij=3b_i + b_j + 2z_{ij} + v_{ij} = 3, which force zij=1−bibjz_{ij} = 1 - b_i b_j. The equations are added up with positive real weights that have no integer relation, the powers of a transcendental number, so that a vector of integers satisfies the resulting knapsack equation exactly when it satisfies every equation. The integer points on the face of the knapsack polytope where the knapsack inequality is tight are therefore the solutions of the system, and the face projects onto the correlation polytope, whose extension complexity is at least (3/2)n(3/2)^n. Adding items does not decrease the extension complexity, which gives the bound in every dimension.

The 0-1 knapsack problem has a single linear constraint, a pseudo-polynomial algorithm and a fully polynomial approximation scheme, and its polytope can be approximated within any factor 1+ε1 + \varepsilon by a polytope with a polynomial number of inequalities Bienstock, 2008. The paper shows that the knapsack polytope itself is not small: there are 0-1 knapsack polytopes and unbounded knapsack polytopes whose extension complexity is exponential in the square root of the dimension. A similar result was found independently by Avis & Tiwary (2015).

The proof embeds the correlation polytope, whose extension complexity is at least (3/2)n(3/2)^n by the entry Exponential lower bounds for polytopes in combinatorial optimization. A system of equations with 0/1 solutions describes the vertices bb⊤b b^\top of the correlation polytope. The equations are added up with weights that have no integer relation, which gives one knapsack equation with the same integer solutions. These solutions span a face of the knapsack polytope, and the face projects onto the correlation polytope.

Knapsack polytopes

So the points of a knapsack polytope with a⊤x=ba^\top x = b form a face, and by the rule of the core for faces of a convex hull this face is the convex hull of the integer points with a⊤x=ba^\top x = b.

One equation instead of many

The powers s0,…,sm−1s^0, \dots, s^{m-1} of a positive transcendental number ss have this property, because an integer relation between them is a polynomial with integer coefficients that vanishes at ss. Here ss is the square of Liouville’s number ∑i2−i!\sum_i 2^{-i!}, whose transcendence is in Mathlib. The paper takes algebraically independent reals. If ℓc(x)=rc\ell_c(x) = r_c, c=1,…,mc = 1, \dots, m, are equations with integer coefficients, an integer vector xx satisfies ∑cλcℓc(x)=∑cλcrc\sum_c \lambda_c \ell_c(x) = \sum_c \lambda_c r_c exactly when it satisfies all mm equations: this is Observation 3.3 of the paper for 0/1 vectors and Observation 3.7 for integer vectors.

The system for the correlation polytope has, for a set of nn elements, the variables bib_i and bˉi\bar b_i for every ii and the variables zijz_{ij}, vijv_{ij} and vˉij\bar v_{ij} for every pair i<ji \lt j, and the equations

bi+bˉi=1,vij+vˉij=1,bi+bj+2zij+vij=3.b_i + \bar b_i = 1, \qquad v_{ij} + \bar v_{ij} = 1, \qquad b_i + b_j + 2 z_{ij} + v_{ij} = 3 .

In nonnegative integers, the first two families force bib_i and vijv_{ij} to be 0 or 1. The third then leaves one solution for every choice of bib_i and bjb_j: since bi+bj+vijb_i + b_j + v_{ij} must be odd, vij=1v_{ij} = 1 exactly when bi=bjb_i = b_j, and zij=1−bibjz_{ij} = 1 - b_i b_j. So the solutions correspond to the vectors b∈{0,1}nb \in \{0, 1\}^n, and all of them are 0/1 vectors. There are 2n+3(n2)=(3n2+n)/22n + 3\binom{n}{2} = (3n^2 + n)/2 variables.

The face

The weight of a variable is the sum of λc\lambda_c times its coefficient over the equations cc, and b=∑cλcrcb = \sum_c \lambda_c r_c. Every variable occurs in an equation, so the weights are positive. The face is the convex hull of the integer points with a⊤x=ba^\top x = b, and these are the solutions of the system, in the 0-1 case and in the unbounded case alike. The map π\pi sends xx to the matrix with the entries bib_i on the diagonal and 1−zij1 - z_{ij} off the diagonal, written linearly as bi+bˉi−zijb_i + \bar b_i - z_{ij}; on a solution this is bb⊤b b^\top.

The lower bounds

Restricting a feasible vector to the old items gives a feasible vector, and a feasible vector of the old items extends by zero. So the smaller polytope is a coordinate projection of the larger one.

For n=⌊N/2⌋n = \lfloor \sqrt{N/2} \rfloor the system has (3n2+n)/2≤2n2≤N(3n^2 + n)/2 \le 2n^2 \le N variables. The face of Theorem 3.5 and the monotonicity of the extension complexity under faces and projections (Lemma 3.1 of the paper, Lemma 9 of the entry on exponential lower bounds) give a knapsack polytope with (3n2+n)/2(3n^2 + n)/2 items and extension complexity at least xc⁡(COR⁡(n))≥(3/2)n\operatorname{xc}(\operatorname{COR}(n)) \ge (3/2)^n, and the remaining items are added with weight 1.

Coverage

This entry covers Observations 3.3 and 3.7, Theorem 3.5 and Corollaries 3.6 and 3.8. Lemma 3.1 is Lemma 9 of the entry on exponential lower bounds, and Theorem 2.4 is its Theorem 7. Not covered are the remarks on the minimization version of the knapsack polytope, on weights with finite encoding length (Remark 3.4) and on relaxation schemes for the unbounded knapsack problem.

The formal statements at a glance

Main.lean
/-- There are positive real weights without integer relations. -/
theorem aggregation_weights : AggregationWeights := fun m => Proof.aggregation_weights m

/-- The knapsack inequality is valid for both knapsack polytopes. -/
theorem knapsack_valid : KnapsackValid := fun a b => Proof.knapsack_valid a b

/-- A knapsack polytope with `(3 n ^ 2 + n) / 2` items has a face that projects onto the
correlation polytope. -/
theorem knapsack_face_cor : KnapsackFaceCor := fun n hn => by
  obtain ⟨a, b, ha, hb, h1, h2⟩ := Proof.knapsack_face_cor n hn
  exact ⟨KVar n, inferInstance, a, b, kProj n, Proof.card_kVar n, ha, hb, h1, h2⟩

/-- Adding items does not decrease the extension complexity of a knapsack polytope. -/
theorem xc_knapsack_mono : XcKnapsackMono := fun f a a' b ha ha' =>
  Proof.xc_knapsack_mono f a a' b ha ha'

/-- There are 0-1 knapsack polytopes with `N` items and extension complexity at least
`(3/2) ^ ⌊√(N/2)⌋`. -/
theorem xc_knapsack : XcKnapsack := fun N hN => by
  obtain ⟨a, b, ha, hb, h⟩ := Proof.xc_knapsack_lt N hN
  exact ⟨a, b, ha, hb, fun k hk => (h k hk).1⟩

/-- There are unbounded knapsack polytopes with `N` items and extension complexity at least
`(3/2) ^ ⌊√(N/2)⌋`. -/
theorem xc_unboundedKnapsack : XcUnboundedKnapsack := fun N hN => by
  obtain ⟨a, b, ha, hb, h⟩ := Proof.xc_knapsack_lt N hN
  exact ⟨a, b, ha, hb, fun k hk => (h k hk).2⟩
Formal verification — ✅ all 8 formal results are kernel-checked

Checked at commit d80d607ebce9. The formal statement is machine-checked; that it matches the prose is checked by review. What “checked” means.

Lean knapsackPolytope · ◇ elaborated · source

Definition in Lean
/-- The **0-1 knapsack polytope** of the weights `a` and the capacity `b`: the convex hull of the
0/1 vectors `x` with `∑ v, a v * x v ≤ b`. -/
def knapsackPolytope {V : Type*} [Fintype V] (a : V → ℝ) (b : ℝ) : Set (V → ℝ) :=
  convexHull ℝ {x | (∀ v, x v = 0 ∨ x v = 1) ∧ ∑ v, a v * x v ≤ b}

Lean unboundedKnapsack · ◇ elaborated · source

Definition in Lean
/-- The **unbounded knapsack polytope** of the weights `a` and the capacity `b`: the convex hull
of the vectors `x` of natural numbers with `∑ v, a v * x v ≤ b`. -/
def unboundedKnapsack {V : Type*} [Fintype V] (a : V → ℝ) (b : ℝ) : Set (V → ℝ) :=
  convexHull ℝ {x | (∀ v, ∃ k : ℕ, x v = k) ∧ ∑ v, a v * x v ≤ b}

Lean aggregation_weights · ✅ kernel-checked · source

Statement in Lean
/-- There are positive real weights without integer relations. -/
theorem aggregation_weights : AggregationWeights

where AggregationWeights is (source):

/-- **Weights without integer relations.** For every `m` there are `m` positive real numbers
such that the only integer combination that vanishes is the trivial one. With such weights, an
integer solution of the weighted sum of `m` equations with integer coefficients solves every
equation. -/
def AggregationWeights : Prop :=
  ∀ m : ℕ, ∃ w : Fin m → ℝ, (∀ c, 0 < w c) ∧
    ∀ d : Fin m → ℤ, ∑ c, w c * d c = 0 → ∀ c, d c = 0

Lean knapsack_valid · ✅ kernel-checked · source

Statement in Lean
/-- The knapsack inequality is valid for both knapsack polytopes. -/
theorem knapsack_valid : KnapsackValid

where KnapsackValid is (source):

/-- **The knapsack inequality is valid** for the 0-1 knapsack polytope and for the unbounded
knapsack polytope. So the points of the polytope where it is tight form a face. -/
def KnapsackValid : Prop :=
  ∀ {V : Type u} [Fintype V] (a : V → ℝ) (b : ℝ),
    (∀ x ∈ knapsackPolytope a b, ∑ v, a v * x v ≤ b) ∧
      ∀ x ∈ unboundedKnapsack a b, ∑ v, a v * x v ≤ b

Lean knapsack_face_cor · ✅ kernel-checked · source

Statement in Lean
/-- A knapsack polytope with `(3 n ^ 2 + n) / 2` items has a face that projects onto the
correlation polytope. -/
theorem knapsack_face_cor : KnapsackFaceCor

where KnapsackFaceCor is (source):

/-- **A face of a knapsack polytope that projects onto the correlation polytope.** For every
`n ≥ 1` there are positive weights `a` and a positive capacity `b` for `(3 n ^ 2 + n) / 2` items
and a linear map `π` such that `π` maps the face `∑ v, a v * x v = b` of the 0-1 knapsack
polytope onto the correlation polytope of an `n`-element set, and likewise the face of the
unbounded knapsack polytope. -/
def KnapsackFaceCor : Prop :=
  ∀ n : ℕ, 1 ≤ n → ∃ (V : Type) (_ : Fintype V) (a : V → ℝ) (b : ℝ)
    (π : (V → ℝ) →ₗ[ℝ] Matrix (Fin n) (Fin n) ℝ),
    2 * Fintype.card V = 3 * n ^ 2 + n ∧ (∀ v, 0 < a v) ∧ 0 < b ∧
      π '' (knapsackPolytope a b ∩ {x | ∑ v, a v * x v = b}) = corPolytope (Fin n) ∧
      π '' (unboundedKnapsack a b ∩ {x | ∑ v, a v * x v = b}) = corPolytope (Fin n)

Lean xc_knapsack_mono · ✅ kernel-checked · source

Statement in Lean
/-- Adding items does not decrease the extension complexity of a knapsack polytope. -/
theorem xc_knapsack_mono : XcKnapsackMono

where XcKnapsackMono is (source):

/-- **Adding items.** If the weights `a'` extend the weights `a` along an embedding of the items
and are nonnegative, the extension complexity of the knapsack polytope of `a` is at most that of
`a'`, for the same capacity, in the 0-1 case and in the unbounded case. -/
def XcKnapsackMono : Prop :=
  ∀ {V : Type u} {W : Type v} [Fintype V] [Fintype W] (f : V ↪ W) (a : V → ℝ) (a' : W → ℝ)
    (b : ℝ), (∀ v, a' (f v) = a v) → (∀ w, 0 ≤ a' w) →
      xc (knapsackPolytope a b) ≤ xc (knapsackPolytope a' b) ∧
        xc (unboundedKnapsack a b) ≤ xc (unboundedKnapsack a' b)

Lean xc_knapsack · ✅ kernel-checked · source

Statement in Lean
/-- There are 0-1 knapsack polytopes with `N` items and extension complexity at least
`(3/2) ^ ⌊√(N/2)⌋`. -/
theorem xc_knapsack : XcKnapsack

where XcKnapsack is (source):

/-- **0-1 knapsack polytopes.** For every `N ≥ 2` there is a 0-1 knapsack polytope with `N`
items, positive weights and positive capacity whose extension complexity is at least
`(3/2) ^ ⌊√(N/2)⌋`. -/
def XcKnapsack : Prop :=
  ∀ N : ℕ, 2 ≤ N → ∃ (a : Fin N → ℝ) (b : ℝ), (∀ i, 0 < a i) ∧ 0 < b ∧
    ∀ k : ℕ, (k : ℝ) < (3 / 2) ^ Nat.sqrt (N / 2) → (k : ℕ∞) < xc (knapsackPolytope a b)

Lean xc_unboundedKnapsack · ✅ kernel-checked · source

Statement in Lean
/-- There are unbounded knapsack polytopes with `N` items and extension complexity at least
`(3/2) ^ ⌊√(N/2)⌋`. -/
theorem xc_unboundedKnapsack : XcUnboundedKnapsack

where XcUnboundedKnapsack is (source):

/-- **Unbounded knapsack polytopes.** For every `N ≥ 2` there is an unbounded knapsack polytope
with `N` items, positive weights and positive capacity whose extension complexity is at least
`(3/2) ^ ⌊√(N/2)⌋`. -/
def XcUnboundedKnapsack : Prop :=
  ∀ N : ℕ, 2 ≤ N → ∃ (a : Fin N → ℝ) (b : ℝ), (∀ i, 0 < a i) ∧ 0 < b ∧
    ∀ k : ℕ, (k : ℝ) < (3 / 2) ^ Nat.sqrt (N / 2) → (k : ℕ∞) < xc (unboundedKnapsack a b)

AI use. The formalization and this page were developed with Claude (Anthropic) under the author’s direction and review, on top of the shared entry Extended formulations: the core and the entry Exponential lower bounds for polytopes in combinatorial optimization.

Acknowledgements. This research was conducted in the context of the Agentic AI in Mathematics (EF-LiOpt-3) project at the Berlin Mathematics Research Center MATH+^+ (EXC-2046/2, project ID 390685689), funded by the Deutsche Forschungsgemeinschaft (DFG, German Research Foundation) under Germany’s Excellence Strategy. This work has been partially supported by OpenAI’s Academic Researchers program.

License: CC BY 4.0

Comments.

Comments are external content (GitHub Discussions, shown with giscus) and need JavaScript.

References
  1. Pokutta, S., & Van Vyve, M. (2013). A note on the extension complexity of the knapsack polytope. Operations Research Letters, 41(4), 347–350. 10.1016/j.orl.2013.03.010
  2. Bienstock, D. (2008). Approximate formulations for 0-1 knapsack sets. Operations Research Letters, 36(3), 317–320. 10.1016/j.orl.2007.09.003
  3. Avis, D., & Tiwary, H. R. (2015). On the extension complexity of combinatorial polytopes. Mathematical Programming, 153(1), 95–115. 10.1007/s10107-014-0764-2