Abstract
Snake is a classic computer game, which has been around for decades. Based on this game, we study the game of Snake on arbitrary undirected graphs. A snake forms a simple path that has to move to an apple while avoiding colliding with itself. When the snake reaches the apple, it grows longer, and a new apple appears. A graph on which the snake has a strategy to keep eating apples until it covers all the vertices of the graph is called snake-winnable.
We prove that determining whether a graph is snake-winnable is NP-hard, even when restricted to grid graphs. We fully characterize snake-winnable graphs for odd-sized bipartite graphs and graphs with vertex-connectivity 1. While Hamiltonian graphs are always snake-winnable, we show that non-Hamiltonian snake-winnable graphs have a girth of at most 6 and that this bound is tight.
We prove that determining whether a graph is snake-winnable is NP-hard, even when restricted to grid graphs. We fully characterize snake-winnable graphs for odd-sized bipartite graphs and graphs with vertex-connectivity 1. While Hamiltonian graphs are always snake-winnable, we show that non-Hamiltonian snake-winnable graphs have a girth of at most 6 and that this bound is tight.
| Original language | English |
|---|---|
| Title of host publication | Graph-Theoretic Concepts in Computer Science |
| Subtitle of host publication | 51st International Workshop, WG 2025, Otzenhausen, Germany, June 11–13, 2025, Revised Selected Papers |
| Editors | Henning Fernau, Philipp Kindermann |
| Place of Publication | Cham |
| Publisher | Springer |
| Pages | 230-243 |
| Number of pages | 14 |
| Edition | 1 |
| ISBN (Electronic) | 978-3-032-11835-6 |
| ISBN (Print) | 978-3-032-11834-9 |
| DOIs | |
| Publication status | Published - 2026 |
| Event | 51st International Workshop on Graph-Theoretic Concepts in Computer Science, WG 2025 - Europäische Akademie Otzenhausen, Otzenhausen, Germany Duration: 11 Jun 2025 → 13 Jun 2025 Conference number: 51 https://algo.uni-trier.de/wg2025/ |
Publication series
| Name | Lecture Notes in Computer Science |
|---|---|
| Publisher | Springer |
| Volume | 16124 LNCS |
| ISSN (Print) | 0302-9743 |
| ISSN (Electronic) | 1611-3349 |
Conference
| Conference | 51st International Workshop on Graph-Theoretic Concepts in Computer Science, WG 2025 |
|---|---|
| Abbreviated title | WG 2025 |
| Country/Territory | Germany |
| City | Otzenhausen |
| Period | 11/06/25 → 13/06/25 |
| Internet address |
Keywords
- 2026 OA procedure
Fingerprint
Dive into the research topics of 'Playing Snake on a Graph'. Together they form a unique fingerprint.Research output
- 1 Preprint
-
Playing Snake on a Graph
Graafsma, D., Manthey, B. & Skopalik, A., 26 Jun 2025, ArXiv.org.Research output: Working paper › Preprint › Academic
Open AccessFile28 Downloads (Pure)
Cite this
- APA
- Author
- BIBTEX
- Harvard
- Standard
- RIS
- Vancouver