Releases: Yusheng-Hu/Position-Pure-Algorithm
Releases · Yusheng-Hu/Position-Pure-Algorithm
v1.1.1
provide Algorithm cpp file
Heap's Algorithm is available and supports standalone execution. For comparation.
Initial Release: Position Method Algorithm (O(n) Linear-Time)
🚀 Initial Release: Position Method (O(n) Linear-Time)
This is the first official release and the reference implementation of the paper:
"Position Method: A Linear-Time Generation Algorithm for Permutations".
🧠 Core Breakthrough
This algorithm shatters the traditional understanding of permutation mapping by establishing a bidirectional one-to-one correspondence between the Factorial Number System and Permutations in strict O(n) time and space complexity.
📊 Key Highlights
-
Mathematical Efficiency: Achieves
$O(n)$ for both Ranking and Unranking. - Superior Performance: Outperforms the classical Myrvold-Ruskey [1] algorithm in large-scale tests (longer N).
- Parallel Ready: Stateless mapping enables massive parallelization of permutation generation.