



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
The general greedy method for finding minimum spanning trees, focusing on kruskal's algorithm as a special case. It also discusses the properties that must be maintained in the d-heap data structure and compares the running time of prim's algorithm using d-heaps and fibonacci heaps. Lastly, it explains how to modify a minimum spanning tree when an edge weight is changed.
Typology: Exams
1 / 7
This page cannot be seen from the preview
Don't miss anything!
Be neat and concise, but complete.
The general greedy method applies one of the following two coloring steps until all edges are colored. On completion, the blue edges form a minimum spanning tree.
Blue rule. Find a cut crossed by no blue edges and at least one uncolored edge. Select a minimum weight uncolored edge crossing the cut and color it blue.
Red rule. Find a cycle with no red edges and at least one uncolored edge. Select an uncolored edge of maximum weight from the cycle and color it red.
Kruskal’s algorithm goes through the edges in non-decreasing order of their weight. On finding an edge that joins two separate blue trees, it colors it blue. This is a proper application of the blue rule, since the cut defined by placing one of the blue trees on one side of the cut and all other vertices on the other side, constitutes a cut that we can apply the blue rule to. Since the edge under consideration is a minimum weight uncolored edge, it is also minimum weight among edges crossing the cut. When Kruskal’s algorithm finds an edge joining two vertices in the same blue tree, it colors it red. This is a proper application of the red rule, since the edge and the tree path joining its endpoints form a cycle that the red rule can be applied to. Since the edge being considered, is the only uncolored edge, in the cycle, it must be a maximum weight uncolored edge in the cycle.
Pd is O ( PF ) when m = 3 n.
This is true, since P (^) d = O ( m (log n ) / log(2+ m/n )) = O ( n log n ) and PF = Ω( m + n log n ) = Ω( n log n ).
Pd is O ( PF ) when m = n^2 /4.
This is true, since P (^) d = O ( m (log n ) / log(2+ m/n )) = O ( n^2 ) and PF = Ω( m + n log n ) = Ω( n^2 ).
Pd is O ( PF ) when m = n (log n ) 2.
This is false, since P (^) d = Ω( m (log n ) / log(2+ m/n )) = Ω( n (log n ) 3 /log log n ) and PF = O ( m + n log n ) = O ( n (log n ) 2 ) and n (log n ) 3 /log log n grows more quickly than n (log n ) 2 does.
Pd is O( PF ) when m = n3/^2.
This is true, since P (^) d = O ( m (log n ) / log(2+ m/n )) = O ( n 3/2^ ) and PF = Ω( m + n log n ) = Ω( n 3/2^ ).
!! !!
!!!!
!!!!
!!!!
!!!! denotes a set mark bit
!! !!
!!!!
!!!!
!!!!
!!!! denotes a set mark bit
!!!!
!!!! !!!!
!!!! p 6,
!!!!
!!!! !!!!
!!!!!!!! (^) ppp 6,06,06,
that have no proper ancestor y with level(y)=level(x), the number of different vertices for which fcredit is incremented during a top level find is at most equal to the number of distinct values of the
From the definition of level(x), we have level(x) ≤ 1+ ( rank ( p ( x )) − rank ( x )) 1/2^. So,