,
Yan Gerard
,
Pascal Lafourcade
,
Léo Robert
Creative Commons Attribution 4.0 International license
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.
@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}
}