  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.
