arXivDaily arXiv每日学术速递 周一至周五更新
arXiv cs/0507053cs.DScs.AI
收藏

图中的非重复路和圈及其在数独中的应用

Nonrepetitive Paths and Cycles in Graphs with Application to Sudoku

David Eppstein

摘要:

我们提供了一个简单的线性时间变换,从有向或无向图与标记的边缘到一个未标记的有向图,使得路径在输入图中,其中没有两个连续的边缘具有相同的标签对应于路径在变换后的图,反之亦然。使用这种转换,我们提供了有效的算法,找到路径和循环没有两个连续的相等的标签。我们还考虑相关的问题,其中的路径和周期都需要是简单的,我们找到了有效的算法,这些问题的无向情况下,但直接的情况下是NP完全的。我们应用我们的路径和周期发现算法在程序中生成和解决数独谜题,并通过实验表明,它们导致有效的解谜规则,也可能是人类的数独解谜者感兴趣。

英文摘要:

We provide a simple linear time transformation from a directed or undirected graph with labeled edges to an unlabeled digraph, such that paths in the input graph in which no two consecutive edges have the same label correspond to paths in the transformed graph and vice versa. Using this transformation, we provide efficient algorithms for finding paths and cycles with no two consecutive equal labels. We also consider related problems where the paths and cycles are required to be simple; we find efficient algorithms for the undirected case of these problems but show the directed case to be NP-complete. We apply our path and cycle finding algorithms in a program for generating and solving Sudoku puzzles, and show experimentally that they lead to effective puzzle-solving rules that may also be of interest to human Sudoku puzzle solvers.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