Vous êtes sur la page 1sur 6

Code No: 2321904 Set No.

1
III B.Tech II Semester Regular Examinations, April/May 2009
DESIGN AND ANALYSIS OF ALGORITHMS
(Electronics � Computer Engineering)
Time: 3 hours Max Marks: 80
Answer any FIVE Questions
All Questions carry equal marks
�����

1. �a) Define time complexity. Describe different notations used to represent there
complexities.
�b) Derive the function f�n)= 12n2 +6n is 0�n3 ) and w�n). [10+6]

2. �a) Suppose a binary tree has leaves �� �2 .......lm at depths d� � d2 ....dm respectively

m
prove that 2��i ≤ 1 and determine when the equality is true.
i=�

�b) Write and explain the control abstraction algorithm of divide and conquer.
[8+8]

3. �a) If objects are selected in order of decreasing vi/wi then prove that the algo-
rithm Knapsack finds an optimal solution.
�b) Write an algorithm of prim’s minimum spanning tree. [8+8]

4. �a) Explain the reliability deign problem.


�b) Find the shortest path between all pairs of nodes in the following graph.
�Figure 4b). [8+8]

Figure 4b
5. �a) Find the strongly connected components in the graph of figure 5a.

1 of 2
Code No: 2321904 Set No. 1

Figure 5a
�b) Write a non-recursive algorithm of Pre-order traversal of a tree and also ana-
lyze its time complexity. [6+10]

6. �a) Let w = �5� 7� 10� 12� 15� 18� 20} and m=35. Find all possible subsets of w that
sum to m. Draw the portion of the state space tree that is generated.
�b) Compare and Contrast Brute force approach and Backtracking. [10+6]

7. �a) Explain the general method of Branch and Bound.


�b) Explain the principles of LIFO Branch and Bound. [8+8]

8. �a) What is meant by Halting problem explain with an example.


�b) Explain the classes of P and NP. [8+8]

�����

2 of 2
Code No: 2321904 Set No. 2
III B.Tech II Semester Regular Examinations, April/May 2009
DESIGN AND ANALYSIS OF ALGORITHMS
(Electronics � Computer Engineering)
Time: 3 hours Max Marks: 80
Answer any FIVE Questions
All Questions carry equal marks
�����

1. �a) Show that f�n)+g�n)=O �n2 ) where f �n) = 3n2 � n + 4 and g�n)=nlogn+5
�b) Explain how time complexity of an algorithm is computed. [8+8]
2. �a) Write and explain the control abstraction for Divide and conquer.
�b) Suggest refinements to mergesort to make it in-place. [8+8]
3. �a) Find the solution for the instance n=7
�p� � p2 .......p7 )=�3,5,20,18,1,6,30) and
�D� � D2 .......D7 ) = �1,3,4,3,2,1,2) by using Job sequencing with Deadlines.
�b) Write control abstraction algorithm of Greedy method. [10+6]
4. �a) Find the shortest tour of a TSP for the following graph �figure 4a) using
dynamic programming.

Figure 4a
2
�b) Design a θ �n ) algorithm for finding an optimal Binary search tree. [8+8]
5. �a) Explain the properties of strongly connected components.
�b) Write a non-recursive algorithm of In-order traversal of a tree and also analyze
its time complexity. [6+10]
6. �a) Write an algorithm of finding all m-colorings of a graph.
�b) Describe the 4-queens problem using backtracking. [8+8]
7. �a) Explain the general method of Branch and Bound.
�b) Explain the principles of LIFO Branch and Bound. [8+8]
8. �a) Explain the classes of NP-hard and NP-complete.
�b) Describe clique decision problem and write the algorithm for the same. [8+8]

�����

1 of 1
Code No: 2321904 Set No. 3
III B.Tech II Semester Regular Examinations, April/May 2009
DESIGN AND ANALYSIS OF ALGORITHMS
(Electronics � Computer Engineering)
Time: 3 hours Max Marks: 80
Answer any FIVE Questions
All Questions carry equal marks
�����

�2 √
1. �a) Develop a probabilistic algorithm to find the value of the integral 4 − x2 dx

�b) Differentiate between priori analysis and posteriori analysis. [10+6]

2. �a) Write and explain the control abstraction for Divide and conquer.
�b) Suggest refinements to mergesort to make it in-place. [8+8]

3. �a) Find the solution for the instance n=7


�p1 � p2 .......p7 )=�3,5,20,18,1,6,30) and
�D1 � D2 .......D7 ) = �1,3,4,3,2,1,2) by using Job sequencing with Deadlines.
�b) Write control abstraction algorithm of Greedy method. [10+6]

4. �a) Find the shortest tour of a TSP for the following graph �figure 4a) using
dynamic programming.

Figure 4a
2
�b) Design a θ �n ) algorithm for finding an optimal Binary search tree. [8+8]

5. �a) A directed graph G=�V,E) is singly connected if u � v implies that there is


atmost one simple path from u to v for all vertices u, v ∈ V. Give an efficient
algorithm to determine whether or not a directed graph is singly connected.
�b) Differentiate between BFS and DFS. [10+6]

6. �a) Write an algorithm of estimating the efficiency of backtracking.


�b) Describe the Graph coloring with an example. [8+8]

7. �a) Describe problem state, solution state and answer state with an example.
�b) Explain the general method of Branch and Bound. [8+8]

8. �a) Explain the classes of NP-hard and NP-complete.

1 of 2
Code No: 2321904 Set No. 3
�b) Describe clique decision problem and write the algorithm for the same. [8+8]

�����

2 of 2
Code No: 2321904 Set No. 4
III B.Tech II Semester Regular Examinations, April/May 2009
DESIGN AND ANALYSIS OF ALGORITHMS
(Electronics � Computer Engineering)
Time: 3 hours Max Marks: 80
Answer any FIVE Questions
All Questions carry equal marks
�����

1. �a) Write an algorithm to find the largest of given ‘n? numbers. Derive its time
complexity.
�b) Differentiate between profilling and debugging. [10+6]

2. �a) Explain the strassen’s matrix multiplication.


�b) Write deletion algorithm, of Binary search tree. [8+8]

3. �a) Find the solution for the instance n=7


�p� � p2 .......p7 )=�3,5,20,18,1,6,30) and
�D� � D2 .......D7 ) = �1,3,4,3,2,1,2) by using Job sequencing with Deadlines.
�b) Write control abstraction algorithm of Greedy method. [10+6]

4. Write a pseudocode of the dynamic programming algorithm for solving Optimal


Binary search tree and determine its time and space efficiencies. [16]

5. �a) Explain the properties of strongly connected components.


�b) Write a non-recursive algorithm of In-order traversal of a tree and also analyze
its time complexity. [6+10]

6. Describe Backtracking technique to m-coloring graph. Explain with an example.


[16]

7. �a) Explain live node, E-node and dead node with an example.
�b) Explain the method of reduction to solve TSP problem using Branch and
Bound. [8+8]

8. �a) Explain the classes of NP-hard and NP-complete.


�b) Describe clique decision problem and write the algorithm for the same. [8+8]

�����

1 of 1

Vous aimerez peut-être aussi