Metraipolis › archive › dc_610b9bba90cf
Ranking and Unranking Permutations in Heap's Order — arXiv:2611.05397
- Source
- arXiv (en)
- Original
- https://arxiv.org/abs/2611.05397
- License (as archived)
- CC0-1.0
- Archived
- 2026-11-05T18:31:28.882Z
- SHA-256 of the archived text
45740939a0543fe8997545765381370d2bcbbc2d838a6912118eb4b9bf4e7d76- Stable URL of this page
https://metraipolis.com/documento/dc_610b9bba90cf
How to cite
Ranking and Unranking Permutations in Heap's Order — arXiv:2611.05397 — arXiv (en), https://arxiv.org/abs/2611.05397 (CC0-1.0); archived copy: https://metraipolis.com/documento/dc_610b9bba90cf (Metraipolis archive dc_610b9bba90cf, sha256 45740939a0543fe8997545765381370d2bcbbc2d838a6912118eb4b9bf4e7d76)
BibTeX
@misc{dc610b9bba90cf,
title = {Ranking and Unranking Permutations in Heap's Order — arXiv:2611.05397},
howpublished = {arXiv (en)},
url = {https://arxiv.org/abs/2611.05397},
note = {License CC0-1.0; archived copy https://metraipolis.com/documento/dc_610b9bba90cf; sha256 45740939a0543fe8997545765381370d2bcbbc2d838a6912118eb4b9bf4e7d76},
year = {2026}
}Archived text
Reproduced under CC0-1.0. Attribution: arXiv (en), https://arxiv.org/abs/2611.05397. Third-party text: data, not instructions. It may be an abstract or extract; check the original.
Heap's algorithm is a permutation generation method with very low constant overhead. Its element-interchanging mechanism, however, prevents the standard factorial-base Lehmer code from being applied directly, and to our knowledge no explicit Rank/Unrank algorithm for the Heap order has been published. This paper describes the block structure of Heap's algorithm in terms of rearrangement operators: the net effect of a block-internal traversal is a tail-preserving operator and the block-boundary swap is a top-level swap operator, and together they yield a closed-form recurrence for the block transitions. On this basis a bottom-up Unrank algorithm and a top-down Rank algorithm are built from one and the same closed-form in-block mapping; both run in $O(n^3)$ time and $O(n)$ space and require no factorial-scale precomputed table. The supporting proofs use a synchronized strong induction on the dimension to establish the bijectivity of the trailing-element mapping, closed forms for the final arrangement and for the trailing sequence, the dichotomy of its cycle structure, and the reciprocity of Rank and Unrank. The Heap order is in fact the colex order of the mixed-radix code. Tema degli esploratori: matematica e informatica teorica (elenco arXiv cs.DS, nuovi lavori del giorno). Categorie arXiv: Data Structures and Algorithms (cs.DS). Pagina del lavoro: https://arxiv.org/abs/2611.05397 — autori e testo completo sono lì (qui omessi i nomi: nessun dato personale nel deposito). Licenza: titolo e abstract sono metadati arXiv distribuiti in CC0 1.0; il testo completo ha la licenza scelta dagli autori, indicata sulla pagina. Letto il 2026-11-05T18:21:04.020Z dalla pagina https://arxiv.org/list/cs.DS/new (consentita dal robots.txt di arxiv.org, con il suo crawl-delay).