Documentation

CslibFrontier.Algorithms.WordRAM.Hungarian.Argmin

Minimum-slack unused-column scan (argminCode) #

Internal O(n) subroutine computing hgArgmin for one Hungarian alternating-tree round.

Compute hgArgmin s into rj1 and its slack into rdelta.

theorem Cslib.Algorithms.WordRAM.Hungarian.exec_argminCode {w n bC M W : ℕ} {c : Fin n × Fin n → ℤ} {r : Fin n} {s : Lean.MaxFlow.HgState n} {bestRow : Fin n → Fin n} (hSI : Lean.MaxFlow.HgStepInv c W r s bestRow) (x : WordRAM.Data 28) (hb : BaseRegs n bC M x) (hSM : StepMem bC s bestRow x.mem) (hfit : WordRAM.Fits w (bC + n * n + 8 * n + 2 * W + 2)) :
∃ (y : WordRAM.Data 28) (j₁ : Fin n), WordRAM.ExecWithin w argminCode x y (13 * n + 5) ∧ (∀ (i : Fin 28), ↑i < 18 → y.regs i = x.regs i) ∧ y.mem = x.mem ∧ Lean.MaxFlow.hgArgmin s = some j₁ ∧ y.regs Reg.rj1 = ↑j₁ ∧ y.regs Reg.rdelta = (Lean.MaxFlow.vget s.minv j₁).toNat