Archive for December, 2007

372 ARITHMETIC (Make a web site) 4.5.4 fast on computers, but it

Monday, December 31st, 2007

372 ARITHMETIC 4.5.4 fast on computers, but it is not very suitable for hand calculation. Fermat actually did not keep the running value of y; he would look at z2 -N and tell whether or not this quantity was a perfect square by looking at its least significant digits. (The last two digits of a perfect square must be 00, el, e4, 25, 06, or e9, where e is an even digit and o is an odd digit.) Therefore he avoided the operations of steps C2 and C3, replacing them by an occasional determination that a certain number is not a perfect square. Fermat s method of looking at the rightmost digits can, of course, be general- ized by using other moduli. Suppose for clarity that N = 11111, and consider the following table: m if smodm is then x2 modm is and (2 -N) mod m is 3 0, 172 0, 1, 1 1,2,2 5 0,1,2,3,4 0,1,4,4,1 4,0,3,3,0 7 0, 1,2,3,4,5,6 0,1,4,2,2,4,1 5,6,2,&O, 2,6 8 0, 1,2,3,4,5,6,7 0, 1,4,1,0,1,4,1 1,2,5,2,1,2,5,2 11 0, 1,2,3,4,5,6,7,8,9,10 0,1,4,9,5,3,3,5,9,4,1 lO,O, 3,8,4,2,2,4,8,3,0 If x2 -N is to be a perfect square y 2, it must have a residue mod m consistent with this fact, for all m. For example, if N = 11111 and zmod3 # 0, then (x2 -iV)mod3 = 2, so x2 -N cannot be a perfect square; therefore z must be a multiple of 3 whenever 11111 = x2 -y 2. The table tells us, in fact, that xmod3 =O; xmod5 =O, l,or4; xmod7 = 2, 3, 4, or 5; (13) zmod8 =Oor4(hencexmod4=0) ; x mod 11 = 1, 2, 4, 7, 9, or 10. This narrows down the search for z considerably. For example, x must be a multiple of 12. We must have x 2 [ml = 106, and it is easy to verify that the first value of x 2 106 that satisfies all of the conditions in (13) is x = 144. Now 1442 -11111 = 9625, and by attempting to take the square root of 9625 we find that it is not a square. The first value of x > 144 that satisfies (13) is x = 156. In this case 1562 -11111 = 13225 = 1152; so we have found the desired solution x = 156, y = 115. This calculation shows that 11111 = 41 . 271. The hand calculations involved in the above example are comparable to the amount of work required to divide 11111 by 13, 17, 19, 23, 29, 31, 37, and 41, even though the factors 41 and 271 are not very close to each other; thus we can see the advantages of Fermat s method. In place of the moduli considered in (13), we can use any powers of distinct primes. For example, if we had used 25 in place of 5, we would find that the only permissible values of xmod 25 are 0, 5, 6, 10, 15, 19, and 20. This gives more information than (13). In general, we will get more information modulo p2 than we do modulo p, for odd primes p, whenever x2 -N E 0 (modulo p) has a solution 5.
If you are looking for affordable and reliable webhost to host and run your business application visit our ftp web hosting services.

4.5.4 FACTORING INTO PRIMES 371 Ifi those rare (Free web hosting music)

Sunday, December 30th, 2007

4.5.4 FACTORING INTO PRIMES 371 Ifi those rare cases where failure occurs for large N, we could try using f(x) = x2 + c for some c # 0 or 1. The value c = -2 should also be avoided, since the recurrence zm+l = XL-2 has solutions of the form xm = r2m +rA2 . Othei values of c do not seem to lead to simple relationships mod p, and they should all be satisfactory when used with suitable starting values. Richard Brent used a modification of Algorithm B in 1980 to discover the prime factor 1238926361552897 of 2256 + 1. Fermat s method. Another approach to the factoring problem, which was used by Pierre de Fermat in 1643, is more suited to finding large factors than small ones. [Fermat s original description of his method, translated into English, can be found in L. E. Dickson s monumental History of the Theory of Numbers 1 (New York: Chelaea, 1952), 357.1 Assume that N = W, where u 5 w. For practical purposes we may assume that N is odd; this means that u and v are odd, and we can let x = (u + vv4 Y = (v - u)P, (11) N = x2 - y2, OIf you are looking for cheap and quality webhost to host and run your website check Jboss Web Hosting services.

Free web hosts - 370 ARITHMETIC 4.5.4 Algorithm B (Monte Carlo factorization).

