Strongly connected components in a Graph
The program starts from the main.py python module which expects a filepath as argument. The
input file needs to be given in the expected format to get the desired output.
1. Generates graph from input file - O(E)
2. Computes DFS - O(V + E)
3. Generates a transpose of the original graph which is a new copy of the graph but
transposed. - O(V + E)
4. Computes DFS again on transposed graph - O(V + E)
5. Writes the output to a text file - O(E)
The overall complexity is O(V + E)
There are some sample graphs that were used to test the sanity of the code. These can be
found in tests.py
large_graph.py can be used to generate a very large graph with one connected component.
The recursion depth for python is increased as python is very strict about the recursion depths.
The profiling results are as follows for the input size of 2^14. For latter input the program halts
with segmentation fault (out of memory issues). For benchmarking, the program is run on 2.7
GHz Intel Core i5, 8GB DDR3, MacBook Pro.