This preview shows pages 1–3. Sign up to view the full content.
This preview has intentionally blurred sections. Sign up to view the full version.
View Full Document
Unformatted text preview: Math 55. Sample Answers to Second Midterm 1. (16 points) Prove that n X k =1 k 7 = ( n 8 ) . We have n X k =1 k 7 n X k =1 n 7 = n n 7 = n 8 , so n k =1 k 7 = O ( n 8 ) . We also have n X k =1 k 7 n X k = d n/ 2 e k 7 n 2 n 2 7 = n 8 2 8 , so n k =1 k 7 = ( n 8 ) . Therefore n k =1 k 7 = ( n 8 ) . 2. (20 points) Use the Euclidean algorithm to find gcd(111 , 33) , and also use it to find integers s and t such that gcd(111 , 33) = 111 s + 33 t . To find the gcd, we have: 111 = 33 3 + 12 ; 33 = 12 2 + 9 ; 12 = 9 1 + 3 ; 9 = 3 3 + 0 . Therefore gcd(111 , 33) = 3 . To get the linear combination, we reverse the above steps, as in the book: 3 = 12 9 1 = 12 (33 12 2) = 12 3 33 = (111 33 3) 3 33 = 111 3 33 10 . Therefore s = 3 and t = 10 . As an alternative approach, we can do as in class: 111 = 111 1 + 33 0 ; 33 = 111 0 + 33 1 ; 111 33 3 = 12 = 111 1 33 3 ; 33 12 2 = 9 = 111 ( 2) + 33 7 ; 12 9 = 3 = 111 3 33 10 . 1 2 This again gives s = 3 and t = 10 . 3. (16 points) A version of Ackermanns function A : N N N is defined recursively by A ( m,n ) = 2 n if m = 0 or n 1; A ( m 1 ,A ( m,n 1)) otherwise....
View Full
Document
 Spring '08
 STRAIN
 Math

Click to edit the document details