In the graph in figure 2(a), there are actually three separate subgraphs, and none of these contain vertices which are able to reach vertices in any…

In the graph in figure 2(a), there are actually three separate subgraphs, and none of these contain vertices which are able to reach vertices in any of the other two. For instance, none of a, b, c can reach any of d, e, f or g. However, in figure 2(b) The graph of a, b, c would be considered connected as a can access b, c. b can access a and c (through a) and c can access a, b (through a). Prepare python code for checking whether a given graph is connected or not. The function you write should accept an adjacency matrix as input.

can someone explain it to me

"Get 15% discount on your first 3 orders with us"
Use the following coupon
FIRST15

Order Now