Math 7 Spring 06 PROBLEM SET SOLUTIONS. (a) ( pts) Use the Euclidean algorithm to find gcd(87, 0). Solution. The Euclidean algorithm is performed as follows: 87 = 0 + 78, 0 = 78 +, 78 = 6. Hence we have gcd(87, 0) =. () (0 pts) Find all the integer solutions of 87x + 0y = 0. Solution. Since 0 = 8 is divisile y = gcd(87, 0), the equation 87x + 0y = 0 has integer solutions. We can rewrite the first two equations in part (a) as 78 = 87 0 and = 0 78. Sustituiting the former to the latter yields = 0 (87 0 ) = 0 6 87. Then 0 = 8 = (0 6 87 ) 8 = 0 8 87 0, so x = 0, y = 8 is a solution. From 87 solutions y = 99 and 0 x = 0 t, y = 8 + 99t where t Z. =, we can parametrize all the integer
Math 7 Spring 06. (a) ( pts) Give a definition of the greatest common divisor of three integers a,, c. Solution. The greatest common divisor of a,, c is the largest integer d such that d a, d, d c. () ( pts) Prove that gcd(a,, c) = gcd(gcd(a, ), c) for any integers a,, c. Solution. Let g = gcd(a, ), g = gcd(g, c) and g = gcd(a,, c). We want to show g = g. Note that g, as the greatest common divisor of g and c, divides g = gcd(a, ), which divides oth a and. Therefore g also divides oth a and. On the other hand, g divides c as the greatest common divisor of g and c. Hence g is indeed a common divisor of a,, c, and we have g gcd(a,, c) = g. Now we note that g = gcd(a,, c) divides a,, c. Since g = gcd(a, ), there exist integers x, y such that ax + y = g. As g divides oth a and, it must divide ax + y = g. Then g is a common divisor of g and c, implying that g g = gcd(g, c). Thus we have oth g g and g g, therey concluding that g = g as desired. Remark. You can also prove this using prime factorizations of a,, c. (c) ( pts) Use the Euclidean algorithm to find the greatest common divisor of 08, 88, 07. Solution. By part (), we have gcd(08, 88, 07) = gcd(gcd(08, 88), 07). We first find gcd(08, 88) y the Euclidean algorithm as follows: 88 = 08 + 68, 08 = 68 6. Here we find gcd(08, 88) = 68. Then we perform the Euclidean algorithm to find gcd(68, 07): 07 = 68 +, 68 = + 7, = 7. The algorithm gives us gcd(68, 07) = 7. (d) (0 pts) Do there exist integers x, y, z such that 08x + 88y + 07z =? (Hint: You don t have to solve the equation.) Solution. By part (), we know that 7 divides 08, 88 and 07. Therefore 7 must divide 08x + 88y + 07z if x, y, z are integers. However, = 7 7 + is not divisile y 7. Hence there do not exist integers x, y, z satisfying 08x + 88y + 07z =.
Math 7 Spring 06. (0 pts) Find all the integer solutions of 6x + y + 0z = 8. Solution. Since gcd(6, ) =, we can write 6x + y = q where q is an integer. Now the equation ecomes q + 0z = 8. We easily find that ( ) + 0 =, and multiplying oth sides y 8 yields ( ) + 0 8 = 8. Then we can solve the equation q + 0z = 8 in integers y q = 0t, z = 8 + t where t Z. () Next we solve the equation 6x + y = q. Since 6 ( ) + =, multiplying oth sides y q gives 6 6 ( q) + q = q. Since gcd(6, ) = and =, we parametrize all the integer solutions y gcd(6, ) x = q s, y = q + s where s Z. () Now sustituiting () to () yields x = 8 + 0t s, y = 0t + s, z = 8 + t where t, s Z.. ( pts) Determine the numer of positive integer solutions of x + y = 00. Solution. Let us first solve the equation x + y = 00 in integers. From ( ) + = we otain ( 00) + 00 = 00. Since gcd(, ) =, the integer solutions are given y x = 00 t, y = 00 + t where t Z. Now x > 0 if and only if 00 t > 0, or equivalently t < 00. Similarly, y > 0 if and only if 00 + t > 0, or equivalently t > 0. Hence x and y are positive integers if and only if 0 < t < 00. This gives 9 possile values for t, namely 0, 0,, 9. Hence the numer of positive integer solutions is 9.. Recall that the Fionacci sequence (F n ) n is defined y the recurrence relation F n+ = F n+ + F n for n with initial values F =, F =. (a) (0 pts) Find gcd(f n+, F n ). Solution. For n =, we directly compute gcd(f n+, F n ) = gcd(f, F ) =. Let us now assume that n. From the recurrence relation we find F n+ = F n+ + F n = (F n + F n ) + F n = F n + F n.
Math 7 Spring 06 Hence we have gcd(f n+, F n ) = gcd(f n, F n ), where the latter was seen to e in class. Therefore we conclude that gcd(f n+, F n ) = for all n. () (0 pts) Show that gcd(f n+, F n ) = gcd(f n, ) for n. Solution. For n =, direct computation gives gcd(f n+, F n ) = gcd(f, F ) = and gcd(f n, ) = gcd(f, ) =. Now for n, the recurrence relation yields F n+ = F n+ + F n+ = (F n+ + F n ) + F n = F n+ + F n = (F n + F n ) + F n = F n + F n. This implies that gcd(f n+, F n ) = gcd(f n, F n ). We also otain gcd(f n, F n ) = gcd(f n, ) using the fact gcd(f n, F n ) = from lecture. Comining these two identities gives the desired identity gcd(f n+, F n ) = gcd(f n, ). (c) ( pts) Use () to prove that F m is an even numer for m. Solution. We prove y induction on m. For m =, we directly find that F m = F = F + F = is an even numer. For the inductive step, we assume that F m is an even numer. We want to prove that F (m+) is also an even numer. Since F m is an even numer, we have gcd(f m, ) =. Then () yields gcd(f (m+), F m ) = gcd(f m, ) =. Hence we see that F (m+) is divisile y, completing the inductive step. Extra Credit Prolem. The Calkin-Wilf tree is a tree otained y starting with the fraction = and a + elow each fraction a as children. and iteratively adding a a +
Math 7 Spring 06 =. Prove the following properties of the Calkin-Wilf tree: (a) (0 pts) Every fraction in this tree is in reduced form, i.e., its denominator and numerator are relatively prime. Solution. From the identity a + = a + we deduce that gcd(a +, a) = gcd(a, ). Similarly, we deduce that gcd(a +, ) = gcd(a, ) from the identity a + = + a. Hence if a is in reduced a form, its children a + and a + are also in reduced form. Since the tree is generated from a single fraction = in the tree must e in reduced form. which is in reduced form, every fraction () (0 pts) Every positive rational numer appears exactly once in this tree. Solution. Let r e an aritrary positive rational numer. We define a sequence r, r, as follows: () r = r. () If r i < with reduced form p q, we set r i+ = p q p. () If r i > with reduced form p q, we set r i+ = p q. q () If r i =, we terminate the sequence. Note that the sum of denominator and numerator is strictly decreasing in this sequence, implying that the sequence must terminate after finite steps. On the other hand, it is evident from the aove rules that the last term must e. Hence we have a sequence of the form r = r, r,, r k, r k =. Tracing this sequence ackwards gives a genealogy for r in the tree, as each r i is a child of r i+ y the aove rules. This proves that r appears in this tree.
Math 7 Spring 06 Now we suppose for contradiction that r appears more than once in the tree. Then r has two different genealogies corresponding to different locations. However, these genealogies must oey the rules ()-() aove. Since the rules uniquely determine the sequence, these genealogies must e the same, yielding a contradiction. Hence we conclude that r appears exactly once in the tree.