You are on page 1of 3

Reg. No.

:

M.E./M.Tech. DEGREE EXAMINATION, JANUARY 2011. First Semester

Computer Science and Engineering

(Common to Information Technology)

241102 — DATA STRUCTURES AND ALGORITHMS (Regulation 2010)

PART A — (10 × 2 = 20 marks) 1. 2. 3. Define Performance Evaluation.

The delete-min operation for Min-Max heaps and Deaps have the same asymptotic complexity O (log n ) . Which will run faster in practice? Why? How

about insert operation? (Hint: give the worst-case number of key comparisons). 4. 5. 6. Write the steps to be followed to decrease the key in node b. How will you calculate the Balance factor of an AVL tree? What is the maximum height of a bottom — up splay tree that is created as the result of n insertions made into an initially empty splay tree? What is the use of Convex Hull? How is recursion used in Divide and Conquer strategy? Define Graph Coloring. List out the advantages of Dynamic Programming over greedy.

75

07
8. 9. 10.

7.

75

What are the properties of an algorithm?

07
Answer ALL questions.

Time : Three hours

75
Maximum : 100 marks

Question Paper Code :

20073

07

22. (16) 13. with example the basic heap operations and write algorithms for the same. 4. (a) (i) Devise a linked list representation for a list in which insertions and insert and delete at either end. every insertion. 4.9. The sublists of l also are inverted. 1.6.30. (2) (3) 12. Meld the following min height — biased leftist trees using the (6) (b) Explain. 3. 3. Show the 2-3 tree after every insertion and deletion. Or (6) (b) (i) Write a function that inverts an arbitrary non-recursive list l with no shared sublists. 10. (10) 20073 . Write functions to 07 (10) elements.8. (8) (8) (ii) Compute the failure function for each of the following patterns.PART B — (5 × 16 = 80 marks) 11. 8 . 8. (16) 07 (b) (i) Insert the following elements in sequence into an initially empty (10) red-black tree : 1. 9. 2. (ii) Define the concept and advantages of a DOUBLY LINKED LIST with an example.16. 7. 5.14. (a) Insert the following elements in sequence into an initially empty 2-3 tree: 6. Delete the elements 11 and 14.11. 7. (a) (i) ababaa abaabaabb a min Consider 07 binomial heap with Or Or 2 (1) aaaab 3. 9.2. Show the red-black tree after 75 75 following deletions can be made at either end in 0(1) time. 2. (ii) 75 algorithm.

gives a nonoptimal solution to a problem.(ii) Delete the element 2 from the below shown figure (double edge red-black tree. (a) A greedy algorithm. Show the 14. W = (4. 4. (16) (b) Consider the following instance of the 0/1 knapsack problem : n = 5 . For the 75 07 solution calculate the value of ρ (n ) . single indicates a black pointer). just like an approximation algorithm. 4 ) . P = (10. Or (16) (b) Write a Pseudo code for Randomized Quick sort algorithm and compare its performance with iterative version of Quick sort. 6. 2) . What is the difference between the two types of algorithm? Compute the time complexity of the both. (a) Develop an algorithm for implementing ‘8 Queens Problem” using BACKTRACKING method.3. indicates a red pointer. 75 (16) 07 (6) 20073 . (16) 15. m = 12 . 8. 15. 75 Or 3 07 ––––––––––– Give the optimal and approximate solutions for this problem. 6.