





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
Exam questions from a university course on advanced data structures and algorithms. The questions cover topics such as partition data structures, fibonacci heaps, dual-key search trees, and max flows. Students are asked to find numerical bounds, identify dominant nodes, analyze heap structures, and determine the validity of labels in the context of min-cost, max-flow problems.
Typology: Exams
1 / 9
This page cannot be seen from the preview
Don't miss anything!






30 a
(^29) b
(^27) c
(^26) d
(^20) e
(^16) f
(^3) g
The diagram at right shows one tree in a partition data structure; the numbers represent ranks. Give a numerical lower bound on the number of nodes in the tree.
List the dominant nodes in the tree.
Suppose a find operation is done at node g. For each non-root node u on the find path that is not dominant before the find, give the ratio of the new value of Δ( u ) to the old value.
How many credits are needed to ensure that the credit invariant used in the amortized analysis is satisfied?
Show the heap that results from performing a deletemin on the heap.
How many credits are needed to maintain the invariant following the deletemin?
a
(^3) b
c 4
d
e
f 7
g
h
i
k j
l
m o p
n 5
q 1
Δ min , Δ cost
b d
e t
a
n
m (^) 3,0 g
i
s f h
k
c
Δ min , Δ cost
b d
e t
a
n
m (^) 3,0 g
i
s f h
k
c
Explain why every step that adds flow to an edge ( u , v ) without saturating it, causes the potential function to decrease.
How is the potential function affected by a step that adds flow to edge ( u , v ) and saturates it?
Give a big- O bound on the sum of the increases in the potential that could result from all such steps, assuming a graph with n vertices and m edges
How is the potential function affected by a step that changes the label of a vertex u.
Give a big- O bound on the sum of the increases in the potential that could result from all such steps.
In the breadth-first scanning algorithm for finding shortest paths, cycles are detected using a pass-counting method. Suppose that we want to detect a negative cycle in the parent pointers at the time the cycle is about to be created? This can be done by checking to see if a vertex x is an ancestor of y in the shortest path tree, whenever we’re about to make x the parent of y. The main loop of the basic version of the breadth-first-scanning algorithm is shown below. Show how you would modify it to use a dynamic tree data structure in place of the parent pointers, and use the ancestor operation to detect a negative cycle.
What is the asymptotic running time for this version of the algorithm?