Sciweavers

CORR
2008
Springer

Ranking and Unranking of Hereditarily Finite Functions and Permutations

13 years 11 months ago
Ranking and Unranking of Hereditarily Finite Functions and Permutations
Prolog's ability to return multiple answers on backtracking provides an elegant mechanism to derive reversible encodings of combinatorial objects as Natural Numbers i.e. ranking and unranking functions. Starting from a generalization of Ackerman's encoding of Hereditarily Finite Sets with Urelements and a novel tupling/untupling operation, we derive encodings for Finite Functions and use them as building blocks for an executable theory of Hereditarily Finite Functions. The more difficult problem of ranking and unranking Hereditarily Finite Permutations is then tackled using Lehmer codes and factoradics. The paper is organized as a self-contained literate Prolog program available at http://logic.csci.unt.edu/tarau/research/2008/pHFF.zip.
Paul Tarau
Added 09 Dec 2010
Updated 09 Dec 2010
Type Journal
Year 2008
Where CORR
Authors Paul Tarau
Comments (0)