Beruflich Dokumente
Kultur Dokumente
com 06CS43
PART -A
1. a. With the help of a flowchart, explain the various stages of algorithm and design
process. (08 marks)
b. Explain any three fundamental problem types. (06 marks)
c. Let A be the adjacency matrix of an undirected graph. Explain what properties of the
matrix indicates that
i. The graph is complete
ii. The graph has a loop
iii. The graph has an isolated vertex (06 marks)
PART -B
5. a. Explain Transform-and-Conquer technique. What are the major variations of this
technique. (06 marks)
b. Explain the different rotations of AVL tree. Construct an AVL tree for the input
sequence 3,6,5,1,2,4 (10 marks)
c. Construct a 2-3 tree for the data of 5 (b) above. (04 marks)
6. a. Explain the different types of hashing. For the input 30,20,56,75,31,19 and hash
function h(K) = 2K mod 11 , construct the open hash table. (08 marks)
b. What are memory functions? Explain how they are used to solve the knapsack
problem . Solve the instance of the knapsack problem below. Capacity W= 5
Item Weight Value
1 2 $12
2 1 $10
3 3 $20
4 2 $15
(12 marks)
7. a. i. Construct a Huffman code for the following data
Character A B C D -
Probability 0.4 0.1 0.2 0.15 0.15
ii. Encode the text ABACABAD using the code of (i) above.
iii. Decode the text whose encoding is 10001011100101 in the code of (i) above.
(10 marks)
b. What are decision trees? Explain the concept of decision trees for sorting algorithms.
(10 marks)