Computing the incoming-weight degree and trial schedule on the RAM
ProvedDirectedHamiltonicity.Main.InputRAM.preprocess_execdirected-hamiltonicityexact-exponential-algorithmslog-cost-ram
Suppose the RAM store contains the parsed records of a weighted directed multigraph with vertices and arcs, its endpoints and its target. Let be the largest input weight, let be the sampling degree of the normalized graph, and let be the specified sampling block size.
If the store fits in width and this width accommodates and the schedule, preprocessing retains the arc records and endpoints in the graph view and records , the saved target word and the trial count
Writing for the schedule subroutine's primitive step bound, preprocessing takes at most
steps. Every intermediate word fits the same width bound. The program preserves the output string and leaves memory above the input table zero.
Preamble
import Definitions.Def_DirectedHamiltonicity_ParityRAMInterfaces open DirectedHamiltonicity DirectedHamiltonicity.Main DirectedHamiltonicity.Main.InputRAM open TargetedSamplers TargetedSamplers.Structured TargetedSamplers.Structured.Word open Multidigraph Classical
Formal statement
theorem DirectedHamiltonicity.Main.InputRAM.preprocess_exec {τ : Tapes} {b n m : ℕ} {tail head : Fin m → Fin n} {w : Fin m → ℕ}
{s t : Fin n} {B : ℤ} (u : Store) (h : Parsed tail head w s t B u) (fit : u.Fits b) :
let W := Finset.univ.sup w
let hw : ∀ e, w e ≤ W := fun e => Finset.le_sup (Finset.mem_univ e)
let H : Multidigraph (Fin n) (Fin m) := ⟨tail,head⟩
let G := Multidigraph.normalizedGraph H w s t hw
let p := Multidigraph.normalizedWeight H w s t hw
let d := Multidigraph.samplingDegree G p
(W+1).size ≤ b → scheduleWidth n d ≤ b →
∃ z j, Exec τ (fun v => v.Fits b) preprocess u z j ∧ j ≤ preprocessWork n m W d ∧
GraphView (W := W) tail head w s t graphBase z ∧ z.mem 52 = d ∧ z.mem 53 = u.mem 1 ∧
z.mem 54 = samplingBlockSize n d*(n+4) ∧ z.out = u.out ∧
∀ a ≥ graphBase+(3*m+2), z.mem a=0 := by sorrySource
Auxiliary result for the log-cost RAM formalization of Proposition 4 in T. Koana and S. Kumabe, Breaking the 2^n barrier for directed hamiltonicity, STOC 2027 submission 811, PDF pp. 5 and 8–11. https://prove2.me/theorems/aa04b14a-8225-48c8-904c-8725ebdcac66