We study the Torus Puzzle, a solitaire game in which the elements of an input $m \times 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 \emph{push number} and the \emph{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 \cdot \max\{ m, n \})$ upper bound is currently known. In this paper, we provide an algorithm that solves the Torus Puzzle using $O(mn \cdot \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\})$.
翻译:我们研究环面拼图,这是一个单人游戏,其目标是通过一系列行和/或列的单位旋转(即循环移位)将输入的$m \times n$矩阵中的元素重新排列成目标配置。Amano等人提出了上述拼图的一个更宽松的变体,其中每个行和列旋转可以将所涉及的元素移动任意数量的位置。解决原始拼图和宽松变体所需的旋转次数分别称为\emph{推数}和\emph{拖数},后者总是小于或等于前者,并存在一个下界$Ω(mn)$。虽然这个下界与$O(mn)$的上界相匹配,但推数尚未被充分理解。事实上,据我们所知,目前仅知道一个$O(mn \cdot \max\{ m, n \})$的上界。在本文中,我们提出了一种算法,能在比原始拼图更受限的模型下,使用$O(mn \cdot \log \max \{m, n\})$次单位旋转解决环面拼图。这给出了推数的一个相应上界,并将已知上下界之间的差距从$Θ(\max\{m,n\})$缩小到$Θ(\log \max\{m, n\})$。