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

2079 Boards

Section A

Answer any two questions.

1

Explain the divide and conquer strategy for problem solving. Describe the worst-case linear time selection algorithm and analyze its complexity.

10

!

2

Write the dynamic programming algorithm for matrix chain multiplication. Find the optimal parenthesization for the matrix chain product ABCD with size of each is given as A(5×10) , B(10×15) , C(15×20) , D(20×30)

10

!

3

What do you mean by Backtracking? Explain the backtracking algorithm for solving 0/1 knapsack problem and find the solution for the problem given below:

question image

10

!

Section B

Answer any eight questions.

4

Explain the iterative algorithm to find the GCD of given two numbers and analyze its complexity.

5

5

Generate the prefix code for the string ” CYBER CRIME” using Huffman algorithm and find the total number of bits required.

5

6

Define tractable and intractable problem. Illustrate vertex cover problem with an example.

5

7

Find the edit distance between the string ” ARTIFICIAL” and “NATURAL” Using dynamic programming.

5

8

Write short notes on:
a) Best, Worst and average case complexity
b) Greedy Strategy

5

9

Solve the following recurrence relations using masters method
a. T(n) = 2T(n/4) + kn2, n > 1
           =1 ,  n=1
b. T(n) = 5T(n/4) + kn , n > 1
            =1  ,   n=1

5

!

10

Solve the following linear congrvences using Chinese Remainder Theorem.
X=1 (MOD 2)
X=3 (MOD 5)
x=6 (MOD 7)

5

11

Find the MST from following graph using Kruskal’s algorithm.

5

!

12

Trace the quick sort algorithm for sorting the array A[ ]={15,7,6,23, 18,34,25} and write it’s best and worst complexity.

5

!