,
Stefano Leucci
Creative Commons Attribution 4.0 International license
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}).
@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}
}