Exercise: 22.5-1 CLRS
How can the number of strongly connected components of a graph change if a new
edge is added?
Somewhere the answer given is If a new edge is added, one of two things could happen.
1) If the new edge connects two vertices that belong to a strongly connected component, the number of strongly connected components will remain the same.
2) If, instead, the edge connects two strongly connected components, and the edge is in the reverse direction of an existing path between the two components, then a new strongly connected component will be made, increasing the number of components.
I think the second point is incorrect.
Lets say we have two strongly connected component C and C'
a) If no edge or edge C->C' exists between them and new edge connects as C->C' then nothing will happen.
b) If edge C->C' exists between them and new edge connects as C'->C then C' will be merged to C decreasing the number of strongly connected component by 1 as every vertex will be reachable from each other.
Please correct me if i am wrong.
You're exactly correct. The answer you quoted is wrong in its description: adding edges is only ever going to decrease the number of strongly connected components. Once all possible edges have been added, there's just a single strongly connected component left - the entire graph.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With