BBA Iind SEMESTER EXAMINATION 2008-09 s6

Total Page:16

File Type:pdf, Size:1020Kb

BBA Iind SEMESTER EXAMINATION 2008-09 s6

M.Tech I (First) Semester Examination 2012-13

Course Code:MCS101 Paper ID:0971204

Design and Analysis of Algorithms

Time: 3 Hours Max. Marks: 70

Max Marks: 75 Note: Attempt six questions in all. Q. No. 1 is compulsory. 1. Answer any five of the following (limit your answer to 50 words). (4x5=20) a) What do you mean by analysis of algorithms? Describe best case, worst case, and average case analysis of an algorithm. b) Describe the incremenatl approach of algorithm designing with an example. c) Prove that a red black tree with n internal nodes has height at most 2lg (n+1). d) Show that Kruskal’s algorithm can return different spanning trees for the same graph. e) What is a merge sort? What are its advantages? Show its execution with an example. f) What do you understand by optimization problems? Define the steps involved in greedy programming. g) How is backtracking useful in solving n-queen problem? h) Define NP-hard, and NP-complete class of problems.

2. What are the different methods to solve recurrence? Use the master method to give tight asymptotic bounds for the following reurrences. (10) a) T(n) = 4T(n/2) + n b) T(n) = 4T(n/2) + n2 c) T(n) = 4T(n/2) + n3 3. Define b-tree with its properties. As a function of the minimum degree t, what is the maximum number of keys that can be stored in a b-tree of height h? (10)

4. Define disjoint-set data structure. Describe the operations performed on disjoint-set data structure. Write psuedocode for make-set, find-set, and union using the linked-list representation and the weighted-union heuristic. (10)

5. Define max-priority queue data structure. What is the application max-priority queue? Discuss how to implement the operations of max-priority queue. (10)

6. Find an optimal parenthesization of a matrix-chain product whose sequence of dimensions is <30, 35, 15, 5, 10, 20, 25>. (10)

7. Explain how to solve graph coloring problem using backtracking approach. (10)

8. Define vertex cover problem. Show the vertex cover problem is NP-complete. (10)

Recommended publications