Code No: RT32054 R13 SET - 1
III B. Tech II Semester Supplementary Examinations, April - 2021
DESIGN AND ANALYSIS OF ALGORITHMS
(Common to Computer Science and Engineering, Information Technology)
Time: 3 hours Max. Marks: 70
Note: 1. Question Paper consists of two parts (Part-A and Part-B)
2. Answering the question in Part-A is compulsory
3. Answer any THREE Questions from Part-B
*****
PART –A (22 Marks)
1. a) Describe the two phases of performance evaluation. [3M]
b) Write the working principles of divide and conquer with finding factorial of ‘n’. [4M]
c) State feasible and optimal solutions obtained by greedy principle with example. [4M]
d) What is dynamic programming and principle of optimality? [4M]
e) Define State space tree, implicit and explicit constraints. [4M]
f) Describe the role of c(-) and u(-) functions in branch and bound to find solution tuples. [3M]
PART –B (48 Marks)
2. a) f(n)=O(g(n)), f(n)=Ω(g(n)) and f(n)=Θ(g(n)), illustrate these relations in estimating [8M]
the time complexities with suitable examples.
b) Describe the cost amortization. How it is used in performance analysis? Explain with [8M]
an example.
3. a) Apply divide and conquer to search an element ‘k’ in an array a[1:n] using binary [8M]
search and explain the algorithm.
b) L={2,12,18,3,34, 27, 56, 4, 8, 3, 10} write and explain the merge sort algorithm that [8M]
outputs the sorted list of elements.
4. a) Formulate the Knapsack problem with greedy method and find the optimal solution [8M]
for n=7, m=15, (p1-p7)=(10,5,15,7,6,18,3), (w1-w2)=(2,3,5,7,1,4,1).
b) Write the prim’s minimum cost spanning tree algorithm and show that the run time is [8M]
O((n+|E|)log n).
5. a) Apply dynamic programming to find the optimal order of multiplying 3 matrices [8M]
A 5X25, B25X10, C10X15.
b) Present an algorithm similar to DKnap to solve the knapsack problem. What are the [8M]
time and space requirements of your algorithm?
6. a) Write and explain the iterative back tracking algorithm. Draw the state space tree for [8M]
4-queens problem and give the solution tuples.
b) How to find the existence of Hamiltonian cycle in graph? Write the algorithm and [8M]
explain with suitable example.
7. a) Write an algorithm schema LC Branch and bound which searches for a least-cost [8M]
answer node and explain.
b) Draw the portion of the state space tree generated by FIFO-Branch and Bound for the [8M]
given knapsack problem m=5 (p1..p5)=(w1..w5)=(3,6,5,7,9) and m=15.
*****
|''|'|''|''|''|||'|| www.manaresults.co.in