Question

In: Computer Science

Show that Boruvka's algorithm has O(lgV) iterations.

Show that Boruvka's algorithm has O(lgV) iterations.

Solutions

Expert Solution

`Hey,

Note: Brother if you have any queries related the answer please do comment. I would be very happy to resolve all your queries.

Looking at the psudocode below

 Input: A graph G whose edges have distinct weights
 Initialize a forest F to be a set of one-vertex trees, one for each vertex of the graph.
 While F has more than one component:
   Find the connected components of F and label each vertex of G by its component
   Initialize the cheapest edge for each component to "None"
   For each edge uv of G:
     If u and v have different component labels:
       If uv is cheaper than the cheapest edge for the component of u:
         Set uv as the cheapest edge for the component of u
       If uv is cheaper than the cheapest edge for the component of v:
         Set uv as the cheapest edge for the component of v
   For each component whose cheapest edge is not "None":
     Add its cheapest edge to F
 Output: F is the minimum spanning forest of G.

Borůvka's algorithm can be shown to take O(log V) iterations of the outer loop until it terminates, and therefore to run in time O(E log V), where E is the number of edges, and V is the number of vertices in G. In planar graphs, and more generally in families of graphs closed under graph minor operations, it can be made to run in linear time, by removing all but the cheapest edge between each pair of components after each stage of the algorithm.

Kindly revert for any queries

Thanks.


Related Solutions

Write a C++ program for Euclids Algorithm that keeps track of the number of iterations (%...
Write a C++ program for Euclids Algorithm that keeps track of the number of iterations (% & loop) 1. Euclid’s Algorithm An alternative of the Euclidean algorithm for finding greatest common divisors (GCD) is repeatedly performing the modulo operation on two numbers until the remainder is 0. Here is the pseudocode for find the GCD of two positive numbers a and b using the Euclidean algorithm :while b ≠ 0 temp = b b = a mod t a =...
compute the first three iterations of the gradient ascent algorithm applied to the function f(x) =...
compute the first three iterations of the gradient ascent algorithm applied to the function f(x) = -0.2 + x + x^2 - 5.5x^3 +4x^4. Assume initial value for x0 = 0.11 and alpha = 0.1.
Subject: Encryption in Malware/Viruses o make an Introduction on this subject o make a Methodology/ Algorithm...
Subject: Encryption in Malware/Viruses o make an Introduction on this subject o make a Methodology/ Algorithm on this subject o setup a Coding / Setup on this subject o and Application o also add Reference
Write a pseudo code for an O (n7log3n) algorithm. Please write in C++.
Write a pseudo code for an O (n7log3n) algorithm. Please write in C++.
a. Using the Euclidean Algorithm and Extended Euclidean Algorithm, show that gcd(99; 5) = 1 and...
a. Using the Euclidean Algorithm and Extended Euclidean Algorithm, show that gcd(99; 5) = 1 and find integers s1 and t1 such that 5s1 + 99t1 = 1. [Hint: You should find that 5(20) + 99(?1) = 1] b. Solve the congruence 5x 17 (mod 99) c. Using the Chinese Remainder Theorem, solve the congruence x 3 (mod 5) x 42 (mod 99) d. Using the Chinese Remainder Theorem, solve the congruence x 3 (mod 5) x 6 (mod 9)...
Pseudocode and algorithm of merging k sorted list with running time O(Nlogk).
Pseudocode and algorithm of merging k sorted list with running time O(Nlogk).
Write an algorithm for combining two skip lists in O(a + b) time, where a is...
Write an algorithm for combining two skip lists in O(a + b) time, where a is the number of keys in the first list, and b is the number of keys in the second list.
Algorithm problem 4 [3.1-4] Is (2^(n+1))∈O(2^n)? Is (2^(2n))∈O(2^n)?
Algorithm problem 4 [3.1-4] Is (2^(n+1))∈O(2^n)? Is (2^(2n))∈O(2^n)?
What characteristic of the binary search algorithm results in its speed? What is big O for...
What characteristic of the binary search algorithm results in its speed? What is big O for binary search? Binary search has a significant disadvantage -- what is it?
Present an O(n) algorithm that sorts n positive integer numbers a1, a2, . . . ,...
Present an O(n) algorithm that sorts n positive integer numbers a1, a2, . . . , an which are known to be bounded by n 2 (so ai ≤ n 2 , for every i = 1, . . . , n. Use the idea of Radix Sort (discussed in class and presented in Section 8.3 in the textbook). Illustrate your algorithm by showing on paper similar to Fig. 8.3, page 198 in the textbook (make sure you indicate clearly...
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT