Sunteți pe pagina 1din 6

www.andhracolleges.

com The Complete Information About Colleges in Andhra Pradesh

Code No: RR210504 Set No. 1


II B.Tech I Semester Supplementary Examinations, March 2006
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

www.andhracolleges.com
⋆⋆⋆⋆⋆

1. (a) Order the following functions according to their order of growth (from the
lowest to the highest).
(n-2)! , 5 log (n+100) 10,22n , 0.001n4 +3n3 +1, ln2 n, n1/3 , 3n
(b) Use the most appropriate notation among O, θ and Ω to indicate the time
efficiency class of sequential search in the
i. worst case
ii. best case
iii. average case
(c) If f(n) = am nm +......+a1 n+a0 and am >0 , then prove that f(n) = θ (nm ).
[5+3+8)

2. (a) Explain when the Quick sort is preferred to merge sort and vice-versa.
(b) What is the principle of Partitioning in Quick sort? Give the algorithm.[8+8]

3. (a) Compute the time complexity of deriving minimum spanning tree from the

www.andhracolleges.com
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. 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) Describe the Dynamic Programming approach for the construction of OBST
for a set of n keys, if all keys are equally likely to be searched for.
(b) Write a linear time algorithm that generates the OBST from the root table.
[8+8]

6. (a) Show that the inorder and preorder sequences of a binary tree uniquely define
the binary tree.
(b) Write an algorithm to construct the binary tree with the given inorder sequence
I and postorder sequence P. What is the time complexity of the algorithm
used? [8+8]

7. (a) What are Game trees? What are its applications?


Seminar Topics - Scholarships - Admission/Entrance Exam Notifications
1 ofUSA-UK-Australia-Germany-France-NewZealand
2 Universities List

www.andhracolleges.com Engineering-MBA-MCA-Medical-Pharmacy-B.Ed-Law Colleges Information


www.andhracolleges.com The Complete Information About Colleges in Andhra Pradesh

Code No: RR210504 Set No. 1


(b) Define uniform game tree, random game tree and totally dependent game tree.
[8+8]

8. Explain the principles of

(a) Control Abstraction for LC-search


(b) Bounding

www.andhracolleges.com
(c) FIFO Branch & Bound
(d) LIFO Branch & Bound [4+4+4+4]

⋆⋆⋆⋆⋆

www.andhracolleges.com
Seminar Topics - Scholarships - Admission/Entrance Exam Notifications
USA-UK-Australia-Germany-France-NewZealand Universities List
2 of 2
www.andhracolleges.com Engineering-MBA-MCA-Medical-Pharmacy-B.Ed-Law Colleges Information
www.andhracolleges.com The Complete Information About Colleges in Andhra Pradesh

Code No: RR210504 Set No. 2


II B.Tech I Semester Supplementary Examinations, March 2006
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

www.andhracolleges.com
⋆⋆⋆⋆⋆

1. A complex valued matrix X is represented by a pair of matrices (A,B) where A


and B contain real values. Write an algorithm that computes the product of two
complex valued matrices (A,B) and (C,D) where (A,B) * (C,D) = (A+iB) * (C+iD)
= (AC-BD) + i (AD+BC). Determine the number of additions and multiplications
if all the matrices are all n×n. [16]

2. (a) Compute 2101 * 1130 by applying Divide and Conquer method.


(b) Applying Divide and Conquer strategy, write a recursive algorithm for finding
the maximum and the minimum element from a list. [8+8]

3. Explain the algorithm for Job sequencing with deadlines. Applying the same, find
the solution for the instance n = 4, (p1 .....p4 )=(100,10,15,27) and (d1 .....d4 )=(2,1,2,1).

[16]

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]

www.andhracolleges.com
5. (a) Define Merging and purging rules in 0/1 Knapsack problem.
(b) Given n=3, weights (w1 , w2 , w3 )= (18,15,10), profits (p1 , p2 , p3 )=(25,24,15)
and the knapsack capacity m=20. Compute the sets S i containing the pair
(Pi .Wi ). [8+8]

6. (a) Show that DFS visits all vertices in G reachable from v.


(b) Show that the number of leaves in a binary tree is more than the number of
nodes of degree two. [8+8]

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. Present a program schema for a FIFO Branch & Bound search for a Least-Cost
answer node. [16]

⋆⋆⋆⋆⋆

Seminar Topics - Scholarships - Admission/Entrance Exam Notifications


1 ofUSA-UK-Australia-Germany-France-NewZealand
1 Universities List

www.andhracolleges.com Engineering-MBA-MCA-Medical-Pharmacy-B.Ed-Law Colleges Information


www.andhracolleges.com The Complete Information About Colleges in Andhra Pradesh

Code No: RR210504 Set No. 3


II B.Tech I Semester Supplementary Examinations, March 2006
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

www.andhracolleges.com
⋆⋆⋆⋆⋆

