Professional Documents
Culture Documents
1
II B.Tech I Semester Supplementary Examinations, February 2007
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
⋆⋆⋆⋆⋆
3. (a) Explain the terms feasible solution, optimal solution and objective function.
(b) How are each of the above terms defined in
i. Knapsack problem and
ii. Storage on tapes. [6+10]
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. (a) What is a Traveling sales person’s problem and what are its applications?
(b) For the traveling salesperson algorithm, show that the time complexity is O(n2
2n ) and space complexity is O(n2n ). [8+8]
6. Write an algorithm for breadth first traversal so that all connected components of
an undirected graph G are printed out. Assume that G is the input in adjacency
list with HEAD as the head node for the adjacency list. [16]
7. Write an algorithm to determine whether or not the given AND/OR graph G rep-
resents a solvable problem. Devise a suitable representation for the above problem.
[16]
8. Define dominance relations. Does the use of the dominance relations result in
the generation of more nodes than the nodes that would otherwise be generated?
Justify. [16]
⋆⋆⋆⋆⋆
1 of 1
Code No: RR210504 Set No. 2
II B.Tech I Semester Supplementary Examinations, February 2007
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
⋆⋆⋆⋆⋆
[16]
8. Given instance is, n=5, (p1 , p2 .....p5 ) =(10,15,6,8,4), (w1 , w2 , ....., w5 )=(4,6,13,4,2)
and m=12. Give relevant diagrams and suitable explanations to solve this by using
(a) LCBB and
(b) Dynamic programming. [10+6]
⋆⋆⋆⋆⋆
1 of 1
Code No: RR210504 Set No. 3
II B.Tech I Semester Supplementary Examinations, February 2007
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+14]
⋆⋆⋆⋆⋆
1 of 1
Code No: RR210504 Set No. 4
II B.Tech I Semester Supplementary Examinations, February 2007
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
⋆⋆⋆⋆⋆
4. Write an algorithm for heap sort. Trace the algorithm to sort the following list of
numbers. 8, 20, 9, 4, 15, 10, 7, 22, 3, 12. Analyze its time complexity. [16]
5. (a) Give an algorithm for solving multistage graph problem using backward ap-
proach when the graph is represented by using adjacency list.
(b) Test the correctness of the above problem using a suitable graph.
(c) What is its time complexity? [8+4+4]
8. Given instance is, n=5, (p1 , p2 , ....., p5 )=(w1 , w2 , ....., w5 )=(4,4,5,8,9) and m=15.
Solve this by using
⋆⋆⋆⋆⋆
1 of 1