



Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
Main points of this exam paper are: Advanced Data Structures, Algorithms, Kruskal's Algorithm, Intermediate Point, Partition Data Structure, Kruskal's Algorithm, Alternate Version, Partition Data Structure, Executed, Intermediate State
Typology: Exams
1 / 7
This page cannot be seen from the preview
Don't miss anything!




Which edges in the graph are in the partial MST solution computed so far?
In the partition data structure, what is the rank ( a )?
What is the rank ( e )?
Consider an alternate version of Kruskal’s algorithm that does not use the partition data structure. Instead, when considering an edge { u , v } it does a tree traversal in the current “blue tree” containing vertex u and checks to see if v is in the tree. Give a big- O bound on the running time of this version of Kruskal’s algorithm and explain why the running time can be as bad as your bound.
Now suppose that a find operation is executed and that x is one of the vertices on the “find path”. Give a lower bound on the value of rank ( p ( x )) after the find operation completes (your lower bound should be as large as possible and still be valid). Explain your answer.
Is x still on level 2 after the find operation completes? Explain your answer.
Which edges are in the partial MST that has been found so far?
In the heap h ( d ), which edges would be considered “deleted” by the round-robin algorithm?
Suppose that h ( d ) is the first item on the list used by the round-robin algorithm. What is the next edge added to the tree?
P : { a , f } { b , c } { e , h , j } { d , g , i , k , m }
h ( a ) = { af,fc,ab,ad }
h ( c ) = { cf,bc,ch,ab,bd,be }
h ( e ) = { eh,ej,be,eg,ej,ch,jh,ij }
h ( d ) = { ad,bd,dg,dk,eg,gi,gk,ij,im,km }
f
a
c
b
d
e
g
h
i
j
m
k 2 5
Consider the node x and its children y 1 ,..., y 5 in the portion of the Fibonacci heap shown below.
Assume that x has never lost any children and that y 1 was the first to become a child of x , followed by y 2 , y 3 and so forth. Which children of x must have a mark bit that is set? Explain your answer.
y 3
x
y 1 y 2 y 3 y 4 y 5
x
y 1 y 2 y 3 y 4 y 5
x
y 1 y 2 y 4 y 5