Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
1
II B.Tech I Semester Supplimentary Examinations, February 2008
DESIGN AND ANALYSIS OF ALGORITHMS
( Common to Computer Science & Engineering, Information Technology
and Computer Science & Systems Engineering)
Time: 3 hours Max Marks: 80
Answer any FIVE Questions
All Questions carry equal marks
⋆⋆⋆⋆⋆
1. Define time complexity. Describe different notations used to represent these com-
plexities. Illustrate with suitable examples. [16]
2. (a) Give the partition algorithm for Quick sort.
(b) Modify the above algorithm to get the selection sort algorithm. Explain the
transition. [8+8]
3. (a) Compute the time complexity of deriving minimum spanning tree from the
weighted connected graph using Kruskal’s algorithm.
(b) Prove that Greedy Knapsack generates optimal solution to the given instance
of Knapsack problem, when the profit-weight ratio is arranged in non-increasing
order. [8+8]
4. (a) Write an algorithm to combine two heaps into a single heap.
(b) Show that if all the internal nodes in a tree have degree k and the number of
external nodes n then n mod (k-1) =1. [8+8]
5. (a) Explain the general Dynamic Programming problem.
(b) What is the Principle of Optimality? Explain its significance. [8+8]
6. (a) Give an algorithm to count the number of leaf nodes in a binary tree T. What
is its computing time?
(b) Prove the relationship E = I + 2n, for a binary tree with n internal nodes
external and the internal path length is I. [16]
7. Compare and contrast
(a) Bruteforce approach Vs Backtracking
(b) fixed Vs variable tuple size formulation. [8+8]
8. Explain the principles of
(a) Control Abstraction for LC-search
(b) Bounding
(c) FIFO Branch & Bound
(d) LIFO Branch & Bound [4+4+4+4]
⋆⋆⋆⋆⋆
1 of 1
Code No: RR210504 Set No. 2
II B.Tech I Semester Supplimentary Examinations, February 2008
DESIGN AND ANALYSIS OF ALGORITHMS
( Common to Computer Science & Engineering, Information Technology
and Computer Science & Systems Engineering)
Time: 3 hours Max Marks: 80
Answer any FIVE Questions
All Questions carry equal marks
⋆⋆⋆⋆⋆
⋆⋆⋆⋆⋆
1 of 1
Code No: RR210504 Set No. 3
II B.Tech I Semester Supplimentary Examinations, February 2008
DESIGN AND ANALYSIS OF ALGORITHMS
( Common to Computer Science & Engineering, Information Technology
and Computer Science & Systems Engineering)
Time: 3 hours Max Marks: 80
Answer any FIVE Questions
All Questions carry equal marks
⋆⋆⋆⋆⋆
2. (a) Modify the Binary search of the text so that in the case of unsuccessful search
it returns the index i such that k(i) <key < k(i+1).
(b) Is Quick sort a stable sorting method? Justify your answer. [8+8]
4. Write an algorithm to split the AVL tree and to concatenate two AVL trees. The
algorithm should work in time proportional to the height of the tree. [16]
5. Explain the Multistage graph problem. Name the design technique that can solve
this problem. Write the algorithm and explain its working with the help of an
example. [16]
6. (a) Show that the inorder and post order sequences of a binary tree uniquely
define the binary tree.
(b) Write a detailed note on depth-first traversal. [10+6]
8. (a) Write a program to solve the Knapsack problem with Branch & Bound algo-
rithm.
(b) Write the algorithm for LC search least cost answer node. [9+7]
⋆⋆⋆⋆⋆
1 of 1
Code No: RR210504 Set No. 4
II B.Tech I Semester Supplimentary Examinations, February 2008
DESIGN AND ANALYSIS OF ALGORITHMS
( Common to Computer Science & Engineering, Information Technology
and Computer Science & Systems Engineering)
Time: 3 hours Max Marks: 80
Answer any FIVE Questions
All Questions carry equal marks
⋆⋆⋆⋆⋆
⋆⋆⋆⋆⋆
1 of 1