Documente Academic
Documente Profesional
Documente Cultură
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]
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
www.andhracolleges.com
⋆⋆⋆⋆⋆
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]
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]
⋆⋆⋆⋆⋆
www.andhracolleges.com
⋆⋆⋆⋆⋆
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]
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]
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.
⋆⋆⋆⋆⋆
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
⋆⋆⋆⋆⋆
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]
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]
⋆⋆⋆⋆⋆