Skip to main navigation Skip to search Skip to main content

Playing Snake on a Graph

Research output: Chapter in Book/Report/Conference proceedingConference contributionAcademicpeer-review

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.
Original languageEnglish
Title of host publicationGraph-Theoretic Concepts in Computer Science
Subtitle of host publication51st International Workshop, WG 2025, Otzenhausen, Germany, June 11–13, 2025, Revised Selected Papers
EditorsHenning Fernau, Philipp Kindermann
Place of PublicationCham
PublisherSpringer
Pages230-243
Number of pages14
Edition1
ISBN (Electronic)978-3-032-11835-6
ISBN (Print)978-3-032-11834-9
DOIs
Publication statusPublished - 2026
Event51st International Workshop on Graph-Theoretic Concepts in Computer Science, WG 2025 - Europäische Akademie Otzenhausen, Otzenhausen, Germany
Duration: 11 Jun 202513 Jun 2025
Conference number: 51
https://algo.uni-trier.de/wg2025/

Publication series

NameLecture Notes in Computer Science
PublisherSpringer
Volume16124 LNCS
ISSN (Print)0302-9743
ISSN (Electronic)1611-3349

Conference

Conference51st International Workshop on Graph-Theoretic Concepts in Computer Science, WG 2025
Abbreviated titleWG 2025
Country/TerritoryGermany
CityOtzenhausen
Period11/06/2513/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.

Cite this