Documentation

CslibFrontier.Algorithms.WordRAM.TreeDecomposition.IndependentSet.ProcessNodes

Bottom-up node-processing loop (processNodesProg) #

This module certifies processNodesProg, which visits all nonroot decomposition nodes numNodes, numNodes - 1, …, 1 in reverse index order, allocates the 2 ^ |LP|-word scratch array best, runs childPassProg and parentPassProg, preserves NodeLayout, maintains the telescoping entry bound prefixMaxSum tblList k ≤ (numNodes - k) * maxBagLen * maxWeight, and agrees pointwise with tablesInst.

Main definitions #

Main results #

Register arguments for processNodesProg.

  • numVerts : ℕ

    Number of graph vertices m.

  • adjPtr : ℕ

    Base memory address of the m × m adjacency matrix.

  • wtPtr : ℕ

    Base memory address of the m-word weight array.

  • parPtr : ℕ

    Base memory address of the (numNodes + 1)-word parent array.

  • descBase : ℕ

    Base memory address of the 4 * (numNodes + 1)-word node descriptor block.

  • numNodes : ℕ

    Number n of nonroot nodes (1 .. n).

Instances For
    theorem Cslib.Algorithms.WordRAM.TreeDecomposition.processNodesProg_spec {w : ℕ} (inst : MWISInstance) (descBase : ℕ) {s₁ : DataStructure.Memory.State} (hlay₁ : NodeLayout inst descBase (fun (i : Fin (inst.numNodes + 1)) => List.replicate (2 ^ (inst.bagAt i).length) 0) s₁) (hfit_peak : WordRAM.Fits w (s₁.frontier + inst.numNodes * 2 ^ inst.maxBagLen)) (hfit_val : WordRAM.Fits w ((inst.numNodes + 1) * inst.maxBagLen * inst.maxWeight)) :
    have m := inst.numVerts; let n := inst.numNodes; have M := inst.maxBagLen; have args := { numVerts := m, adjPtr := 3 + m, wtPtr := 3, parPtr := 3 + m + m * m, descBase := descBase, numNodes := n }; have s₂ := (DataStructure.Memory.spec 0).clientState s₁ (processNodesProg args); (DataStructure.Memory.spec w).ValidHistory s₁ ((DataStructure.Memory.spec w).clientHistory s₁ (processNodesProg args)) ∧ s₂.frontier ≤ s₁.frontier + n * 2 ^ M ∧ (∃ (tblFinal : Fin (n + 1) → List ℕ), NodeLayout inst descBase tblFinal s₂ ∧ prefixMaxSum tblFinal 0 ≤ n * (M * inst.maxWeight) ∧ ∀ (i : Fin (n + 1)), ∀ s < 2 ^ (inst.bagAt i).length, (tblFinal i).getD s 0 = (tablesInst inst.adj inst.wt n inst.parFin inst.bagAt n)[i].getD s 0) ∧ WordRAM.Realization.memoryCost (processNodesProg args) s₁ ≤ n * (10 + 2 ^ M * (5 * M ^ 2 + 5 * M + 7))

    Layout preservation, telescoping table-entry bound, agreement with tablesInst, and cost bound for processNodesProg.