You are on page 1of 2
CS21001 Discrete Structures, Autumn 2006 Eud-semester exin tion ‘Total marks: 100 ‘November 20, 2006 (AN): $-302 (13) Duration: 3 hours [Answer all questions | (Gh Consider the following C function: i unsigned int £ ( unsigned int no ) sathitg 3 4£ (n == 0) return 07 if (nm % 2 == 1) return 0; q return 1 + £(ne(n+1)/2)7 ? Denote by (72) the value retumed by the above function upon input 1 " (@) Derive the values of f(2), #(8)s £(4), /(6), and f(6). (b) Notice that if'm is large, the computation of n(n + 1)/2 (argument for the recursive call) may lead to an overflow. Assume that for some value of r, no overflow occurs during any of the recursive calls. Argue that in this case the function terminates after O(log n) number of recursive calls, where n is the argument of f in the outermost call 4 (©) Suppose that your machine supports 32-bit unsigned integers and during a multiplication ab of unsigned integers a,b, the least significant 32 bits of the actual product is returned. This means that if there is no overflow during the multiplication, you get the correct product. In case of an overflow, you obtain the least significant 32 bits of the correct product. Justify that in this case too, the function makes (og m) number of recursive calls, where n is the argument of f in the outermost call. (@) Describe (with proper justification) what f(n) retums for a positive integer n. (©) Deduce that the running time of the above function is O(log n)- ‘Argue (with proper justification) which ofthe following sets is/are countable. “(a Theset = fn € R| 3°42" = 99). (Here R is the set of eal numbers) ©) 1 G be the tot of all invertible (ie., non-singular) 2% 2 matrices with real entsies. Prove that Gi group under matrix multiplication. (b) Define the center Z(G) of G asi UG) = {AEG\AP = PA forall PEG). Prove that Z(G) is a normal subgroup of C. ' (©) Derive that Z(G) = ne: jae Rya 40}. ( (8) A matrix A € Gis said to be similar to a matrix BE Gif B= PAP! for some P © G. Prove that ! similarity is an equivalence relation on G. { (e) Prove or disprove: Similarity is a congruence relation on G, { (For any fixed P © G, define the map Sp 1G + Gas fp(A) = PAP-!, Prove that fp is a group isomorphism, —* 1 Biaisewh the ) (q) Prove that fp is the identity pon Hand eiy P62) shag Ye ie ing ‘ ee pulaueheh apedy 32 'r papi eae ARRINS, Sor o

You might also like