COMP 5481 Programming and problem solving

$ 24.99
Category:

Description

Lab 8
Problem Description:
Write a Java program that receives a directed graph as input and determines the strongly connected components. A directed graph is strongly connected if there is a path between all pairs of vertices.
Input: The first two lines of input determines number of vertices V and number of edges E, respectively in the graph. The next E lines indicate the connectivity between vertices.

Output: Output will show the strongly connected components in input graph as given in the test case format. The components themselves must be sorted.
Test Case Input Output
1 6
7
1 4
1 5
0 4
4 2
3 1
5 3
2 0 [1, 3, 5]
[0, 2, 4]
2 7
10
2 3
0 2
6 3
1 2
3 4
3 5
0 1
1 3
0 3
5 6 [0] [1]
[2]
[3, 5, 6]
[4]

Reviews

There are no reviews yet.

Be the first to review “COMP 5481 Programming and problem solving”

Your email address will not be published. Required fields are marked *