Results 1 
4 of
4
On Euclid’s algorithm and elementary number theory
, 2009
"... Algorithms can be used to prove and to discover new theorems. This paper shows how algorithmic skills in general, and the notion of invariance in particular, can be used to derive many results from Euclid’s algorithm. We illustrate how to use the algorithm as a verification interface (i.e., how to v ..."
Abstract

Cited by 3 (2 self)
 Add to MetaCart
Algorithms can be used to prove and to discover new theorems. This paper shows how algorithmic skills in general, and the notion of invariance in particular, can be used to derive many results from Euclid’s algorithm. We illustrate how to use the algorithm as a verification interface (i.e., how to verify theorems) and as a construction interface (i.e., how to investigate and derive new theorems). The theorems that we verify are wellknown and most of them are included in standard numbertheory books. The new results concern distributivity properties of the greatest common divisor and a new algorithm for efficiently enumerating the positive rationals in two different ways. One way is known and is due to Moshe Newman. The second is new and corresponds to a deforestation of the SternBrocot tree of rationals. We show that both enumerations stem from the same simple algorithm. In this way, we construct a SternBrocot enumeration algorithm with the same time and space complexity as Newman’s algorithm. A short review of the original papers by Stern and Brocot is also included.
Declarative Combinatorics: Isomorphisms, Hylomorphisms and Hereditarily Finite Data Types in Haskell – unpublished draft –
, 808
"... This paper is an exploration in a functional programming framework of isomorphisms between elementary data types (natural numbers, sets, finite functions, permutations binary decision diagrams, graphs, hypergraphs, parenthesis languages, dyadic rationals etc.) and their extension to hereditarily fin ..."
Abstract

Cited by 1 (1 self)
 Add to MetaCart
This paper is an exploration in a functional programming framework of isomorphisms between elementary data types (natural numbers, sets, finite functions, permutations binary decision diagrams, graphs, hypergraphs, parenthesis languages, dyadic rationals etc.) and their extension to hereditarily finite universes through hylomorphisms derived from ranking/unranking and pairing/unpairing operations. An embedded higher order combinator language provides anytoany encodings automatically. A few examples of “free algorithms ” obtained by transferring operations between data types are shown. Other applications range from stream iterators on combinatorial objects to succinct data representations and generation of random instances. The paper is part of a larger effort to cover in a declarative programming paradigm some fundamental combinatorial generation algorithms along the lines of Knuth’s recent work (Knuth 2006). In 440 lines of Haskell code we cover 20 data types and, through the use of the embedded combinator language, provide 380 distinct bijective encodings between them. The selfcontained source code of the paper, as generated from a literate Haskell program, is available at
Isomorphic Data Encodings and their Generalization to Hylomorphisms on Hereditarily Finite Data Types
"... Abstract. This paper is an exploration in a functional programming framework of isomorphisms between elementary data types (natural numbers, sets, multisets, finite functions, permutations binary decision diagrams, graphs, hypergraphs, parenthesis languages, dyadic rationals, primes, DNA sequences e ..."
Abstract
 Add to MetaCart
Abstract. This paper is an exploration in a functional programming framework of isomorphisms between elementary data types (natural numbers, sets, multisets, finite functions, permutations binary decision diagrams, graphs, hypergraphs, parenthesis languages, dyadic rationals, primes, DNA sequences etc.) and their extension to hereditarily finite universes through hylomorphisms derived from ranking/unranking and pairing/unpairing operations. An embedded higher order combinator language provides anytoany encodings automatically. Besides applications to experimental mathematics, a few examples of “free algorithms ” obtained by transferring operations between data types are shown. Other applications range from stream iterators on combinatorial objects to selfdelimiting codes, succinct data representations and generation of random instances. The paper covers 60 data types and, through the use of the embedded combinator language, provides 3660 distinct bijective transformations between them. The selfcontained source code of the paper, as generated from a literate Haskell program, is available at
Isomorphic Data Encodings in Haskell and their Generalization to Hylomorphisms on Hereditarily Finite Data Types
, 808
"... Abstract. This paper is an exploration in a functional programming framework of isomorphisms between elementary data types (natural numbers, sets, multisets, finite functions, permutations binary decision diagrams, graphs, hypergraphs, parenthesis languages, dyadic rationals, DNA sequences etc.) and ..."
Abstract
 Add to MetaCart
Abstract. This paper is an exploration in a functional programming framework of isomorphisms between elementary data types (natural numbers, sets, multisets, finite functions, permutations binary decision diagrams, graphs, hypergraphs, parenthesis languages, dyadic rationals, DNA sequences etc.) and their extension to hereditarily finite universes through hylomorphisms derived from ranking/unranking and pairing/unpairing operations. An embedded higher order combinator language provides anytoany encodings automatically. Besides applications to experimental mathematics, a few examples of “free algorithms ” obtained by transferring operations between data types are shown. Other applications range from stream iterators on combinatorial objects to selfdelimiting codes, succinct data representations and generation of random instances. The paper covers 47 data types and, through the use of the embedded combinator language, provides 2162 distinct bijective transformations between them. The selfcontained source code of the paper, as generated from a literate Haskell program, is available at