Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
skip to main content
10.1145/1863597.1863602acmconferencesArticle/Chapter ViewAbstractPublication PagesicfpConference Proceedingsconference-collections
research-article

Hereditarily finite representations of natural numbers and self-delimiting codes

Published: 25 September 2010 Publication History

Abstract

Using a bijection between natural numbers and hereditarily finite functions we derive a new reversible variable length self-delimiting code through a bitstring representation in a balanced parenthesis language. The code features the ability to encode arbitrarily nested data types, can represent huge (low "complexity") numbers, and is decodable from its beginning or its end. Besides its possible practical applications to media stream encodings, a comparison with the well-known Elias omega code and a conjecture about its asymptotic behavior under the Kraft inequality suggest it as an interesting object of study for experimental mathematicians.
The paper is organized as a self-contained literate Haskell program inviting the reader to explore its content independently. Its code is available at http://logic.cse.unt.edu/tarau/research/2010/selfdelim.hs

References

[1]
}}Artem Alimarine, Sjaak Smetsers, Arjen van Weelden, Marko van Eekelen, and Rinus Plasmeijer. There and back again: arrows for invertible programming. In Haskell '05: Proceedings of the 2005 ACM SIGPLAN workshop on Haskell, pages 86--97, New York, NY, USA, 2005. ACM Press.
[2]
}}J. Berstel and L. Boasson. Balanced grammars and their languages. Lecture Notes In Computer Science, pages 3--25, 2002.
[3]
}}J. Berstel and L. Boasson. Formal properties of XML grammars and languages. Acta Informatica, 38 (9): 649--671, 2002.
[4]
}}Cristian Calude and Arto Salomaa. Algorithmically coding the universe. In Developments in Language Theory, World Scientific, pages 472--492, 1994.
[5]
}}G. J. Chaitin. Information-theoretic incompleteness. Applied Mathematics and Computation, 52 (1): 83--101, 1992.
[6]
}}Conal Elliott. Module: Data.Bijections. Haskell source code library at: http://haskell.org/haskellwiki/TypeCompose.
[7]
}}C. Deppe and H. Schnettler. On the 3/4-Conjecture for Fix-Free Codes. DMTCS Proceedings, (1), 2006.
[8]
}}P. Elias. Universal codeword sets and representations of the integers. IEEE Transactions on Information Theory, 21 (2): 194--203, 1975.
[9]
}}K. Gödel. Über formal unentscheidbare Sätze der Principia Mathematica und verwandter Systeme I. Monatshefte für Mathematik und Physik, 38: 173--198, 1931.
[10]
}}Juris Hartmanis and Theodore P. Baker. On Simple Goedel Numberings and Translations. In Jacques Loeckx, editor, ICALP, volume 14 of Lecture Notes in Computer Science, pages 301--316. Springer, 1974. ISBN 3-540-06841-4. URL http://dblp.uni-trier.de/db/conf/icalp/icalp74.html#HartmanisB74.
[11]
}}John Hughes. Generalizing Monads to Arrows. Science of Computer Programming 37, pp. 67--111, May 2000.
[12]
}}Laszlo Kalmar. On the Reduction of the Decision Problem. First Paper. Ackermann Prefix, A Single Binary Predicate. The Journal of Symbolic Logic, 4 (1): 1--9, mar 1939. ISSN 0022-4812.
[13]
}}Richard Kaye and Tin Lock Wong. On Interpretations of Arithmetic and Set Theory. Notre Dame J. Formal Logic Volume, 48 (4): 497--510, 2007.
[14]
}}Laurence Kirby. Addition and multiplication of sets. Math. Log. Q., 53 (1): 52--65, 2007.
[15]
}}Donald Knuth. The Art of Computer Programming, Volume 4, draft, 2006. http://www-cs-faculty.stanford.edu/~knuth/taocp.html.
[16]
}}L. G. Kraft. A device for quantizing, grouping, and coding amplitude-modulated pulses. Master's thesis, Massachusetts Institute of Technology. Dept. of Electrical Engineering, 1949.
[17]
}}Ming Li and Paul Vitányi. An introduction to Kolmogorov complexity and its applications. Springer-Verlag New York, Inc., New York, NY, USA, 1993. ISBN 0-387-94053-7.
[18]
}}J. Liebehenschel. Ranking and unranking of a generalized Dyck language and the application to the generation of random trees. Séminaire Lotharingien de Combinatoire, 43: 19, 2000.
[19]
}}Conrado Martinez and Xavier Molinero. Generic algorithms for the generation of combinatorial objects. In Branislav Rovan and Peter Vojtas, editors, MFCS, volume 2747 of Lecture Notes in Computer Science, pages 572--581. Springer, 2003.
[20]
}}John McCarthy. Recursive functions of symbolic expressions and their computation by machine, part i. Commun. ACM, 3 (4): 184--195, 1960. ISSN 0001-0782. http://doi.acm.org/10.1145/367177.367199.
[21]
}}Erik Meijer and Graham Hutton. Bananas in Space: Extending Fold and Unfold to Exponential Types. In FPCA, pages 324--333, 1995.
[22]
}}Jozef Pepis. Ein verfahren der mathematischen logik. The Journal of Symbolic Logic, 3 (2): 61--76, jun 1938. ISSN 0022-4812.
[23]
}}Julia Robinson. General recursive functions. Proceedings of the American Mathematical Society, 1 (6): 703--718, dec 1950. ISSN 0002-9939.
[24]
}}Frank Ruskey and Andrzej Proskurowski. Generating binary trees by transpositions. J. Algorithms, 11: 68--84, 1990.
[25]
}}S. A. Savari. On minimum-redundancy fix-free codes. In Proc. of the Data Compression Conference, Snowbird, UT, 2009.
[26]
}}Moto-o Takahashi. A Foundation of Finite Mathematics. Publ. Res. Inst. Math. Sci., 12 (3): 577--708, 1976.
[27]
}}Paul Tarau. Declarative Combinatorics: Isomorphisms, Hylomorphisms and Hereditarily Finite Data Types in Haskell, January 2009. http://arXiv.org/abs/0808.2953, unpublished draft, 104 pages.
[28]
}}Paul Tarau. A Groupoid of Isomorphic Data Transformations. In J. Carette, L. Dixon, C. S. Coen, and S. M. Watt, editors, Intelligent Computer Mathematics, 16th Symposium, Calculemus 2009, 8th International Conference MKM 2009, pages 170--185, Grand Bend, Canada, July 2009. Springer, LNAI 5625.
[29]
}}Paul Tarau. Isomorphisms, Hylomorphisms and Hereditarily Finite Data Types in Haskell. In Proceedings of ACM SAC'09, pages 1898--1903, Honolulu, Hawaii, March 2009. ACM.
[30]
}}Paul Tarau. "Everything Is Everything" Revisited: Shapeshifting Data Types with Isomorphisms and Hylomorphisms. Complex Systems, (18), 2010.
[31]
}}J. Wen and J. D. Villasenor. Reversible variable length codes for efficient and robust image and video coding. In Proceedings Data Compression Conference, pages 471--480, 1998.

