Basic #
Loads, makespans, the existence of list and LPT schedules, the attained optimum, relabeling.
theorem
GrahamLPT.sum_prefix_succ
{M : Type u_1}
[AddCommMonoid M]
{m n : ℕ}
(f : Fin n → M)
(σ : Fin n → Fin m)
(k : Fin n)
(i : Fin m)
:
Adding one job to a prefix sum, for arbitrary commutative additive values.
theorem
GrahamLPT.IsListSchedule.restrict
{m n N : ℕ}
(h : n ≤ N)
(p : Fin N → ℝ)
(σ : Fin N → Fin m)
(hσ : IsListSchedule p σ)
:
IsListSchedule (p ∘ Fin.castLE h) (σ ∘ Fin.castLE h)
A list schedule restricts to a list schedule of any initial segment of the jobs.
theorem
GrahamLPT.bs_exists_last_job_before
{m n : ℕ}
(p : Fin n → ℝ)
(σ : Fin n → Fin m)
(c : ℕ)
(i : Fin m)
(h : ∃ (j : Fin n), ↑j < c ∧ σ j = i)
:
∃ (k : Fin n), ↑k < c ∧ σ k = i ∧ loadBefore p σ c i = loadBefore p σ (↑k) i + p k
With a cutoff c: a machine with a job of index below c has a last such job.
theorem
GrahamLPT.bs_mul_loadBefore_le
{m n : ℕ}
(p : Fin n → ℝ)
(σ : Fin n → Fin m)
(hσ : IsListSchedule p σ)
(k : Fin n)
:
In a list schedule, m times the least load before k is at most the total length of the
jobs before k.
A least-loaded machine of a load vector (the greedy choice).
Equations
Instances For
The greedy loads after the first k jobs.
Equations
- GrahamLPT.greedyLoads p 0 = fun (x : Fin m) => 0
- GrahamLPT.greedyLoads p k.succ = fun (i : Fin m) => GrahamLPT.greedyLoads p k i + if i = GrahamLPT.leastLoadedMachine (GrahamLPT.greedyLoads p k) then if h : k < n then p ⟨k, h⟩ else 0 else 0
Instances For
theorem
GrahamLPT.bs_loadBefore_greedy
{m n : ℕ}
[NeZero m]
(p : Fin n → ℝ)
(k : ℕ)
:
k ≤ n → ∀ (i : Fin m), loadBefore p (fun (j : Fin n) => leastLoadedMachine (greedyLoads p ↑j)) k i = greedyLoads p k i
theorem
GrahamLPT.exists_isListSchedule
{m n : ℕ}
[NeZero m]
(p : Fin n → ℝ)
:
∃ (σ : Fin n → Fin m), IsListSchedule p σ
A list schedule exists.
theorem
GrahamLPT.exists_isLPTSchedule
{m n : ℕ}
[NeZero m]
(p : Fin n → ℝ)
:
∃ (σ : Fin n → Fin m), IsLPTSchedule p σ
An LPT schedule exists.