Download as doc, pdf, or txt
Download as doc, pdf, or txt
You are on page 1of 1

1.

(a)Discuss various the asymptotic notations used for best case average case and worst case
analysis of algorithms. (7)
(b) Show the tracing steps of merge sort and quicksort and analyze the time complexity for
the following data: 33, 44, 2, 10, 25, 79, 86, 47, 14, 36 (7)
Or
2. Write and solve recurrence relation for Strassen’s matrix multiplication (14)
UNIT-2
3. (a) Write and Explain Informal knapsack algorithm by using dynamic Programming (07)
(b) Explain optimal binary search tree algorithm with example (07)
Or
4. Give the recurrence used to solve knapsack problem using dynamic programming and
explain in brief the same. Solve the following Knapsack problem using dynamic
programming. Capacity W=5

Item 1 2 3 4

Weight 2 1 3 2

Value 12 10 20 15

(14)

UNIT-3
5. (a) Illustrate how to identify given graph is connected or not (07)
(b) Compare the approaches of BFS and DFS methods and derive the time complexities of
both methods for the inputs of adjacency lists and adjacency matrix separately (07)

Or
6. (a) Prove that Prim’s method generates minimum-cost spanning tree. (07)
(b)Sketch the state space tree degenerated by 4 queens problem. (07)

You might also like