undefined
DR. BABASAHEB AMBEDKAR TECHNOLOGICAL
UNIVERSITY LONERE – RAIGAD -402 103
Semester Examination – Summer - 2019
---------------------------------------------------------------------------------------------
Branch: Computer Engineering
Sem.:- IV
Subject and Subject Code:- Design and Analysis of Algorithms (BTCOC401)
Date:- 14/05/2019
Marks: 60
Time:- 3 Hrs.
=
=====================================================
Instructions to the Students
1
2
3
. Each Question carries 12 marks.
. Attempt Any Five Questions of the following.
. Illustrate your answers with neat sketches, diagram etc., wherever
necessary.
4
. If some part or parameter is noticed to be missing, you may appropriately
assume it and should mention it clearly.
_
_____________________________________________________________
Q.1. Attempt Any Three from the following questions. (04*03=12)
a) Define Big O notation? What is total time complexity of following code ?
int a,b,c,d,i.
{
for (i = 0 ;i<=11; i++)
{
a = a+b;
}
d= c+a;
}
b) Define algorithm. What is the need of algorithm analysis ? Which factors affect
runtime of algorithm?
c) Solve the following recurrence relation using characteristic polynomial.
n
if n=0 or n=1
tn =
t n-1 + t n-2 , otherwise
d) Solve the following recurrence using master method. Verify solution using
substitution method.
T(n) = 2T (n/2) + cn
3
D07E6E1D9ECEFE9FCC585CDAAC8AF06