Design and Analysis of Algorithms (CS2000) End Semester Dec 2024 Question Paper
RV University End Semester exam for Design and Analysis of Algorithms (CS2000), held Dec 2024, semester 3, with 7 questions. Also searched as DAA, DAOA, ALGO. Last updated 2026-11-20.
Questions
1a. a) Solve the following recurrence relation using substitution method.( T(n)=2T(n/2)+nlog n; n1 )( 1; n<=1 )
1b. b) What is the time complexity of fun()?
2a. a) A certain permutation of integer stored in an array is provided as an input to the procedure of quicksort. After one pass of algorithm the status of the array is 9, 16, 11, 13, 18, 15, 17, 24. Find the sum of all possible values that could have been used as a pivot.
2b. b) A priority queue is implemented as a Max-Heap. Initially, it has 9 elements. The level-order traversal of the heap is: 20, 18, 15, 13, 12, 7, 4, 3, 1. Three new elements 16, 24 and 28 are inserted into the heap in that order. Write the level-order traversal of the heap after t
3a. a) Consider the following message:aabbbbabccdddccccbbdbd Find the number of bits required for Huffman encoding of the above message. If Huffman tree coded as left child with ‘0’ and right child with ‘1’ from every node then what is the decoded message for 110100?
4b. b) Find the number of distinct minimum cost spanning trees for the following weighted graph. And draw all possible minimum cost spanning trees.
4. Consider the weights and values of items listed below. Note that there is only one unit of each item. Item Number Weight (in Kgs) Value (in Rupees) 1 3 60 2 5 28 3 4 20 4 2 24 The task is to pick a subset of these items such that their total weight is no more than 5 Kgs and their