Skip to Main content Skip to Navigation
Journal articles

Lexicographic unranking of combinations revisited

Abstract : In the context of combinatorial sampling, the so-called “unranking method” can be seen as a link between a total order over the objects and an effective way to construct an object of given rank. The most classical order used in this context is the lexicographic order, which corresponds to the familiar word ordering in the dictionary. In this article, we propose a comparative study of four algorithms dedicated to the lexicographic unranking of combinations, including three algorithms that were introduced decades ago. We start the paper with the introduction of our new algorithm using a new strategy of computations based on the classical factorial numeral system (or factoradics). Then, we present, in a high level, the three other algorithms. For each case we analyze its time complexity on average, within a uniform framework, and describe its strengths and weaknesses. For about 20 years, such algorithms have been implemented using big integer arithmetic rather than bounded integer arithmetic which makes the cost of computing some coefficients higher than previously stated. We propose improvements for all implementations which take this fact into account and we give a detailed complexity analysis which is validated by an experimental analysis. Finally we show that even if the algorithms are based on different strategies, all are doing very similar computations. Lastly, we extend our approach to the unranking of other classical combinatorial objects like families counted by multinomial coefficients and k-permutations.
Complete list of metadata
Contributor : Martin Pépin Connect in order to contact the contributor
Submitted on : Monday, February 22, 2021 - 11:01:08 AM
Last modification on : Sunday, June 26, 2022 - 3:05:01 AM


Files produced by the author(s)



Antoine Genitrini, Martin Pépin. Lexicographic unranking of combinations revisited. Algorithms, MDPI, 2021, 14 (3), pp.97. ⟨10.3390/a14030097⟩. ⟨hal-03040740v2⟩



Record views


Files downloads