You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
print("The Graph has {} connected components".format(nx.number_connected_components(G)))
print("The shortest path from Node 1 to Node 5 is {}".format(nx.shortest_path(G, source=1, target=5))) #finds the shortest path from source=0 to destination=5
print("The average shortest path is {}".format(nx.average_shortest_path_length(G))) #helps to analyse the average shortest path in the network