Results 1 
3 of
3
Computing with Free Algebras, in
 Zaharie (Eds.), Proceedings of SYNASC 2012, IEEE, 2013
"... Abstract We describe arithmetic computations in terms of operations on some well known free algebras (S1S, S2S and ordered rooted binary trees) while emphasizing the common structure present in all of them when seen as isomorphic with the set of natural numbers. Constructors and deconstructors seen ..."
Abstract

Cited by 1 (1 self)
 Add to MetaCart
(Show Context)
Abstract We describe arithmetic computations in terms of operations on some well known free algebras (S1S, S2S and ordered rooted binary trees) while emphasizing the common structure present in all of them when seen as isomorphic with the set of natural numbers. Constructors and deconstructors seen through an initial algebra semantics are generalized to recursively defined functions obeying similar laws. Implementations using GHC's view construct are discussed, based on the free algebra of rooted ordered binary trees. Categories and Subject Descriptors D.3.3 [PROGRAMMING LANGUAGES]: Language Constructs and FeaturesData types and structures General Terms Algorithms, Languages, Theory Keywords arithmetic computations with free algebras, generalized constructors, declarative modeling of computational phenomena, bijective Gödel numberings and algebraic datatypes,
Treebased Arithmetic and Compressed Representations of Giant Numbers
"... Abstract. Can we do arithmetic in a completely different way, with a radically different data structure? Could this approach provide practical benefits, like operations on giant numbers while having an average performance similar to traditional bitstring representations? While answering these quest ..."
Abstract
 Add to MetaCart
(Show Context)
Abstract. Can we do arithmetic in a completely different way, with a radically different data structure? Could this approach provide practical benefits, like operations on giant numbers while having an average performance similar to traditional bitstring representations? While answering these questions positively, our tree based representation described in this paper comes with a few extra benefits: it compresses giant numbers such that, for instance, the largest known prime number as well as its related perfect number are represented as trees of small sizes. The same also applies to Fermat numbers and important computations like exponentiation of two become constant time operations. At the same time, succinct representations of sparse sets, multisets and sequences become possible through bijections to our treerepresented natural numbers. 1
Computing with Free Algebras and Generalized Constructors
"... We describe arithmetic computations in terms of operations on some well known free algebras (S1S, S2S and ordered rooted binary trees) while emphasizing the common structure present in all them when seen as isomorphic with the set of natural numbers. Constructors and deconstructors seen through an i ..."
Abstract
 Add to MetaCart
(Show Context)
We describe arithmetic computations in terms of operations on some well known free algebras (S1S, S2S and ordered rooted binary trees) while emphasizing the common structure present in all them when seen as isomorphic with the set of natural numbers. Constructors and deconstructors seen through an initial algebra semantics are generalized to recursively defined functions obeying similar laws. Implementations using Scala’s apply and unapply and GHC’s view construct are discussed together with an application to a realistic arbitrary size arithmetic package written in Scala, based on the free algebra of rooted ordered binary trees. Categories and Subject Descriptors D.3.3 [PROGRAMMING