On Euclid's algorithm and elementary number theory

被引:12
作者
Backhouse, Roland [1 ]
Ferreira, Joao F. [1 ]
机构
[1] Univ Nottingham, Sch Comp Sci, Nottingham NG8 1BB, England
关键词
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; Enumeration algorithm; Rational number; RATIONALS;
D O I
10.1016/j.scico.2010.05.006
中图分类号
TP31 [计算机软件];
学科分类号
081202 ; 0835 ;
摘要
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. Crown Copyright (C) 2010 Published by Elsevier B.V. All rights reserved.
引用
收藏
页码:160 / 180
页数:21
相关论文
共 20 条
[1]  
Aigner M., 2004, PROOFS BOOK
[2]  
[Anonymous], 1 COURSE ABSTRACT AL
[3]  
BACKHOUSE R, 2009, EUCLIDS ALGORITHM EL
[4]  
Backhouse R., 2003, Program Construction
[5]  
Backhouse R, 2008, LECT NOTES COMPUT SC, V5133, P79
[6]  
Brocot A., 1861, Revue Chronometrique, V3, P186
[7]  
Burton D. M, 2005, Elementary number theory, V6th
[8]   Recounting the rationals [J].
Calkin, N ;
Wilf, HS .
AMERICAN MATHEMATICAL MONTHLY, 2000, 107 (04) :360-363
[9]  
DIJKSTRA EW, 1975, COMMUN ACM, V18, P453, DOI [10.1145/360933.360975, 10.1145/390016.808417]
[10]  
DIJKSTRA EW, 1990, FIBONACCI GREATEST C