3.2.2 ANSWERS TO EXERCISES 529 (Web page design) 15. Algorithm M
Monday, September 17th, 20073.2.2 ANSWERS TO EXERCISES 529 15. Algorithm M generates (Xn+k,Yn) in step Ml and outputs 2, = Xn+k–q, in step M3, for all sufficiently large n. Thus (.&) has a period of length X , where X is the least positive integer such that Xn+kwq,, = Xn+X/+k–qnfX, for all large n. Since X is a multiple of X1 and X2, it follows that X is a divisor of X. (These observations are due to Alan G. Waterman.) We also have n + k -qn E n + X + k -q,+~t (modulo Xl) for all large n, by the distinctness of the X s. The bound on (qn) implies that qn+xt = qn + c for all large n, where c z X (modulo Xl) and ICI < &X1. But c must be 0 since (qn) is bounded. Hence X E 0 (modulo Xl), and q,+x/ = qn for all large n; it follows that X is a multiple of X2 and X1, so X = X. Note: The answer to exercise 3.2.1.2-4 implies that when (Yn) is a linear congruen- tial sequence of maximum period modulo m = 2 , the period length XZ will be at most Zep2 when k is a power of 2. 16. There are several methods of proof. (1) Using the theory of finite fields. In the field with 2k elements let [ satisfy p=alp-l+...+ ak. Let f(bl tk- + + bk) = bk, where each b3 is either zero or one; this is a linear function. If word X in the generation algorithm is (blbz . . . bk)2 before (10) is executed, and if bltkml + . .. + bkt = En, then word X represents 7L+1 after (10) is executed. Hence the sequence is f([ ), f([ +l), f([ -t2), . . . ; and :(tnik) = f(( tk) = f(ul[ +k- + ... f akEn) = alf(( +k-l) + . . + akf(< ). (2) Using brute force, or elementary ingenuity. We are given a sequence Xnj, n 2 0, 1 5 j 5 k, satisfying x(,+1), = -&(,+I) + Gh, l