Cse 5 Sem Design and Analysis of Algorithms 2015
Cse 5 Sem Design and Analysis of Algorithms 2015
INSTRUCTIONS TO CANDIDATES
(1) All questions carry marks as indicated.
(2) Solve SIX questions as follows :
Que. No. 1 OR Que. No. 2
Que. No. 3 OR Que. No. 4
Que. No. 5 OR Que. No. 6
Que. No. 7 OR Que. No. 8
Que. No. 9 OR Que. No. 10
Que. No. 11 OR Que. No. 12
(3) Due credit will be given to neatness and
adequate dimensions.
(4) Illustrate the answers with necessary figures/
drawings wherever necessary.
1 if n = 1
tn = 5
2 T( n / 2) + n otherwise .
MVM—47101 1 (Contd.)
www.rtmnuonline.com
(b) Solve non homogenous recurrence : 4. (a) What are different asymptotic notations ? Explain
them briefly. For the following equation find values
T(n) = n if n=0 or n = 1
of constant using various approaches :
= st(n – 1) – 6n otherwise. 5
(i) 3n + 2
(c) Define algorithm. Explain the characteristics of
algorithm. 4 (ii) 10n2 + 4n + 2 7
OR (b) Implement insertion sort on following array :
2. (a) Using master method, solve the following 18, 12, 44, 64, 76, 15, 129, 20.
recurrence and also find the values of constant Write recursive algorithm. 6
involved :
5. (a) Explain the difference between Greedy and Divide
T(n) = T(n/4) + n + 4 for n ≥ 4 and T(1) = 4.
and Conquer method of algorithm design. 4
7
(b) For the following sequence of objects find the
2 if n=0 profit by three method capacity = 30, Number of
(b) tn = 4
3t n − 1 + n + 2
n
otherwise . objects = 07
Object Weight Profit
(c) State the difference between recursive and iterative
method. 3 1 4 20
1 7 5 8 2 6 9 3. 6 4 14 28
www.rtmnuonline.com
www.rtmnuonline.com
6. (a) Write algorithm to find out minimum cost spanning (b) Implement Bellman Ford algorithm for the
tree for the following graph, using PRIM’s following graph. Find the distance matrix : 7
algorithm : 7 1
1 2 8
10 28 –4
6 2 –3 4
14 5
7 16 4
25 24 6
5 3 –2
18
22 OR
4 12
8. (a) What is Travelling Salesman Problem ? Implement
(b) Draw the merge and split tree using Merge sorting Travelling Salesman Problem for the following
for array size of 15. Write recurrence equation matrix representing complete graph :
for merge sort algorithm. 6
www.rtmnuonline.com
www.rtmnuonline.com
9. (a) Explain the significance of graph colouring (b) Write a non-deterministic algorithm to generate
algorithm. For the graph drawn complete solution CLIQUE of size K from graph of n vertices.
space tree if maximum number of colours permitted 5
are 3. Also write the algorithm for graph OR
colouring. 6
12. (a) Explain :
1 2
(i) P-NP class problem
www.rtmnuonline.com