Beruflich Dokumente
Kultur Dokumente
NR
M.Tech. – I Semester Supplementary Examinations,
September, 2008
2.a) Write union and Find algorithms that use weighting rule and
collapsing rule respectively for disjoint sets.
b) Using the above representation for disjoint sets, write an algorithm for
job sequencing with dead lines.
4.a) Write a non recursive procedure for the post order traversal of a given
binary tree.
b) Define a B-tree of order m.
c) Compare the performance of the following search trees for insertion,
deletion and searching operations:
i) AVL trees
ii) B-trees.
5.a) Write an algorithm for finding the minimum cost binary search tree.
b) Using the above algorithm compute w(i,j), r(i,j) and c(i,j), 0≤i≤j≤4, for
the identifier set (a1, a2, a3, a4)=(cout , float, if, while) with
( )
p (1) = 1
20 ( ) ( ) ( )
, p (2) = 1 , p (3) = 1 , p (4) = 1
5 10 20
,
( ) 5 ( ) 10 ( ) ( )
5 ( )
q (0) = 1 , q (1) = 1 , q (2) 1 , q (3) = 1
20
, q (4) = 1
20
.
Using the r(i, j)’s construct the optimal binary search tree.
Contd…2.,
Code No: 55101/MT ::2::
x-x-x