Documentation

CslibFrontier.Algorithms.WordRAM.OddCycleTransversal.Layout

Input encoding and workspace layout for Word-RAM odd cycle transversal #

This module collects the pure input encoding (encodeAdjMatrix, encodeInput) and linear workspace address offsets shared across the OddCycleTransversal Word-RAM implementation, including the (2n + 2)-vertex split-network node indices inIdx and outIdx.

Main definitions #

Main results #

Input encoding and workspace layout #

Row-major n * n-word 0/1 adjacency matrix of G : SimpleGraph (Fin n).

@[reducible, inline]

Number of vertices n + n + 2 in the vertex-split network of an n-vertex graph.

Output address storing the 0/1 transversal indicator of vertex v (3 + n * n + v).

Output address storing the 0/1 proper colouring bit of vertex v (3 + n * n + n + v).

@[reducible, inline]

Base address of the 0/1 transversal indicator slice.

@[reducible, inline]

Base address of the 0/1 proper colouring slice.

@[reducible, inline]

Base address of the candidate-set W indicator slice.

@[reducible, inline]

Base address of the compacted vertex list W.

@[reducible, inline]

Base address of the base-3 odometer digits for W.

@[reducible, inline]

Base address of the unpacked guess-role slice.

@[reducible, inline]

Base address of the keep-terminal indicator slice.

@[reducible, inline]

Base address of the flip-terminal indicator slice.

@[reducible, inline]

Base address of the flattened split-network flow matrix.

@[reducible, inline]

Base address of the BFS distance array.

@[reducible, inline]

Base address of the BFS parent array.

@[reducible, inline]

Base address of the extracted separator indicator array.

@[reducible, inline]

Total scratch words allocated past 3 + n * n.

Total memory frontier 5 * (n * n) + 21 * n + 11 (= 3 + n * n + octScratch n) used by the Word-RAM odd-cycle-transversal solver.

theorem Cslib.Algorithms.WordRAM.OddCycleTransversal.splitCount_sq (n : ℕ) :
(n + n + 2) * (n + n + 2) = 4 * (n * n) + 8 * n + 4

Expanded form of splitCount n * splitCount n.

In-vertex index v + 2 inside the (2n + 2)-vertex split network.

Out-vertex index v + n + 2 inside the (2n + 2)-vertex split network.