Parallel machine scheduling with deadlines
AbbreviationParallel machine scheduling instances#✓fully proved
An instance of parallel machine scheduling with deadlines is a pair consisting of a finite list of jobs, each a pair \((p, d)\) of natural numbers giving its processing time \(p\) and deadline \(d\), and a natural number \(m\), the number of machines.
abbrev ParallelMachinesDeadlinesInstance := List (ℕ × ℕ) × ℕ
DefinitionFeasible schedules on parallel machines with deadlines#✓fully proved
An instance consisting of jobs \((p_1, d_1), \dots, (p_k, d_k)\), where job \(j\) has processing time \(p_j\) and deadline \(d_j\), and a number \(m\) of machines is feasible when there are start times \(s_1, \dots, s_k \in \mathbb{N}\) and machines \(\mu_1, \dots, \mu_k \in \{0, \dots, m - 1\}\) such that \(s_j + p_j \le d_j\) for every \(j\), and for all \(a \ne b\) with \(\mu_a = \mu_b\), either \(s_a + p_a \le s_b\) or \(s_b + p_b \le s_a\).
def ParallelMachinesDeadlinesFeasible
(i : ParallelMachinesDeadlinesInstance) : Prop :=
∃ start : List ℕ, start.length = i.1.length ∧
∃ machine : List ℕ, machine.length = i.1.length ∧
(∀ j < i.1.length, machine.getD j 0 < i.2) ∧
(∀ j < i.1.length, start.getD j 0 + (i.1.getD j (0, 0)).1 ≤ (i.1.getD j (0, 0)).2) ∧
∀ a < i.1.length, ∀ b < i.1.length, a < b → machine.getD a 0 = machine.getD b 0 →
start.getD a 0 + (i.1.getD a (0, 0)).1 ≤ start.getD b 0 ∨
start.getD b 0 + (i.1.getD b (0, 0)).1 ≤ start.getD a 0
abbrev ParallelMachinesDeadlinesInstance := List (ℕ × ℕ) × ℕ
WantedExt/Complexity/NPComplete/ParallelMachinesDeadlinesWanted.lean:46
Uses 1 · Used by 1
DefinitionThe PARALLEL MACHINES WITH DEADLINES decision problem#✓fully proved
This decision problem accepts a bitstring \(x\) exactly when \(x\) decodes, under the canonical bitstring encoding, to jobs \((p_1, d_1), \dots, (p_k, d_k)\) of natural numbers (processing times and deadlines) and a number \(m\) of machines for which there are start times \(s_1, \dots, s_k \in \mathbb{N}\) and machines \(\mu_1, \dots, \mu_k \in \{0, \dots, m - 1\}\) such that \(s_j + p_j \le d_j\) for every \(j\), and for all \(a \ne b\) with \(\mu_a = \mu_b\), either \(s_a + p_a \le s_b\) or \(s_b + p_b \le s_a\). It rejects every bitstring that does not decode.
noncomputable def parallelMachinesDeadlinesDec :
MetaMathlibExt.ComplexityTheory.DecisionProblem := fun x =>
match MetaMathlibExt.BitstringEncoding.bitDecode
(α := ParallelMachinesDeadlinesInstance) x with
| some i => decide (ParallelMachinesDeadlinesFeasible i)
| none => false
abbrev DecisionProblem := List Bool → Bool
MathlibExt/Computability/Complexity.lean:170
def bitDecode [BitstringEncoding α] (l : List Bool) : Option α := toEncoding.decode l
MathlibExt/Computability/Complexity.lean:58
abbrev ParallelMachinesDeadlinesInstance := List (ℕ × ℕ) × ℕ
WantedExt/Complexity/NPComplete/ParallelMachinesDeadlinesWanted.lean:46
def ParallelMachinesDeadlinesFeasible
(i : ParallelMachinesDeadlinesInstance) : Prop :=
∃ start : List ℕ, start.length = i.1.length ∧
∃ machine : List ℕ, machine.length = i.1.length ∧
(∀ j < i.1.length, machine.getD j 0 < i.2) ∧
(∀ j < i.1.length, start.getD j 0 + (i.1.getD j (0, 0)).1 ≤ (i.1.getD j (0, 0)).2) ∧
∀ a < i.1.length, ∀ b < i.1.length, a < b → machine.getD a 0 = machine.getD b 0 →
start.getD a 0 + (i.1.getD a (0, 0)).1 ≤ start.getD b 0 ∨
start.getD b 0 + (i.1.getD b (0, 0)).1 ≤ start.getD a 0
WantedExt/Complexity/NPComplete/ParallelMachinesDeadlinesWanted.lean:49
Uses 11 · Used by 1
TheoremPARALLEL MACHINES WITH DEADLINES is NP-complete#●ready to prove
The PARALLEL MACHINES WITH DEADLINES decision problem belongs to NP, and every decision problem in NP reduces to it by a polynomial-time many-one reduction.
public theorem_wanted parallelMachinesDeadlines_npComplete :
parallelMachinesDeadlinesDec ∈ MetaMathlibExt.ComplexityTheory.NP ∧
∀ L : MetaMathlibExt.ComplexityTheory.DecisionProblem,
L ∈ MetaMathlibExt.ComplexityTheory.NP →
Cslib.CookLevin.PolyManyOneRed L parallelMachinesDeadlinesDec
noncomputable def parallelMachinesDeadlinesDec :
MetaMathlibExt.ComplexityTheory.DecisionProblem := fun x =>
match MetaMathlibExt.BitstringEncoding.bitDecode
(α := ParallelMachinesDeadlinesInstance) x with
| some i => decide (ParallelMachinesDeadlinesFeasible i)
| none => false
WantedExt/Complexity/NPComplete/ParallelMachinesDeadlinesWanted.lean:61
def NP : DecisionComplexityClass :=
{ L | ∃ (p : Polynomial ℕ), ∃ R : (List Bool × List Bool) → Bool,
IsPolyTime R ∧
∀ x, L x ↔ ∃ w : List Bool, w.length ≤ p.eval x.length ∧ R (x, w) }
MathlibExt/Computability/Complexity.lean:200
abbrev DecisionProblem := List Bool → Bool
MathlibExt/Computability/Complexity.lean:170
def PolyManyOneRed (L₁ L₂ : MetaMathlibExt.ComplexityTheory.DecisionProblem) : Prop :=
∃ reduce : List Bool → List Bool,
MetaMathlibExt.ComplexityTheory.IsPolyTime reduce ∧ ∀ x, L₁ x = L₂ (reduce x)
CSLibExt/Computability/CookLevin.lean:396
Sources
- M. R. Garey and D. S. Johnson, Computers and Intractability (1979), PARALLEL MACHINE SCHEDULING WITH DEADLINES.
Loading dependency explorer…
The dependency explorer needs JavaScript and its graph data.