CayleyR:通过循环交集解决TopSpin谜题
CayleyR: Solving the TopSpin puzzle via cycle intersection
浏览论文内容
中文总结 AI 辅助
CayleyR是用于解决排列谜题的R包,核心算法通过在凯莱图中检测循环交集来迭代双向搜索,针对TopSpin(n,k)谜题,结合C++哈希索引状态存储与Vulkan GPU加速,实现对谜题的求解,软件公开可用。
中文摘要 AI 辅助
我们提出了CayleyR,一个用于通过检测凯莱图中的循环交集来解决排列谜题的R包。核心算法执行迭代双向搜索:从初始和目标排列状态开始,随机操作序列在对称群Sn的凯莱图中生成循环;它们的交集产生一条连接路径。当未找到直接交集时,距离引导的桥接选择会缩小差距,然后重复该过程。该包针对TopSpin(n,k)谜题,其状态空间是由循环移位和前缀反转生成的Sn的凯莱图。我们描述了数学框架、算法及其实现,它将C++哈希索引状态存储与可选的Vulkan GPU加速相结合。该软件可在CRAN上公开获取。
英文摘要
We present cayleyR, an R package for solving permutation puzzles by detecting cycle intersections in Cayley graphs. The core algorithm performs an iterative bidirectional search: from both the initial and target permutation states, random operation sequences generate cycles in the Cayley graph of the symmetric group Sn; their intersection yields a connecting path. When no direct intersection is found, a distance-guided bridge selection narrows the gap, and the process repeats. The package targets the TopSpin(n,k) puzzle, whose state space is a Cayley graph of Sn generated by a cyclic shift and a prefix reversal. We describe the mathematical framework, the algorithm, and its implementation, which combines a C++ hash-indexed state store with optional Vulkan GPU acceleration. The software is publicly available on CRAN.