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

2076 Boards

Section A

Answer any two questions.

1

What do you mean by the complexity of an algorithm? Explain the asymptotic notations used to describe the time/space complexity of any algorithm with their geometrical interpretation and example.

10

!

2

Explain the divide and conquer paradigm from algorithm design with a suitable example. Write the Quick sort algorithm using a randomized approach and explain its time complexity.

10

!

3

Explain in brief the Backtracking approach for algorithm design. How it differs with recursion? Explain the N-Queen problem and algorithm using backtracking and analyze its time complexity.

10

!

Section B

Answer any eight questions.

4

Write the algorithm for selection sort and explain its time and space complexity.

5

!

5

Solve the following recurrence relation using the master method.

a. T(n)=7T(n2)+n2T(n) = 7T\left(\frac{n}{2}\right) + n^2

b.T(n)=4T(n4)+knT(n) = 4T\left(\frac{n}{4}\right) + kn

5

!

6

Explain the greedy algorithm for the fractional knapsack problem with its time complexity.

5

!

7

Trace heap sort algorithm for the following data:
{2, 9, 3, 12, 15, 8, 11}

5

!

8

What do you mean by Dynamic programming strategy? Explain the element of DP.

5

!

9

Explain the approximation for solving vertex cover with a suitable example.

5

!

10

Explain Prism’s algorithm for MST problem and analyze its time complexity.

5

!

11

Explain in brief about the classes P, NP, and NP complete with examples.

5

!

12

Write short notes on

a. Backtracking strategy
b. Tractable and Intractable Problem

5