csc325

Design and Analysis of Algorithms

Medium Exam Preparation: 3 - 4 days
Question Papers (7)
logo

Community

FM: 60 PM: 24

Design and Analysis of Algorithms

2081 Boards

Section A

Answer any two questions.

1

Differentiate between dynamic programming and memorization. Compute the shortest path between every pairs in the following graphs using Floyd Warshal algorithm.

question image

 

 

10

2

What is the worst case of quick sort and how does randomize quick sort handle this problem? Sort the data { -2, 4, -3, 6, 12, 10, 11, 13, 9 } using quick sort.

10

3

Does greedy algorithm guarantee optimal solution? Solve the Fractional knapsack problem to find maximum loot from given information.

Item Value Weight (kgs)
1 12 2
2 10 1
3 20 3
4 15 2
5 2 12
6 3 10
7 50 1

 

10

Section B

Answer any eight questions.

4

Given a set A=(5,7,10,12,15,18,20}, find the subset that sum to 35 using backtracking.

5

5

5

6

Write an algorithm to find the nth fibonacci number with its time and space complexity.

5

7

Define order statistics problem. Find the edit distance between “cat” and “car” using dynamic programming.

5

8

Discuss about recursion and backtracking. Analyze the complexity of Miller Rabin Randomized Primality test.

5

9

Solve the following linear equation using Chinese Remainder Theorem.
x = 1 MOD 3
x = 2 MOD 5
x = 0 MOD 7

5

10

Explain the approximation algorithm for vertex cover of a connected graph with an example.

5

11

State cooks theorem. Discuss about problem reducibility.

5

12

Write short notes on:
a) Big Oh, Big Omega, Big theta
b) Class P, Class NP and NP-Complete

5