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

MCSE/4257/35/2006

M. C. S. E. Examination 2006
(1st Semester)

DESIGN AND ANALYSIS OF ALGORITHMS


Time: Three hours Full Marks: 100

Answer any five questions

1. Write an algorithm to find the kth -smallest element out of n and argue for its
efficiency.
20
2. Explain the randomized quicksort algorithm and discuss its efficiency.
20

3. a) Define the knapsack problem and solve it.


b) Explain the job sequencing problem and devise an optimal solution.
10+10

4. What is the principle of optimality? Does it always hold? Formulate a k-stage graph
problem as a dynamic programming problem and outline a solution.
5+5+10
5. Explain the 8-Queens problem and provide an efficient backtracking solution.
20
6. Use least cost search for the 15-puzzle problem and state the condition for the solution.
20
7. Write an algorithm for Huffman code and prove its correctness
20

You might also like