Professional Documents
Culture Documents
CSE342 - ADS SuppExam - 2020
CSE342 - ADS SuppExam - 2020
B. Consider the weight biased leftist trees as shown in the figure. Perform the meld
operation on the following min weight biased leftist trees.
2. A. Show the resultant Treap structure when the following operations are performed one 03+03
by one, in order on the given (key, priority) pairs in an initially empty Treap data
structure: insert(G,50), insert(C,30), insert(B,20), insert(A,25), insert(E,35),
insert(H,40), insert(I,15), delete(E,35), insert(J,10), delete(H,40),
B. Perform the deletionmin() operation on the following Binomial heap. Illustrate each
step clearly.
3. A. Consider a splay tree as shown in the figure. Perform the following operation one by 03+03
one in order. delete(8), delete(6), insert(12), and delete(20).
B. Show the resultant Fibonacci heap when the removemin() operation is performed on
the Fibonacci heap as shown in the figure.
4. A. Construct the string-matching automaton for the pattern P = abbaa over the over the 03+03
alphabet Σ={a,b} and illustrate its operation on the text string T = aababaaabbaa.
B. Construct a standard trie by inserting eight names that starts with character c or n.
Identify the redundant nodes and redundant chain of edges and convert the
constructed standard trie into compressed trie.
5. A. Consider a graph G with three connected components: {a, b, c, d}, {e, f, g}, and {h, i, 03+03
j} as shown in Figure.
Compute the collection of disjoint sets when each edge is processed one by one in
order as prescribed below:
(a,b), (e,f), (h,j), (e,g), (a,c), (h,i), (b,d), (c, b)