@article { ,
title = {On Euclidâ€™s algorithm and elementary number theory},
abstract = {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 well-known and most of them are included in standard number-theory 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 Sternâ€“Brocot tree of rationals. We show that both enumerations stem from the same simple algorithm. In this way, we construct a Sternâ€“Brocot 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.},
doi = {10.1016/j.scico.2010.05.006},
eissn = {0167-64230},
issn = {0167-6423},
issue = {3},
journal = {Science of Computer Programming},
publicationstatus = {Published},
publisher = {Elsevier},
url = {https://nottingham-repository.worktribe.com/output/707172},
volume = {76},
keyword = {Number theory;
Calculational method;
Greatest common divisor;
Euclidâ€™s algorithm;
Invariant;
Eisenstein array;
Eisensteinâ€“Stern tree (aka Calkinâ€“Wilf tree);
Sternâ€“Brocot tree;
Algorithm derivation;
Enum},
year = {2011},
author = {Backhouse, Roland and Ferreira, João F.}
}