C++ code: Different Graph connected

profileyxpan1996
Requirement.docx

For a directed graph, a strongly connected graph is one where for all pairs of vertices, u and v, a directed path exits for u to v and from v to u. A weakly connected graph is a directed graph which becomes strongly connected when all of its directed edges are replaced with undirected edges. A graph with a single vertex is considered strongly connected.

The job is to add some methods to the Graph class provided :

· bool isStronglyConnected() - returns true if the graph instance is strongly connected.

· bool isWeaklyConnected() - returns true if the graph instance is weakly connected.

· int largestWeaklyConnectedSubGraph() - returns the number of vertices in the weakly connected sub-graph with the largest number of vertices. In the case of a graph that is at least weakly connected, this should return the number of vertices in the graph.

· int largestStronglyConnectedSubGraph() - returns the number of vertices in the STRONGLY connected sub-graph with the largest number of vertices. In the case of a graph that is already strongly connected, this should return the number of vertices in the graph. This is MUCH more difficult than the the weakly connected sub-graph method.