Recommendations

Comments

Information & Contributors

Information

Published In

cover image ACM Conferences
MSFP '10: Proceedings of the third ACM SIGPLAN workshop on Mathematically structured functional programming
September 2010
62 pages
ISBN:9781450302555
DOI:10.1145/1863597
Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. Copyrights for components of this work owned by others than ACM must be honored. Abstracting with credit is permitted. To copy otherwise, or republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a fee. Request permissions from [email protected]

Sponsors

Publisher

Association for Computing Machinery

New York, NY, United States

Publication History

Published: 25 September 2010

Permissions

Request permissions for this article.

Check for updates

Author Tags

  1. computational mathematics and functional programming
  2. hereditarily finite data types
  3. ranking/unranking bijections
  4. reversible variable length codes
  5. self-delimiting codes

Qualifiers

  • Research-article

Conference

ICFP '10
Sponsor:

Acceptance Rates

MSFP '10 Paper Acceptance Rate 4 of 8 submissions, 50%;
Overall Acceptance Rate 4 of 8 submissions, 50%

Upcoming Conference

ICFP '25
ACM SIGPLAN International Conference on Functional Programming
October 12 - 18, 2025
Singapore , Singapore

Contributors

Other Metrics

Bibliometrics & Citations

Bibliometrics

Article Metrics

  • 0
    Total Citations
  • 90
    Total Downloads
  • Downloads (Last 12 months)0
  • Downloads (Last 6 weeks)0
Reflects downloads up to 25 Jan 2025

Other Metrics

Citations

View Options

Login options

View options

PDF

View or Download as a PDF file.

PDF

eReader

View online with eReader.

eReader

Figures

Tables

Media

Share

Share

Share this Publication link

Share on social media