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 such as families counted by multinomial coefficients and k-permutations.
Highlights
We extend our approach to the unranking of other classical combinatorial objects such as families counted by multinomial coefficients and k-permutations
We recall that the factorial number system, or factoradics, is a mixed radix numeral system in which the representation of integers relies on the use of factorial numbers
We are dealing with a combinatorial structure here, combinations, that is well understood in the combinatorial sense
Summary
Publisher’s Note: MDPI stays neutral with regard to jurisdictional claims in published maps and institutional affiliations. It is often used for the reverse of Lehmer’s problem: generating the uth combination (for a given order on the set of combinations) For efficiency reasons, this approach can be substituted to exhaustive generation once the latter is no longer possible due to the combinatorial explosion of the number of objects when their size increases. Other combinatorial objects are studied in Ruskey’s book about combinatorial generation [7] and in Skiena’s book dedicated to the practical implementation of such algorithms [9] For another ad hoc approach focused on the efficiency aspects of the ranking problem, one can refer to the work of Ryabko [10]. We extend our approach to solve the problem of unranking structures enumerated by multinomial coefficients and objects counted by the k-permutations of n ( called arrangements)
Talk to us
Join us for a 30 min session where you can share your feedback and ask us any queries you have
Disclaimer: All third-party content on this website/platform is and will remain the property of their respective owners and is provided on "as is" basis without any warranties, express or implied. Use of third-party content does not indicate any affiliation, sponsorship with or endorsement by them. Any references to third-party content is to identify the corresponding services and shall be considered fair use under The CopyrightLaw.