Documentation

CslibFrontier.Computability.Pebbling.ReversiblePath

Reversible pebbling of the directed path #

Bennett's recursive strategy reversibly pebbles the directed path 0 → 1 → ⋯ with logarithmically many pebbles, and this is optimal. With k pebbles,

So the reversible pebbling price of v is ⌈log₂ (v + 2)⌉ and its persistent price is ⌈log₂ (v + 1)⌉ + 1, while the black pebbling price of every vertex other than the source is 2 (blackPebblingPrice_pathDigraph_succ).

Bennett's strategy. bennettMoves a k pebbles the block a, …, a + 2 ^ k - 1 of the path, given a pebble on a - 1 (or a = 0), and leaves only a + 2 ^ k - 1 pebbled. For k = 0 it places a pebble on a. For the block of length 2 ^ (k + 1), bennettMoves a (k + 1) first runs bennettMoves a k to pebble the midpoint a + 2 ^ k - 1, then bennettMoves (a + 2 ^ k) k to pebble the end, then plays the first run backwards to remove the midpoint. So bennettMoves a k uses k + 1 extra pebbles and 3 ^ k moves (bennettMoves_mTr, length_bennettMoves). In particular k + 1 pebbles reversibly pebble a path of 2 ^ k vertices in 3 ^ k moves, ending with only the last vertex pebbled (exists_mTr_bennett_pathDigraph). These are the procedures pebble(s, n) and unpebble(s, n) of [LTV98], Section 7, in the form that ends with a single pebble.

The lower bound. Write R_k for the configurations reachable with k pebbles. We prove by induction on k that every x in a configuration of R_k has x + 2 ≤ 2 ^ k (add_two_le_of_reversiblePebbleGame_pathDigraph_mTr), together with the bound 2 * (c + 1) ≤ 2 ^ k on its least element c (two_mul_min_add_one_le_of_reversiblePebbleGame_pathDigraph_mTr).

This proves the bound of [LTV98], Corollary 2 and Theorem 2(i), by a different route: they first characterize all reachable configurations (Theorem 1 and Corollary 1).

Index conventions. Vertex v of pathDigraph is node v + 1 of [LTV98], whose node 0 carries a permanent pebble that is not counted; the source 0 here plays the role of their freely toggled node 1. Their Corollary 2, that the maximum reachable node with n pebbles is 2 ^ n - 1, is reversiblePebblable_pathDigraph_iff.

Main definitions #

Main results #

References #

Bennett's strategy #

Bennett's strategy on the block a, …, a + 2 ^ k - 1 of the directed path: pebble the midpoint of the block recursively, pebble the second half recursively from it, then play the first run backwards to remove the midpoint.

theorem Cslib.Pebbling.bennettMoves_mTr (k : ℕ) {a : ℕ} {C : Finset ℕ} (hC : ∀ x ∈ C, x < a ∨ a + 2 ^ k ≤ x) (ha : ∀ (u : ℕ), pathDigraph.Adj u a → u ∈ C) :
(reversiblePebbleGame pathDigraph (C.card + k + 1)).MTr C (bennettMoves a k) (insert (a + 2 ^ k - 1) C)

Bennett's strategy. If the configuration C has no pebble on the block a, …, a + 2 ^ k - 1 and a pebble on a - 1 (or a = 0), then bennettMoves a k pebbles a + 2 ^ k - 1 and changes nothing else, using k + 1 pebbles beyond those of C.

Bennett's theorem on paths. k + 1 pebbles reversibly pebble the path of 2 ^ k vertices 0, …, 2 ^ k - 1 in 3 ^ k moves, ending with only the last vertex pebbled.

Upper bounds #

theorem Cslib.Pebbling.exists_mTr_insert_pathDigraph (k : ℕ) {a v : ℕ} {C : Finset ℕ} (hav : a ≤ v) (hv : v + 1 ≤ a + 2 ^ k) (hC : ∀ x ∈ C, x < a ∨ v < x) (ha : ∀ (u : ℕ), pathDigraph.Adj u a → u ∈ C) :
∃ (ms : List (Move ℕ)), (reversiblePebbleGame pathDigraph (C.card + k + 1)).MTr C ms (insert v C)

Pebbling any vertex v of the block a, …, a + 2 ^ k - 1 from C, ending with insert v C, with k + 1 extra pebbles.

Lower bounds #

The lower bound. Every pebble of a configuration reachable with k pebbles on the directed path lies at a vertex v with v + 2 ≤ 2 ^ k ([LTV98], Corollary 2).

The least pebble of a nonempty configuration reachable with k pebbles on the directed path lies at a vertex c with 2 * (c + 1) ≤ 2 ^ k.

Exact prices #

Reversible pebbling of the path. With k pebbles, a configuration containing v is reachable iff v + 2 ≤ 2 ^ k.

Persistent reversible pebbling of the path. With k pebbles, the configuration {v} is reachable iff 2 * (v + 1) ≤ 2 ^ k.

The reversible pebbling price of vertex v of the directed path is ⌈log₂ (v + 2)⌉.

The persistent reversible pebbling price of vertex v of the directed path is ⌈log₂ (v + 1)⌉ + 1.

Optimality of Bennett's strategy, visiting form. The last vertex 2 ^ k - 1 of a path of 2 ^ k vertices has reversible price k + 1: with k pebbles it cannot even be visited.

Optimality of Bennett's strategy. Ending with only the last vertex 2 ^ k - 1 of a path of 2 ^ k vertices pebbled costs exactly k + 1 pebbles, the budget of exists_mTr_bennett_pathDigraph.