Open hsxavier opened 4 years ago
The length of the shortest path between nodes 12 and 15 in the Karate network should be:
len(networkx.shortest_path(Graph_Karate, 12, 15)) - 1
because the output of shortest_path includes both the starting and ending nodes. However, the notebooks Introduction_to_Networks_Karate.ipynb and Introduction_to_Networks_clean.ipynb show, instead:
shortest_path
len(networkx.shortest_path(Graph_Karate, 12,15))
The length of the shortest path between nodes 12 and 15 in the Karate network should be:
because the output of
shortest_path
includes both the starting and ending nodes. However, the notebooks Introduction_to_Networks_Karate.ipynb and Introduction_to_Networks_clean.ipynb show, instead: