Documentation

CslibFrontier.Algorithms.WordRAM.Auction

Bertsekas's auction algorithm on the word RAM #

This module re-exports the public problem instances from Auction.Instance and exposes the uniform standard-basis Word-RAM running-time theorems for Bertsekas's Gauss–Seidel ε-auction algorithm (Cslib.Algorithms.Lean.Assignment.auction and Cslib.Algorithms.Lean.Assignment.scaledAuction). The Memory.Prog implementation and proof are organized into focused submodules under CslibFrontier.Algorithms.WordRAM.Auction:

Main definitions #

Main results #

References #

theorem Cslib.Algorithms.WordRAM.Auction.exists_epsAuction_program :
∃ (r : ℕ) (K : ℕ), 0 < K ∧ ∃ (prog : WordRAM.Program WordRAM.Basis.standard r), ¬prog.ReadsWidth ∧ prog.IsRandFree ∧ (∀ {w C : ℕ} (inst : EpsInstance), 0 < inst.eps → (∀ (i j k : Fin inst.n), inst.cost (i, k) - inst.cost (i, j) ≤ ↑C) → WordRAM.Fits w inst.wordBound → ∃ (steps : ℕ), WordRAM.ExecutesList w prog (WordRAM.State.init inst.encode) inst.assignment steps ∧ steps ≤ K * (inst.n ^ 2 * (C / inst.eps + 1) + 1)) ∧ prog.ComputesListInTime (fun (x : ℕ) (inst : EpsInstance) => inst.encode) (fun (inst : EpsInstance) (x : ℕ) => K * (inst.n ^ 2 * (inst.rowSpread / inst.eps + 1) + 1)) (fun (inst : EpsInstance) (w : ℕ) => 0 < inst.eps ∧ WordRAM.Fits w inst.wordBound) EpsInstance.assignment

O(n² (C / ε + 1)) Word-RAM ε-auction (ExecutesList and Program.ComputesListInTime). There is a uniform deterministic width-blind standard-basis program (Program .standard r, ¬ prog.ReadsWidth, prog.IsRandFree) that, on inst.encode for any inst : EpsInstance with 0 < inst.eps, row cost ranges bounded by C, and Fits w inst.wordBound (w = O(log n + log M + log ε)), halts within K * (inst.n ^ 2 * (C / inst.eps + 1) + 1) instructions returning inst.assignment (n * eps-optimal by sum_auctionPerm_le and ε-complementary-slack by isEpsCompSlack_auctionPerm; [Ber88], §1).

theorem Cslib.Algorithms.WordRAM.Auction.exists_scaledAuction_program :
∃ (r : ℕ) (K : ℕ), 0 < K ∧ ∃ (prog : WordRAM.Program WordRAM.Basis.standard r), ¬prog.ReadsWidth ∧ prog.IsRandFree ∧ (∀ {w C : ℕ} (inst : Instance), (∀ (i j k : Fin inst.n), inst.cost (i, k) - inst.cost (i, j) ≤ ↑C) → WordRAM.Fits w inst.wordBound → ∃ (steps : ℕ), WordRAM.ExecutesList w prog (WordRAM.State.init inst.encode) inst.assignment steps ∧ steps ≤ K * (inst.n ^ 3 * C + inst.n ^ 2 + 1)) ∧ prog.ComputesListInTime (fun (x : ℕ) (inst : Instance) => inst.encode) (fun (inst : Instance) (x : ℕ) => K * (inst.n ^ 3 * inst.rowSpread + inst.n ^ 2 + 1)) (fun (inst : Instance) (w : ℕ) => WordRAM.Fits w inst.wordBound) Instance.assignment

O(n³ C + n²) Word-RAM exact (n + 1)-scaled integer assignment (ExecutesList and Program.ComputesListInTime). There is a uniform deterministic width-blind standard-basis program (Program .standard r, ¬ prog.ReadsWidth, prog.IsRandFree) that, on inst.encode for any inst : Instance with row cost ranges bounded by C and Fits w inst.wordBound (w = O(log n + log M)), halts within K * (inst.n ^ 3 * C + inst.n ^ 2 + 1) instructions returning the exact optimal assignment inst.assignment (sum_scaledAuctionPerm_le; [Ber88], §3).

theorem Cslib.Algorithms.WordRAM.Auction.exists_scaledMinCost_program :
∃ (r : ℕ) (K : ℕ), 0 < K ∧ ∃ (prog : WordRAM.Program WordRAM.Basis.standard r), ¬prog.ReadsWidth ∧ prog.IsRandFree ∧ (∀ {w C : ℕ} (inst : Instance), (∀ (i j k : Fin inst.n), inst.cost (i, k) - inst.cost (i, j) ≤ ↑C) → WordRAM.Fits w inst.wordBound → ∃ (steps : ℕ), WordRAM.Executes w prog (WordRAM.State.init inst.encode) inst.encodedMinCost steps ∧ steps ≤ K * (inst.n ^ 3 * C + inst.n ^ 2 + 1)) ∧ prog.ComputesInTime (fun (x : ℕ) (inst : Instance) => inst.encode) (fun (inst : Instance) (x : ℕ) => K * (inst.n ^ 3 * inst.rowSpread + inst.n ^ 2 + 1)) (fun (inst : Instance) (w : ℕ) => WordRAM.Fits w inst.wordBound) Instance.encodedMinCost

O(n³ C + n²) Word-RAM exact (n + 1)-scaled integer minimum assignment cost (Executes and Program.ComputesInTime). There is a uniform deterministic width-blind standard-basis program (Program .standard r, ¬ prog.ReadsWidth, prog.IsRandFree) that, on inst.encode for any inst : Instance with row cost ranges bounded by C and Fits w inst.wordBound (w = O(log n + log M)), halts within K * (inst.n ^ 3 * C + inst.n ^ 2 + 1) instructions returning inst.encodedMinCost (Signed.encode inst.minCost; [Ber88], §3).