Improvement of the greedy algorithm for (n2 - 1)-puzzle. (2017) - Utsunomiya, Kaede; Asahiro, Yuichi
The ( n 2 - 1)-puzzle is a generalisation of the well-known 15-puzzle. Ratner and Warmuth (1990) showed that finding a shortest sequence of moves for the ( n 2 - 1)-puzzle is NP-hard. Many researches have been devoted to the ( n 2 - 1)-puzzle so far. Also, the ( n 2 - 1)-puzzle is chosen as a benchmark problem in many researches developing a new method/strategy. For the ( n 2 - 1)-puzzle, a real-time algorithm is proposed by Parberry (1995), which is based on a greedy method and completes the puzzle in at most 5 n 3 - 9 n 2 / 2 + O ( n ) moves and needs O (1) computation time per move, although there is no guarantee that the number of moves is optimal (shortest). Following the direction of the research by Parberry (1995), we present an algorithm, which is designed by modifying Parberry's algorithm and giving a tight analysis. The number of moves by the new algorithm is smaller, which needs at most 5 n 3 - 11 n 2 + O ( n ) moves, and computation time per move is also O (1).