Boruvka's Algorithm has a runtime of \(O((|V| + |E|) \log |V|)\).
Note 1: ETH::1. Semester::A&D
Deck: ETH::1. Semester::A&D
Note Type: Horvath Cloze
GUID:
modified
Note Type: Horvath Cloze
GUID:
B/7aNL0zYE
Before
Front
Back
Boruvka's Algorithm has a runtime of \(O((|V| + |E|) \log |V|)\).
During each iteration, we examine all edges to find the cheapest one: \(O(|V| + |E|)\):
- Run DFS to find the connected components: \(O(|V| + |E|)\)
- Find the cheapest one \(O(|E|)\)
After
Front
Boruvka's Algorithm has a runtime of \(O((|V| + |E|) \log |V|)\).
Back
Boruvka's Algorithm has a runtime of \(O((|V| + |E|) \log |V|)\).
During each iteration, we examine all edges to find the cheapest one: \(O(|V| + |E|)\):
- Run DFS to find the connected components (ZHKs): \(O(|V| + |E|)\)
- Find the cheapest one \(O(|E|)\)
Field-by-field Comparison
| Field | Before | After |
|---|---|---|
| Extra | During each iteration, we examine all edges to find the cheapest one: \(O(|V| + |E|)\):<br><ol><li>Run DFS to find the connected components |
During each iteration, we examine all edges to find the cheapest one: \(O(|V| + |E|)\):<br><ol><li>Run DFS to find the connected components (ZHKs): \(O(|V| + |E|)\)</li><li>Find the cheapest one \(O(|E|)\)</li></ol>We iterate a total of \(\log_2 |V|\) times as each iteration halves the number of connected components. |