1. A complex valued matrix X is represented by a pair of matrices (A,B) where A


and B contain real values. Write an algorithm that computes the product of two
complex valued matrices (A,B) and (C,D) where (A,B) * (C,D) = (A+iB) * (C+iD)
= (AC-BD) + i (AD+BC). Determine the number of additions and multiplications
if all the matrices are all n×n. [16]

2. Explain the Divide and Conquer method with an example. [16]

3. (a) Applying the Greedy strategy, find the solution for optimal storage on tapes
for the problem instance n=3, (l1 , l2 , l3 ) = (5,10,3).
(b) Explain the 0/1 knapsack problem algorithm with the Greedy method. Show
that this strategy doesn’t necessarily yield optimal solution. [6+10]

4. (a) In the problem of maintaining a ‘changing set’ S of elements, delete some of


the old elements and find whether an element ‘b’ is in the set S. Can this be
modeled by a dictionary? Write the three fundamental set operations needed
to implement the solution of the problem.

www.andhracolleges.com
(b) Implement a technique to handle INSERT, MEMBER and DELETE instruc-
tions. Explain the scheme with a suitable sketch. [8+8]

5. (a) Design a three stage system with device types D1 , D2 , D3 . The costs are Rs.30,
Rs.15 and Rs.20 respectively. The cost of the system is to be not more than
Rs.105. The reliability of each device type is 0.9, 0.8 and 0.5 respectively.
(b) Explain in detail the reliability design problem. [10+6]

6. (a) Design an algorithm to delete a vertex from binary search tree so that the
result is still a binary search tree.
(b) Prove that the BFS algorithm visits all the vertices reachable from the begin-
ning vertex v. [8+8]

7. (a) Explain the nim game.


(b) Generate the complete game tree for nim with n=6. [8+8]

8. (a) Draw the portion of the state space tree generated by LCBB for the knapsack
instance: n=5, (p1 , p2 , ....., p5 )=(10,15,6,8,4), (w1 , w2 , ......, w5 )=(4,6,3,4,2) and
m=12.

Seminar Topics - Scholarships - Admission/Entrance Exam Notifications


1 ofUSA-UK-Australia-Germany-France-NewZealand
2 Universities List

www.andhracolleges.com Engineering-MBA-MCA-Medical-Pharmacy-B.Ed-Law Colleges Information


www.andhracolleges.com The Complete Information About Colleges in Andhra Pradesh

Code No: RR210504 Set No. 3


(b) What do you mean by bounding? Explain how these bounds are useful in the
Branch and Bound method. [10+6]

⋆⋆⋆⋆⋆

www.andhracolleges.com

www.andhracolleges.com
Seminar Topics - Scholarships - Admission/Entrance Exam Notifications
2 ofUSA-UK-Australia-Germany-France-NewZealand
2 Universities List

www.andhracolleges.com Engineering-MBA-MCA-Medical-Pharmacy-B.Ed-Law Colleges Information


www.andhracolleges.com The Complete Information About Colleges in Andhra Pradesh

Code No: RR210504 Set No. 4


II B.Tech I Semester Supplementary Examinations, March 2006
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

www.andhracolleges.com
⋆⋆⋆⋆⋆

1. (a) Define an algorithm. Describe the characteristics of the algorithm.


(b) Write an algorithm to find largest of given ‘n’ numbers. Derive its time com-
plexity. Using big-oh notation. (8+8)

2. (a) Compute 2101 * 1130 by applying Divide and Conquer method.


(b) Applying Divide and Conquer strategy, write a recursive algorithm for finding
the maximum and the minimum element from a list. [8+8]

3. (a) What is a minimum spanning tree? What are its applications?


(b) Design an algorithm for finding a maximum spanning tree of a weighted con-
nected graph. [6+10]

4. (a) What are Dictionaries? Explain.


(b) What is a balanced tree? Differentiate between 2-3 trees and AVL trees.[6+10]

5. Consider the Knapsack instance n=6, m=165, (p1 , p2 , ....., p6 ) = (w1 , w2 , ......, w6 )
= (100,50,20,10,7,3). Generate the Si sets containing the pair (pi , wi ) and thus find

www.andhracolleges.com
the optimal solution. [16]

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. Discuss the relevance of Backtracking technique to m-coloring graph. Explain with


an example. [16]

8. (a) Give the algorithm for LCBB for the 0/1 Knapsack problem.
(b) Compare the efficiencies of FIFO, LIFO and LC Branch & Bound algorithms.

[8+8]

⋆⋆⋆⋆⋆

Seminar Topics - Scholarships - Admission/Entrance Exam Notifications


USA-UK-Australia-Germany-France-NewZealand Universities List
1 of 1
www.andhracolleges.com Engineering-MBA-MCA-Medical-Pharmacy-B.Ed-Law Colleges Information

S-ar putea să vă placă și