LIPIcs, Volume 366

13th International Conference on Fun with Algorithms (FUN 2026)



Thumbnail PDF

Event

Editor

John Iacono
  • Université libre de Bruxelles, Belgium

Publication Details

  • published at: 2026-05-15
  • Publisher: Schloss Dagstuhl – Leibniz-Zentrum für Informatik
  • ISBN: 978-3-95977-417-8

Access Numbers

Documents

No documents found matching your filter selection.
Document
Complete Volume
LIPIcs, Volume 366, FUN 2026, Complete Volume

Authors: John Iacono


Abstract
LIPIcs, Volume 366, FUN 2026, Complete Volume

Cite as

13th International Conference on Fun with Algorithms (FUN 2026). Leibniz International Proceedings in Informatics (LIPIcs), Volume 366, pp. 1-752, Schloss Dagstuhl – Leibniz-Zentrum für Informatik (2026)


Copy BibTex To Clipboard

@Proceedings{iacono:LIPIcs.FUN.2026,
  title =	{{LIPIcs, Volume 366, FUN 2026, Complete Volume}},
  booktitle =	{13th International Conference on Fun with Algorithms (FUN 2026)},
  pages =	{1--752},
  series =	{Leibniz International Proceedings in Informatics (LIPIcs)},
  ISBN =	{978-3-95977-417-8},
  ISSN =	{1868-8969},
  year =	{2026},
  volume =	{366},
  editor =	{Iacono, John},
  publisher =	{Schloss Dagstuhl -- Leibniz-Zentrum f{\"u}r Informatik},
  address =	{Dagstuhl, Germany},
  URL =		{https://drops.dagstuhl.de/entities/document/10.4230/LIPIcs.FUN.2026},
  URN =		{urn:nbn:de:0030-drops-257975},
  doi =		{10.4230/LIPIcs.FUN.2026},
  annote =	{Keywords: LIPIcs, Volume 366, FUN 2026, Complete Volume}
}
Document
Front Matter
Front Matter, Table of Contents, Preface, Conference Organization

Authors: John Iacono


Abstract
Front Matter, Table of Contents, Preface, Conference Organization

Cite as

13th International Conference on Fun with Algorithms (FUN 2026). Leibniz International Proceedings in Informatics (LIPIcs), Volume 366, pp. 0:i-0:xvi, Schloss Dagstuhl – Leibniz-Zentrum für Informatik (2026)


Copy BibTex To Clipboard

@InProceedings{iacono:LIPIcs.FUN.2026.0,
  author =	{Iacono, John},
  title =	{{Front Matter, Table of Contents, Preface, Conference Organization}},
  booktitle =	{13th International Conference on Fun with Algorithms (FUN 2026)},
  pages =	{0:i--0:xvi},
  series =	{Leibniz International Proceedings in Informatics (LIPIcs)},
  ISBN =	{978-3-95977-417-8},
  ISSN =	{1868-8969},
  year =	{2026},
  volume =	{366},
  editor =	{Iacono, John},
  publisher =	{Schloss Dagstuhl -- Leibniz-Zentrum f{\"u}r Informatik},
  address =	{Dagstuhl, Germany},
  URL =		{https://drops.dagstuhl.de/entities/document/10.4230/LIPIcs.FUN.2026.0},
  URN =		{urn:nbn:de:0030-drops-257965},
  doi =		{10.4230/LIPIcs.FUN.2026.0},
  annote =	{Keywords: Front Matter, Table of Contents, Preface, Conference Organization}
}
Document
Finding Maximum and Minimum Size Matrices: The Algorithmic Complexity of Coding Challenges

Authors: Abdelrahman Abdelmonsef, Xingyu Dong, Daniel Průša, Michael Wehar, and Chen Xu


Abstract
We investigate coding challenge problems related to finding a maximum (or minimum) size match for a predetermined two-dimensional pattern. We improve upon known runtime results by introducing new algorithms and refining existing algorithmic techniques. First, we present our main result which introduces a nearly quadratic time algorithm for the problem of finding a rectangular block within a matrix of maximum (or minimum) size containing only positive border entries which improves the prior cubic time solution. Then, we introduce a quadratic time and linear space algorithm for the problem of finding all rectangular blocks containing only positive border and empty interior entries. Finally, we present a log(n) factor improvement for detecting the largest length such that all square blocks in a matrix have their sums bounded by a given number.

Cite as

Abdelrahman Abdelmonsef, Xingyu Dong, Daniel Průša, Michael Wehar, and Chen Xu. Finding Maximum and Minimum Size Matrices: The Algorithmic Complexity of Coding Challenges. In 13th International Conference on Fun with Algorithms (FUN 2026). Leibniz International Proceedings in Informatics (LIPIcs), Volume 366, pp. 1:1-1:10, Schloss Dagstuhl – Leibniz-Zentrum für Informatik (2026)


Copy BibTex To Clipboard

@InProceedings{abdelmonsef_et_al:LIPIcs.FUN.2026.1,
  author =	{Abdelmonsef, Abdelrahman and Dong, Xingyu and Pr\r{u}\v{s}a, Daniel and Wehar, Michael and Xu, Chen},
  title =	{{Finding Maximum and Minimum Size Matrices: The Algorithmic Complexity of Coding Challenges}},
  booktitle =	{13th International Conference on Fun with Algorithms (FUN 2026)},
  pages =	{1:1--1:10},
  series =	{Leibniz International Proceedings in Informatics (LIPIcs)},
  ISBN =	{978-3-95977-417-8},
  ISSN =	{1868-8969},
  year =	{2026},
  volume =	{366},
  editor =	{Iacono, John},
  publisher =	{Schloss Dagstuhl -- Leibniz-Zentrum f{\"u}r Informatik},
  address =	{Dagstuhl, Germany},
  URL =		{https://drops.dagstuhl.de/entities/document/10.4230/LIPIcs.FUN.2026.1},
  URN =		{urn:nbn:de:0030-drops-257203},
  doi =		{10.4230/LIPIcs.FUN.2026.1},
  annote =	{Keywords: Pattern Matching, Matrices, Discrete Algorithms}
}
Document
Man, These New York Times Games Are Hard! A Computational Perspective

Authors: Alessandro Giovanni Alberti, Flavio Chierichetti, Mirko Giacchini, Daniele Muscillo, Alessandro Panconesi, and Erasmo Tani


Abstract
The New York Times (NYT) games have found widespread popularity in recent years and reportedly account for an increasing fraction of the newspaper’s readership. In this paper, we bring the computational lens to the study of New York Times games and consider four of them not previously studied: Letter Boxed, Pips, Strands and Tiles. We show that these games can be just as hard as they are fun. In particular, we characterize the hardness of several variants of computational problems related to these popular puzzle games. For Letter Boxed, we show that deciding whether an instance is solvable is in general NP-Complete, while in some parameter settings it can be done in polynomial time. Similarly, for Pips we prove that deciding whether a puzzle has a solution is NP-Complete even in some restricted classes of instances. We then show that one natural computational problem arising from Strands is NP-Complete in most parameter settings. Finally, we demonstrate that deciding whether a Tiles puzzle is solvable with a single, uninterrupted combo requires polynomial time.

Cite as

Alessandro Giovanni Alberti, Flavio Chierichetti, Mirko Giacchini, Daniele Muscillo, Alessandro Panconesi, and Erasmo Tani. Man, These New York Times Games Are Hard! A Computational Perspective. In 13th International Conference on Fun with Algorithms (FUN 2026). Leibniz International Proceedings in Informatics (LIPIcs), Volume 366, pp. 2:1-2:23, Schloss Dagstuhl – Leibniz-Zentrum für Informatik (2026)


Copy BibTex To Clipboard

@InProceedings{alberti_et_al:LIPIcs.FUN.2026.2,
  author =	{Alberti, Alessandro Giovanni and Chierichetti, Flavio and Giacchini, Mirko and Muscillo, Daniele and Panconesi, Alessandro and Tani, Erasmo},
  title =	{{Man, These New York Times Games Are Hard! A Computational Perspective}},
  booktitle =	{13th International Conference on Fun with Algorithms (FUN 2026)},
  pages =	{2:1--2:23},
  series =	{Leibniz International Proceedings in Informatics (LIPIcs)},
  ISBN =	{978-3-95977-417-8},
  ISSN =	{1868-8969},
  year =	{2026},
  volume =	{366},
  editor =	{Iacono, John},
  publisher =	{Schloss Dagstuhl -- Leibniz-Zentrum f{\"u}r Informatik},
  address =	{Dagstuhl, Germany},
  URL =		{https://drops.dagstuhl.de/entities/document/10.4230/LIPIcs.FUN.2026.2},
  URN =		{urn:nbn:de:0030-drops-257219},
  doi =		{10.4230/LIPIcs.FUN.2026.2},
  annote =	{Keywords: NP-Hardness, Puzzles, Games, New York Times, Pips, Letter Boxed, Strands, Tiles}
}
Document
Hive Is PSPACE-Hard

Authors: Daniël I. Andel and Benjamin G. Rin


Abstract
Hive is an abstract strategy game played on a table with hexagonal pieces. First published in 2001, it was and continues to be highly popular among both casual and competitive players. In this paper, we show that for a suitably generalized version of the game, the computational problem of determining whether a given player in an arbitrary position has a winning strategy is PSPACE-hard. We do this by reduction from Formula Game, which is first reduced to an intermediate problem we call Formula Game Geography, after which the latter is reduced to our decision problem.

Cite as

Daniël I. Andel and Benjamin G. Rin. Hive Is PSPACE-Hard. In 13th International Conference on Fun with Algorithms (FUN 2026). Leibniz International Proceedings in Informatics (LIPIcs), Volume 366, pp. 3:1-3:20, Schloss Dagstuhl – Leibniz-Zentrum für Informatik (2026)


Copy BibTex To Clipboard

@InProceedings{andel_et_al:LIPIcs.FUN.2026.3,
  author =	{Andel, Dani\"{e}l I. and Rin, Benjamin G.},
  title =	{{Hive Is PSPACE-Hard}},
  booktitle =	{13th International Conference on Fun with Algorithms (FUN 2026)},
  pages =	{3:1--3:20},
  series =	{Leibniz International Proceedings in Informatics (LIPIcs)},
  ISBN =	{978-3-95977-417-8},
  ISSN =	{1868-8969},
  year =	{2026},
  volume =	{366},
  editor =	{Iacono, John},
  publisher =	{Schloss Dagstuhl -- Leibniz-Zentrum f{\"u}r Informatik},
  address =	{Dagstuhl, Germany},
  URL =		{https://drops.dagstuhl.de/entities/document/10.4230/LIPIcs.FUN.2026.3},
  URN =		{urn:nbn:de:0030-drops-257221},
  doi =		{10.4230/LIPIcs.FUN.2026.3},
  annote =	{Keywords: Computational complexity, Combinatorial games, Hive, PSPACE-hardness, Formula Game, Generalized Geography}
}
Document
The Closed Hull Game and the Closed Interval Game

Authors: Samuel N. Araújo, Fabrício Benevides, Nicolas Martins, Nicolas Nisse, and Rudini Sampaio


Abstract
Given a set S of vertices in a graph G, its geodesic interval is the set I(S) containing S and all vertices on a shortest path between vertices of S. A set S is convex if I(S) = S. Moreover, the convex hull ℋ(S) of S is the smallest convex set containing S. In 1984, Harary introduced convexity games where two players, Alice and Bob, alternately select vertices of a graph G = (V,E) such that, if the set of already selected vertices is S, the next player can only select a vertex in V ⧵ I(S) (closed interval game) or in V ⧵ ℋ(S) (closed hull game). Normal and misère versions of these games have been studied and here, we introduced the optimization variants of them. Formally, given a graph G and k ∈ ℕ, Alice wins if the game ends after at most k vertices have been selected and Bob wins otherwise. The corresponding problem consists of determining which player has a winning strategy. We prove that the closed interval optimization game is PSPACE-complete in graphs with diameter 4 and that the closed hull optimization game is NP-hard in bipartite graphs and in split graphs. On the positive side, we prove that both games can be solved in polynomial time in trees and that the closed hull optimization game can be solved in polynomial time in cobipartite graphs. We conjecture that the closed interval optimization game is NP-hard in cobipartite graphs and that the closed hull optimization game is PSPACE-complete in general graphs.

Cite as

Samuel N. Araújo, Fabrício Benevides, Nicolas Martins, Nicolas Nisse, and Rudini Sampaio. The Closed Hull Game and the Closed Interval Game. In 13th International Conference on Fun with Algorithms (FUN 2026). Leibniz International Proceedings in Informatics (LIPIcs), Volume 366, pp. 4:1-4:12, Schloss Dagstuhl – Leibniz-Zentrum für Informatik (2026)


Copy BibTex To Clipboard

@InProceedings{araujo_et_al:LIPIcs.FUN.2026.4,
  author =	{Ara\'{u}jo, Samuel N. and Benevides, Fabr{\'\i}cio and Martins, Nicolas and Nisse, Nicolas and Sampaio, Rudini},
  title =	{{The Closed Hull Game and the Closed Interval Game}},
  booktitle =	{13th International Conference on Fun with Algorithms (FUN 2026)},
  pages =	{4:1--4:12},
  series =	{Leibniz International Proceedings in Informatics (LIPIcs)},
  ISBN =	{978-3-95977-417-8},
  ISSN =	{1868-8969},
  year =	{2026},
  volume =	{366},
  editor =	{Iacono, John},
  publisher =	{Schloss Dagstuhl -- Leibniz-Zentrum f{\"u}r Informatik},
  address =	{Dagstuhl, Germany},
  URL =		{https://drops.dagstuhl.de/entities/document/10.4230/LIPIcs.FUN.2026.4},
  URN =		{urn:nbn:de:0030-drops-257232},
  doi =		{10.4230/LIPIcs.FUN.2026.4},
  annote =	{Keywords: Combinatorial games in graphs, graph convexity, PSPACE}
}
Document
Token Positional Games

Authors: Guillaume Bagan, Quentin Deschamps, Florian Galliot, Mirjana Mikalački, and Nacim Oijid


Abstract
The classical Maker-Breaker positional game is played on a board which is a hypergraph ℋ, with two players, Maker and Breaker, alternately claiming vertices of ℋ until all the vertices are claimed. When the game ends, Maker wins if she has claimed all the vertices of some edge of ℋ; otherwise, Breaker wins. Playing this game in real life can be done by placing tokens on the vertices of the board. In this paper, we study the unfortunate case in which one or both players do not have enough tokens to cover all the vertices and, as such, will have to move their tokens around at some point instead of placing new ones. There may be a bias, in that Maker and Breaker do not necessarily have the same amount of tokens. The present paper initiates the study of this generalization of positional games, called token positional games. A particularly interesting case is when Maker has a winning strategy in the classical game: what is the lowest number of tokens with which she still wins against Breaker’s unlimited stock? We notably show that, for k-uniform hypergraphs on an arbitrarily large number n of vertices, this number equals k if k ∈ {2,3} but can vary from k to Ω(n) if k ≥ 4. From an algorithmic point of view, PSPACE-hardness in general is inherited from classical positional games, but we get a polynomial-time algorithm to solve the case where Breaker only has one token. We also establish EXPTIME-completeness for a "token sliding" variation of the game.

Cite as

Guillaume Bagan, Quentin Deschamps, Florian Galliot, Mirjana Mikalački, and Nacim Oijid. Token Positional Games. In 13th International Conference on Fun with Algorithms (FUN 2026). Leibniz International Proceedings in Informatics (LIPIcs), Volume 366, pp. 5:1-5:22, Schloss Dagstuhl – Leibniz-Zentrum für Informatik (2026)


Copy BibTex To Clipboard

@InProceedings{bagan_et_al:LIPIcs.FUN.2026.5,
  author =	{Bagan, Guillaume and Deschamps, Quentin and Galliot, Florian and Mikala\v{c}ki, Mirjana and Oijid, Nacim},
  title =	{{Token Positional Games}},
  booktitle =	{13th International Conference on Fun with Algorithms (FUN 2026)},
  pages =	{5:1--5:22},
  series =	{Leibniz International Proceedings in Informatics (LIPIcs)},
  ISBN =	{978-3-95977-417-8},
  ISSN =	{1868-8969},
  year =	{2026},
  volume =	{366},
  editor =	{Iacono, John},
  publisher =	{Schloss Dagstuhl -- Leibniz-Zentrum f{\"u}r Informatik},
  address =	{Dagstuhl, Germany},
  URL =		{https://drops.dagstuhl.de/entities/document/10.4230/LIPIcs.FUN.2026.5},
  URN =		{urn:nbn:de:0030-drops-257240},
  doi =		{10.4230/LIPIcs.FUN.2026.5},
  annote =	{Keywords: positional games, token games, hypergraphs, algorithmic complexity}
}
Document
Ferry Cover with Connectivity Constraints

Authors: Niranjan Balachandran, Ankita Dargad, Urban Larsson, Neeldhara Misra, and Umesh Shankar


Abstract
The classical Ferry Cover problem asks for the minimum boat capacity needed to transport all vertices of a graph across a river such that no edge remains on either bank at any time - a requirement that the banks induce stable (independent) sets. We study a natural generalization in which the banks must satisfy an arbitrary graph property. For hereditary properties such as acyclicity or planarity, we show that the structural characterization of small-boat and large-boat graphs established by Csorba, Hurkens, and Woeginger extends directly. We then turn to the connected-bank variant, where the property of interest - connectedness - is not hereditary: both banks must induce connected subgraphs throughout the transfer. We provide a complete characterization of graphs that can be transferred with a boat of size one (boat-1 graphs): a connected graph is boat-1 if and only if its block-cut tree is a path. This characterization yields a linear-time recognition algorithm. As a consequence, we show that every biconnected graph is boat-1, since such graphs admit an st-numbering. We also develop an efficient algorithm for determining the boat number of trees. Our work opens new directions for river-crossing problems under non-hereditary bank constraints.

Cite as

Niranjan Balachandran, Ankita Dargad, Urban Larsson, Neeldhara Misra, and Umesh Shankar. Ferry Cover with Connectivity Constraints. In 13th International Conference on Fun with Algorithms (FUN 2026). Leibniz International Proceedings in Informatics (LIPIcs), Volume 366, pp. 6:1-6:19, Schloss Dagstuhl – Leibniz-Zentrum für Informatik (2026)


Copy BibTex To Clipboard

@InProceedings{balachandran_et_al:LIPIcs.FUN.2026.6,
  author =	{Balachandran, Niranjan and Dargad, Ankita and Larsson, Urban and Misra, Neeldhara and Shankar, Umesh},
  title =	{{Ferry Cover with Connectivity Constraints}},
  booktitle =	{13th International Conference on Fun with Algorithms (FUN 2026)},
  pages =	{6:1--6:19},
  series =	{Leibniz International Proceedings in Informatics (LIPIcs)},
  ISBN =	{978-3-95977-417-8},
  ISSN =	{1868-8969},
  year =	{2026},
  volume =	{366},
  editor =	{Iacono, John},
  publisher =	{Schloss Dagstuhl -- Leibniz-Zentrum f{\"u}r Informatik},
  address =	{Dagstuhl, Germany},
  URL =		{https://drops.dagstuhl.de/entities/document/10.4230/LIPIcs.FUN.2026.6},
  URN =		{urn:nbn:de:0030-drops-257253},
  doi =		{10.4230/LIPIcs.FUN.2026.6},
  annote =	{Keywords: ferry cover, river crossing, block-cut tree, st-numbering, hereditary graph property, connectivity}
}
Document
Nemesis, an Escape Game in Graphs

Authors: Pierre Bergé, Antoine Dailly, and Yan Gerard


Abstract
We define a new escape game in graphs that we call Nemesis. The game is played on a graph having a subset of vertices labeled as exits and the goal of one of the two players, called the fugitive, is to reach one of these exit vertices. The second player, i.e. the fugitive adversary, is called the Nemesis. Her goal is to trap the fugitive in a connected component which does not contain any exit. At each round of the game, the fugitive moves from one vertex to an adjacent vertex. Then the Nemesis deletes one edge anywhere in the graph. The game ends when either the fugitive reached an exit or when he is in a connected component that does not contain any exit. In trees and graphs of maximum degree bounded by 3, Nemesis can be solved in linear time. For arbitrary graphs, we show that Nemesis is PSPACE-complete, and that it is NP-hard on planar multigraphs. We extend our results to the related Cat Herding problem, proving its PSPACE-completeness.

Cite as

Pierre Bergé, Antoine Dailly, and Yan Gerard. Nemesis, an Escape Game in Graphs. In 13th International Conference on Fun with Algorithms (FUN 2026). Leibniz International Proceedings in Informatics (LIPIcs), Volume 366, pp. 7:1-7:22, Schloss Dagstuhl – Leibniz-Zentrum für Informatik (2026)


Copy BibTex To Clipboard

@InProceedings{berge_et_al:LIPIcs.FUN.2026.7,
  author =	{Berg\'{e}, Pierre and Dailly, Antoine and Gerard, Yan},
  title =	{{Nemesis, an Escape Game in Graphs}},
  booktitle =	{13th International Conference on Fun with Algorithms (FUN 2026)},
  pages =	{7:1--7:22},
  series =	{Leibniz International Proceedings in Informatics (LIPIcs)},
  ISBN =	{978-3-95977-417-8},
  ISSN =	{1868-8969},
  year =	{2026},
  volume =	{366},
  editor =	{Iacono, John},
  publisher =	{Schloss Dagstuhl -- Leibniz-Zentrum f{\"u}r Informatik},
  address =	{Dagstuhl, Germany},
  URL =		{https://drops.dagstuhl.de/entities/document/10.4230/LIPIcs.FUN.2026.7},
  URN =		{urn:nbn:de:0030-drops-257261},
  doi =		{10.4230/LIPIcs.FUN.2026.7},
  annote =	{Keywords: Graphs, Evasion and Pursuit Games, PSPACE-completeness, Quantified SAT, Canadian Traveler Problem, Cat Herding Problem}
}
Document
Directed Grabbing Games or How to Politely Grab the Maximum Number of Olives in a Reception

Authors: Jean-Claude Bermond, Michel Cosnard, Frédéric Havet, Takako Kodate, and Stéphane Pérennes


Abstract
We introduce and study the directed grabbing game, a directed variation of the graph grabbing game played by two players Alice and Bob on a weighted acyclic digraph D. Alice plays first and then they play alternately. At a given odd (resp. even) move, Alice (resp. Bob) chooses a sink, that is a vertex of out-degree 0, grabs the weight (olives) on it and then removes the vertex. The aim of each player is to grab a maximum weight, i.e. a maximum number of olives. This game is inspired by the behaviour that guests are expected to adopt during a reception or cocktail party. We first consider the case where hors d'oeuvre are arranged on slightly spaced parallel lines, such that politeness allows one to take the first hors d'oeuvre from each line. This corresponds to the directed grabbing game on a union of disjoint directed paths. We give an algorithm that, given a weighted digraph D of order n which is the union of q disjoint directed paths, computes an optimal play in O(nlog q) time. Then we consider the "pissaladière case" where the digraph D is a directed (p× q)-grid. We show that, depending on the parity of pq, one player, called Content, has a strategic advantage. Specifically, Content is Alice when pq is odd and Bob when pq is even. We present some strategies that enable Content to remove some large sets of vertices (of order pq/2) in directed grids. We then derive that Content can remove any given vertex that is not in the border of the grid. Finally, in the case where each vertex contains either zero or one olive, we prove that Content can secure the grabbing of around one third of the olives.

Cite as

Jean-Claude Bermond, Michel Cosnard, Frédéric Havet, Takako Kodate, and Stéphane Pérennes. Directed Grabbing Games or How to Politely Grab the Maximum Number of Olives in a Reception. In 13th International Conference on Fun with Algorithms (FUN 2026). Leibniz International Proceedings in Informatics (LIPIcs), Volume 366, pp. 8:1-8:19, Schloss Dagstuhl – Leibniz-Zentrum für Informatik (2026)


Copy BibTex To Clipboard

@InProceedings{bermond_et_al:LIPIcs.FUN.2026.8,
  author =	{Bermond, Jean-Claude and Cosnard, Michel and Havet, Fr\'{e}d\'{e}ric and Kodate, Takako and P\'{e}rennes, St\'{e}phane},
  title =	{{Directed Grabbing Games or How to Politely Grab the Maximum Number of Olives in a Reception}},
  booktitle =	{13th International Conference on Fun with Algorithms (FUN 2026)},
  pages =	{8:1--8:19},
  series =	{Leibniz International Proceedings in Informatics (LIPIcs)},
  ISBN =	{978-3-95977-417-8},
  ISSN =	{1868-8969},
  year =	{2026},
  volume =	{366},
  editor =	{Iacono, John},
  publisher =	{Schloss Dagstuhl -- Leibniz-Zentrum f{\"u}r Informatik},
  address =	{Dagstuhl, Germany},
  URL =		{https://drops.dagstuhl.de/entities/document/10.4230/LIPIcs.FUN.2026.8},
  URN =		{urn:nbn:de:0030-drops-257273},
  doi =		{10.4230/LIPIcs.FUN.2026.8},
  annote =	{Keywords: grabbing games, paths, directed grids}
}
Document
MIDTERM Is a Deterministic Technique to Exit Recursive Mazes

Authors: Charles Bouillaguet and Orel Cosseron


Abstract
A recursive maze is a maze that contains copies of itself (that themselves contain copies of themselves, etc.). To exit the maze or reach the goal, each recursive block that has been entered must be exited. These once-popular puzzles are difficult to solve by hand, and this begs for an algorithmic solution. It has been observed many times in the past that a recursive maze can be represented by a deterministic pushdown automaton. Finding a path, possibly the shortest, that leads to an exit therefore reduces to finding a word in a context-free language described by such an automaton. The problem is well-known to be decidable, and there is a classical algorithm for this task. We present a new algorithm, Midterm, with improved complexity compared to existing solutions. Midterm improves on a previous attempt called Longterm (Obviously Not a Good Technique to Exit Recursive Mazes).

Cite as

Charles Bouillaguet and Orel Cosseron. MIDTERM Is a Deterministic Technique to Exit Recursive Mazes. In 13th International Conference on Fun with Algorithms (FUN 2026). Leibniz International Proceedings in Informatics (LIPIcs), Volume 366, pp. 9:1-9:21, Schloss Dagstuhl – Leibniz-Zentrum für Informatik (2026)


Copy BibTex To Clipboard

@InProceedings{bouillaguet_et_al:LIPIcs.FUN.2026.9,
  author =	{Bouillaguet, Charles and Cosseron, Orel},
  title =	{{MIDTERM Is a Deterministic Technique to Exit Recursive Mazes}},
  booktitle =	{13th International Conference on Fun with Algorithms (FUN 2026)},
  pages =	{9:1--9:21},
  series =	{Leibniz International Proceedings in Informatics (LIPIcs)},
  ISBN =	{978-3-95977-417-8},
  ISSN =	{1868-8969},
  year =	{2026},
  volume =	{366},
  editor =	{Iacono, John},
  publisher =	{Schloss Dagstuhl -- Leibniz-Zentrum f{\"u}r Informatik},
  address =	{Dagstuhl, Germany},
  URL =		{https://drops.dagstuhl.de/entities/document/10.4230/LIPIcs.FUN.2026.9},
  URN =		{urn:nbn:de:0030-drops-257280},
  doi =		{10.4230/LIPIcs.FUN.2026.9},
  annote =	{Keywords: Recursive maze, pushdown automaton, reachability, context-free grammar, graph rewriting}
}
Document
77 Shades of Grey

Authors: Quentin Bramas, Stéphane Devismes, Anaïs Durand, Pascal Lafourcade, and Anissa Lamani


Abstract
Bruce Wayne contacted us to help him develop a new surveillance technology for dark environments such as caves, using a swarm of Unmanned Aerial Vehicles (UAVs), called Batdroids. A Batdroid has no chirality, limited visibility, and a perfect clock to synchronize with the others. A Batdroid can produce 77 shades of grey in dark mode and four colors in light mode. In this paper, we propose two algorithms using three Batdroids to perpetually explore a finite 3D grid modeling a cave. The first algorithm operates in darkness, uses 77 shades of grey, and requires visibility range one. The second operates in light, uses four colors and visibility range two. We also prove that three is the optimal number of Batdroids required to solve Bruce Wayne’s challenge.

Cite as

Quentin Bramas, Stéphane Devismes, Anaïs Durand, Pascal Lafourcade, and Anissa Lamani. 77 Shades of Grey. In 13th International Conference on Fun with Algorithms (FUN 2026). Leibniz International Proceedings in Informatics (LIPIcs), Volume 366, pp. 10:1-10:19, Schloss Dagstuhl – Leibniz-Zentrum für Informatik (2026)


Copy BibTex To Clipboard

@InProceedings{bramas_et_al:LIPIcs.FUN.2026.10,
  author =	{Bramas, Quentin and Devismes, St\'{e}phane and Durand, Ana\"{i}s and Lafourcade, Pascal and Lamani, Anissa},
  title =	{{77 Shades of Grey}},
  booktitle =	{13th International Conference on Fun with Algorithms (FUN 2026)},
  pages =	{10:1--10:19},
  series =	{Leibniz International Proceedings in Informatics (LIPIcs)},
  ISBN =	{978-3-95977-417-8},
  ISSN =	{1868-8969},
  year =	{2026},
  volume =	{366},
  editor =	{Iacono, John},
  publisher =	{Schloss Dagstuhl -- Leibniz-Zentrum f{\"u}r Informatik},
  address =	{Dagstuhl, Germany},
  URL =		{https://drops.dagstuhl.de/entities/document/10.4230/LIPIcs.FUN.2026.10},
  URN =		{urn:nbn:de:0030-drops-257294},
  doi =		{10.4230/LIPIcs.FUN.2026.10},
  annote =	{Keywords: Mobile robots, grid exploration, perpetual exploration}
}
Document
An Almost-Optimal Upper Bound on the Push Number of the Torus Puzzle

Authors: Matteo Caporrella and Stefano Leucci


Abstract
We study the Torus Puzzle, a solitaire game in which the elements of an input m × n matrix need to be rearranged into a target configuration via a sequence of unit rotations (i.e., circular shifts) of rows and/or columns. Amano et al. proposed a more permissive variant of the above puzzle, where each row and column rotation can shift the involved elements by any amount of positions. The number of rotations needed to solve the original and the permissive variants of the puzzle are respectively known as the push number and the drag number, where the latter is always smaller than or equal to the former and admits an existential lower bound of Ω(mn). While this lower bound is matched by an O(mn) upper bound, the push number is not so well understood. Indeed, to the best of our knowledge, only an O(mn ⋅ max{m, n}) upper bound is currently known. In this paper, we provide an algorithm that solves the Torus Puzzle using O(mn ⋅ log max {m, n}) unit rotations in a model that is more restricted than that of the original puzzle. This implies a corresponding upper bound on the push number and reduces the gap between the known upper and lower bounds from Θ(max{m,n}) to Θ(log max{m, n}).

Cite as

Matteo Caporrella and Stefano Leucci. An Almost-Optimal Upper Bound on the Push Number of the Torus Puzzle. In 13th International Conference on Fun with Algorithms (FUN 2026). Leibniz International Proceedings in Informatics (LIPIcs), Volume 366, pp. 11:1-11:21, Schloss Dagstuhl – Leibniz-Zentrum für Informatik (2026)


Copy BibTex To Clipboard

@InProceedings{caporrella_et_al:LIPIcs.FUN.2026.11,
  author =	{Caporrella, Matteo and Leucci, Stefano},
  title =	{{An Almost-Optimal Upper Bound on the Push Number of the Torus Puzzle}},
  booktitle =	{13th International Conference on Fun with Algorithms (FUN 2026)},
  pages =	{11:1--11:21},
  series =	{Leibniz International Proceedings in Informatics (LIPIcs)},
  ISBN =	{978-3-95977-417-8},
  ISSN =	{1868-8969},
  year =	{2026},
  volume =	{366},
  editor =	{Iacono, John},
  publisher =	{Schloss Dagstuhl -- Leibniz-Zentrum f{\"u}r Informatik},
  address =	{Dagstuhl, Germany},
  URL =		{https://drops.dagstuhl.de/entities/document/10.4230/LIPIcs.FUN.2026.11},
  URN =		{urn:nbn:de:0030-drops-257307},
  doi =		{10.4230/LIPIcs.FUN.2026.11},
  annote =	{Keywords: Torus puzzle, Push number, Permutation puzzles}
}
Document
A Bookworm Climbs up the Polynomial Hierarchy: Meta-Restoration Complexity in Arithmetic Puzzles

Authors: Brynmor Chapman, Lily Chung, Erik D. Demaine, Yota Irino, Della Hendrickson, Tonan Kamata, and Ryuhei Uehara


Abstract
In arithmetic puzzles, a partially specified arithmetic expression must be completed to make the computation valid. Arithmetical restoration puzzles require filling in missing digits, while cryptarithms involve assigning digits to letters. The Japanese term mushikui-zan ("bookwormed arithmetic") commonly refers to arithmetical restorations, where we imagine the missing digits have been eaten by a bookworm. Puzzle creator Yousuke Ikeda proposed a new type of puzzle in which a previously designed bookwormed arithmetic with multiplication - known to have a unique solution - has itself been "bookwormed", that is, partially erased. The goal is to restore the specified blanks so that the resulting bookwormed puzzle again has a unique solution. We further generalize this framework: for each k ≥ 2, we define level-k puzzles as those in which type-k blanks must be filled to make the resulting level-(k{-}1) puzzle uniquely solvable. We study the level-k versions of the Boolean satisfiability problem, and show that they form a hierarchy of Σ^P_k-complete decision problems, tightly matching the levels of the polynomial hierarchy. As applications, we show that the level-k arithmetical restoration problem with multiplication is Σ^P_k-complete, as is the level-k cryptarithm problem. On the positive side, we show that level-2 arithmetical restoration puzzles with addition are solvable in polynomial time.

Cite as

Brynmor Chapman, Lily Chung, Erik D. Demaine, Yota Irino, Della Hendrickson, Tonan Kamata, and Ryuhei Uehara. A Bookworm Climbs up the Polynomial Hierarchy: Meta-Restoration Complexity in Arithmetic Puzzles. In 13th International Conference on Fun with Algorithms (FUN 2026). Leibniz International Proceedings in Informatics (LIPIcs), Volume 366, pp. 12:1-12:15, Schloss Dagstuhl – Leibniz-Zentrum für Informatik (2026)


Copy BibTex To Clipboard

@InProceedings{chapman_et_al:LIPIcs.FUN.2026.12,
  author =	{Chapman, Brynmor and Chung, Lily and Demaine, Erik D. and Irino, Yota and Hendrickson, Della and Kamata, Tonan and Uehara, Ryuhei},
  title =	{{A Bookworm Climbs up the Polynomial Hierarchy: Meta-Restoration Complexity in Arithmetic Puzzles}},
  booktitle =	{13th International Conference on Fun with Algorithms (FUN 2026)},
  pages =	{12:1--12:15},
  series =	{Leibniz International Proceedings in Informatics (LIPIcs)},
  ISBN =	{978-3-95977-417-8},
  ISSN =	{1868-8969},
  year =	{2026},
  volume =	{366},
  editor =	{Iacono, John},
  publisher =	{Schloss Dagstuhl -- Leibniz-Zentrum f{\"u}r Informatik},
  address =	{Dagstuhl, Germany},
  URL =		{https://drops.dagstuhl.de/entities/document/10.4230/LIPIcs.FUN.2026.12},
  URN =		{urn:nbn:de:0030-drops-257311},
  doi =		{10.4230/LIPIcs.FUN.2026.12},
  annote =	{Keywords: arithmetical restoration, cryptarithms, polynomial hierarchy, uniqueness quantifier, puzzle complexity}
}
Document
The Berlin Safe House Puzzle: Spycraft via Interval Graphs

Authors: Gennaro Cordasco, Luisa Gargano, and Adele Anna Rescigno


Abstract
We propose a gamified application of the {Identifying Code} problem on {Interval Graphs}, framed as a high-stakes Cold War counter-intelligence operation. We present a polynomial-time algorithm to assign "Listening Devices" (bugs) to "Safe Houses" (intervals) so that every safe house is uniquely identifiable by its bug signature. While the problem is NP-hard on several graph classes, including chordal and bipartite graphs, the interval-graph structure allows us to compute a 2-approximate solution efficiently.

Cite as

Gennaro Cordasco, Luisa Gargano, and Adele Anna Rescigno. The Berlin Safe House Puzzle: Spycraft via Interval Graphs. In 13th International Conference on Fun with Algorithms (FUN 2026). Leibniz International Proceedings in Informatics (LIPIcs), Volume 366, pp. 13:1-13:18, Schloss Dagstuhl – Leibniz-Zentrum für Informatik (2026)


Copy BibTex To Clipboard

@InProceedings{cordasco_et_al:LIPIcs.FUN.2026.13,
  author =	{Cordasco, Gennaro and Gargano, Luisa and Rescigno, Adele Anna},
  title =	{{The Berlin Safe House Puzzle: Spycraft via Interval Graphs}},
  booktitle =	{13th International Conference on Fun with Algorithms (FUN 2026)},
  pages =	{13:1--13:18},
  series =	{Leibniz International Proceedings in Informatics (LIPIcs)},
  ISBN =	{978-3-95977-417-8},
  ISSN =	{1868-8969},
  year =	{2026},
  volume =	{366},
  editor =	{Iacono, John},
  publisher =	{Schloss Dagstuhl -- Leibniz-Zentrum f{\"u}r Informatik},
  address =	{Dagstuhl, Germany},
  URL =		{https://drops.dagstuhl.de/entities/document/10.4230/LIPIcs.FUN.2026.13},
  URN =		{urn:nbn:de:0030-drops-257325},
  doi =		{10.4230/LIPIcs.FUN.2026.13},
  annote =	{Keywords: Interval Graphs, Watching-System, Approximate Algorithms}
}
Document
The Careless Coupon Collector’s Problem

Authors: Emilio Cruciani and Aditi Dudeja


Abstract
We initiate the study of the Careless Coupon Collector’s Problem (CCCP), a novel variation of the classical coupon collector, that we envision as a model for information systems such as web crawlers, dynamic caches, and fault-resilient networks. In CCCP, a collector attempts to gather n distinct coupon types by obtaining one coupon type uniformly at random in each discrete round, however the collector is careless: at the end of each round, each collected coupon type is independently lost with probability p. We analyze the number of rounds required to complete the collection as a function of n and p. In particular, we show that it transitions from Θ(n ln n) when p = o((ln n)/n²) up to Θ(((np)/(1-p))ⁿ) when p = ω(1/n) in multiple distinct phases. Interestingly, when p = c/n, the process remains in a metastable phase, where the fraction of collected coupon types is concentrated around 1/(1+c) with probability 1-o(1), for a time window of length e^{Θ(n)}. Finally, we give an algorithm that computes the expected completion time of CCCP in O(n²) time.

Cite as

Emilio Cruciani and Aditi Dudeja. The Careless Coupon Collector’s Problem. In 13th International Conference on Fun with Algorithms (FUN 2026). Leibniz International Proceedings in Informatics (LIPIcs), Volume 366, pp. 14:1-14:21, Schloss Dagstuhl – Leibniz-Zentrum für Informatik (2026)


Copy BibTex To Clipboard

@InProceedings{cruciani_et_al:LIPIcs.FUN.2026.14,
  author =	{Cruciani, Emilio and Dudeja, Aditi},
  title =	{{The Careless Coupon Collector’s Problem}},
  booktitle =	{13th International Conference on Fun with Algorithms (FUN 2026)},
  pages =	{14:1--14:21},
  series =	{Leibniz International Proceedings in Informatics (LIPIcs)},
  ISBN =	{978-3-95977-417-8},
  ISSN =	{1868-8969},
  year =	{2026},
  volume =	{366},
  editor =	{Iacono, John},
  publisher =	{Schloss Dagstuhl -- Leibniz-Zentrum f{\"u}r Informatik},
  address =	{Dagstuhl, Germany},
  URL =		{https://drops.dagstuhl.de/entities/document/10.4230/LIPIcs.FUN.2026.14},
  URN =		{urn:nbn:de:0030-drops-257333},
  doi =		{10.4230/LIPIcs.FUN.2026.14},
  annote =	{Keywords: Coupon Collector, Markov Chains, Metastability}
}
Document
Spells for Quantum Programmers: Expressive High-Level Commands in Qutes

Authors: Simone Faro, Francesco Pio Marino, and Gabriele Messina


Abstract
Classical computers are powerful but fundamentally mundane: they operate through explicit, step-by-step instructions that force programmers to think locally and procedurally. Quantum technologies, by contrast, resemble magical instruments, capable of acting on superpositions, correlations, and entire collections of states at once. Yet, despite their magical nature, quantum computers are still programmed as if they were ordinary machines, relying on long sequences of low-level operations that obscure the underlying algorithmic ideas. Magic, however, is not performed by improvisation alone: it requires a spellbook. In this paper we position Qutes as a book of spells for quantum programmers, providing high-level commands that capture complex quantum behaviour behind concise and expressive syntax. We focus on the manipulation of quantum arrays, which naturally arise in many algorithms but are notoriously cumbersome to manage at the circuit level. We introduce three new array-oriented spells in Qutes: global initialization, parallel pairwise comparison, and parallel (optionally controlled) swap. Individually, these spells encapsulate non-trivial quantum procedures; when combined, they enable programmers to express algorithms in a way that is immediate, readable, and surprisingly elegant. As a final demonstration, we show how these spells can be assembled to produce a remarkably compact implementation of Bubble Sort. While algorithmically simple, this example illustrates a broader message: when the right abstractions are available, quantum programming can feel less like engineering machinery and more like magic.

Cite as

Simone Faro, Francesco Pio Marino, and Gabriele Messina. Spells for Quantum Programmers: Expressive High-Level Commands in Qutes. In 13th International Conference on Fun with Algorithms (FUN 2026). Leibniz International Proceedings in Informatics (LIPIcs), Volume 366, pp. 15:1-15:20, Schloss Dagstuhl – Leibniz-Zentrum für Informatik (2026)


Copy BibTex To Clipboard

@InProceedings{faro_et_al:LIPIcs.FUN.2026.15,
  author =	{Faro, Simone and Marino, Francesco Pio and Messina, Gabriele},
  title =	{{Spells for Quantum Programmers: Expressive High-Level Commands in Qutes}},
  booktitle =	{13th International Conference on Fun with Algorithms (FUN 2026)},
  pages =	{15:1--15:20},
  series =	{Leibniz International Proceedings in Informatics (LIPIcs)},
  ISBN =	{978-3-95977-417-8},
  ISSN =	{1868-8969},
  year =	{2026},
  volume =	{366},
  editor =	{Iacono, John},
  publisher =	{Schloss Dagstuhl -- Leibniz-Zentrum f{\"u}r Informatik},
  address =	{Dagstuhl, Germany},
  URL =		{https://drops.dagstuhl.de/entities/document/10.4230/LIPIcs.FUN.2026.15},
  URN =		{urn:nbn:de:0030-drops-257349},
  doi =		{10.4230/LIPIcs.FUN.2026.15},
  annote =	{Keywords: Quantum programming languages, High-level abstractions, Quantum arrays}
}
Document
Lozenge Tiling by Computing Distances

Authors: Jean-Marie Favreau, Yan Gerard, Pascal Lafourcade, and Léo Robert


Abstract
The Calisson puzzle is a recent tiling game in which one must tile a triangular grid inside a hexagon with lozenges, under the constraint that certain prescribed edges must remain tile boundaries and that adjacent lozenges along these edges have different orientations. We present the first polynomial-time algorithm for this problem, with running time O(n³) for a hexagon of side length n. This algorithm, called the advancing surface algorithm, can be executed in a simple and intuitive way, even by hand with a pencil and an eraser. Its apparent simplicity conceals a deeper algorithmic reinterpretation of the classical ideas of John Conway and William Thurston, which we revisit from a theoretical computer science perspective. We introduce a graph-theoretic and difference constraints overlay that complements Thurston’s theory of lozenge tilings, revealing its intrinsic algorithmic structure and extending its scope to tiling problems with interior constraints and without necessarily boundary conditions. In Thurston’s approach, lozenge tilings are lifted to monotone stepped surfaces in the three-dimensional cubic lattice and projected back to the plane using height functions, reducing the tiling problem to the computation of heights. We show that, at an algorithmic level, selecting a monotone surface corresponds to selecting a directed cut (dicut) in a periodic directed graph, while height functions are solutions of a system of difference constraints. In this formulation, a region is tilable if and only if the associated weighted directed graph contains no cycle of strictly negative total weight. This new graph layer completing Thurston’s theory shows that Bellman–Ford’s shortest path algorithm is the only algorithmic primitive needed to decide feasibility and compute solutions. In particular, our framework allows us to decide whether the infinite triangular grid can be tiled while respecting a finite set of prescribed local constraints, a setting in which no boundary conditions are available.

Cite as

Jean-Marie Favreau, Yan Gerard, Pascal Lafourcade, and Léo Robert. Lozenge Tiling by Computing Distances. In 13th International Conference on Fun with Algorithms (FUN 2026). Leibniz International Proceedings in Informatics (LIPIcs), Volume 366, pp. 16:1-16:21, Schloss Dagstuhl – Leibniz-Zentrum für Informatik (2026)


Copy BibTex To Clipboard

@InProceedings{favreau_et_al:LIPIcs.FUN.2026.16,
  author =	{Favreau, Jean-Marie and Gerard, Yan and Lafourcade, Pascal and Robert, L\'{e}o},
  title =	{{Lozenge Tiling by Computing Distances}},
  booktitle =	{13th International Conference on Fun with Algorithms (FUN 2026)},
  pages =	{16:1--16:21},
  series =	{Leibniz International Proceedings in Informatics (LIPIcs)},
  ISBN =	{978-3-95977-417-8},
  ISSN =	{1868-8969},
  year =	{2026},
  volume =	{366},
  editor =	{Iacono, John},
  publisher =	{Schloss Dagstuhl -- Leibniz-Zentrum f{\"u}r Informatik},
  address =	{Dagstuhl, Germany},
  URL =		{https://drops.dagstuhl.de/entities/document/10.4230/LIPIcs.FUN.2026.16},
  URN =		{urn:nbn:de:0030-drops-257350},
  doi =		{10.4230/LIPIcs.FUN.2026.16},
  annote =	{Keywords: Tiling, Lozenge, Directed Graph, Dicut, Difference Constraints, Bellman-Ford}
}
Document
Sorting Magazines and Boxes

Authors: Gabriele Fici, Manal Mohamed, and Jakub Radoszewski


Abstract
It is a rainy Sunday. Agata has decided to sort the magazines on her shelf. Because the magazines are quite thin, she refuses to insert one between two others, preferring to move them only to the ends of the shelf. She has conceived a strategy for this but is unsure of its efficiency. Meanwhile, in the adjacent room, her three-year-old son, Szymon, has just finished his Montessori tower puzzle and is figuring out how to put it away. He has adopted a very intuitive approach to nesting the boxes, though he is not certain it will ultimately succeed. Agata and Szymon are employing very primitive strategies. While many sorting algorithms are remarkably simple to explain and implement-specifically, the class of in-place sorting algorithms with 𝒪(n²) worst-case and average-case running time and constant space requirements (e.g., Bubble Sort, Gnome Sort)-the strategies discussed here offer a unique perspective on "intuitive" sorting. Our contribution aims to enrich the field of simple sorting algorithms. Interestingly, determining the exact worst-case complexity of some of the proposed algorithms remains an open problem.

Cite as

Gabriele Fici, Manal Mohamed, and Jakub Radoszewski. Sorting Magazines and Boxes. In 13th International Conference on Fun with Algorithms (FUN 2026). Leibniz International Proceedings in Informatics (LIPIcs), Volume 366, pp. 17:1-17:13, Schloss Dagstuhl – Leibniz-Zentrum für Informatik (2026)


Copy BibTex To Clipboard

@InProceedings{fici_et_al:LIPIcs.FUN.2026.17,
  author =	{Fici, Gabriele and Mohamed, Manal and Radoszewski, Jakub},
  title =	{{Sorting Magazines and Boxes}},
  booktitle =	{13th International Conference on Fun with Algorithms (FUN 2026)},
  pages =	{17:1--17:13},
  series =	{Leibniz International Proceedings in Informatics (LIPIcs)},
  ISBN =	{978-3-95977-417-8},
  ISSN =	{1868-8969},
  year =	{2026},
  volume =	{366},
  editor =	{Iacono, John},
  publisher =	{Schloss Dagstuhl -- Leibniz-Zentrum f{\"u}r Informatik},
  address =	{Dagstuhl, Germany},
  URL =		{https://drops.dagstuhl.de/entities/document/10.4230/LIPIcs.FUN.2026.17},
  URN =		{urn:nbn:de:0030-drops-257368},
  doi =		{10.4230/LIPIcs.FUN.2026.17},
  annote =	{Keywords: Sorting algorithm, analysis of algorithms, intuitive sorting}
}
Document
1038 A10s Fit into One A0

Authors: Noel Friedrich


Abstract
The A-series paper sizes are specified in integer millimetres in ISO 216. Since the sizes are based on an irrational aspect ratio, rounding errors introduce small but cumulative discrepancies from their nominal areas. In this work, we prove that exactly 1038 sheets of ISO A10 can be packed without overlap into a single ISO A0 sheet, allowing only orthogonal (axis-aligned) placements. A lower bound is given by an explicit construction, while the upper bound is proved by a simple-to-verify computer-assisted certificate. Along the way, the dual certificates produce unexpectedly pretty weightmaps.

Cite as

Noel Friedrich. 1038 A10s Fit into One A0. In 13th International Conference on Fun with Algorithms (FUN 2026). Leibniz International Proceedings in Informatics (LIPIcs), Volume 366, pp. 18:1-18:13, Schloss Dagstuhl – Leibniz-Zentrum für Informatik (2026)


Copy BibTex To Clipboard

@InProceedings{friedrich:LIPIcs.FUN.2026.18,
  author =	{Friedrich, Noel},
  title =	{{1038 A10s Fit into One A0}},
  booktitle =	{13th International Conference on Fun with Algorithms (FUN 2026)},
  pages =	{18:1--18:13},
  series =	{Leibniz International Proceedings in Informatics (LIPIcs)},
  ISBN =	{978-3-95977-417-8},
  ISSN =	{1868-8969},
  year =	{2026},
  volume =	{366},
  editor =	{Iacono, John},
  publisher =	{Schloss Dagstuhl -- Leibniz-Zentrum f{\"u}r Informatik},
  address =	{Dagstuhl, Germany},
  URL =		{https://drops.dagstuhl.de/entities/document/10.4230/LIPIcs.FUN.2026.18},
  URN =		{urn:nbn:de:0030-drops-257379},
  doi =		{10.4230/LIPIcs.FUN.2026.18},
  annote =	{Keywords: rectangle packing, pallet loading problem, rounding effects, ISO 216}
}
Document
Sinks and Ladders: ARRIVAL and SSG with Two Vertices per Level

Authors: Bernd Gärtner, Sebastian Haslebacher, and Hung P. Hoang


Abstract
ARRIVAL is the problem of deciding whether a token, following a deterministic process, eventually reaches a designated destination. While the problem is known to lie in NP ∩ CoNP, whether it can be solved in polynomial time remains a major open question. In this article, we study ladders, a class of graphs that constitutes a family of worst-case instances for many existing algorithms, including the currently best known algorithm by Gärtner, Haslebacher, and Hoang (ICALP 2021). We show that ARRIVAL restricted to ladders can be solved in polynomial time, and we further extend this result to stopping binary simple stochastic games (SSG).

Cite as

Bernd Gärtner, Sebastian Haslebacher, and Hung P. Hoang. Sinks and Ladders: ARRIVAL and SSG with Two Vertices per Level. In 13th International Conference on Fun with Algorithms (FUN 2026). Leibniz International Proceedings in Informatics (LIPIcs), Volume 366, pp. 19:1-19:16, Schloss Dagstuhl – Leibniz-Zentrum für Informatik (2026)


Copy BibTex To Clipboard

@InProceedings{gartner_et_al:LIPIcs.FUN.2026.19,
  author =	{G\"{a}rtner, Bernd and Haslebacher, Sebastian and Hoang, Hung P.},
  title =	{{Sinks and Ladders: ARRIVAL and SSG with Two Vertices per Level}},
  booktitle =	{13th International Conference on Fun with Algorithms (FUN 2026)},
  pages =	{19:1--19:16},
  series =	{Leibniz International Proceedings in Informatics (LIPIcs)},
  ISBN =	{978-3-95977-417-8},
  ISSN =	{1868-8969},
  year =	{2026},
  volume =	{366},
  editor =	{Iacono, John},
  publisher =	{Schloss Dagstuhl -- Leibniz-Zentrum f{\"u}r Informatik},
  address =	{Dagstuhl, Germany},
  URL =		{https://drops.dagstuhl.de/entities/document/10.4230/LIPIcs.FUN.2026.19},
  URN =		{urn:nbn:de:0030-drops-257385},
  doi =		{10.4230/LIPIcs.FUN.2026.19},
  annote =	{Keywords: ARRIVAL, Rotor-Routing, Simple Stochastic Games}
}
Document
Permutation Match Puzzles: How Young Tanvi Learned About Computational Complexity

Authors: Kshitij Gajjar and Neeldhara Misra


Abstract
We study a family of sorting match puzzles on grids, which we call permutation match puzzles. In this puzzle, each row and column of a n × n grid is labeled with an ordering constraint - ascending (A) or descending (D) - and the goal is to fill the grid with the numbers 1 through n² such that each row and column respects its constraint. We provide a complete characterization of solvable puzzles: a puzzle admits a solution if and only if its associated constraint graph is acyclic, which translates to a simple "at most one switch" condition on the A/D labels. When solutions exist, we show that their count is given by a hook length formula. For unsolvable puzzles, we present an O(n) algorithm to compute the minimum number of label flips required to reach a solvable configuration. Finally, we consider a generalization where rows and columns may specify arbitrary permutations rather than simple orderings, and establish that finding minimal repairs in this setting is NP-complete by a reduction from feedback arc set.

Cite as

Kshitij Gajjar and Neeldhara Misra. Permutation Match Puzzles: How Young Tanvi Learned About Computational Complexity. In 13th International Conference on Fun with Algorithms (FUN 2026). Leibniz International Proceedings in Informatics (LIPIcs), Volume 366, pp. 20:1-20:16, Schloss Dagstuhl – Leibniz-Zentrum für Informatik (2026)


Copy BibTex To Clipboard

@InProceedings{gajjar_et_al:LIPIcs.FUN.2026.20,
  author =	{Gajjar, Kshitij and Misra, Neeldhara},
  title =	{{Permutation Match Puzzles: How Young Tanvi Learned About Computational Complexity}},
  booktitle =	{13th International Conference on Fun with Algorithms (FUN 2026)},
  pages =	{20:1--20:16},
  series =	{Leibniz International Proceedings in Informatics (LIPIcs)},
  ISBN =	{978-3-95977-417-8},
  ISSN =	{1868-8969},
  year =	{2026},
  volume =	{366},
  editor =	{Iacono, John},
  publisher =	{Schloss Dagstuhl -- Leibniz-Zentrum f{\"u}r Informatik},
  address =	{Dagstuhl, Germany},
  URL =		{https://drops.dagstuhl.de/entities/document/10.4230/LIPIcs.FUN.2026.20},
  URN =		{urn:nbn:de:0030-drops-257398},
  doi =		{10.4230/LIPIcs.FUN.2026.20},
  annote =	{Keywords: sorting match puzzles, permutation match puzzles, grid puzzles, constraint satisfaction, directed acyclic graphs, hook length formula, standard Young tableaux, NP-completeness, feedback arc set}
}
Document
Endgames in Fog of War Chess

Authors: Matthias Gehnen and Julius Stannat


Abstract
Fog of War chess is a popular variant of classical chess, in which both players have only partial information about the position of the opponent’s pieces. This study provides the first theoretical analysis of endgames in Fog of War chess. In particular, we analyze the setups king and queen versus king, king and rook versus king, and king and two rooks versus king. We show that a king and queen can always guarantee a win against a lone king. In contrast to classical chess, a king and a rook cannot guarantee a win against a lone king. However, adding one more rook guarantees a win.

Cite as

Matthias Gehnen and Julius Stannat. Endgames in Fog of War Chess. In 13th International Conference on Fun with Algorithms (FUN 2026). Leibniz International Proceedings in Informatics (LIPIcs), Volume 366, pp. 21:1-21:20, Schloss Dagstuhl – Leibniz-Zentrum für Informatik (2026)


Copy BibTex To Clipboard

@InProceedings{gehnen_et_al:LIPIcs.FUN.2026.21,
  author =	{Gehnen, Matthias and Stannat, Julius},
  title =	{{Endgames in Fog of War Chess}},
  booktitle =	{13th International Conference on Fun with Algorithms (FUN 2026)},
  pages =	{21:1--21:20},
  series =	{Leibniz International Proceedings in Informatics (LIPIcs)},
  ISBN =	{978-3-95977-417-8},
  ISSN =	{1868-8969},
  year =	{2026},
  volume =	{366},
  editor =	{Iacono, John},
  publisher =	{Schloss Dagstuhl -- Leibniz-Zentrum f{\"u}r Informatik},
  address =	{Dagstuhl, Germany},
  URL =		{https://drops.dagstuhl.de/entities/document/10.4230/LIPIcs.FUN.2026.21},
  URN =		{urn:nbn:de:0030-drops-257401},
  doi =		{10.4230/LIPIcs.FUN.2026.21},
  annote =	{Keywords: Chess, Endgame, King, Queen, Rook}
}
Document
The Quaternary Gray Code and Ziggu Puzzles

Authors: Madeleine Goertz and Aaron Williams


Abstract
We investigate solutions to the new "Ziggu" family of sequential puzzles including Ziggurat, Zigguflat, Zigguhooked and so on. These puzzles have p pieces that form m mazes. We encode the state of each puzzle as a quaternary number (i.e., base 4) with n = m+1 digits, where each digit gives the horizontal or vertical position in one maze. For example, the commercial version of Zigguflat has p = 6 pieces connected into m = 4 mazes and its state requires n = 5 digits to describe. We show that the number of states on a shortest solution is 6 ⋅ 2ⁿ - 3n - 5 (Oeis A101946). There is only one solution of this length, and it is generated from the start configuration by a simple algorithm: make the leftmost modification that doesn't undo the previous modification. Replacing "leftmost" with "rightmost" instead generates the unique longest solution that visits all (3^{n+1} - 1)/2 states (Oeis A003462). In this way, Ziggu puzzles can be viewed as 4-ary, 3-ary, or 2-ary puzzles based on how the number of state encodings, valid states, or minimum states grow with each additional maze. Classic Gray code puzzles (e.g., Spin-Out) provide natural and illuminating comparisons. These puzzles with p pieces typically have 2^p (Oeis A000079) or ⌊ 2/3 ⋅ 2^p ⌋ (Oeis A000975 [Stockmeyer, 2017]) states on their unique (shortest) solution, and at most one modification doesn't undo the previous modification. The states visited in a Gray code puzzle solution follow the well-known binary reflected Gray code. We show that Ziggu puzzles instead follow the quaternary reflected Gray code. More specifically, the shortest and longest solutions are both sublists of this order, meaning that some quaternary words are skipped over but the relative order of the remaining words does not change. These results show how to solve Ziggu puzzles from the start configuration. To help solve the puzzle from an arbitrary configuration we provide O(n)-time comparison, and successor algorithms, which give the relative order of two states and the next state, respectively. While Gray code puzzles have simpler recursive descriptions and successor rules, a Ziggu puzzle has a much simpler loopless algorithm to generate its shortest solution than the Gray code puzzles do. The two families are also intimately related as they have the same comparison function.

Cite as

Madeleine Goertz and Aaron Williams. The Quaternary Gray Code and Ziggu Puzzles. In 13th International Conference on Fun with Algorithms (FUN 2026). Leibniz International Proceedings in Informatics (LIPIcs), Volume 366, pp. 22:1-22:22, Schloss Dagstuhl – Leibniz-Zentrum für Informatik (2026)


Copy BibTex To Clipboard

@InProceedings{goertz_et_al:LIPIcs.FUN.2026.22,
  author =	{Goertz, Madeleine and Williams, Aaron},
  title =	{{The Quaternary Gray Code and Ziggu Puzzles}},
  booktitle =	{13th International Conference on Fun with Algorithms (FUN 2026)},
  pages =	{22:1--22:22},
  series =	{Leibniz International Proceedings in Informatics (LIPIcs)},
  ISBN =	{978-3-95977-417-8},
  ISSN =	{1868-8969},
  year =	{2026},
  volume =	{366},
  editor =	{Iacono, John},
  publisher =	{Schloss Dagstuhl -- Leibniz-Zentrum f{\"u}r Informatik},
  address =	{Dagstuhl, Germany},
  URL =		{https://drops.dagstuhl.de/entities/document/10.4230/LIPIcs.FUN.2026.22},
  URN =		{urn:nbn:de:0030-drops-257413},
  doi =		{10.4230/LIPIcs.FUN.2026.22},
  annote =	{Keywords: Puzzle, Ziggu, Ziggurat, Zigguflat, Gray Code, Loopless Algorithm}
}
Document
Pyramid Schemes for Eating M&Ms: Enumeration, Generation, and Gray Codes

Authors: Elizabeth Hartung, Brett Stevens, and Aaron Williams


Abstract
Consider the following problem. You have a rainbow pyramid of M&Ms with n rows. For example, when n = 4 you may have one red, two orange, three yellow, and four green {inline.pdf}. You want to eat n of the M&Ms in such a way that the remaining M&Ms can be rearranged into a rainbow pyramid with n-1 rows. Two approaches are distinct if a different number from a particular row are eaten. In other words, we only care about the multiset of row frequencies (or colours) that are eaten and not the order in which they are eaten. One solution eats one M&M per row (e.g., 1234 → {inline.pdf}). Another eats the entire bottom row (e.g., 4444 → {inline.pdf}). How many different solutions are there? We show that the answer is 2^{n-1}. Furthermore, each solution can be naturally encoded with combinatorial objects enumerated by 2^{n-1} including binary words of length n-1, compositions of n, and subsets of [n-1]. Less obviously they are encoded by M&M permutations where each value in [n] is at most one position to the right of its position in the identity (e.g., 123, 132, 213, 312 for n = 3). What if at most m from each row can be eaten? When m = 1 the only solution is to eat one of each colour. Otherwise, the solutions are counted by Fibonacci (m = 2), Tribonacci (m = 3), Tetranacci (m = 4), and so on, up to 2^{n-1} (m = n). Furthermore, solutions can be naturally encoded by limited versions of the aforementioned objects including binary strings avoiding the substring 0^{m} and M&M permutations where values are limited by moving at most 𝓁 = m-1 positions to the left. Motivated by the works of Samuel Beckett, we consider minimal-change orders of the solutions. We obtain a satisfying result by filtering the binary reflected Gray code to words avoiding 0^{m}. For example, when n = 4 we have BRGC(n) = 000, 100, 110, 010, 011, 111, 101, 001 and the words avoiding 00 are BRGC_𝓁(3) = 110, 010, 011, 111, 101 where 𝓁 = 1 is the limit on the run-lengths of 0s. Our bijection then creates solutions that differ in by a single M&M 1244, 2244, 2234,1234, 1334. Thus, Beckett’s character Murphy can imagine every experience by changing one M&M at a time. The generalized Gray code BRGC_𝓁(n) was previously defined recursively [Bernini et. al Acta Informatica 2015] with its change sequence supporting amortized 𝒪(1)-time generation [Arndt Matters Computational 2010]. We uncover a simple greedy definition - flip the leftmost bit that creates a new binary word avoiding 0^m starting from w = ⋯ 110^{𝓁}110^{𝓁} - and a successor rule that supports loopless worst-case 𝒪(1)-time generation. Furthermore, the corresponding limited M&M permutations are greedily generated by swapping the smallest value (or the leftmost pair of adjacent values) that gives a valid new permutation (e.g., ̅{12}43, 21 ̅{43}, ̅{21}34, 1 ̅{23}4, 1324 for n = 4 and 𝓁 = 1). We also consider a relaxed version of the problem in which the initial pyramid’s n rows have respective widths r, r+1, r+2, …, n, n, …, n. Here the answer is an n-term product ⟨n,r⟩! = 1 ⋅ 2 ⋅ 3 ⋯ r ⋅ (r+1) ⋅ (r+1) ⋯ (r+1) that we refer to as a flatorial number. Furthermore, the solutions are represented by a generalization of M&M permutations in which each symbol can appear at most r positions to the right of its position in the identity. We complete our investigation by showing that eight distinct classes of permutations are enumerated by flatorial numbers.

Cite as

Elizabeth Hartung, Brett Stevens, and Aaron Williams. Pyramid Schemes for Eating M&Ms: Enumeration, Generation, and Gray Codes. In 13th International Conference on Fun with Algorithms (FUN 2026). Leibniz International Proceedings in Informatics (LIPIcs), Volume 366, pp. 23:1-23:24, Schloss Dagstuhl – Leibniz-Zentrum für Informatik (2026)


Copy BibTex To Clipboard

@InProceedings{hartung_et_al:LIPIcs.FUN.2026.23,
  author =	{Hartung, Elizabeth and Stevens, Brett and Williams, Aaron},
  title =	{{Pyramid Schemes for Eating M\&Ms: Enumeration, Generation, and Gray Codes}},
  booktitle =	{13th International Conference on Fun with Algorithms (FUN 2026)},
  pages =	{23:1--23:24},
  series =	{Leibniz International Proceedings in Informatics (LIPIcs)},
  ISBN =	{978-3-95977-417-8},
  ISSN =	{1868-8969},
  year =	{2026},
  volume =	{366},
  editor =	{Iacono, John},
  publisher =	{Schloss Dagstuhl -- Leibniz-Zentrum f{\"u}r Informatik},
  address =	{Dagstuhl, Germany},
  URL =		{https://drops.dagstuhl.de/entities/document/10.4230/LIPIcs.FUN.2026.23},
  URN =		{urn:nbn:de:0030-drops-257420},
  doi =		{10.4230/LIPIcs.FUN.2026.23},
  annote =	{Keywords: combinatorial enumeration, generation, Gray code, loopless algorithm}
}
Document
On the Complexity of the Maker-Breaker Happy Vertex Game

Authors: Mathieu Hilaire, Perig Montfort, and Nacim Oijid


Abstract
Given a c-colored graph G, a vertex v of G is said to be happy if it has the same color as all its neighbors. The notion of happy vertices was introduced by Zhang and Li [Peng Zhang and Angsheng Li, 2015] to compute the homophily of a graph. Eto, Fujimoto, Kiya, Matsushita, Miyano, Murao and Saitoh [Hiroshi Eto et al., 2025] introduced the Maker-Maker version of the Happy vertex game, where two players compete to claim more happy vertices than their opponent. We introduce here the Maker-Breaker happy vertex game: two players, Maker and Breaker, alternately color the vertices of a graph with their respective colors. Maker aims to maximize the number of happy vertices at the end, while Breaker aims to prevent her. This game is also a scoring version of the Maker-Breaker domination game introduced by Duchene, Gledel, Parreau and Renault [Duchene et al., 2020], as a happy vertex corresponds exactly to a vertex that is not dominated in the domination game. Therefore, this game is a very natural game on graphs and can be studied within the scope of scoring positional games [Bagan et al., 2024]. We initiate here the complexity study of this game, by proving that computing its score is PSPACE-complete on trees, NP-hard on caterpillars, and polynomial on subdivided stars. Finally, we provide the exact value of the score on graphs of maximum degree 2, and we provide an FPT-algorithm to compute the score on graphs of bounded neighborhood diversity. An important contribution of the paper is that, to achieve our hardness results, we introduce a new type of incidence graph called the literal-clause incidence graph for 2-SAT formulas. We prove that QMAX 2-SAT remains PSPACE-complete even if this graph is acyclic, and that MAX 2-SAT remains NP-complete, even if this graph is acyclic and has maximum degree 2, i.e. is a union of paths. We demonstrate the importance of this contribution by proving that Incidence, the scoring positional game played on a graph is also PSPACE-complete when restricted to forests.

Cite as

Mathieu Hilaire, Perig Montfort, and Nacim Oijid. On the Complexity of the Maker-Breaker Happy Vertex Game. In 13th International Conference on Fun with Algorithms (FUN 2026). Leibniz International Proceedings in Informatics (LIPIcs), Volume 366, pp. 24:1-24:20, Schloss Dagstuhl – Leibniz-Zentrum für Informatik (2026)


Copy BibTex To Clipboard

@InProceedings{hilaire_et_al:LIPIcs.FUN.2026.24,
  author =	{Hilaire, Mathieu and Montfort, Perig and Oijid, Nacim},
  title =	{{On the Complexity of the Maker-Breaker Happy Vertex Game}},
  booktitle =	{13th International Conference on Fun with Algorithms (FUN 2026)},
  pages =	{24:1--24:20},
  series =	{Leibniz International Proceedings in Informatics (LIPIcs)},
  ISBN =	{978-3-95977-417-8},
  ISSN =	{1868-8969},
  year =	{2026},
  volume =	{366},
  editor =	{Iacono, John},
  publisher =	{Schloss Dagstuhl -- Leibniz-Zentrum f{\"u}r Informatik},
  address =	{Dagstuhl, Germany},
  URL =		{https://drops.dagstuhl.de/entities/document/10.4230/LIPIcs.FUN.2026.24},
  URN =		{urn:nbn:de:0030-drops-257434},
  doi =		{10.4230/LIPIcs.FUN.2026.24},
  annote =	{Keywords: Maker-Breaker game, Domination game, happy vertex game, scoring game, complexity}
}
Document
Computational Complexity of Swish Is Solved

Authors: Takashi Horiyama, Takehiro Ito, Jun Kawahara, Shin-ichi Minato, Akira Suzuki, Ryuhei Uehara, and Yutaro Yamaguchi


Abstract
Swish is a card game in which players are given cards having symbols (hoops and balls), and find a valid superposition of cards, called a "swish." Dailly, Lafourcade, and Marcadet (FUN 2024) studied a generalized version of Swish and showed that the problem is solvable in polynomial time with one symbol per card, while it is NP-complete with three or more symbols per card. In this paper, we resolve the previously open case of two symbols per card, which corresponds to the original game. We show that Swish is NP-complete for this case. Specifically, we prove the NP-hardness when the allowed transformations of cards are restricted to a single (horizontal or vertical) flip or 180-degree rotation, and extend the results to the original setting allowing all three transformations. In contrast, when neither transformation is allowed, we present a polynomial-time algorithm. Combining known and our results, we establish a complete characterization of the computational complexity of Swish with respect to both the number of symbols per card and the allowed transformations.

Cite as

Takashi Horiyama, Takehiro Ito, Jun Kawahara, Shin-ichi Minato, Akira Suzuki, Ryuhei Uehara, and Yutaro Yamaguchi. Computational Complexity of Swish Is Solved. In 13th International Conference on Fun with Algorithms (FUN 2026). Leibniz International Proceedings in Informatics (LIPIcs), Volume 366, pp. 25:1-25:12, Schloss Dagstuhl – Leibniz-Zentrum für Informatik (2026)


Copy BibTex To Clipboard

@InProceedings{horiyama_et_al:LIPIcs.FUN.2026.25,
  author =	{Horiyama, Takashi and Ito, Takehiro and Kawahara, Jun and Minato, Shin-ichi and Suzuki, Akira and Uehara, Ryuhei and Yamaguchi, Yutaro},
  title =	{{Computational Complexity of Swish Is Solved}},
  booktitle =	{13th International Conference on Fun with Algorithms (FUN 2026)},
  pages =	{25:1--25:12},
  series =	{Leibniz International Proceedings in Informatics (LIPIcs)},
  ISBN =	{978-3-95977-417-8},
  ISSN =	{1868-8969},
  year =	{2026},
  volume =	{366},
  editor =	{Iacono, John},
  publisher =	{Schloss Dagstuhl -- Leibniz-Zentrum f{\"u}r Informatik},
  address =	{Dagstuhl, Germany},
  URL =		{https://drops.dagstuhl.de/entities/document/10.4230/LIPIcs.FUN.2026.25},
  URN =		{urn:nbn:de:0030-drops-257448},
  doi =		{10.4230/LIPIcs.FUN.2026.25},
  annote =	{Keywords: Swish, Computational complexity, Matching, Parity-constrained cycles}
}
Document
Hexasort - the Complexity of Stacking Colors on Graphs

Authors: Linus Klocker and Simon Dominik Fink


Abstract
Many popular puzzle and matching games have been analyzed through the lens of computational complexity. Prominent examples include Sudoku [Takayuki Yato and Takahiro Seta, 2003], Candy Crush [Luciano Gualà et al., 2014], and Flood-It [Fellows et al., 2018]. A common theme among these widely played games is that their generalized decision versions are NP-hard, which is often thought of as a source of their inherent difficulty and addictive appeal to human players. In this paper, we study a popular single-player stacking game commonly known as Hexasort. The game can be modelled as placing colored stacks onto the vertices of a graph, where adjacent stacks of the same color merge and vanish according to deterministic rules. We prove that Hexasort is NP-hard, even when restricted to single-color stacks and progressively more constrained classes of graphs, culminating in strong NP-hardness on trees of either bounded height or degree. Towards fixed-parameter tractable algorithms, we identify settings in which the problem becomes polynomial-time solvable and present dynamic programming algorithms.

Cite as

Linus Klocker and Simon Dominik Fink. Hexasort - the Complexity of Stacking Colors on Graphs. In 13th International Conference on Fun with Algorithms (FUN 2026). Leibniz International Proceedings in Informatics (LIPIcs), Volume 366, pp. 26:1-26:12, Schloss Dagstuhl – Leibniz-Zentrum für Informatik (2026)


Copy BibTex To Clipboard

@InProceedings{klocker_et_al:LIPIcs.FUN.2026.26,
  author =	{Klocker, Linus and Fink, Simon Dominik},
  title =	{{Hexasort - the Complexity of Stacking Colors on Graphs}},
  booktitle =	{13th International Conference on Fun with Algorithms (FUN 2026)},
  pages =	{26:1--26:12},
  series =	{Leibniz International Proceedings in Informatics (LIPIcs)},
  ISBN =	{978-3-95977-417-8},
  ISSN =	{1868-8969},
  year =	{2026},
  volume =	{366},
  editor =	{Iacono, John},
  publisher =	{Schloss Dagstuhl -- Leibniz-Zentrum f{\"u}r Informatik},
  address =	{Dagstuhl, Germany},
  URL =		{https://drops.dagstuhl.de/entities/document/10.4230/LIPIcs.FUN.2026.26},
  URN =		{urn:nbn:de:0030-drops-257457},
  doi =		{10.4230/LIPIcs.FUN.2026.26},
  annote =	{Keywords: Hexasort, offline color stacking on graphs, NP-complete, polynomial-time solvable, dynamic programming}
}
Document
Completing the Complexity Classification of 2-Solo Chess: Knights and Kings Are Hard

Authors: Kolja Kühn and Wendy Yi


Abstract
We extend the study of the 2-Solo Chess problem which was first introduced by Aravind, Misra, and Mittal in 2022. 2-Solo Chess is a single-player variant of chess in which the player must clear the board via captures such that only one piece remains, with each piece capturing at most twice. It is known that the problem is solvable in polynomial time for instances containing only pawns, while it becomes NP-complete for instances restricted to rooks, bishops, or queens. In this work, we complete the complexity classification by proving that 2-Solo Chess is NP-complete if the instance contains only knights or only kings.

Cite as

Kolja Kühn and Wendy Yi. Completing the Complexity Classification of 2-Solo Chess: Knights and Kings Are Hard. In 13th International Conference on Fun with Algorithms (FUN 2026). Leibniz International Proceedings in Informatics (LIPIcs), Volume 366, pp. 27:1-27:21, Schloss Dagstuhl – Leibniz-Zentrum für Informatik (2026)


Copy BibTex To Clipboard

@InProceedings{kuhn_et_al:LIPIcs.FUN.2026.27,
  author =	{K\"{u}hn, Kolja and Yi, Wendy},
  title =	{{Completing the Complexity Classification of 2-Solo Chess: Knights and Kings Are Hard}},
  booktitle =	{13th International Conference on Fun with Algorithms (FUN 2026)},
  pages =	{27:1--27:21},
  series =	{Leibniz International Proceedings in Informatics (LIPIcs)},
  ISBN =	{978-3-95977-417-8},
  ISSN =	{1868-8969},
  year =	{2026},
  volume =	{366},
  editor =	{Iacono, John},
  publisher =	{Schloss Dagstuhl -- Leibniz-Zentrum f{\"u}r Informatik},
  address =	{Dagstuhl, Germany},
  URL =		{https://drops.dagstuhl.de/entities/document/10.4230/LIPIcs.FUN.2026.27},
  URN =		{urn:nbn:de:0030-drops-257464},
  doi =		{10.4230/LIPIcs.FUN.2026.27},
  annote =	{Keywords: Solo chess, puzzle games, board games, NP-completeness}
}
Document
Weak Binary Search Trees

Authors: Tobias Lauer


Abstract
Binary Search Trees (BST) have probably been studied more extensively than any other data structure in computer science. Their central property is the in-order invariant, which enables search for a key in time proportional to the height of the tree. Quite interestingly, the need for this strict invariant for efficient search seems to have always been taken for granted. In this paper, we introduce Weak Binary Search Trees (WST) and show that the in-order invariant can be relaxed substantially without sacrificing the O(log n) runtime bounds for search known from BST. We provide a simple and efficient search algorithm and list methods for insertion and deletion of keys in time proportional to the height of the tree. For balancing WST, rotations are less efficient than in BST. We adapt a rotation-free balancing scheme to WST, which can keep update operations in O(log n) overall time in the amortized average case.

Cite as

Tobias Lauer. Weak Binary Search Trees. In 13th International Conference on Fun with Algorithms (FUN 2026). Leibniz International Proceedings in Informatics (LIPIcs), Volume 366, pp. 28:1-28:12, Schloss Dagstuhl – Leibniz-Zentrum für Informatik (2026)


Copy BibTex To Clipboard

@InProceedings{lauer:LIPIcs.FUN.2026.28,
  author =	{Lauer, Tobias},
  title =	{{Weak Binary Search Trees}},
  booktitle =	{13th International Conference on Fun with Algorithms (FUN 2026)},
  pages =	{28:1--28:12},
  series =	{Leibniz International Proceedings in Informatics (LIPIcs)},
  ISBN =	{978-3-95977-417-8},
  ISSN =	{1868-8969},
  year =	{2026},
  volume =	{366},
  editor =	{Iacono, John},
  publisher =	{Schloss Dagstuhl -- Leibniz-Zentrum f{\"u}r Informatik},
  address =	{Dagstuhl, Germany},
  URL =		{https://drops.dagstuhl.de/entities/document/10.4230/LIPIcs.FUN.2026.28},
  URN =		{urn:nbn:de:0030-drops-257474},
  doi =		{10.4230/LIPIcs.FUN.2026.28},
  annote =	{Keywords: Binary search trees, weak data structures, relaxed in-order invariant, balancing}
}
Document
Finding Shortest Walks in Kuru Kuru Kururin

Authors: Mickaël Laurent and Maher Mallem


Abstract
This paper serves as a celebration of the twenty-fifth anniversary of Kuru Kuru Kururin. Although this video game is presented as a collection of two-dimensional puzzles based on rotation, it naturally invites players to complete its levels as quickly as possible. This has led to a surprisingly rich and challenging playing field to finding foremost temporal walks. In this work, we tackle this problem both in theory and in practice. First, we introduce a model for the game and provide an in-depth complexity analysis. Most notably, we show how each gameplay mechanic independently brings a layer of NP-hardness and/or co-NP-hardness. We also provide a pseudo-polynomial time algorithm for the general problem and identify several cases which can be solved in polynomial time. Along the way, we discuss connections to the more established framework of temporal graphs, both in the point model and the interval model. Then, we propose simple and flexible algorithmic techniques to reduce state space and guide the search, offering trade-offs between precision and computation speed in practice. These techniques were implemented and tested using a full recreation of the game physics and the levels from the original game. We demonstrate the efficiency of our framework in several settings - with or without taking damage, with or without unintended game mechanics - and relate empirical struggles which we encountered in practice to our complexity analysis. Our implementation is open source and fully available online, offering a novel and amusing setting to benchmark shortest path algorithms.

Cite as

Mickaël Laurent and Maher Mallem. Finding Shortest Walks in Kuru Kuru Kururin. In 13th International Conference on Fun with Algorithms (FUN 2026). Leibniz International Proceedings in Informatics (LIPIcs), Volume 366, pp. 29:1-29:20, Schloss Dagstuhl – Leibniz-Zentrum für Informatik (2026)


Copy BibTex To Clipboard

@InProceedings{laurent_et_al:LIPIcs.FUN.2026.29,
  author =	{Laurent, Micka\"{e}l and Mallem, Maher},
  title =	{{Finding Shortest Walks in Kuru Kuru Kururin}},
  booktitle =	{13th International Conference on Fun with Algorithms (FUN 2026)},
  pages =	{29:1--29:20},
  series =	{Leibniz International Proceedings in Informatics (LIPIcs)},
  ISBN =	{978-3-95977-417-8},
  ISSN =	{1868-8969},
  year =	{2026},
  volume =	{366},
  editor =	{Iacono, John},
  publisher =	{Schloss Dagstuhl -- Leibniz-Zentrum f{\"u}r Informatik},
  address =	{Dagstuhl, Germany},
  URL =		{https://drops.dagstuhl.de/entities/document/10.4230/LIPIcs.FUN.2026.29},
  URN =		{urn:nbn:de:0030-drops-257480},
  doi =		{10.4230/LIPIcs.FUN.2026.29},
  annote =	{Keywords: Shortest path, Complexity}
}
Document
Replacing Cops with Zombies

Authors: Fengyi Liu and Avery Miller


Abstract
In the Cops and Robbers game, two players take turns to move their pieces in a given graph, and the goal of the Cop player is to have any of their pieces capture the piece controlled by the Robber player. In the Zombies and Survivors variant, the Zombie player is trying to catch the piece controlled by the Survivor player, but the pursuers are more restricted: the zombie pieces must always move, and must do so toward the survivor along a shortest path. Essentially, the zombies move in a 'brainless' way, which severely limits the design of algorithmic strategies. In a practical setting where the pursuers are robots or drones, the zombie strategies can be carried out by simpler/cheaper devices. This motivates the question: when can cops be replaced by zombies? In contrast to previous work that highlights graph classes where cops are significantly more useful when trying to catch the evader, we examine some situations where the simpler restricted movements imposed on zombies can be sufficient.

Cite as

Fengyi Liu and Avery Miller. Replacing Cops with Zombies. In 13th International Conference on Fun with Algorithms (FUN 2026). Leibniz International Proceedings in Informatics (LIPIcs), Volume 366, pp. 30:1-30:12, Schloss Dagstuhl – Leibniz-Zentrum für Informatik (2026)


Copy BibTex To Clipboard

@InProceedings{liu_et_al:LIPIcs.FUN.2026.30,
  author =	{Liu, Fengyi and Miller, Avery},
  title =	{{Replacing Cops with Zombies}},
  booktitle =	{13th International Conference on Fun with Algorithms (FUN 2026)},
  pages =	{30:1--30:12},
  series =	{Leibniz International Proceedings in Informatics (LIPIcs)},
  ISBN =	{978-3-95977-417-8},
  ISSN =	{1868-8969},
  year =	{2026},
  volume =	{366},
  editor =	{Iacono, John},
  publisher =	{Schloss Dagstuhl -- Leibniz-Zentrum f{\"u}r Informatik},
  address =	{Dagstuhl, Germany},
  URL =		{https://drops.dagstuhl.de/entities/document/10.4230/LIPIcs.FUN.2026.30},
  URN =		{urn:nbn:de:0030-drops-257492},
  doi =		{10.4230/LIPIcs.FUN.2026.30},
  annote =	{Keywords: Pursuit-Evasion Games, Grid Graphs, Cop Number, Zombie Number, Throttling Number}
}
Document
A Demigod’s Number for the Rubik’s Cube

Authors: Arturo Merino and Bernardo Subercaseaux


Abstract
It is by now well-known that any state of the 3× 3 × 3 Rubik’s Cube can be solved in at most 20 moves, a result often referred to as "God’s Number". However, this result took Rokicki et al. around 35 CPU years to prove and is therefore very challenging to reproduce. We provide a novel approach to obtain a worse bound of 36 moves with high confidence, but that offers two main advantages: (i) it is easy to understand, reproduce, and verify, and (ii) our main idea generalizes to bounding the diameter of other vertex-transitive graphs by at most twice its true value, hence the name "demigod number". Our approach is based on the fact that, for vertex-transitive graphs, the diameter at most twice the average distance (of which we give a much simpler proof than in the literature). Then, by sampling uniformly random states and using a modern solver to obtain upper bounds on their distance, a standard concentration bound allows us to confidently state that the average distance is around 18.32 ± 0.18, from where the diameter is at most 36.

Cite as

Arturo Merino and Bernardo Subercaseaux. A Demigod’s Number for the Rubik’s Cube. In 13th International Conference on Fun with Algorithms (FUN 2026). Leibniz International Proceedings in Informatics (LIPIcs), Volume 366, pp. 31:1-31:20, Schloss Dagstuhl – Leibniz-Zentrum für Informatik (2026)


Copy BibTex To Clipboard

@InProceedings{merino_et_al:LIPIcs.FUN.2026.31,
  author =	{Merino, Arturo and Subercaseaux, Bernardo},
  title =	{{A Demigod’s Number for the Rubik’s Cube}},
  booktitle =	{13th International Conference on Fun with Algorithms (FUN 2026)},
  pages =	{31:1--31:20},
  series =	{Leibniz International Proceedings in Informatics (LIPIcs)},
  ISBN =	{978-3-95977-417-8},
  ISSN =	{1868-8969},
  year =	{2026},
  volume =	{366},
  editor =	{Iacono, John},
  publisher =	{Schloss Dagstuhl -- Leibniz-Zentrum f{\"u}r Informatik},
  address =	{Dagstuhl, Germany},
  URL =		{https://drops.dagstuhl.de/entities/document/10.4230/LIPIcs.FUN.2026.31},
  URN =		{urn:nbn:de:0030-drops-257505},
  doi =		{10.4230/LIPIcs.FUN.2026.31},
  annote =	{Keywords: Diameter, Rubik’s Cube, Experimental mathematics}
}
Document
Tetris Is Hard with Just One Piece Type

Authors: MIT Hardness Group, Josh Brunner, Erik D. Demaine, Della Hendrickson, and Jeffery Li


Abstract
We analyze the computational complexity of Tetris clearing (determining whether the player can clear an initial board using a given sequence of pieces) and survival (determining whether the player can avoid losing before placing all the given pieces in an initial board) when restricted to a single polyomino piece type. We prove, for any tetromino piece type P except for O, the NP-hardness of Tetris clearing and survival under the standard Super Rotation System (SRS), even when the input sequence consists of only a specified number of P pieces. These surprising results disprove a 23-year-old conjecture on the computational complexity of Tetris with only I pieces (although our result is only for a specific rotation system). As a corollary, we prove the NP-hardness of Tetris clearing when the sequence of pieces has to be able to be generated from a 7k-bag randomizer for any positive integer k ≥ 1. On the positive side, we give polynomial-time algorithms for Tetris clearing and survival when the input sequence consists of only dominoes, assuming a particular rotation model, solving a version of a 9-year-old open problem. Along the way, we give polynomial-time algorithms for Tetris clearing and survival with 1 × k pieces (for any fixed k), provided the top k-1 rows are initially empty, showing that our I NP-hardness result needs to have filled cells in the top three rows.

Cite as

MIT Hardness Group, Josh Brunner, Erik D. Demaine, Della Hendrickson, and Jeffery Li. Tetris Is Hard with Just One Piece Type. In 13th International Conference on Fun with Algorithms (FUN 2026). Leibniz International Proceedings in Informatics (LIPIcs), Volume 366, pp. 32:1-32:22, Schloss Dagstuhl – Leibniz-Zentrum für Informatik (2026)


Copy BibTex To Clipboard

@InProceedings{mithardnessgroup_et_al:LIPIcs.FUN.2026.32,
  author =	{MIT Hardness Group and Brunner, Josh and Demaine, Erik D. and Hendrickson, Della and Li, Jeffery},
  title =	{{Tetris Is Hard with Just One Piece Type}},
  booktitle =	{13th International Conference on Fun with Algorithms (FUN 2026)},
  pages =	{32:1--32:22},
  series =	{Leibniz International Proceedings in Informatics (LIPIcs)},
  ISBN =	{978-3-95977-417-8},
  ISSN =	{1868-8969},
  year =	{2026},
  volume =	{366},
  editor =	{Iacono, John},
  publisher =	{Schloss Dagstuhl -- Leibniz-Zentrum f{\"u}r Informatik},
  address =	{Dagstuhl, Germany},
  URL =		{https://drops.dagstuhl.de/entities/document/10.4230/LIPIcs.FUN.2026.32},
  URN =		{urn:nbn:de:0030-drops-257515},
  doi =		{10.4230/LIPIcs.FUN.2026.32},
  annote =	{Keywords: complexity, hardness, video games, counting}
}
Document
When Locality Implies Globality: Card-Based ZKP Protocol for Shakashaka Puzzle

Authors: Daiki Miyahara, Léo Robert, Pascal Lafourcade, and Shohei Kaneko


Abstract
Shakashaka is an NP-complete Nikoli puzzle that requires to draw white rectangles by filling a grid with black triangles. Verifying that there are only rectangles drawn in the solution was an open problem for card-based ZKP protocols designers. In this paper, we construct a card-based ZKP protocol to show that a prover can prove to a verifier that he knows a solution of this puzzle without revealing any information. For doing this we prove a local property on all possible 2 × 2 subgrids drawn according to the rules of the game and such configurations are possible valid shapes for rectangles. This local property implies a global property on the shape of the constructed areas. Thanks to this local result for all 2 × 2 subgrids, we are able to establish that the only possible shape in the global grid are rectangles. We also verify other classical rules of Shakashaka.

Cite as

Daiki Miyahara, Léo Robert, Pascal Lafourcade, and Shohei Kaneko. When Locality Implies Globality: Card-Based ZKP Protocol for Shakashaka Puzzle. In 13th International Conference on Fun with Algorithms (FUN 2026). Leibniz International Proceedings in Informatics (LIPIcs), Volume 366, pp. 33:1-33:16, Schloss Dagstuhl – Leibniz-Zentrum für Informatik (2026)


Copy BibTex To Clipboard

@InProceedings{miyahara_et_al:LIPIcs.FUN.2026.33,
  author =	{Miyahara, Daiki and Robert, L\'{e}o and Lafourcade, Pascal and Kaneko, Shohei},
  title =	{{When Locality Implies Globality: Card-Based ZKP Protocol for Shakashaka Puzzle}},
  booktitle =	{13th International Conference on Fun with Algorithms (FUN 2026)},
  pages =	{33:1--33:16},
  series =	{Leibniz International Proceedings in Informatics (LIPIcs)},
  ISBN =	{978-3-95977-417-8},
  ISSN =	{1868-8969},
  year =	{2026},
  volume =	{366},
  editor =	{Iacono, John},
  publisher =	{Schloss Dagstuhl -- Leibniz-Zentrum f{\"u}r Informatik},
  address =	{Dagstuhl, Germany},
  URL =		{https://drops.dagstuhl.de/entities/document/10.4230/LIPIcs.FUN.2026.33},
  URN =		{urn:nbn:de:0030-drops-257525},
  doi =		{10.4230/LIPIcs.FUN.2026.33},
  annote =	{Keywords: Card-based cryptography, ShakaShaka, Nikoli, ZKP}
}
Document
Playing President with Virtual Players: How to Play Multiple Cards of a Kind

Authors: Daiki Miyahara, Pascal Lafourcade, Takaaki Mizuki, and Kazumasa Shinagawa


Abstract
President is a popular card game in which players may play one to four cards of the same rank. Since it is less enjoyable with too few human players, to address this, we study the player-simulation problem for President: realizing the moves of a virtual player while keeping its hand hidden. We propose a selection protocol, which selects multiple cards of the same rank uniformly at random from a hidden virtual player’s hand, whose rank exceeds the latest played cards. Our construction reduces the task to secure sorting, so the overall efficiency is dominated by the underlying sorting protocol. To address this bottleneck, we design an efficient sorting protocol, which reduces the number of steps from O(m log m) to O(m), compared to the existing sorting protocols.

Cite as

Daiki Miyahara, Pascal Lafourcade, Takaaki Mizuki, and Kazumasa Shinagawa. Playing President with Virtual Players: How to Play Multiple Cards of a Kind. In 13th International Conference on Fun with Algorithms (FUN 2026). Leibniz International Proceedings in Informatics (LIPIcs), Volume 366, pp. 34:1-34:15, Schloss Dagstuhl – Leibniz-Zentrum für Informatik (2026)


Copy BibTex To Clipboard

@InProceedings{miyahara_et_al:LIPIcs.FUN.2026.34,
  author =	{Miyahara, Daiki and Lafourcade, Pascal and Mizuki, Takaaki and Shinagawa, Kazumasa},
  title =	{{Playing President with Virtual Players: How to Play Multiple Cards of a Kind}},
  booktitle =	{13th International Conference on Fun with Algorithms (FUN 2026)},
  pages =	{34:1--34:15},
  series =	{Leibniz International Proceedings in Informatics (LIPIcs)},
  ISBN =	{978-3-95977-417-8},
  ISSN =	{1868-8969},
  year =	{2026},
  volume =	{366},
  editor =	{Iacono, John},
  publisher =	{Schloss Dagstuhl -- Leibniz-Zentrum f{\"u}r Informatik},
  address =	{Dagstuhl, Germany},
  URL =		{https://drops.dagstuhl.de/entities/document/10.4230/LIPIcs.FUN.2026.34},
  URN =		{urn:nbn:de:0030-drops-257535},
  doi =		{10.4230/LIPIcs.FUN.2026.34},
  annote =	{Keywords: Card-Based Cryptography, Player-Simulation Problem, President}
}
Document
Card-Based ZKP Protocols for Connectivity-Based Puzzles: Extending to Tree Structures with Application to Nurimeizu

Authors: Daiki Miyahara, Pascal Lafourcade, and Maxime Puys


Abstract
Card-based zero-knowledge proof (ZKP) protocols allow a prover to convince a verifier that it knows a witness of a given statement, without revealing any information, using a physical deck of playing cards. Previous studies have focused on puzzles with a specific connected component, such as a simple cycle and a polyomino. In this study, we propose a unified approach to handle a family of connected components, including a tree, path, cycle, and polyomino. This approach achieves this verification in O(mn) steps relative to a given grid size m × n. Using this approach, we construct a card-based ZKP protocol for Nurimeizu, where the goal is to find the shortest path on a given grid.

Cite as

Daiki Miyahara, Pascal Lafourcade, and Maxime Puys. Card-Based ZKP Protocols for Connectivity-Based Puzzles: Extending to Tree Structures with Application to Nurimeizu. In 13th International Conference on Fun with Algorithms (FUN 2026). Leibniz International Proceedings in Informatics (LIPIcs), Volume 366, pp. 35:1-35:13, Schloss Dagstuhl – Leibniz-Zentrum für Informatik (2026)


Copy BibTex To Clipboard

@InProceedings{miyahara_et_al:LIPIcs.FUN.2026.35,
  author =	{Miyahara, Daiki and Lafourcade, Pascal and Puys, Maxime},
  title =	{{Card-Based ZKP Protocols for Connectivity-Based Puzzles: Extending to Tree Structures with Application to Nurimeizu}},
  booktitle =	{13th International Conference on Fun with Algorithms (FUN 2026)},
  pages =	{35:1--35:13},
  series =	{Leibniz International Proceedings in Informatics (LIPIcs)},
  ISBN =	{978-3-95977-417-8},
  ISSN =	{1868-8969},
  year =	{2026},
  volume =	{366},
  editor =	{Iacono, John},
  publisher =	{Schloss Dagstuhl -- Leibniz-Zentrum f{\"u}r Informatik},
  address =	{Dagstuhl, Germany},
  URL =		{https://drops.dagstuhl.de/entities/document/10.4230/LIPIcs.FUN.2026.35},
  URN =		{urn:nbn:de:0030-drops-257547},
  doi =		{10.4230/LIPIcs.FUN.2026.35},
  annote =	{Keywords: Card-based cryptography, Nurimeizu, Nikoli, ZKP}
}
Document
Turing Completeness of GNU find: From mkdir-Assisted Loops to Standalone Computation

Authors: Keigo Oka


Abstract
The Unix command find is among the first commands taught to beginners, yet remains indispensable for experienced engineers. In this paper, we demonstrate that find possesses unexpected computational power, establishing three Turing completeness results using the GNU implementation (a standard in Linux distributions). (1) find + mkdir is Turing complete. By encoding computational states as directory paths and using regex back-references to copy substrings, we simulate 2-tag systems using only the find and mkdir executables. (2) GNU find 4.9.0+ alone is Turing complete: by reading and writing to files during traversal, we simulate a two-counter machine without mkdir. (3) find + mkdir without regex back-references is still Turing complete: by a trick of encoding regex patterns directly into directory names, we achieve the same power. These results place find among the "surprisingly Turing-complete" systems, highlighting the hidden complexity within seemingly simple standard utilities.

Cite as

Keigo Oka. Turing Completeness of GNU find: From mkdir-Assisted Loops to Standalone Computation. In 13th International Conference on Fun with Algorithms (FUN 2026). Leibniz International Proceedings in Informatics (LIPIcs), Volume 366, pp. 36:1-36:16, Schloss Dagstuhl – Leibniz-Zentrum für Informatik (2026)


Copy BibTex To Clipboard

@InProceedings{oka:LIPIcs.FUN.2026.36,
  author =	{Oka, Keigo},
  title =	{{Turing Completeness of GNU find: From mkdir-Assisted Loops to Standalone Computation}},
  booktitle =	{13th International Conference on Fun with Algorithms (FUN 2026)},
  pages =	{36:1--36:16},
  series =	{Leibniz International Proceedings in Informatics (LIPIcs)},
  ISBN =	{978-3-95977-417-8},
  ISSN =	{1868-8969},
  year =	{2026},
  volume =	{366},
  editor =	{Iacono, John},
  publisher =	{Schloss Dagstuhl -- Leibniz-Zentrum f{\"u}r Informatik},
  address =	{Dagstuhl, Germany},
  URL =		{https://drops.dagstuhl.de/entities/document/10.4230/LIPIcs.FUN.2026.36},
  URN =		{urn:nbn:de:0030-drops-257555},
  doi =		{10.4230/LIPIcs.FUN.2026.36},
  annote =	{Keywords: Turing completeness, GNU find, tag system, counter machine}
}
Document
Covering a Polyomino-Shaped Stain with Non-Overlapping Identical Stickers

Authors: Keigo Oka, Naoki Inaba, and Akira Iino


Abstract
You find a stain on the wall and decide to cover it with non-overlapping stickers of a single identical shape (rotation and reflection are allowed). Is it possible to find a sticker shape that fails to cover the stain? In this paper, we consider this problem under polyomino constraints and complete the classification of always-coverable stain shapes (polyominoes). We provide proofs for the maximal always-coverable polyominoes and construct concrete counterexamples for the minimal not always-coverable ones, demonstrating that such cases exist even among hole-free polyominoes. This classification consequently yields an algorithm to determine the always-coverability of any given stain. We also show that the problem of determining whether a given sticker can cover a given stain is NP-complete, even though exact cover is not demanded. This result extends to the 1D case where the connectivity requirement is removed. As an illustration of the problem complexity, for a specific hexomino (6-cell) stain, the smallest sticker found in our search that avoids covering it has, although not proven minimum, a bounding box of 325 × 325.

Cite as

Keigo Oka, Naoki Inaba, and Akira Iino. Covering a Polyomino-Shaped Stain with Non-Overlapping Identical Stickers. In 13th International Conference on Fun with Algorithms (FUN 2026). Leibniz International Proceedings in Informatics (LIPIcs), Volume 366, pp. 37:1-37:21, Schloss Dagstuhl – Leibniz-Zentrum für Informatik (2026)


Copy BibTex To Clipboard

@InProceedings{oka_et_al:LIPIcs.FUN.2026.37,
  author =	{Oka, Keigo and Inaba, Naoki and Iino, Akira},
  title =	{{Covering a Polyomino-Shaped Stain with Non-Overlapping Identical Stickers}},
  booktitle =	{13th International Conference on Fun with Algorithms (FUN 2026)},
  pages =	{37:1--37:21},
  series =	{Leibniz International Proceedings in Informatics (LIPIcs)},
  ISBN =	{978-3-95977-417-8},
  ISSN =	{1868-8969},
  year =	{2026},
  volume =	{366},
  editor =	{Iacono, John},
  publisher =	{Schloss Dagstuhl -- Leibniz-Zentrum f{\"u}r Informatik},
  address =	{Dagstuhl, Germany},
  URL =		{https://drops.dagstuhl.de/entities/document/10.4230/LIPIcs.FUN.2026.37},
  URN =		{urn:nbn:de:0030-drops-257560},
  doi =		{10.4230/LIPIcs.FUN.2026.37},
  annote =	{Keywords: polyomino, covering, NP-completeness}
}
Document
Solving Small Rubik’s Cubes as Slowly as Possible

Authors: Jenny Quan, Noah Kim, Bernardo Subercaseaux, and John Mackey


Abstract
We study, for different Rubik’s puzzles, whether from any starting state one can solve the puzzle as slowly as possible, visiting every reachable state exactly once before reaching the solved configuration. This question corresponds to the existence of Hamiltonian paths (ending in the solved state) in the Cayley graphs associated with these puzzles. A major conjecture attributed to Lovász is that every Cayley graph has a Hamiltonian path. An even stronger version of the conjecture, considered by Dupuis and Wagon (2015) and Gregor et al. (2024), is that every Cayley graph of degree at least 3 is either bipartite and has Hamiltonian paths between any pair of vertices on opposite parts, or is non-bipartite and has Hamiltonian paths between any pair of vertices. Our study of slowly solving Rubik’s puzzles amounts to studying this Strong Lovász Conjecture in their respective Cayley graphs. We first verify the Strong Lovász Conjecture computationally for small Rubik’s puzzles like the 1 × 2 × 3 or 1 × 3 × 3 cuboids, which have under 200 states. This approach, however, becomes infeasible for the 2 × 2 × 2, which has over 3.6 million states. Our main result is then showing that the Strong Lovász Conjecture holds for the 2 × 2 × 2 cube, using a careful graph-theoretic construction based on the subgroup induced by the R and U turns.

Cite as

Jenny Quan, Noah Kim, Bernardo Subercaseaux, and John Mackey. Solving Small Rubik’s Cubes as Slowly as Possible. In 13th International Conference on Fun with Algorithms (FUN 2026). Leibniz International Proceedings in Informatics (LIPIcs), Volume 366, pp. 38:1-38:20, Schloss Dagstuhl – Leibniz-Zentrum für Informatik (2026)


Copy BibTex To Clipboard

@InProceedings{quan_et_al:LIPIcs.FUN.2026.38,
  author =	{Quan, Jenny and Kim, Noah and Subercaseaux, Bernardo and Mackey, John},
  title =	{{Solving Small Rubik’s Cubes as Slowly as Possible}},
  booktitle =	{13th International Conference on Fun with Algorithms (FUN 2026)},
  pages =	{38:1--38:20},
  series =	{Leibniz International Proceedings in Informatics (LIPIcs)},
  ISBN =	{978-3-95977-417-8},
  ISSN =	{1868-8969},
  year =	{2026},
  volume =	{366},
  editor =	{Iacono, John},
  publisher =	{Schloss Dagstuhl -- Leibniz-Zentrum f{\"u}r Informatik},
  address =	{Dagstuhl, Germany},
  URL =		{https://drops.dagstuhl.de/entities/document/10.4230/LIPIcs.FUN.2026.38},
  URN =		{urn:nbn:de:0030-drops-257570},
  doi =		{10.4230/LIPIcs.FUN.2026.38},
  annote =	{Keywords: Hamilton connectivity, Rubik’s Cube, Finite group theory}
}
Document
Price of Locality in Permutation Mastermind: Are TikTok Influencers Chaotic Enough?

Authors: Bernardo Subercaseaux


Abstract
In the permutation Mastermind game, the goal is to uncover a secret permutation σ^⋆ : [n] → [n] by making a series of guesses π₁, …, π_T which must also be permutations of [n], and receiving as feedback after guess π_t the number of positions i for which σ^⋆(i) = π_t(i). While the existing literature on permutation Mastermind suggests strategies in which π_t and π_{t+1} might be widely different permutations, a resurgence in popularity of this game as a TikTok trend shows that humans (or at least TikTok influencers) use strategies in which consecutive guesses are very similar. For example, it is common to see players attempt one transposition at a time and slowly see their score increase. Motivated by these observations, we study the theoretical impact of two forms of locality in permutation Mastermind strategies: 𝓁_k-local strategies, in which any two consecutive guesses differ in at most k positions, and the even more restrictive class of w_k-local strategies, in which consecutive guesses differ in a window of length at most k. We show that, in broad terms, the optimal number of guesses for local strategies is quadratic, and thus much worse than the O(n lg n) guesses that suffice for non-local strategies. We also show NP-hardness of the satisfiability version for 𝓁₃-local strategies, whereas in the 𝓁₂-local variant the problem admits a randomized polynomial-time algorithm.

Cite as

Bernardo Subercaseaux. Price of Locality in Permutation Mastermind: Are TikTok Influencers Chaotic Enough?. In 13th International Conference on Fun with Algorithms (FUN 2026). Leibniz International Proceedings in Informatics (LIPIcs), Volume 366, pp. 39:1-39:21, Schloss Dagstuhl – Leibniz-Zentrum für Informatik (2026)


Copy BibTex To Clipboard

@InProceedings{subercaseaux:LIPIcs.FUN.2026.39,
  author =	{Subercaseaux, Bernardo},
  title =	{{Price of Locality in Permutation Mastermind: Are TikTok Influencers Chaotic Enough?}},
  booktitle =	{13th International Conference on Fun with Algorithms (FUN 2026)},
  pages =	{39:1--39:21},
  series =	{Leibniz International Proceedings in Informatics (LIPIcs)},
  ISBN =	{978-3-95977-417-8},
  ISSN =	{1868-8969},
  year =	{2026},
  volume =	{366},
  editor =	{Iacono, John},
  publisher =	{Schloss Dagstuhl -- Leibniz-Zentrum f{\"u}r Informatik},
  address =	{Dagstuhl, Germany},
  URL =		{https://drops.dagstuhl.de/entities/document/10.4230/LIPIcs.FUN.2026.39},
  URN =		{urn:nbn:de:0030-drops-257585},
  doi =		{10.4230/LIPIcs.FUN.2026.39},
  annote =	{Keywords: Permutation Mastermind, Locality, NP-hard}
}
Document
An ASP-Completeness Framework for Dynasty Puzzles

Authors: Kosuke Susukita


Abstract
A certain class of pencil-and-paper puzzles shares common rules: given a grid, certain cells must be shaded such that i) no two shaded cells are orthogonally adjacent, and ii) all unshaded cells are orthogonally connected. Such puzzles are sometimes referred to as "dynasty puzzles" within parts of the online puzzle community. We introduce a framework for proving the ASP-completeness (i.e., NP-complete under parsimonious reductions) of various dynasty puzzles. We apply this framework to seven specific dynasty puzzles - Akichiwake, Aquapelago, Ayeheya, Guide Arrow, Heyawake, Hitori, and Kurodoko. As a consequence, for given k solutions of any of these puzzles, deciding whether a distinct solution exists is NP-complete, and counting the number of solutions is #P-complete. Our results strengthen the known result of ASP-completeness for Heyawake and establish the ASP-completeness of the other six puzzles. The main idea is to reconstruct the reduction from the Tree-Residue Vertex-Breaking Problem (TRVB) to the Hamiltonian Cycle Problem introduced by MIT Hardness Group (2024). In our framework, the connectivity of the unshaded cells ensures the connectivity of the shaded cells, allowing the shaded cells to simulate TRVB, which is also an alternative representation of the Hamiltonian cycles under certain conditions.

Cite as

Kosuke Susukita. An ASP-Completeness Framework for Dynasty Puzzles. In 13th International Conference on Fun with Algorithms (FUN 2026). Leibniz International Proceedings in Informatics (LIPIcs), Volume 366, pp. 40:1-40:20, Schloss Dagstuhl – Leibniz-Zentrum für Informatik (2026)


Copy BibTex To Clipboard

@InProceedings{susukita:LIPIcs.FUN.2026.40,
  author =	{Susukita, Kosuke},
  title =	{{An ASP-Completeness Framework for Dynasty Puzzles}},
  booktitle =	{13th International Conference on Fun with Algorithms (FUN 2026)},
  pages =	{40:1--40:20},
  series =	{Leibniz International Proceedings in Informatics (LIPIcs)},
  ISBN =	{978-3-95977-417-8},
  ISSN =	{1868-8969},
  year =	{2026},
  volume =	{366},
  editor =	{Iacono, John},
  publisher =	{Schloss Dagstuhl -- Leibniz-Zentrum f{\"u}r Informatik},
  address =	{Dagstuhl, Germany},
  URL =		{https://drops.dagstuhl.de/entities/document/10.4230/LIPIcs.FUN.2026.40},
  URN =		{urn:nbn:de:0030-drops-257596},
  doi =		{10.4230/LIPIcs.FUN.2026.40},
  annote =	{Keywords: ASP-completeness, pencil-and-paper puzzles, dynasty puzzles, Hitori, Kurodoko, Hamiltonian cycle, Tree-Residue Vertex-Breaking}
}

Filters


Any Issues?
X

Feedback on the Current Page

CAPTCHA

Thanks for your feedback!

Feedback submitted to Dagstuhl Publishing

Could not send message

Please try again later or send an E-mail