Skip to main content
QUICK REVIEW

[论文解读] Dancing links

Donald E. Knuth|arXiv (Cornell University)|Nov 15, 2000
Constraint Satisfaction and Optimization参考文献 5被引用 185
一句话总结

本文介紹了「舞蹈鏈」技術,用於加速組合謎題(如多格骨牌鋪砌與八皇后問題)中的深度優先搜索。透過在雙向鏈結串列上使用可逆操作,並引入幽靈方格以統一約束條件,該方法實現了高效、以啟發式法則驅動的搜索,表現優異,成功解決了19個六方形骨牌的鋪砌問題與N最大達18的八皇后問題。

ABSTRACT

The author presents two tricks to accelerate depth-first search algorithms for a class of combinatorial puzzle problems, such as tiling a tray by a fixed set of polyominoes. The first trick is to implement each assumption of the search with reversible local operations on doubly linked lists. By this trick, every step of the search affects the data incrementally. The second trick is to add a ghost square that represents the identity of each polyomino. Thus puts the rule that each polyomino be used once on the same footing as the rule that each square be covered once. The coding simplifies to a more abstract form which is equivalent to 0-1 integer programming. More significantly for the total computation time, the search can naturally switch between placing a fixed polyomino or covering a fixed square at different stages, according to a combined heuristic. Finally the author reports excellent performance for his algorithm for some familiar puzzles. These include tiling a hexagon by 19 hexiamonds and the N queens problem for N up to 18.

研究动机与目标

  • 提升組合謎題(如多格骨牌鋪砌與八皇后問題)中深度優先搜索演算法的效率。
  • 透過單一資料結構統一「每塊多格骨牌僅使用一次」與「每個方格僅覆蓋一次」的約束條件。
  • 在搜尋過程中動態切換放置固定多格骨牌或覆蓋固定方格的啟發式策略。
  • 透過優化資料操作與約束表示方式,縮減總計算時間。

提出的方法

  • 將每項搜尋假設表示為雙向鏈結串列上的可逆局部操作,進而於回溯過程中實現增量式更新。
  • 引入幽靈方格以代表每塊多格骨牌的身分,將「僅使用一次」規則嵌入與「僅覆蓋一次」規則相同的框架中。
  • 將問題重新公式化為抽象的0-1整數規劃形式,簡化程式碼邏輯。
  • 允許搜尋動態選擇根據合併啟發式法則,決定是放置多格骨牌還是覆蓋方格。
  • 使用舞蹈鏈資料結構,有效管理與更新遞迴探索過程中的搜尋狀態。

实验结果

研究问题

  • RQ1如何在組合謎題(如鋪砌與八皇后問題)中加速深度優先搜索?
  • RQ2能否在單一資料結構中統一「多格骨牌唯一使用」與「方格唯一覆蓋」的約束條件?
  • RQ3結合可逆操作與啟發式搜索順序,可達成何種程度的效能提升?
  • RQ4舞蹈鏈技術在硬性組合謎題(如六方形骨牌鋪砌)中可擴展至何種程度?

主要发现

  • 舞蹈鏈技術透過在雙向鏈結串列上使用可逆操作,實現高效且增量式的更新,顯著縮減總計算時間。
  • 使用幽靈方格統一處理多格骨牌使用與方格覆蓋,簡化演算法邏輯,提升可維護性。
  • 該方法支援在放置多格骨牌與覆蓋方格之間動態切換啟發式策略,提升搜尋效率。
  • 演算法成功解決了著名的難度較高的19個六方形骨牌鋪砌問題。
  • 該方法在八皇后問題上表現極佳,成功解決至N = 18的案例。

更好的研究,从现在开始

从阅读论文到最终审阅,大幅缩短您的研究时间。

无需绑定信用卡

本解读由 AI 生成,并经人工编辑审核。