Single-call RAM core of Baker's shifting technique
ProvedWilliamsonShmoys.baker_union_single_call_ramThis is the single-call version of the RAM core of Baker's shifting technique.
Let solver be a unit-cost RAM program that solves maximum weight independent set exactly on every instance whose graph has tree-width at most its parameter , within operations, as in baker_masked_best_of_runs_ram.
Then there is one RAM program and constants with the following property. For every and every instance with graph and Baker levels , let be the disjoint union of the masked graphs. Its vertex set is , and is adjacent to when and . Assume . Then the program halts within operations, outputs an independent set of , and for every and every independent set of the -th masked graph,
The intended implementation builds the single instance on vertices, with level- weights set to in copy , and runs solver once from a clean memory. Because is a disjoint union, the optimal set it returns is optimal in every copy, so the best copy can be read off. One call suffices: the solver specification only covers runs from a fresh input layout, so a second call could not start from clean memory.
Formalization Note. is SimpleGraph.fromRel on Fin k × Fin n with relation .
import Definitions.Def_WilliamsonShmoys_PlanarIndependentSetRAM import Definitions.Def_WilliamsonShmoys_BakerLevel import Definitions.Def_RobertsonSeymour1986_GM5_TreewidthLE set_option autoImplicit false open scoped BigOperators
theorem WilliamsonShmoys.baker_union_single_call_ram
(solver : List WilliamsonShmoys.PlanarRAMInstruction) (C₀ d₀ : ℕ) (hC₀ : 0 < C₀) (hd₀ : 0 < d₀)
(hsolver : ∀ (w n : ℕ) (edge : Fin n → Fin n → Bool) (weight : Fin n → ℝ),
let G := SimpleGraph.fromRel (fun u v => edge u v = true)
RobertsonSeymour1986.GM5.TreewidthLE G w →
∃ t : ℕ, t + 1 ≤ C₀ * 2 ^ (d₀ * w) * (n + 1) ^ 2 ∧
let result := WilliamsonShmoys.planarRAMRun solver (WilliamsonShmoys.planarRAMInput n w edge weight) t
solver[result.pc]? = some WilliamsonShmoys.PlanarRAMInstruction.halt ∧
(∀ i : Fin n, result.natMem (2 + n * n + i.val) ≤ 1) ∧
G.IsIndepSet (WilliamsonShmoys.planarRAMOutput n result : Set (Fin n)) ∧
∀ S : Finset (Fin n), G.IsIndepSet (S : Set (Fin n)) →
∑ i ∈ S, weight i ≤ ∑ i ∈ WilliamsonShmoys.planarRAMOutput n result, weight i) :
∃ (program : List WilliamsonShmoys.PlanarRAMInstruction) (C d : ℕ),
0 < C ∧ 0 < d ∧
∀ (k : ℕ), 0 < k →
∀ (n : ℕ) (edge : Fin n → Fin n → Bool) (weight : Fin n → ℝ),
let G := SimpleGraph.fromRel (fun u v => edge u v = true)
RobertsonSeymour1986.GM5.TreewidthLE
(SimpleGraph.fromRel (fun (x y : Fin k × Fin n) => x.1 = y.1 ∧
G.Adj x.2 y.2 ∧ WilliamsonShmoys.bakerLevel G x.2 % k ≠ x.1.val ∧
WilliamsonShmoys.bakerLevel G y.2 % k ≠ x.1.val))
(3 * k) →
∃ t : ℕ, t + 1 ≤ C * 2 ^ (d * k) * (n + 1) ^ 2 ∧
let result := WilliamsonShmoys.planarRAMRun program (WilliamsonShmoys.planarRAMInput n k edge weight) t
program[result.pc]? = some WilliamsonShmoys.PlanarRAMInstruction.halt ∧
(∀ i : Fin n, result.natMem (2 + n * n + i.val) ≤ 1) ∧
G.IsIndepSet (WilliamsonShmoys.planarRAMOutput n result : Set (Fin n)) ∧
∀ j < k, ∀ S : Finset (Fin n),
(SimpleGraph.fromRel (fun u v => G.Adj u v ∧
WilliamsonShmoys.bakerLevel G u % k ≠ j ∧ WilliamsonShmoys.bakerLevel G v % k ≠ j)).IsIndepSet
(S : Set (Fin n)) →
∑ i ∈ S, (if WilliamsonShmoys.bakerLevel G i % k ≠ j then weight i else 0) ≤
∑ i ∈ WilliamsonShmoys.planarRAMOutput n result, weight i := by sorry