While this submission is a draft, it cannot be used by other submissions.

The auxiliary problem is NP-complete

Lax391470.Lemma2 · concepts/Lax391470/Lemma2.lean · lax-391470

proven

Loading review…

Sign in with ORCID

Community review

Flags

Each flag is tied to a public ORCID identity and explains why this concept may be incorrect.

No flags have been submitted.

    Community review

    Flag this concept

    State precisely what appears incorrect. This explanation will be public under your ORCID name.

    No source line selected.

    Natural Language Statement

    Theorem

    For any two integer job lengths p>q>1p > q > 1, the problem AUX(p,q)\mathrm{AUX}(p, q) is NP-complete.

    Hardness is by reduction from satisfiability of formulas in conjunctive normal form. A satisfying assignment yields a solution in which the sections of the false literals are delayed by one unit: every clause has a true literal, whose section is not delayed and whose clause block is active, and at that block the chain of connected pairs of the clause can switch from completing short jobs early to completing long jobs early. Conversely, in any solution every job runs inside its own block, one of the sections of xix_i and ¬xi\neg x_i is delayed for every ii, and a chain of clause blocks can be scheduled only if it passes an active block in a section that is not delayed; setting the literals of the delayed sections to false satisfies the formula.

    The assumption q>1q > 1 is needed: one unit of delay must not leave room for a short job.

    Concept map
    12 concepts; 1 descendant hidden
    100%
    Proven claimDefinitionThis conceptRelated conceptA → B: B builds on A
    Evidence

    Lean source view on GitHub

    1import Lax391470.BinaryEncoding
    2import Lax391470.SatConstruction
    3import Lax429075.Reductions
    4import Lax429075.Satisfiability
    5
    6/-!
    7---
    8title: The auxiliary problem is NP-complete
    9type: theorem
    10---
    11For any two integer job lengths p>q>1p > q > 1, the problem AUX(p,q)\mathrm{AUX}(p, q) is
    12NP-complete.
    13
    14Hardness is by reduction from satisfiability of formulas in conjunctive normal form. A
    15satisfying assignment yields a solution in which the sections of the false literals are
    16delayed by one unit: every clause has a true literal, whose section is not delayed and
    17whose clause block is active, and at that block the chain of connected pairs of the
    18clause can switch from completing short jobs early to completing long jobs early.
    19Conversely, in any solution every job runs inside its own block, one of the sections of
    20xix_i and ¬xi\neg x_i is delayed for every ii, and a chain of clause blocks can be
    21scheduled only if it passes an active block in a section that is not delayed; setting
    22the literals of the delayed sections to false satisfies the formula.
    23
    24The assumption q>1q > 1 is needed: one unit of delay must not leave room for a short job.
    25
    26# Formalization notes
    27
    28A reduction is a function on all words. A word that does not encode a formula is sent to
    29the encoding of a fixed instance without a solution: a single ordinary short job that is
    30due at time 00.
    31
    32The statements separate what is asserted. The first two concern one map on words: that
    33it preserves and reflects membership, and that a Turing machine computes it in
    34polynomial time. NP-hardness follows from them and the Cook–Levin theorem, which the
    35archive proves. Membership in NP is a further statement, and NP-completeness is the
    36conjunction.
    37-/
    38
    39namespace Lax391470.Lemma2
    40
    41open Lax391470.BinaryEncoding Lax434930.PolynomialTime
    42open Lax434930.NondeterministicPolynomialTime Lax429075.Reductions
    43
    44/-- An instance of the auxiliary problem without a solution, when `q ≥ 1`: one ordinary
    45short job, released and due at time `0`. -/
    46def blocked : AuxiliaryProblem.Instance where
    47 ordinary := 1
    48 r _ := 0
    49 d _ := 0
    50 long _ := false
    51 pairs := 0
    52 longEarly := Fin.elim0
    53 longDue := Fin.elim0
    54 shortEarly := Fin.elim0
    55 shortDue := Fin.elim0
    56
    57/-- **The reduction**, as a map on words: the encoding of a formula is sent to the
    58encoding of the instance built from it, and every other word to the encoding of
    59`blocked`. -/
    60def reduce (p q : ℕ) (w : Word) : Word :=
    61 match Lax429075.Encoding.decodeCNF w with
    62 | some F => encodeAux (SatConstruction.inst p q F)
    63 | none => encodeAux blocked
    64
    65/-- **The reduction is correct.** -/
    66axiom reduce_correct (p q : ℕ) (hq : 1 < q) (hqp : q < p) (w : Word) :
    67 w ∈ Lax429075.Satisfiability.SATreduce p q w ∈ AUX p q
    68
    69/-- **The reduction runs in polynomial time.** -/
    70axiom reduce_polyTime (p q : ℕ) :
    71 Nonempty (Turing.TM2ComputableInPolyTime id id (reduce p q))
    72
    73/-- For job lengths `p > q > 1`, `AUX(p, q)` is NP-hard. -/
    74axiom aux_npHard (p q : ℕ) (hq : 1 < q) (hqp : q < p) :
    75 ∀ A : Language, A ∈ NPManyOne A (AUX p q)
    76
    77/-- `AUX(p, q)` belongs to NP. -/
    78axiom aux_mem_NP (p q : ℕ) : AUX p q ∈ NP
    79
    80/-- **Lemma 2.** For job lengths `p > q > 1`, `AUX(p, q)` is NP-complete. -/
    81axiom aux_npComplete (p q : ℕ) (hq : 1 < q) (hqp : q < p) : NPComplete (AUX p q)
    82
    83end Lax391470.Lemma2
    84
    Show ProofShow ProofShow ProofShow ProofShow Proof
    Formalization notes

    A reduction is a function on all words. A word that does not encode a formula is sent to the encoding of a fixed instance without a solution: a single ordinary short job that is due at time 00.

    The statements separate what is asserted. The first two concern one map on words: that it preserves and reflects membership, and that a Turing machine computes it in polynomial time. NP-hardness follows from them and the Cook–Levin theorem, which the archive proves. Membership in NP is a further statement, and NP-completeness is the conjunction.

    Discussion

    Ask a question or add context. Endorsements and structured flags are kept in the review panel above.

    Loading discussion…