The Calisson puzzle is a tiling puzzle in which one must tile a triangular grid inside a hexagon with lozenges, under the constraint that certain prescribed edges remain tile boundaries and that adjacent lozenges along these edges have different orientations. We present the first polynomial-time algorithm for this problem, with cubic running time. 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, revisited here from a theoretical computer science perspective. We introduce a graph-theoretic overlay based on directed cuts and systems of difference constraints that complements Thurston's theory of lozenge tilings and makes its algorithmic structure explicit. 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 tilability to the computation of heights. We show that selecting a monotone surface corresponds to selecting a directed cut in a periodic directed graph, while height functions arise as 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 weight. This additional graph layer shows that the Bellman-Ford algorithm suffices to decide feasibility and compute solutions. In particular, our framework allows one to decide whether the infinite triangular grid can be tiled while respecting a finite set of prescribed local constraints, even in the absence of boundary conditions.
翻译:卡利松拼图是一种铺砌谜题,要求用菱形铺砌六边形内部的三角形网格,并满足特定预设边保持为铺砌边界,且沿这些边相邻的菱形具有不同朝向。我们提出了首个多项式时间算法解决该问题,其运行时间为立方阶。这一被称为推进曲面算法的算法可通过简单直观的方式执行,甚至可用铅笔和橡皮手动完成。其表面简洁性背后隐藏着对约翰·康威和威廉·瑟斯顿经典思想的深层算法重构,本文从理论计算机科学视角重新审视了这些思想。我们引入基于有向割与差分约束系统的图论覆盖层,该层补充了瑟斯顿的菱形铺砌理论并使其算法结构显式化。在瑟斯顿的方法中,菱形铺砌被提升至三维立方晶格中的单调阶梯曲面,并通过高度函数投影回平面,从而将可铺砌性简化为高度计算。我们证明:选择单调曲面等价于在周期有向图中选择有向割,而高度函数则作为差分约束系统的解出现。在此表述下,当且仅当关联的加权有向图中不存在严格负权环时,区域才是可铺砌的。这一额外的图结构层表明贝尔曼-福特算法足以判定可行性并计算解。特别地,我们的框架允许在无边界条件的情况下,判定无限三角形网格在满足有限预设局部约束时是否可被铺砌。