Pebble game

In mathematics and computer science, a pebble game is a type of mathematical game played by placing "pebbles" or "markers" on a directed acyclic graph according to certain rules:
 * A given step of the game consists of either placing a pebble on an empty vertex or removing a pebble from a previously pebbled vertex.
 * A vertex may be pebbled only if all its predecessors have pebbles.
 * The objective of the game is to successively pebble each vertex of G (in any order) while minimizing the number of pebbles that are ever on the graph simultaneously.

Running time
The trivial solution is to pebble an n-vertex graph in n steps using n pebbles. Hopcroft, Paul and Valiant showed that any vertex of an n-vertex graph can be pebbled with O(n/log n) pebbles where the constant depends on the maximum in-degree. This enabled them to prove that DTIME(f(n)) is contained in DSPACE(f(n)/log f(n)) for all time-constructible f. Lipton and Tarjan showed that any n-vertex planar acyclic directed graph with maximum in-degree k can be pebbled using O($\sqrt{n}$ + k log2 n) pebbles. They also proved that it is possible to obtain a substantial reduction in pebbles while preserving a polynomial bound on the number of pebbling steps with a theorem that any n-vertex planar acyclic directed graph with maximum in-degree k can be pebbled using O(n2/3 + k) pebbles in O(n5/3) time. Alon, Seymour and Thomas showed that any n-vertex acyclic directed graph with no kh-minor and with maximum in-degree k can be pebbled using O(h3/2 n1/2 + k log n) pebbles.

Variations
An extension of this game, known as "black-white pebbling", was developed by Stephen Cook and Ravi Sethi in a 1976 paper. It also adds white pebbles, which may be placed at any vertex at will, but can only be removed if all the vertex's immediate ancestor vertices are also pebbled. The goal remains to place a black pebble on the target vertex, but the pebbling of adjacent vertices may be done with pebbles of either color.

Takumi Kasai et al. developed a game in which a pebble may be moved along an edge-arrow to an unoccupied vertex only if a second pebble is located at a third, control vertex; the goal is to move a pebble to a target vertex. This variation makes the pebble game into a generalization of games such as Chinese checkers and Halma. They determined the computational complexity of the one-player and two-player versions of this game, and special cases thereof. In the two-player version, the players take turns moving pebbles. There may also be constraints on which pebbles a player can move.

Pebbling may be used to extend Ehrenfeucht–Fraïssé games.