透過您的圖書館登入
IP:18.119.133.96
  • 學位論文

矩形棋盤上構築騎士路徑之成本最佳化演算法

Optimal Algorithms for Constructing Knight's Tours on Rectangular Chessboards

指導教授 : 林順喜
若您是本文的作者,可授權文章由華藝線上圖書館中協助推廣。

摘要


騎士路徑問題(knight's tour problem)已經被研究很長的一段時間,它的規則為在一棋盤上,要找出一條路徑讓騎士恰能走過棋盤上的每一個格子一次。1992年Takefuji與Lee聲明他們尚不能確定此一問題是否屬於NP-complete的範疇。在前人的研究中所提出的方法皆僅解決了部份的子集合。舉例來說,如Ian Parberry於1997年提出一個分而治之(divide-and-conquer)的演算法,利用單一個處理器能在O(n^2)的時間內求得n x n、n x (n+1)、n x (n+2) 的盤面上的封閉騎士路徑(Closed knight's tour)。而在本篇論文中,我們提出一個新的方法可以找出任意n x m大小的棋盤上的封閉騎士路徑與開放騎士路徑(Open knight's tour),至此得以完全解決騎士路徑問題並回答了Takefuji與Lee的疑問。在只利用單一處理器的狀況下,我們的演算法所花用的時間也只僅要線性時間(O(nm))。

並列摘要


The knight's tour problem has been studied for a very long period of time. The main purpose of the knight's tour problem is to find out how to construct a series of moves made by a knight visiting every square of a chessboard exactly once. In 1992, Takefuji and Lee state that they are unsure whether the problem of finding a knight's tour is NP-complete. In previous works, all researchers partially solve this problem by offering algorithms for a partial subset of chessboards. For example, among the prior studies, Ian Parberry proposes a divided-and-conquer algorithm that can build a closed knight's tour on an n x n, an n x (n+1) or an n x (n+2) chessboard in O(n^2) (i.e. linear) time on a sequential processor. In this paper, we completely solve this problem and answer the question of Takefuji and Lee by presenting a new method that can construct a closed knight's tour or an open knight's tour on an arbitrary n m chessboard if they exist. Our algorithm runs in linear time (O(nm)) on a sequential processor.

參考文獻


[15] Rees, G. H. J. van: Knight's tours and circuits on the 3 n chessboard (classroom notes), Bulletin of ICA, 16, 81-86 (1996).
[1] Ball, W. W. R.: Mathematical Recreations and Essays, 11th Edition, MacMillan and Co.,1939.
[3] Cannon, R., Dolan, S.: The knight's tour, Mathematical Gazette, 70, 91-100 (1986).
[4] Conrad, A., Hindrichs, T., Morsy, H., Wegener, I.: Solution of the knight's Hamiltonian path problem on chessboards, Discrete Applied Mathematics, 50, 125-134 (1994).
[5] Domoryad, A. P.: Mathematical Games and Pastimes, Pergamon Press, 1964.

延伸閱讀