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 there are positive weights and a positive capacity for items such that the 0-1 knapsack polytope has extension complexity at least , and the same for the unbounded knapsack polytope, the convex hull of the feasible vectors of nonnegative integers. The proof embeds the correlation polytope . Its vertices are the integer solutions of the equations , and , which force . 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 . 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 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 by the entry Exponential lower bounds for polytopes in combinatorial optimization. A system of equations with 0/1 solutions describes the vertices 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 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 .
One equation instead of many¶
The powers of a positive transcendental number have this property, because an integer relation between them is a polynomial with integer coefficients that vanishes at . Here is the square of Liouville’s number , whose transcendence is in Mathlib. The paper takes algebraically independent reals. If , , are equations with integer coefficients, an integer vector satisfies exactly when it satisfies all 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 elements, the variables and for every and the variables , and for every pair , and the equations
In nonnegative integers, the first two families force and to be 0 or 1. The third then leaves one solution for every choice of and : since must be odd, exactly when , and . So the solutions correspond to the vectors , and all of them are 0/1 vectors. There are variables.
The face¶
The weight of a variable is the sum of times its coefficient over the equations , and . Every variable occurs in an equation, so the weights are positive. The face is the convex hull of the integer points with , and these are the solutions of the system, in the 0-1 case and in the unbounded case alike. The map sends to the matrix with the entries on the diagonal and off the diagonal, written linearly as ; on a solution this is .
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 the system has 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 items and extension complexity at least , 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¶
/-- 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
◇ elaborated definition (Lean v4.35.0) The 0-1 knapsack polytope —
Lemmata.KnapsackXC.knapsackPolytope(source)◇ elaborated definition (Lean v4.35.0) The unbounded knapsack polytope —
Lemmata.KnapsackXC.unboundedKnapsack(source)✓ kernel-checked (Lean v4.35.0) Observation 3.3 —
Lemmata.KnapsackXC.aggregation_weights(source)✓ kernel-checked (Lean v4.35.0) The knapsack inequality —
Lemmata.KnapsackXC.knapsack_valid(source)✓ kernel-checked (Lean v4.35.0) Theorem 3.5 —
Lemmata.KnapsackXC.knapsack_face_cor(source)✓ kernel-checked (Lean v4.35.0) Adding items —
Lemmata.KnapsackXC.xc_knapsack_mono(source)✓ kernel-checked (Lean v4.35.0) Corollary 3.6 —
Lemmata.KnapsackXC.xc_knapsack(source)✓ kernel-checked (Lean v4.35.0) Corollary 3.8 —
Lemmata.KnapsackXC.xc_unboundedKnapsack(source)
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 : AggregationWeightswhere 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 = 0Lean knapsack_valid · ✅ kernel-checked · source
Statement in Lean
/-- The knapsack inequality is valid for both knapsack polytopes. -/
theorem knapsack_valid : KnapsackValidwhere 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 ≤ bLean 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 : KnapsackFaceCorwhere 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 : XcKnapsackMonowhere 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 : XcKnapsackwhere 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 : XcUnboundedKnapsackwhere 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.
- 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
- Bienstock, D. (2008). Approximate formulations for 0-1 knapsack sets. Operations Research Letters, 36(3), 317–320. 10.1016/j.orl.2007.09.003
- 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