Documentation

CslibFrontier.Computability.Pebbling.Words

Black pebble configurations as words #

A configuration of the black pebble game on Fin N is a word of N bits, its indicator word Cslib.BitString.indicatorList, bit i recording whether vertex i carries a pebble. A legal move with at most s pebbles flips one bit (Cslib.Pebbling.wordStep): it clears a bit, or sets the bit of a vertex that is ready, meaning that all its predecessors carry pebbles. Readiness is a parameter, a Boolean test on words, so that a machine can evaluate it directly from its own description of the graph.

There are 2 ^ N configurations, so every reachable configuration is reachable within 2 ^ N moves, and the midpoint recursion of Savitch's theorem (Cslib.Reachability.reach) decides reachability in the game at depth N. In particular it decides whether a vertex is pebblable with s pebbles. A simulation that walks this recursion stores one configuration per level, instead of a whole pebbling strategy.

Main definitions #

Main results #

References #

Moves on words #

def Cslib.Pebbling.wordStep (ready : List Bool → ℕ → Bool) (s : ℕ) (u v : List Bool) :

One legal move with at most s pebbles, on words: v is u with one bit flipped, either cleared or set at a position that ready u declares ready, and v has at most s bits set.

theorem Cslib.Pebbling.wordStep_indicatorList_iff {N : ℕ} {G : Digraph (Fin N)} {ready : List Bool → ℕ → Bool} {s : ℕ} (hready : ∀ (C : Finset (Fin N)) (i : Fin N), ready (BitString.indicatorList C) ↑i = true ↔ ∀ (u : Fin N), G.Adj u i → u ∈ C) {C D : Finset (Fin N)} :

On configuration words, a step is a legal move that changes the configuration, when ready tests on configuration words that all predecessors carry pebbles.

theorem Cslib.Pebbling.reach_wordStep_iff_canReach {N : ℕ} {G : Digraph (Fin N)} {ready : List Bool → ℕ → Bool} {s : ℕ} (hready : ∀ (C : Finset (Fin N)) (i : Fin N), ready (BitString.indicatorList C) ↑i = true ↔ ∀ (u : Fin N), G.Adj u i → u ∈ C) {C D : Finset (Fin N)} :

Savitch's recursion decides reachability in the pebble game. Between configuration words, the midpoint recursion at depth N holds exactly when the game with s pebbles can move from one configuration to the other.

theorem Cslib.Pebbling.reach_wordStep_iff_blackPebblable {N : ℕ} {G : Digraph (Fin N)} {ready : List Bool → ℕ → Bool} {s : ℕ} (hready : ∀ (C : Finset (Fin N)) (i : Fin N), ready (BitString.indicatorList C) ↑i = true ↔ ∀ (u : Fin N), G.Adj u i → u ∈ C) {v : Fin N} :

Savitch's recursion decides black pebblability. From the zero word, the midpoint recursion at depth N reaches the word of the single pebble v exactly when v is pebblable with s pebbles.