Unformatted text preview: 1536 is even, so it is 6. 4824 is even, so it is 1. It is divisible by 5 for sure. Because 35 = 5*7, that means that 4*6 must have remainder 1, and 4824 and 1536 are divisible by 24. Therefore, 11 (mod 35) = 0. Yes. 4d. 4, 21, none, 14 5. gcd(Fn+1, Fn) = 1 1, 1, 2, 3, 5, 8, 13, 21, 34, 55 … Because F n is the sum of F n1 + F n2 , and if we are comparing F n1 and F n , that means Base case: the gcd(1, 1) = 1, gcd(1, 2) = 1. 6. Input x, y. X*y/GCD(x,y) = LCM. Finding GCD = O(n 3 ) (this algorithm works) 2 7 – 1 1, 1, 2, 3, 5, 8, 13 Using euclid’s formula...
View
Full
Document
This note was uploaded on 01/09/2012 for the course CSE 101 taught by Professor Staff during the Spring '08 term at UCSD.
 Spring '08
 staff
 Algorithms

Click to edit the document details