Deriving a Fast Inverse of the Generalized Cantor N-tupling Bijection

Author Paul Tarau

Thumbnail PDF


  • Filesize: 429 kB
  • 11 pages

Document Identifiers

Author Details

Paul Tarau

Cite AsGet BibTex

Paul Tarau. Deriving a Fast Inverse of the Generalized Cantor N-tupling Bijection. In Technical Communications of the 28th International Conference on Logic Programming (ICLP'12). Leibniz International Proceedings in Informatics (LIPIcs), Volume 17, pp. 312-322, Schloss Dagstuhl – Leibniz-Zentrum für Informatik (2012)


We attack an interesting open problem (an efficient algorithm to invert the generalized Cantor N-tupling bijection) and solve it through a sequence of equivalence preserving transformations of logic programs, that take advantage of unique strengths of this programming paradigm. An extension to set and multiset tuple encodings, as well as a simple application to a "fair-search" mechanism illustrate practical uses of our algorithms. The code in the paper (a literate Prolog program, tested with SWI-Prolog and Lean Prolog) is available at .
  • generalized Cantor n-tupling bijection
  • bijective data type transformations
  • combinatorial number system
  • solving combinatorial problems in Prolog
  • op


  • Access Statistics
  • Total Accesses (updated on a weekly basis)
    PDF Downloads