1. Trang chủ
  2. » Giáo án - Bài giảng

The euclidean algorithm and continued fractions

3 52 0

Đang tải... (xem toàn văn)

THÔNG TIN TÀI LIỆU

Thông tin cơ bản

Định dạng
Số trang 3
Dung lượng 60,72 KB

Nội dung

Princeton Companion to Mathematics Proof step earlier, because 25 is expressed as a combination of 20 and Working back up the algorithm we conclude that is a factor of both m = 165 and n = 70 So is certainly a common factor of m and n By Keith Ball On the other hand, the last-but-one line shows that can be written as a combination of 25 and The Euclidean Algorithm 20 with integer coefficients Since the previous line The fundamental theorem of arithmetic (see shows that 20 can be written as a combination of p ??), which states that every integer can be 70 and 25 we can write in terms of 70 and 25: factored into primes in a unique way, has been known since antiquity The usual proof depends = 25 − 20 = 25 − (70 − × 25) = × 25 − 70 upon what is known as the Euclidean algorithm, Continuing back up the algorithm we can express which constructs the highest common factor (h, 25 in terms of 165 and 70 and conclude that say) of two numbers m and n In doing so, it shows that h can be written in the form am + bn for some = × (165 − × 70) − 70 = × 165 − × 70 pair of integers a, b (not necessarily positive) For example, the highest common factor of 17 and This shows that is the highest common factor is and sure enough we can express as the com- of 165 and 70 because any factor of 165 and 70 bination = × 17 − 12 × would automatically be a factor of × 165 − × 70: The algorithm works as follows Assume that m that is, a factor of Along the way we have shown is larger than n and start by dividing m by n to that the highest common factor can be expressed yield a quotient q1 and a remainder r1 that is less as a combination of the two original numbers m than n Then we have and n The Euclidean Algorithm and Continued Fractions m = q n + r1 (1.1) Continued Fractions for Numbers Now since r1 < n we may divide n by r1 to obtain a second quotient and remainder: During the 1500 years following Euclid, it was realized by mathematicians of the Indian and Aran = q r1 + r2 (1.2) bic schools that the application of the Euclidean Continue in this way, dividing r1 by r2 , r2 by r3 , algorithm to a pair of integers m and n could be and so on The remainders get smaller each time encoded in a formula for the ratio m/n The equabut cannot go below zero So the process must tion (1.1) can be written stop at some point with a remainder of 0—with m r1 a division that comes out exactly For instance, if = q1 + = q1 + , n n F m = 165 and n = 70, the algorithm generates the sequence of divisions where F = n/r1 Now equation (1.2) expresses F as r2 165 = × 70 + 25, (1.3) F = q2 + r 70 = × 25 + 20, (1.4) 25 = × 20 + 5, (1.5) The next step of the algorithm will produce an 20 = × + (1.6) expression for r1 /r2 and so on If the algorithm stops after k steps, then we can put these expresThe process guarantees that the last non-zero sions together to get what is called the continued remainder, in this case, is the highest common fraction for m/n: factor of m and n On the one hand, the last line m shows that is a factor of the previous remain = q1 + n q2 + der 20 Now the last but one line shows that is q3 + + also a factor of the remainder 25 that occurred one qk Princeton Companion to Mathematics Proof For example, 165 =2+ 70 + 1+1 The continued fraction can be constructed directly from the ratio 165/70 = 2.357 14 without reference to the integers 165 and 70 We start by subtracting from 2.357 14 the largest whole number we can: namely Now we take the reciprocal of what is left: 1/0.357 14 = 2.8 Again we subtract off the largest integer we can, 2, which tells us that q2 = The reciprocal of 0.8 is 1.25 so q3 = and then, finally, 1/0.25 = 4, so q4 = and the continued fraction stops The mathematician John Wallis, who worked in the seventeenth century, seems to have been the first to give a systematic account of continued fractions and to recognize that continued-fraction expansions exist for all numbers (not only rational numbers), provided that we allow the continued fraction to have infinitely many levels If we start with any positive number, we can build its continued fraction in the same way as for the ratio 2.357 14 For example, if the number is π = 3.141 592 65 , we start by subtracting 3, then take the reciprocal of what is left: 1/0.141 59 = 7.062 51 So for π we get that the second quotient is Continuing the process we build the continued fraction π =3+ (2.1) + 15+ 1+ 292+ 1+ The numbers 3, 7, 15, and so on, that appear in the fraction are called the partial quotients of π The continued fraction for a real number can be used to approximate it by rational numbers If we truncate the continued fraction after several steps, we are left with a finite continued fraction which is a rational number: for example, by truncating the fraction (2.1), one level down we get the familiar approximation π ≈ + 1/7 = 22/7; at the second level we get the approximation + 1/(7 + 1/15) = 333/106 The truncations at different levels thus generate a sequence of rational approximations: the sequence for π begins 3, 22/7, 333/106, 355/113, Whatever positive number x we start with, the sequence of continued-fraction approximations will approach x as we move further down the fraction Indeed, the formal interpretation of the equation (2.1) is precisely that the successive truncations of the fraction approach π Naturally, in order to get better approximations to a number x we need to take more “complicated” fractions—fractions with larger numerator and denominator The continued-fraction approximations to x are best approximations to x in the following sense: if p/q is one of these fractions, then it is impossible to find any fraction r/s that is closer than p/q to x, but which has denominator s smaller than q Moreover, if p/q is one of the approximations coming from the continued fraction for x, then the error x − p/q cannot be too large relative to the size of the denominator q; specifically, it is always true that p x− (2.2) q q2 This error estimate shows just how special the continued-fraction approximations are: if you pick a denominator q without thinking, and then select the numerator p that makes p/q closest to x, the only thing you can guarantee is that x lies between (p−1/2)/q and (p+1/2)/q So the error could be as large as 1/(2q), which is much bigger than 1/(q ) if q is a large integer Sometimes a continued-fraction approximation to x can have even smaller error than is guaranteed by (2.2) For example, the approximation π ≈ 355/113 that we get by truncating (2.1) at the third level is exceptionally accurate, the reason being that the next partial quotient, 292, is rather large So we are not changing the fraction much by ignoring the tail 1/(292 + 1/(1 + )) In this sense, the most difficult number to approximate by fractions is the one with the smallest possible partial quotients, i.e the one with all its partial quotients equal to This number, 1+ , (2.3) + 1+1 can be easily calculated because the sequence of partial quotients is periodic: it repeats itself If we call the number φ, then φ−1 is 1/(1 + 1/(1 + )) The reciprocal of this number is exactly the continued fraction (2.3) for φ Hence = φ, φ−1 Princeton Companion to Mathematics Proof which in turn implies that φ2 − φ√= The roots of this quadratic equation are (1 + 5)/2 = 1.618 and (1 − 5)/2 = −0.618 Since the number we are trying to find is positive, it is the first of these roots: the so-called golden ratio It is quite easy to show that, just as (2.3) represents the positive solution of the equation x2 − x − = 0, any other periodic continued fraction represents a root of a quadratic equation This fact seems to have been understood already in the sixteenth century It is quite a lot trickier to prove the converse: that the continued fraction of any quadratic surd is periodic This was established by Lagrange during the eighteenth century and is closely related to the existence of units in quadratic number fields (see Algebraic Numbers on p ??) Continued Fractions for Functions Several of the most important functions in mathematics are most easily described using infinite sums For example, the exponential function has the infinite series x2 xn ex = + x + + ··· + + ··· n! There are also a number of functions that have simple continued-fraction expansions: continued fractions involving a variable like x These are probably the most important continued fractions historically For example, the function x → tan x has the continued fraction x tan x = , (3.1) x2 1− x2 3− 5− valid for any value of x other than the odd multiples of π/2, where the tangent has a vertical asymptote Whereas the infinite series of a function can be truncated to provide polynomial approximations to the function, truncation of the continued fraction provides approximations by rational functions: functions that are ratios of polynomials Thus if we truncate the fraction for the tangent after one level, we get the approximation x 3x tan x ≈ = − x2 /3 − x2 This continued fraction, and the rapidity with which its truncations approach tan x, played the central role in the proof that π is irrational: that π is not the ratio of two whole numbers The proof was found by Johann Lambert in the 1760s He used the continued fraction to show that if x is a rational number (other than 0), then tan x is not But tan π/4 = (which certainly is rational), so π/4 cannot be ... is 1.25 so q3 = and then, finally, 1/0.25 = 4, so q4 = and the continued fraction stops The mathematician John Wallis, who worked in the seventeenth century, seems to have been the first to give... “complicated” fractions fractions with larger numerator and denominator The continued- fraction approximations to x are best approximations to x in the following sense: if p/q is one of these fractions, then... that the second quotient is Continuing the process we build the continued fraction π =3+ (2.1) + 15+ 1+ 292+ 1+ The numbers 3, 7, 15, and so on, that appear in the fraction are called the

Ngày đăng: 07/03/2019, 13:07

TỪ KHÓA LIÊN QUAN

TÀI LIỆU CÙNG NGƯỜI DÙNG

TÀI LIỆU LIÊN QUAN

w