Sunday, December 30th, 2007

370 ARITHMETIC 4.5.4 Algorithm B (Monte Carlo factorization). This algorithm outputs the prime factors of a given integer N 2 2, with high probability, although there is a chance that it will fail. Bl. [Initialize.] Set 2 c 5, x c 2, Ic +- 1, 1 +- 1, n +- N. (During this algorithm, 72 is the unfactored part of N, and the variables x and x represent the quantities x, modn and xl m~-l modn in (9), where f(z) = x2 + 1, A = 1, 1=l(m),andk=21-m. I B2. [Test primality.] If 72 is prime (see the discussion below), output n; the algorithm terminates. B3. [Factor found?] Set g t gcd(x -x, n). If g = 1, go on to step B4; otherwise output g. Now if g = n, the algorithm terminates (and it has failed, because we know that n isn t prime). Otherwise set n t n/g, x c xmodn, x t 5 mod 12, and return to step B2. (Note that g may not be prime; this should be tested. In the rare event that g isn t prime, its prime factors probably won t be determinable with this algorithm.) B4. [Advance.] Set k t k -1. If Ic = 0, set x c x, 1 c 21, Ic c 1. Set x t (x2 + 1) mod n and return to B3. fl As an example of Algorithm B, let s try to factor N = 25852 again. The third execution of step B3 will output g = 4 (which isn t prime). After six more iterations the algorithm finds the factor g = 23. Algorithm B has not distinguished itself in this example, but of course it was designed to factor big numbers. Algorithm A takes much longer to find large prime factors, but it can t be beat when it comes to removing the small ones. In practice, we should run Algorithm A awhile before switching over to Algorithm B. We can get a better idea of Algorithm B s prowess by considering the ten largest six-digit primes. The number of iterations, m(p), that Algorithm B needs to find the factor p is given in the following table: p= 999863 999883 999907 999917 999931 999953 999959 999961 999979 999983 m(P) = 276 409 2106 1561 1593 1091 474 1819 395 814 Experiments indicate that m(p) has an average value of about ZJir, and it never exceeds 12& when p < 1000000. The maximum m(p) for p < lo6 is ~~(874771) = 7685; and the maximum of m(p)/& occurs when p = 290047, m(p) .= 6251. According to these experimental results, almost all 12-digit numbers can be factored in fewer than 2000 iterations of Algorithm B (compared to roughly 100,000 divisions in Algorithm A). The time-consuming operations in each iteration of Algorithm B are the multiple-precision multiplication and division in step B4, and the gcd in step B3. If the gcd operation is slow, Pollard suggests gaining speed by accumulating the product mod rz of, say, ten consecutive (x/-x) values before taking each gcd; this replaces 90 percent of the gcd operations by a single multiplication and division while only slightly increasing the chance of failure. He also suggests starting with m = 4 instead of m = 1 in step Bl, where q is, say, & the number of iterations you are planning to use.
You want to have a cheap webhost for your apache application, then check apache web hosting services.

4.5.4 FACTORING INTO (Web design tools) PRIMES 389 [Cf. G. H.

Saturday, December 29th, 2007

4.5.4 FACTORING INTO PRIMES 389 [Cf. G. H. Hardy and E. M. Wright 0), 522.11; see als The size of prime factors has a remarkable connection with permutations: The average number of bits in the lath largest prime factor of a random n-bit integer is asymptotically the same as the average length of the lath largest cycle of a random n-element permutation, as n + 00. [See D. E. Knuth and L. Trabb Pardo, Theoretica Comp. Sci. 3 (1976), 321-348.1 It follows that Algorithm A usually finds a few small factors and then begins a long-drawn-out search for the big ones that are left. Factoring a la Monte Carlo. Near the beginning of Chapter 3, we observed that a random number generator chosen at random isn t very random. This principle, which worked against us in that chapter, has the redeeming virtue that it leads to a surprisingly efficient method of factorization, discovered by J. M. Pollard [BIT 15 (1975), 331-3341. Th e number of computational steps in Pollard s method is on the order of &, so it is significantly faster than Algorithm A when N is large. According to (7) and Fig. 11, the running time will usually be well under N1i4. Let f(z) be any polynomial with integer coefficients, and consider the two sequences defined by x0 = yyo = A; xm+l = f(x,) mod N, ym+l = f(yd modn (9) where p is any prime factor of N. It follows that yrn = xm mod P, for m 2 1. UOi Now exercise 3.1-7 shows that we will have ym = y~(~)-i for some m 2 1, where l(m) is the greatest power of 2 that is 2 m. Thus xm -x~(~).-i will be a multiple of p. Furthermore if f(y)modp behaves as a random mapping from the set {O,l,. . . , p - 1) into itself, exercise 3.1-12 shows that the average value of the least such m will be of order Jir. In fact, exercise 4 below shows that this average value for random mappings is less than 1.625 Q(p), where the function Q(p) x m was defined in Section 1.2.11.3. If the different prime divisors of N correspond to different values of m (as they almost surely will, when N is large), we will be able to find them by calculating gcd(x, -~l(~)-i, N) for m = 1, 2, 3, . . .X until the unfactored residue is prime. From the theory in Chapter 3, we know that a linear polynomial f(z) = ax + c will not be sufficiently random for our purposes. The next-simplest case is quadratic, say f(x) = x2 + 1; although we don t know that this function is sufficiently random, our lack of knowledge tends to support the hypothesis of randomness, and empirical tests show that this f does work essentially as predicted. In fact, f is probably slightly better than random, since x2 + 1 takes on only i(p + 1) distinct values mod p. Therefore the following procedure is reasonable:
Visit our web design programs services for an affordable and reliable webhost to suit all your needs.

Web server version - 368 ARITHMETIC Fig. 11. Probability distribution functions for

Saturday, December 29th, 2007

368 ARITHMETIC Fig. 11. Probability distribution functions for the two largest prime factors of a random integer 2 x. Dickman s (see exercise 18), we can show that the second-largest prime factor of a random integer z will be 2 Z? with approximate probability G(P), where Clearly G(P) = 1 for p 2 a. (See Fig. 11.) Numerical evaluation of (6) and (7) yields the following percentage points : F(a), G(P) = .Ol .05 .lO .20 .35 .50 .65 .80 .90 .95 .99 a = .2697 .3348 .3785 .4430 .5220 .6065 .704i .8187 .9048 .9512 .9900 B = .0056 .0273 .0531 .1003 .1611 .2117 .2582 .3104 .3590 .3967 .4517 Thus, the second-largest prime factor will be 5 x.2117 about half the time, etc. The total number of prime factors, t, has also been intensively analyzed. Obviously 1 5 t2 lg N, but these lower and upper bounds are seldom achieved. It is possible to prove that if N is chosen at random between 1 and 2, the probability that t5 In In x + cd= approaches 1 c -u=/2 (8) -Ifi –ooe du as z + co, for any fixed c. In other words, the distribution of tis essentially normal, with mean and variance lnlnz; about 99.73 percent of all the large integers 5 z have It-lnln ~1 5 3dm. Furthermore the average value of t-In In x for 1 5 N < 2 is known to approach 7 + c (ln(1 -l/p) + l/(p -1)) = LO3465 38818 9 7438. p prime
In case you need quality webspace to host and run your web applications, try our personal web hosting services.

Web hosting faq - 4.5.4 FACTORING INTO PRIMES 367 would imply that

Friday, December 28th, 2007

4.5.4 FACTORING INTO PRIMES 367 would imply that X(X) = L(z) + O(Jl 2 o g z),* see exercise 25. Richard Brent has used a method of D. H. Lehmer to verify Riemann s hypothesis computationally for all small values of z, by showing that c(z) has exactly 75,000,OOO zeros whose imaginary part is in the range 0 < SZ < 32585736.4; all of these zeros have !J?z = 3 and c (z) # 0. [Math. Camp. 33 (1979), 1361-1372.1 In order to analyze the average behavior of Algorithm A, we would like to know how large the largest prime factor pt will tend to be. This question was first investigated by Karl Dickman [A&iv fiir Mat., As&on. och Fys. 22A, 10 (1930), l-141, who studied the probability that a random integer between 1 and z will have its largest prime factor 5 P. Dickman gave a heuristic argument to show that this probability approaches the limiting value F(a) as 2 + 00, where F can be calculated from the functional equation F(a) = 6 F(A) T, for 0 2 QI 5 1; F(a) = 1 for QI 2 1. (6) His argument was essentially this: Given 0 < t < 1, the number of integers less than x whose largest prime factor is between xt and xtfdt is xF (t) dt. The num- ber of primes p in that range is ~IT(x~+~~ T(x ) n(xt + (ln z)xt dt) - r(xt) = ) - = xt dt/t. For every such p, the number of integers n such that np 5 z and the largest prime factor of n is < p is the number of n 5 x1-t whose largest prime factor is 5 (~?- )~/(l-~), namely x1- F(t/(l -t)). Hence xF (t) dt = (x dt/t)(xl-tF(t/(l -t))), and (6) fo11ows by integration. This heuristic argu- ment can be made rigorous; V. Ramaswami [Bull. Amer. Math. Sot. 55 (1949), 1122-11271 showed that the probability in question for fixed a is asymptotically F(a)+O(l/log x), as 2 + co, and many other authors have extended the analysis [see the survey by Karl K. Norton, Memoirs Amer. Math. Sot. 106 (1971), g-271. If 3 2 cr < 1, formula (6) simplifies to F(a) = l-s, F(&)$ = 1-l: = l+lna. Thus, for example, the probability that a random positive integer 5 x has a prime factor > fi is 1 - F( 4) = In 2, about 69 percent. In all such cases, Algorithm A must work hard. The net result of this discussion is that Algorithm A will give the answer rather quickly if we want to factor a six-digit number; but for lqrge N the amount of computer time for factorization by trial division will rapidly exceed practical limits, unless we are unusually lucky. Later in this section we will see that there are fairly good ways to determine whether or not a reasonably large number n is prime, without trying all divisors up to &i. Therefore Algorithm A would often run faster if we inserted a primality test between steps A2 and A3; the running time for this improved algorithm would then be roughly proportional to pt-1, the second-largest prime factor of N, instead of to max(p,-l, ,&). By an argument analogous to
Go visit our java server pages services for a reliable, lowcost webhost to satisfy all your needs.

Free web hosting music - 366 ARITHMETIC 4.5.4 can be set up by

Friday, December 28th, 2007

366 ARITHMETIC 4.5.4 can be set up by means of a short auxiliary program, which builds the table just after the factoring program has been loaded into the computer; see Algorithm 1.3.2P, or see exercise 8. How many trial divisions are necessary in Algorithm A? Let T(Z) be the number of primes 5 Z, so that 7r(2) = 1, ~(10) = 4; the asymptotic behavior of this function has been studied extensively by many of the world s greatest mathematicians, beginning with Legendre in 1798. Numerous advances made during the nineteenth century culminated in 1899, when Charles de la Vall6e Poussin proved that, for some A > 0, 7(x)= s21 & + o(xe-A@=). [A&m. Cowon&% Acad. Roy. Belgique 59 (1899), l-74.1 Integrating by parts yields T(x)=j& + (In:) + ($)3 + . . . + (l,;):+l + o( (log g+J C4) for all fixed r 2 0. The error term in (3) has subsequently been improved; for example, it can be replaced by 0(x exp(-A(log x)3/5/(log log x)1/5)). [See A. Walfisz, Weyl sche Exponentialsummen in der neueren Zahlentheorie (Berlin, 1963), Chapter 5.1 Bernhard Riemann conjectured in 1859 that T(X) = c p(k)L($q/k + O(1) = L(z) -&(&) -;qs) +. *. (5) k>l where L(s) = sr dt/lnt, and his formula agrees well with actual counts when z is of reasonable size. For example, we have the following table: X n(x) x/in x L(x) Riemann s formula 103 168 144.8 176.6 168.36 106 78498 72382.4 78626.5 78527.40 109 50847534 48254942.4 50849233.9 50847455.43 However, the distribution of large primes is not that simple, and Riemann s con- jecture (5) was disproved by J. E. Littlewood in 1914; see Hardy and Littlewood, Acta Math. 41 (1918), 119-196, where it is shown that there is a positive con- stant C such that T(Z) > L(x) + Cfilogloglog x/log x for infinitely many x. Littlewood s result shows that prime numbers are inherently somewhat mys- terious, and it will be necessary to develop deep properties of mathematics before their distribution is really understood. Riemann made another much more plausible conjecture, the famous Riemann hypothesis, which states that the complex function c(z) is zero only when the real part of z is equal to 4, except in the trivial cases where z is a negative even integer. This hypothesis, if true,
Looking for affordable and reliable webhost to host and run your business application? Then look no more and go to servlet web hosting services.

4.5.4 FACTORING INTO PRIMES 365 Al. Initialize No (Make web site)

Friday, December 28th, 2007

4.5.4 FACTORING INTO PRIMES 365 Al. Initialize No A3. Divide A5. Factor found A7. n is prime Fig. 10. A simple factoring algorithm. A3. [Divide.] Set 4 t Ln/&J, T t n mod &. (Here 4 and r are the quotient and remainder obtained when n is divided by dk.) A4. [Zero remainder?] If r # 0, go to step A6. A5. [Factor found.] Increase t by 1, and set pt t d,+, n t q. Return to step A2. A6. [Low quotient?] If q > dk, increase Ic by 1 and return to step A3. A7. [n is prime.] Increase t by 1, set pt t n, and terminate the algorithm. 1 As an example of Algorithm A, consider the factorization of the number N = 25852. We immediately find that iV = 2 a 12926; hence pl = 2. Further- more, 12926 = 2.6463, so ~2 = 2. But now n = 6463 is not divisible by 2, 3, 5, * * . , 19; we find that n = 23.281, hence ps = 23. Finally 281 = 12 + 23 + 5 and 12 5 23; hence p4 = 281. The determination of 25852 s factors has therefore involved a total of 12 division operations; on the other hand, if we hadbtried to factor the slightly smaller number 25849 (which is prime), at least 38 division operations would have been performed. This illustrates the fact that Algorithm A requires a running time roughly proportional to max(pt-1, @). (If t = 1, this formula is valid if we adopt the convention ~0 = 1.) The sequence do, dl, dz, . . . of trial divisors used in Algorithm A can be taken to be simply 2, 3, 5, 7, 11, 13, 17, 19, 23, 25, 29, 31, 35, . . . , where we alternately add 2 and 4 after the first three terms. This sequence contains all numbers that +re not multiples of 2 or 3; it also includes numbers such as 25, 35, 49, etc., which are not prime, but the algorithm will still give the correct answer. A further savings of 20 percent in computation time can be made by removing the numbers 30m f 5 from the list for m 2 1, thereby eliminating all of the spurious multiples of 5. The exclusion of multiples of 7 shortens the list by 14 percent more, etc. A compact bit table can be used to govern the choice of trial divisors. If N is known to be small, it is reasonable to have a table of all the necessary primes as part of the program. For example, if N is less than a million, we need only include the 168 primes less than a thousand (followed by the value dlss = 1000, to terminate the list in case N is a prime larger than 9972). Such a table
We recommend cheap and reliable webhost to host and run your web applications: Coldfusion Web Hosting services.

364 ARITHMETIC 4.5.3 44. [A42.5] Suppose we are (Web site management)

Thursday, December 27th, 2007

364 ARITHMETIC 4.5.3 44. [A42.5] Suppose we are doing fixed slash arithmetic with mediant rounding, where the fraction (U/U ) is representable if and only if 1 1~1< M and 0 5 1~ < N and gcd(u, 2~ ) = 1. Prove or disprove the identity ((U/U ) @ (U/W )) 8 (V/W ) = (u/u ) for all representable (U/U ) and (U/W ), provided that U < v% and no overflow occurs. 45. [HM48] Develop the analysis of algorithms for computing the greatest common divisor of three or more integers. 4.5.4. Factoring into Primes Several of the computational methods we have encountered in this book rest on the fact that every positive integer n can be expressed in a unique way in the form n=w2...pt, Pl I P2 5 ... I Pt, (1) where each pk is prime. (When n = 1, this equation holds for t = 0.) It is unfortunately not a simple matter to find this prime factorization of n, or to determine whether or not n is prime. So far as anyone knows, it is a great deal harder to factor a large number n than to compute the greatest common divisor of two large numbers m and n; therefore we should avoid factoring large numbers whenever possible. But several ingenious ways to speed up the factoring process have been discovered, and we will now investigate some of them. Divide and factor. First let us consider the most obvious algorithm for factor- ization: If n > 1, we can divide n by successive primes p = 2, 3, 5, . . . until discovering the smallest p for which n mod p = 0. Then p is the smallest prime factor of n, and the same process may be applied to n c n/p in an attempt to divide this new value of n by p and by higher primes. If at any stage we find that nmodp # 0 but Ln/pJ 5 p, we can conclude that n is prime; for if n is not prime, then by (1) we must have n 2 pf, but pl > p implies that ~~2(~+1)~>~(~+1)>~~+(nmod~)~lnl~J~+(nmod~)=n. This leads us to the following procedure: Algorithm A (Factoring by division). Given a positive integer N, this algorithm finds the prime factors pl 5 p2 5 … 5 p, of N as in Eq. (1). The method makes use of an auxiliary sequence of trial divisors 2 = do < dl < dz < da < . , (2) which includes all prime numbers 5 m (and which may also include values that are not prime, if it is convenient to do so). The sequence of d s must also include at least one value such that dk 2 m. Al. [Initialize.] Set t t 0, k t 0, n t N. (During this algorithm the variables t, k, n are related by the following condition: % = N/p1 . . .pt, and n has no prime factors less than dk. ) A2. [n = l?] If n = 1, the algorithm terminates.
In case you need quality webspace to host and run your web applications, try our personal web hosting services.

45.3 ANALYSIS (Web site designers) OF EUCLID S ALGORITHM 363 37. [M38]

Thursday, December 27th, 2007

45.3 ANALYSIS OF EUCLID S ALGORITHM 363 37. [M38] (T. S. Mote in and E. G. Straus.) Let al, . . . , a, be positive integers. Show that max Qn(a,(l), . . . , sp(n)), over all permutations p(1). . . p(n) of {1,2, . . . , n}, occurs when U,(I) 2 a,(,) 2 a,(2) 2 u~(~–I) 2 .+.; and the minimum occurs when u,cl) 2 a,(n) I U,(3) I %(n-2) I U,(5) 5 *** 5 a,(6) 5 %(n-3) 5 a,(4) < %(n-1) 2 a,(2). 38. [A4~?5] (J. Mikusiriski.) Let K(n) = max,zo T(m, n). Theorem F shows that K(n) < Llog+(&n + 1)j -2; prove that K(n) 2 frlog+(&n + 1)1 - 2. b 39. [A&%] (R. W. Gosper.) If a baseball player s batting average is .334, what is the fewest possible number of times he has been at bat? [Note for non-baseball-fans: Batting average = (number of hits)/(t lmes at bat), rounded to three decimal places.] b 40. [MZB] (The Stern-Peirce tree.) Consider an infinite binary tree in which each node is labeled with the fraction (pl + p,)/(ql + q7), where pl/ql is the label of the node s nearest left ancestor and p7/q7 is the label of the node s nearest right ancestor. (A left ancestor is one that precedes a node in symmetric order, while a right ancestor follows the node. See Section 2.3.1 for the definition of symmetric order.) If the node has no left ancestors, pl/ql = O/l; if it has no right ancestqrs, pr/q7 = l/O. Thus the label of the root is l/l; the labels of its two sqns are l/2 and 2/l; the labels of the four nodes on level 2 are l/3, 213, 312, and 3/l, from left to right; the labels of the eight nodes on level 3 are l/4, 215, 315, 314, 413, 513, 512, 4/l; and so on. Prove that p is relatively prime to q in each label p/q; furthermore, the node labeled p/q precedes the nbde labeled p /q in symmetric order if and only if the labels satisfy p/q < p /q . Find a connection between the cbntinued fraction for the label of a node and the path to that node, thereby showing that each positive rational number appears as the label of exactly one node in the tree. 01 (J. Shallit, 1979.) Show that the regular continued fraction expansion of f+$+$+...=cL 22"-1 VI>1 contains only l s and 2 s and has a fairly Prove that the partial quotients of Liouville s numbers c,, 1 l- gular pattern, when 1 is any integer 2 2. [The latter nurpb&, introduced by J. Liouville in J. de Math. Pures et Appl. 16 (1851), 133-142, were the first explicitly defined numbers to be proved transcendental. The former number and si&lar constants were first proved transcendental by A. J. Kempner, Trans. Amer. Math. Sot. 17 (1916), 476-482.1 42. [M30] (J. Lagrange, 1798.) Let X have the regular continued fraction expansion /AI,-&, . . . /, and let qn = &,(A;, . . . ,An). Let llzll denote the distance from z to the nearest integer, namely min, IZ -p(. Show that IlqXll 2 llqn-lXll for 1 5 q < qn. (Thus the denoniinators qn of the so-call&d convergents pn/q, = /Al,. . . ,An/ are the record-breaking integers that make IlqXll achieve new lows.) 43. [A&?01 (D. W. Matula.) Show that the media@ rounding rule for fixed-slash or floating-slash numbers, Eq. 4.5.1-1, can be implemented simply as follows, when the number z > 0 is not representable: Let the regular continued fraction expansion of 2 be uo + /al, ~2,. . . /, and let pn = Q,+l(uo,. . . ,a,), qn = Qn(ul,. . . , a,). Then round(z) = (pilqi), where (pi/qi) is representable but (pi+l/qi+l) is not. [Hint: See exercise 40 .]
Searching for affordable and reliable webhost to host and run your web applications? Go to our java web server services and you will be pleased.