In mathematics and computer science, a pebble game is a type of mathematical game played by moving "pebbles" or "markers" on a directed graph. A variety of different pebble games exist. A general definition of pebbling is given below.
- Pebbling is a game that involves placing pebbles on the vertices of a directed acyclic graph G according to certain rules.
- A given step of the game consists of either placing a pebble on an empty vertex of G or removing a pebble from a previously pebbled vertex.
- A vertex may be pebbled only if all its predecessors have pebbles.
- The object 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( √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.
- A 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 descendant 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 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.
Graph pebbling: A certain number of pebbles are distributed among the vertices of an undirected graph; the goal is to move at least one to a particular target vertex. But to move one pebble to an adjacent vertex, another pebble at the same vertex must be discarded.
- J. Hopcroft, W. Paul and L. Valiant, On Time versus space, J. Assoc. Comput. Mach. 1977
- Richard J. Lipton and Robert E. Tarjan, Applications of a Planar Separator Theorem, SIAM J. Comput. 1980
- Noga Alon , Paul Seymour , Robin Thomas, A Separator Theorem for Graphs with an Excluded Minor and its Applications, ACM, 1990.
- Stephen Cook; Ravi Sethi (1976). "Storage requirements for deterministic polynomial time recognizable languages". Journal of Computer and System Sciences 13 (1): 25–37. doi:10.1016/S0022-0000(76)80048-7.
- Takumi Kasai; Akeo Adachi; Shigeki Iwata (1979). "Classes of pebble games and complete problems". SIAM Journal on Computing 8 (4): 574–586. doi:10.1137/0208046.
- Straubing, Howard (1994). Finite automata, formal logic, and circuit complexity. Progress in Theoretical Computer Science. Basel: Birkhäuser. pp. 39–44. ISBN 3-7643-3719-2. Zbl 0816.68086.
- Nicholas Pippenger. Pebbling. Technical Report RC 8258, IBM Watson Research Center, 1980. Appeared in Proceedings of the 5th IBM Symposium on Mathematical Foundations of Computer Science, Japan.
- Jakob Nordström. Pebble Games, Proof Complexity, and Time-Space Trade-offs. Logical Methods in Computer Science, volume 9, issue 3, article 15, September 2013.
- Grädel, Erich; Kolaitis, Phokion G.; Libkin, Leonid; Maarten, Marx; Spencer, Joel; Vardi, Moshe Y.; Venema, Yde; Weinstein, Scott (2007). Finite model theory and its applications. Texts in Theoretical Computer Science. An EATCS Series. Berlin: Springer-Verlag. ISBN 978-3-540-00428-8. Zbl 1133.03001.