Note: Previously titled "Circle-Permutation-Algorithm." The name was updated to ensure uniqueness and prevent naming collisions with common academic algorithms.
An optimized iterative algorithm for Full Permutation generation that challenges the
Ring-Cascade-Permutation-Algorithm is a transformative generation framework for permutations that shatters the operational bottlenecks of classical combinatorial algorithms. By introducing a triple-segment memory mirroring topology, this framework demonstrates that active logic overhead can be structurally decoupled from the
This repository is the official C++ implementation of the paper:
Work in Progress
As discussed in the computer science community,
-
Non-Constant Factor: Since they differ by a factor of
$N$ , which grows toward infinity, they are not in the same order of magnitude. -
Scalability: This project focuses on optimizing the transition between permutation sets (e.g., scaling from
$N=15$ to$N=16$ ), significantly enhancing the algorithm's capability to handle larger datasets. -
Practical Impact: By narrowing the computational gap, we make generating permutations for larger
$N$ more viable in real-world applications.
You can try the interactive Ring-Cascade permutation visualization directly in your browser:
👉 View Ring-Cascade and Triple Process
-
Complexity Breakthrough: Reduces the frequency of state-transition decisions to an amortized
$O((n-1)!)$ level, while the majority of permutations are generated via deterministic topological shifts. - Extreme Performance: Unlike traditional algorithms, the Ring-Cascade Algorithm's throughput scales positively with order N. It reaches 4.856 Giga/s at N=14, demonstrating the power of its O((n−1)!) amortized logic. This performance translates to a CPP of 0.41, setting a new benchmark for combinatorial generation.
-
Optimal Superpermutation: Provides a universal constructive proof for the Superpermutation problem, yielding sequences that strictly attain the theoretical lower bound
$L = \sum_{i=1}^{n} i!$ . - Stateless Sharding: Features a mathematically consistent indexing theorem (Theorem 1) that enables efficient Rank and Unrank operations for massive parallelization.
Last Run: 2026-02-12 06:56:13 UTC / 2026-02-12 14:56:13 (UTC+8)
Processor: AMD EPYC 7763 64-Core Processor
| N | Heap's Algorithm (s) | RCPA (s) | Speedup (vs Heap) |
|---|---|---|---|
| 10 | 0.058064 s | 0.000893 s | 65.02x |
| 11 | 0.645421 s | 0.008182 s | 78.88x |
| 12 | 7.833244 s | 0.080941 s | 96.77x |
| 13 | 104.411604 s | 0.897805 s | 116.29x |
| Order (N) | Theoretical Lower Bound ( |
Ring-Cascade Algorithm Length | Status |
|---|---|---|---|
| 10 | 4,037,913 | 4,037,913 | ✅ MATCH |
| 12 | 523,001,313 | 523,001,313 | ✅ MATCH |
| 15 | 1,401,602,636,313 | 1,401,602,636,313 | ✅ MATCH |
If you use this algorithm in your research or project, please cite it as:
Yusheng-Hu. (2026). Ring-Cascade-Permutation-Algorithm: High-performance Full Permutation Generation [Data set]. Zenodo. https://doi.org/10.5281/zenodo.18194997