CayleyR: Solving the TopSpin puzzle via cycle intersection
cayleyR is an R package for solving permutation puzzles by detecting cycle intersections in Cayley graphs. It uses an iterative bidirectional search and distance-guided bridge selection. The package targets the TopSpin(n,k) puzzle and leverages C++ indexing with optional Vulkan GPU acceleration. It is available on CRAN.
-->
[Submitted on 14 Jul 2026]
Title:CayleyR: Solving the TopSpin puzzle via cycle intersection
View a PDF of the paper titled CayleyR: Solving the TopSpin puzzle via cycle intersection, by Yuri Baramykov
View PDF HTML (experimental)
Abstract: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.
Comments: 17 pages, 2 figures
Subjects:
Artificial Intelligence (cs.AI)
MSC classes: 20B40, 05C25, 68W05
ACM classes: F.2.2; I.2.8; G.2.1
Cite as: arXiv:2607.13219 [cs.AI]
(or arXiv:2607.13219v1 [cs.AI] for this version)
https://doi.org/10.48550/arXiv.2607.13219
arXiv-issued DOI via DataCite (pending registration)
Submission history
From: Yuri Baramykov [view email] [v1] Tue, 14 Jul 2026 19:28:41 UTC (312 KB)
Full-text links:
Access Paper:
View a PDF of the paper titled CayleyR: Solving the TopSpin puzzle via cycle intersection, by Yuri Baramykov
View PDF
HTML (experimental)
TeX Source
view license
Current browse context:
cs.AI
new | recent | 2026-07
Change to browse by:
cs
References & Citations
NASA ADS
Google Scholar
Semantic Scholar
Loading...
Data provided by:
Bibliographic Tools
Bibliographic and Citation Tools
Bibliographic Explorer Toggle
Bibliographic Explorer (What is the Explorer?)
Connected Papers Toggle
Connected Papers (What is Connected Papers?)
Litmaps Toggle
Litmaps (What is Litmaps?)
scite.ai Toggle
scite Smart Citations (What are Smart Citations?)
Code, Data, Media
Code, Data and Media Associated with this Article
alphaXiv Toggle
alphaXiv (What is alphaXiv?)
Links to Code Toggle
CatalyzeX Code Finder for Papers (What is CatalyzeX?)
DagsHub Toggle
DagsHub (What is DagsHub?)
GotitPub Toggle
Gotit.pub (What is GotitPub?)
Huggingface Toggle
Hugging Face (What is Huggingface?)
ScienceCast Toggle
ScienceCast (What is ScienceCast?)
Demos
Demos
Replicate Toggle
Replicate (What is Replicate?)
Spaces Toggle
Hugging Face Spaces (What is Spaces?)
Spaces Toggle
TXYZ.AI (What is TXYZ.AI?)
Related Papers
Recommenders and Search Tools
Link to Influence Flower
Influence Flower (What are Influence Flowers?)
Core recommender toggle
CORE Recommender (What is CORE?)
Author
Venue
Institution
Topic
About arXivLabs
arXivLabs: experimental projects with community collaborators
arXivLabs is a framework that allows collaborators to develop and share new arXiv features directly on our website.
Both individuals and organizations that work with arXivLabs have embraced and accepted our values of openness, community, excellence, and user data privacy. arXiv is committed to these values and only works with partners that adhere to them.
Have an idea for a project that will add value for arXiv's community? Learn more about arXivLabs.
Which authors of this paper are endorsers? | Disable MathJax (What is MathJax?)