



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, Prim's Algorithm, Minimum Spanning Tree, Implicitly Colors, Edge Weights, General Greedy Method, Prim's Algorithm, Spanning Trees, Changkey, Siftdown Procedure
Typology: Exams
1 / 7
This page cannot be seen from the preview
Don't miss anything!




Suppose an application uses Prim’s algorithm for minimum spanning trees and we happen to know that for the graphs that arise in the application, changkey is called at most n 4/3^ times. Based on this, derive an estimate for the best choice of d for this application. How many levels will the heap have if n =10 6?
What if the inserted item had a key of 500 thousand? Explain.
Suppose that instead of insert, we did a deletemin. Approximately how many iterations would the siftdown procedure perform? Explain.
Suppose that we selected an item at random and did a changekey on that item with a new key value of 60,000. Estimate the number of levels the item will move. Explain.
Identify a maximum capacity augmenting path in the residual graph. How much flow can be added to this path?
Find the path that would be selected by the capacity scaling algorithm if the current scale factor was 3. How much flow can be added to this path?
s
a
c
b
d
e
t
7
4
3
2
3
2
2
(^4 2 )
4
3
2
3
1
2
2
Suppose that during step k+1 , an edge ( u , v ) is added to the residual graph. Give an equation relating the value of level (^) k ( u ) to level (^) k ( v ). Explain your answer
Give an equation relating the value of level 99 ( u ) to level 99 ( v ). Explain your answer.
Let S be the set of edges ( x , y ) for which level 99 ( y )= level 99 ( x )+1. Is it possible for S to have exactly 85 edges? Why or why not?