Reachable configurations of reversible pebbling on the path #
Li, Tromp and Vitányi characterize every configuration reachable in Bennett's reversible pebble
game on the directed path ([LTV98], Section 7, Theorem 1 and Corollary 1). Here the
game is reversiblePebbleGame pathDigraph n, and a configuration C leaves f = n - #C pebbles
free.
- A placed pebble
xis available (PathAvailable C f x) if the path start, or another pebble ofC, lies at most2 ^ fpositions to its left. Bennett's procedure then removesxwith theffree pebbles and changes nothing else, and its reverse placesx(PathAvailable.exists_mTr_remove,PathAvailable.exists_mTr_place). LTV count such a removal as one big step (PathRemoval). Cis weakly solvable if some sequence of big steps frees every pebble, and strongly solvable if no sequence of big steps gets stuck before every pebble is free. LTV's Theorem 1 says that the two notions coincide (PathWeaklySolvable.pathStronglySolvable).- A removal numbering numbers the pebbles of
Cbyf, …, n - 1so that pebbleihas a higher-numbered pebble, or the path start, at most2 ^ ipositions to its left (IsPathRemovalNumbering). LTV's Corollary 1 says thatCis reachable from∅exactly when it has one (exists_reversiblePebbleGame_pathDigraph_mTr_iff).
Index conventions. As in CslibFrontier.Computability.Pebbling.ReversiblePath, vertex v is
LTV's node v + 1. Their permanently pebbled node 0 is not counted and becomes the path start,
at position -1; LTV number it ∞. So "the path start lies at most 2 ^ i positions to the left
of x" reads x + 1 ≤ 2 ^ i.
Proof. A weakly solvable configuration is reachable, since its big steps played backwards are
runs. Conversely, each move of the game places or removes a pebble whose predecessor is pebbled,
hence an available pebble. Placing one keeps the configuration weakly solvable. Removing one keeps
it weakly solvable by the key step of Theorem 1, IsPathRemovalNumbering.erase_of_pathAvailable:
pebbles numbered below the removed pebble move up by one, and a pebble whose witness was the
removed pebble follows the chain of witnesses to the left (IsPathRemovalNumbering.chain). The
distances along the chain add up to at most 2 ^ (i + 1), which is LTV's estimate.
Deciding reachability. By Theorem 1, removing the least available pebble until none is left
frees every pebble exactly when the configuration is weakly solvable (pathGreedySolvable). This
makes reachability and the existence of a removal numbering decidable, and decide checks small
instances.
Main definitions #
Cslib.Pebbling.PathAvailable C f x: the pebble onxcan be removed withffree pebbles.Cslib.Pebbling.PathRemoval n: one big step, removing an available pebble.Cslib.Pebbling.PathWeaklySolvable n C,Cslib.Pebbling.PathStronglySolvable n C: weak and strong solvability.Cslib.Pebbling.IsPathRemovalNumbering n C σ,Cslib.Pebbling.HasPathRemovalNumbering n C: removal numberings.Cslib.Pebbling.pathGreedySolvable: the greedy test.
Main results #
Cslib.Pebbling.PathAvailable.exists_mTr_place,Cslib.Pebbling.PathAvailable.exists_mTr_remove: big steps are runs of the game.Cslib.Pebbling.PathWeaklySolvable.pathStronglySolvable: LTV's Theorem 1.Cslib.Pebbling.pathWeaklySolvable_iff_hasPathRemovalNumbering: weak solvability is the existence of a removal numbering.Cslib.Pebbling.exists_reversiblePebbleGame_pathDigraph_mTr_iff: LTV's Corollary 1.Cslib.Pebbling.add_one_add_two_pow_le_of_reversiblePebbleGame_pathDigraph_mTr: withffree pebbles, every pebblevsatisfiesv + 1 + 2 ^ f ≤ 2 ^ n.
References #
- M. Li, J. Tromp, P. Vitányi, Reversible simulation of irreversible computation by pebble games, Section 7, Theorem 1 and Corollaries 1 and 2.
Available pebbles and solvability #
C is strongly solvable with n pebbles: it fits in the budget and every configuration that
big steps reach from C is empty or allows another big step. Each big step removes a pebble, so
every maximal sequence of big steps frees every pebble.
σ is a removal numbering of C with n pebbles: it numbers the pebbles of C by
n - #C, …, n - 1 so that each pebble x has a higher-numbered pebble, or the path start, at
most 2 ^ σ x positions to its left ([LTV98], Corollary 1). The numbering is an
order in which big steps can remove the pebbles.
- injOn : Set.InjOn σ ↑C
Distinct pebbles get distinct numbers.
Numbers are at least the number of free pebbles.
Numbers are below the budget.
The path start, or a higher-numbered pebble, is close enough on the left.
Big steps are runs #
An available pebble can be removed using the free pebbles.
Numberings #
Removing the pebble with the least number leaves a removal numbering.
Following the witnesses to the left from a pebble y numbered below j, either the path
start or a pebble numbered at least j is close: the distances along the chain add up to at most
2 ^ j - 2 ^ σ y.
The key step of [LTV98], Theorem 1. Removing any available pebble x
leaves a removal numbering: the pebbles numbered below x move up by one.
Weak and strong solvability #
The empty configuration is weakly solvable.
Adding a pebble to a weakly solvable configuration, where it is available, gives a weakly solvable configuration.
Numbering the pebbles in the order of a solving sequence of big steps gives a removal numbering.
Removing the pebbles in the order of a removal numbering is a solving sequence of big steps.
The key step of [LTV98], Theorem 1. Removing any available pebble from a weakly solvable configuration gives a weakly solvable configuration.
[LTV98], Theorem 1. Every weakly solvable configuration is strongly solvable.
A strongly solvable configuration is weakly solvable.
Reachable configurations #
A weakly solvable configuration is reachable: play its big steps backwards.
A pebble whose predecessor is pebbled, or the source, is available.
One move of the game keeps a configuration weakly solvable.
Every reachable configuration is weakly solvable.
The reachable configurations are the weakly solvable ones.
Reachable configurations of reversible pebbling on the path ([LTV98],
Corollary 1). With n pebbles, a configuration C is reachable from ∅ iff its pebbles can be
numbered n - #C, …, n - 1 so that each pebble x has a higher-numbered pebble, or the path
start, at most 2 ^ σ x positions to its left.
With n pebbles and f = n - #C free pebbles, every pebble v of a reachable configuration
C satisfies v + 1 + 2 ^ f ≤ 2 ^ n. With f = 0 this is the bound v + 2 ≤ 2 ^ n of
add_two_le_of_reversiblePebbleGame_pathDigraph_mTr, and with C = {v} it is
persistentReversiblePebblable_pathDigraph_iff's 2 * (v + 1) ≤ 2 ^ n.
Deciding reachability #
Correctness of the greedy test. With at least #C rounds, the greedy test accepts exactly
the weakly solvable configurations. By Theorem 1, removing an available pebble never loses
solvability.
By Corollary 1, reachability on the path is decidable through removal numberings.