A note on the number of division steps in the Euclidean algorithm
暂无分享,去创建一个
Let w be a natural number and let #(w) be the maximal number of divisions that the Euclidean algorithm, ao = qlal+a2 , al ~ q2a2+a3 , ak-2 = qk-lak-l+ak , ak-1 = qkak, (1) needs for a given input (ao, al), where a0 > al = w. Lamd's theorem [2, 1] (this theorem was proved earlier by Finck in 1841 [1]) implies the asymptotic estimate u(~) = O(log w), (2) and log w cannot be replaced by any function h(w) such that h(w) = o(logw), since, if Fo, F1,... is the Fibonacci sequence, for ao = Fk+2, w = at = Fk+x the number of divisions is equal to k. The difference between the latter number and log s w, where ¢ = (1 + z/g)/2, is a bounded value. One of the results related to the average case behavior of the Euclidean algorithm is by Heilbronn [4, 1]: 1 ~ E(v,~) ~ 121n-Aln. ~(v) ~r~ ' l~w~v gcd(v,w)=l where E(v,w) is the number of division steps performed by the Euclidean algorithm on the input (v, w). From this asymptotic equality it follows that for some constant C the inequality 12 In 2 ~(w)> ~ lnw+C (3) holds. Using the standard notation f(n) = O(g(n)), which is defined for functions f(n), g(n) with positive values by f(n) = O(g(n)) if and only if 3cl,c2,no>0, Vn>no, clg(n)~f(n)gc2g(n), we therefore have Theorem 1 #(w) = O(logw). We now prove the following main theorem. Notice that (121n2)/~r 2 < 1/(21n¢), and (4) is stronger than (3) for all large enough w. Additionally, the proof of Theorem 2, which will be given, is elementary and thereby we get an elementary proof of Theorem 1. We start with a lemma on Fibonacci numbers. Lemma 1 For any 0 < d < ~/g, the inequality IF.+1 _¢ < 1 dF~ (5) holds for all large enough n.
[1] David Thomas,et al. The Art in Computer Programming , 2001 .
[2] H. Heilbronn. On the Average Length of a Class of Finite Continued Fractions , 1969 .
[3] Jeffrey Shallit,et al. Algorithmic Number Theory , 1996, Lecture Notes in Computer Science.
[4] G. Hardy,et al. An Introduction to the Theory of Numbers , 1938 .
[5] Donald E. Knuth,et al. The Art of Computer Programming, Vol. 2 , 1981 .