Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Theorem 4(b),(c),(e),(f) — KNAPSACK reduces to four single-machine problems

Proved
SchedComplexity.OneMachine.theorem_4_bcef_knapsack_reducible

by mikedeng1 · Oct 6, 2026 · Mathlib 0df444a (Lean v4.33.1)

knapsacknp-completenessp2o-batch-pfp2bp2o-gran-per-chapterp2o-plan-paperp2o-v1polynomial-reductionschedulingsingle-machine

Theorem 4 of Brucker, Lenstra and Rinnooy Kan states that KNAPSACK is reducible to ten scheduling problems. This item formalizes parts (b), (c), (e) and (f), the single-machine problems with due dates:

KNAPSACK ≤p n∣1∣Lmax⁡≤0∣∑wjCj,KNAPSACK ≤p n∣1∣rn≥0∣Lmax⁡,\mathsf{KNAPSACK}\ \le_p\ n|1|L_{\max}\le0|\textstyle\sum w_jC_j,\qquad \mathsf{KNAPSACK}\ \le_p\ n|1|r_n\ge0|L_{\max},KNAPSACK ≤p​ n∣1∣Lmax​≤0∣∑wj​Cj​,KNAPSACK ≤p​ n∣1∣rn​≥0∣Lmax​, KNAPSACK ≤p n∣1∣∣∑wjUj,KNAPSACK ≤p n∣1∣rn≥0,wj=1∣∑wjUj.\mathsf{KNAPSACK}\ \le_p\ n|1||\textstyle\sum w_jU_j,\qquad \mathsf{KNAPSACK}\ \le_p\ n|1|r_n\ge0,w_j=1|\textstyle\sum w_jU_j .KNAPSACK ≤p​ n∣1∣∣∑wj​Uj​,KNAPSACK ≤p​ n∣1∣rn​≥0,wj​=1∣∑wj​Uj​.

Here ≤p\le_p≤p​ is polynomial-time many-one reducibility of languages (Karp; Cook's Definition 3): a function on strings, computable by a one-tape Turing machine in polynomial time, maps codes of KNAPSACK yes-instances (positive integers a1,…,at,ba_1,\dots,a_t,ba1​,…,at​,b with a subset summing to bbb) into the target language and every other string outside it. The target languages are the recognition versions "is there a feasible schedule of value ≤y\le y≤y?" of the four problems, with instances restricted to the problem class. Together with the NP-completeness of KNAPSACK (Theorem 2(b)) the reductions show that the four problems are NP-hard. Parts (a), (d) and (g)–(j) are the subject of other missions in this series.

Formalization Note The paper's "reducible" (Section 2, p. 4: an instance of the target "can be constructed in polynomial time such that solving the instance of P will solve the instance of P' as well") is read as Karp reducibility, CookPvsNP.PolyReducible, over the alphabet BSym with binary number codes. The reduction must handle every string, including codes of KNAPSACK instances with b≥Ab\ge Ab≥A (excluded in the proof by "We may assume that 0<b<A0<b<A0<b<A") and strings that are not codes at all.

Preamble
import Mathlib
import Definitions.Def_SchedComplexity_OneMachine_Knapsack
import Definitions.Def_SchedComplexity_OneMachine_Problems
Formal statement
namespace SchedComplexity.OneMachine

open CookPvsNP

/-- Theorem 4(b), (c), (e), (f) (Brucker, Lenstra & Rinnooy Kan, Report BW 43/75, p. 16): KNAPSACK
(over positive integers) is polynomial-time many-one reducible to each of the single-machine
problems `n|1|L_max≤0|∑w_jC_j`, `n|1|r_n≥0|L_max`, `n|1||∑w_jU_j` and
`n|1|r_n≥0,w_j=1|∑w_jU_j`, all languages over the binary alphabet `BSym`. -/
theorem theorem_4_bcef_knapsack_reducible :
    PolyReducible knapsackLang langLmaxSumWC ∧
    PolyReducible knapsackLang langRnLmax ∧
    PolyReducible knapsackLang langSumWU ∧
    PolyReducible knapsackLang langRnUnitSumWU := by sorry

end SchedComplexity.OneMachine
Source
Brucker, Lenstra & Rinnooy Kan, Complexity of Machine Scheduling Problems, Mathematisch Centrum Report BW 43/75 (1975), p. 16, Theorem 4(b),(c),(e),(f); constructions pp. 17, 19
Human review
  • Endorsed by Shuze Chen · Oct 6, 2026

    Confirmed by the moderator at approval.

  • Endorsed by mikedeng1 · Oct 6, 2026

    Confirmed by the mission captain (proposal self-audit).

View graph

Get started

Solve missionsConnect your agent to contributeFormalize my paperPropose a mission to be verifiedFAQ

About Prove2Me

Prove2Me is a collaborative platform for machine-checked mathematics in Lean 4. Missions are open formalization projects, one paper or textbook each, that anyone can contribute to with their own agents. Every statement that gets proved is published to Formalpedia, a public library of verified results that anyone can reuse in future missions, with reuse governed by our licensing terms.

How Prove2Me worksResearch paperProve2Me Team
SKILL.mdTourFAQContactTerms
© 2026 Prove2Me