Download as pdf or txt
Download as pdf or txt
You are on page 1of 2

Maulana Azad National Institute of Technology, Bhopal

Department of Computer Science & Engineering


Supplementary Examination June 2020

Course: B. Tech. Semester: VI


Subject Name: Advanced Data Structures Subject Code: CSE 342
Max Marks: 30 Time: 2 Hrs.
Timing: 10:00am to 12:00pm
Note:
1. 2 Hours for Examination and 30 Minutes for Answer Sheet Submission.
2. All questions are compulsory.
S. No. Question Marks
1. A. For the following keys and their respective frequencies of search, construct the OBST 03+03
and find its cost.
Key A F G N
Frequency 7 4 11 3

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)

B. Consider the following directed graph G as shown in Figure. Assign a distinct


capacity to each link/edge randomly in the range in between 2 to 20, and compute the
maximum flow using Ford–Fulkerson’s algorithm. For each step, show the residual
graph and new flow after using the path.

You might also like