Click here to Skip to main content
15,881,803 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I am new to Graph Theory. I am trying to understand the relationship between Strongly connected graphs and Strongly connected components(SCC). Please explain why if there are k SCCs in a graph, we can add atmost 2k edges to make the graph a strongly connected one.


What I have tried:

My intuition is that for a graph to be strongly connected each vertex should have at-least one incoming edge and one out going edge. So, if there are k SCC, they can generate a cycle among themselves by adding 2 edges to adjacent SCC - 2k edges. I am not sure if my intuition is correct and if it is how can I logically implement this in an algorithm.
Posted
Updated 8-May-22 2:03am

This is the quick answers forum, please see https://www.codeproject.com/KB/FAQs/QuickAnswersFAQ.aspx[^].
 
Share this answer
 
O(n) algorithms for finding strongly connected components are referenced here[^].

I think your intuition is correct. However, the wording "we can add at most 2k edges to make the graph a strongly connected one" is confusing. In many such graphs, you can add more than 2k edges without making the graph strongly connected. For example, if an SCC only contains a one-way cycle, all the edges in the opposite direction could be added without connecting any SCCs at all. The statement should therefore be that "up to 2k edges may have to be added to make the graph strongly connected". But those edges must be chosen the way that you describe.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900