Академический Документы
Профессиональный Документы
Культура Документы
?????
Code No: R5220502 2
II B.Tech. II Semester (R05) Supplementary Examinations, April/May 2009
DESIGN AND ANALYSIS OF ALGORITHMS
(Computer Science & Engineering)
Time: 3 hours Max Marks: 80
Answer any FIVE Questions
All Questions carry equal marks
?????
?????
Code No: R5220502 3
II B.Tech. II Semester (R05) Supplementary Examinations, April/May 2009
DESIGN AND ANALYSIS OF ALGORITHMS
(Computer Science & Engineering)
Time: 3 hours Max Marks: 80
Answer any FIVE Questions
All Questions carry equal marks
?????
1. (a) Write the non-recursive algorithm for finding the fibonacci sequence and derive its time complex-
ity.
(b) Show that f(n) = 4n2 −64n + 288 =Ω (n)2 . [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) Write a greedy algorithm to the Job sequencing with deadlines.
(b) Prove that the edge with the smallest weight will be part of every minimum spanning tree. [8+8]
4. (a) Explain the matrix chain multiplication with an example.
(b) Find the shortest tour of a TSP for the following graph (figure 1)using dynamic programming.
[8+8]
Figure 1:
5. (a) Write a pseudocode for finding the strongly connected components of directed graph. Also analyze
its time complexity.
(b) Explain the Inorder traversal of a tree with an example. [8+8]
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 method of reduction to solve TSP problem using Branch and Bound.
(b) Explain the principles of FIFO 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]
?????
Code No: R5220502 4
II B.Tech. II Semester (R05) Supplementary Examinations, April/May 2009
DESIGN AND ANALYSIS OF ALGORITHMS
(Computer Science & Engineering)
Time: 3 hours Max Marks: 80
Answer any FIVE Questions
All Questions carry equal marks
?????
1. (a) Write the non-recursive algorithm for finding the fibonacci sequence and derive its time complex-
ity.
(b) Show that f(n) = 4n2 −64n + 288 =Ω (n)2 . [10+6]
2. (a) Write a search algorithm in a binary search tree.
(b) List some of the advantages and disadvantages of the partition algorithm.
[10+6]
3. Write and Explain the Kruskal’s algorithm for finding the minimum cost spanning tree. What is its
time complexity. [16]
4. (a) Find one problem for which the principle of optimality does not hold. Explain why the principle
does not hold.
(b) Find the shortest path between all pairs of nodes in the following graph. (Figure 1) [8+8]
Figure 1:
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. Write the control abstraction of backtracking write backtracking algorithm for 8-queen problem. [16]
7. (a) Explain the method of reduction to solve TSP problem using Branch and Bound.
(b) Explain the principles of FIFO 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]
?????