Optimal algorithms for constructing knight's tours on arbitrary n×m chessboards

  • Authors:
  • Shun-Shii Lin;Chung-Liang Wei

  • Affiliations:
  • Graduate Institute of Computer Science and Information Engineering, National Taiwan Normal University, No. 88, Sector 4, Ting-Chow Road, Taipei, Taiwan, ROC;Department of Information and Computer Education, National Taiwan Normal University, Taipei, Taiwan, ROC

  • Venue:
  • Discrete Applied Mathematics
  • Year:
  • 2005

Quantified Score

Hi-index 0.05

Visualization

Abstract

The knight's tour problem is an ancient puzzle whose goal is to find out how to construct a series of legal moves made by a knight so that it visits every square of a chessboard exactly once. In previous works, researchers have partially solved this problem by offering algorithms for subsets of chessboards. For example, among prior studies, Parberry proposed a divided-and-conquer algorithm that can build a closed knight's tour on an nxn, an nx(n+1) or an nx(n+2) chessboard in O(n^2) (i.e., linear in area) time on a sequential processor. In this paper we completely solve this problem by presenting new methods that can construct a closed knight's tour or an open knight's tour on an arbitrary nxm chessboard if such a solution exists. Our algorithms also run in linear time (O(nm)) on a sequential processor.