We study the following variant of the 15 puzzle. Given a graph and two token placements on the vertices, we want to find a walk of the minimum length (if any exists) such that the sequence of token swappings along the walk obtains one of the given token placements from the other one. This problem was introduced as Sequential Token Swapping by Yamanaka et al. [JGAA 2019], who showed that the problem is intractable in general but polynomial-time solvable for trees, complete graphs, and cycles. In this paper, we present a polynomial-time algorithm for block-cactus graphs, which include all previously known cases. We also present general tools for showing the hardness of the problem on restricted graph classes such as chordal graphs and chordal bipartite graphs. We also show that the problem is hard on grids and king's graphs, which are the graphs corresponding to the 15 puzzle and its variant with relaxed moves.
翻译:我们研究15拼图的以下变体问题。给定一个图及两个放置在顶点上的令牌,我们希望找到一条最小长度的游走(若存在),使得沿游走的令牌交换序列能将一个给定的令牌放置转化为另一个。该问题由Yamanaka等人引入,称为“顺序令牌交换”[JGAA 2019],他们证明该问题在一般情况下难解,但对于树、完全图和环可在多项式时间内求解。本文中,我们提出了块-仙人掌图的多项式时间算法,此类图包含了所有先前已知的可解情况。我们还展示了用于证明该问题在受限图类(如弦图和弦二分图)上难解性的一般性工具。此外,我们证明了该问题在网格图和国王图(对应于15拼图及其允许移动限制放宽的变体的图)上是难解的。