Lexicographic unranking algorithms for the Twelvefold Way - Sorbonne Université Access content directly
Preprints, Working Papers, ... Year : 2024

Lexicographic unranking algorithms for the Twelvefold Way


The Twelvefold Way represents Rota's classification, addressing the most fundamental enumeration problems and their associated combinatorial counting formulas. These distinct problems are connected to enumerating functions defined from a set of elements denoted by N into another one K. The counting solutions for the twelve problems are well known. We are interested in unranking algorithms. Such an algorithm is based on an underlying total order on the set of structures we aim at constructing. By taking the rank of an object, i.e. its number according to the total order, the algorithm outputs the structure itself after having built it. One famous total order is the lexicographic order: it is probably the one that is the most used by people when one wants to order things. While the counting solutions for Rota's classification have been known for years it is interesting to note that three among the problems have yet no lexicographic unranking algorithm. In this paper we aim at providing algorithms for the last three cases that remain without such algorithms. After presenting in detail the solution for set partitions associated with the famous Stirling numbers of the second kind, we explicitly explain how to adapt the algorithm for the two remaining cases. Additionally, we propose a detailed and fine-grained complexity analysis based on the number of bitwise arithmetic operations.
Fichier principal
Vignette du fichier
CurielGenitrini.pdf (787.82 Ko) Télécharger le fichier
Origin Files produced by the author(s)

Dates and versions

hal-04411470 , version 1 (23-01-2024)
hal-04411470 , version 2 (11-02-2024)
hal-04411470 , version 3 (21-02-2024)


  • HAL Id : hal-04411470 , version 2


Amaury Curiel, Antoine Genitrini. Lexicographic unranking algorithms for the Twelvefold Way. 2024. ⟨hal-04411470v2⟩
186 View
79 Download


Gmail Mastodon Facebook X LinkedIn More