Professional Documents
Culture Documents
is a probability density function of the random variable X for a suitable value of the constant k. Calculate the probability that the random variable X lies between
1 2
and 3 . 2
7. Let u and v be two n-bit numbers, where for simplicity n is a power of 2. The traditional multiplication algorithm requires O(n2 ) operations. A divide-and-conquer algorithm splits the number into two equal parts and then computes the multiplication. Let u and v be divided into two n/2 parts as a, b, c, d such that u = a2n/2 + b and v = c2n/2 + d. Then, uv = (a2n/2 + b)(c2n/2 + d). (i) Write a recursive algorithm for computing uv using the divide-and-conquer algorithm. What is the time complexity of this algorithm? (ii) Devise an efcient algorithm for computing the product uv than the algorithm in Part (i). (iii) Discuss this issue when n is not a power of 2. 8. Let a, b, c be non-negative constants. Consider the following recurrence relation: b, if n = 1, T (n) = aT (n/c) + bn, if n > 1 Find the solution of T (n), for the following two cases: (i) a < c, (ii) a = c. 9. Using the generating function, solve the following recurrence relation an 7an1 + 9an2 = 3n , with the initial conditions a0 = 1 and a1 = 3. 10. Using the generating function, nd the sum 13 + 23 + 33 + + n3 . 11. Consider an air trafc-control system in which the desired altitude of an aircraft, ar , is computed by a computer every second and is compared with the actual altitude of the aircraft, br1 , determined by a tracking radar 1 second earlier. Depending on whether ar is larger or smaller than br1 , the altitude of the aircraft will be changed accordingly. Specically, the change in altitude at the r-th second, br br1 , is proportional to the difference ar br1 . That is, br br1 = K(ar br1 ) 2
ar
K = 5, and b0 = 0. 12. There are 33 students in the class and sum of their ages 430 years. Applying the pigeonhole principle, verify the following. Is it true that one can nd 20 students in the class such that sum of their ages greater 260 ? 13. A chess player wants to prepare for a championship match by playing some practice games in 77 days. She wants to play at least one game a day but no more than 132 games altogether. Show that no matter how she schedules the games there is a period of consecutive days within which she plays exactly 21 games.
Submission Instructions Copying in assignments leads to award ZERO marks in assignment marks. Also, the source from which you have copied, that source student will be treated under the same rule. Please submit the assignment in hard copy stating the following at the top in my ofce CSTAR, B3-307 (Vindhya Block):
Discrete Mathematics and Algorithms (CSE 611) Assignment Set 3 submitted by Name: XYZ Roll No: abc