





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
Community
Ask the community for help and clear up your study doubts
Discover the best universities in your country according to Docsity users
Free resources
Download our free guides on studying techniques, anxiety management strategies, and thesis advice from Docsity tutors
Main points of this past exam are: Advanced Data Structures, Partition Data Structure, Numbers Represent Ranks., Numerical Lower Bound, Non-Root Node, Dominant, Amortized, Analysis, Deletemin, Invariant
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
How many credits are needed to ensure that the credit invariant used in the amortized analysis is satisfied? 6+2 × 4= Show the heap that results from performing a deletemin on the heap.
How many credits are needed to maintain the invariant following the deletemin? 9
a
(^3) b
c 4
d
e
f 7
g
h
i
k j
l
m o p
n 5
q 1
a
(^3) b
2
c 4
d
e
6
f 7
g
h
9
k^ j
l
m o p
n 5
8
5 3
5 8
7
6
4
q (^) 1
9
(^999)
The actual tree appears at right. The edge from b to a is the only one that becomes saturated after 2 units of flow are added to the path skfebadt.
Δ 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
b
t
d
e
c a
f
s
k
g 13
i
h
n
m
What is the asymptotic running time for this version of the algorithm? O(mn log n) since the dynamic tree operations have an amortized cost of O(log n) per operation.
Replace p ( w ) := v with if dt. ancestor ( v , w ) then stop, cycle found fi dt.cut ( w ); dt. link ( w , v );