Theorem 5.5 (correctness) — the algorithm of Figure 1 solves 1‖ΣC^A_i : f^B_max ≤ Q
ProvedTwoAgentSched.TotalMax.theorem_5_5Consider the problem with positive processing times and nondecreasing -cost functions , and the algorithm of Figure 1: building the schedule backwards, with the total length of the unscheduled jobs, place last any unscheduled -job with if there is one, otherwise a longest unscheduled -job, and stop with "no solution exists" if neither is possible. Then:
- if the instance is feasible, every schedule the algorithm can produce, under any tie-breaking, is optimal;
- the algorithm can run to completion (some schedule of all jobs obeys its rule) if and only if the instance is feasible.
This is the correctness of the paper's algorithm for the unweighted problem.
Formalization Note The paper's Theorem 5.5 states that the problem can be solved in time ; the running time is not formalized, only the correctness of the algorithm as Figure 1 and the text before Theorem 5.5 describe it. The algorithm is the property IsFig1Seq of a finished sequence.
import Mathlib import Definitions.Def_TwoAgentSched_TotalMax_Rules
namespace TwoAgentSched.TotalMax
/-- Theorem 5.5, correctness half (Agnetis et al. 2004, §5.2, p. 234): the algorithm of
Figure 1 solves `1‖ΣC^A_i : f^B_max ≤ Q`.
1. On a feasible instance, every schedule of all jobs that the algorithm can produce (any
tie-breaking) is optimal.
2. The algorithm runs to completion (some schedule of all jobs satisfies its rule) if and only
if the instance is feasible.
The running time `O(n_A log n_A + n_B log n_B)` is not formalized. -/
theorem theorem_5_5 {nA nB : ℕ} (p : TwoAgentSched.MaxMax.Job nA nB → ℝ) (hp : ∀ j, 0 < p j)
(fB : Fin nB → ℝ → ℝ) (hfB : ∀ k, Monotone (fB k)) (Q : ℝ) :
(IsFeasibleInstance p fB Q →
∀ l : List (TwoAgentSched.MaxMax.Job nA nB), MooreLateJobs.Shared.IsSchedule Finset.univ l →
IsFig1Seq p fB Q l → IsOptimal p fB Q l) ∧
((∃ l : List (TwoAgentSched.MaxMax.Job nA nB), MooreLateJobs.Shared.IsSchedule Finset.univ l ∧
IsFig1Seq p fB Q l) ↔ IsFeasibleInstance p fB Q) := by sorry
end TwoAgentSched.TotalMax
Confirmed by the mission captain (proposal self-audit).
Confirmed by the moderator at approval.