hitchhikers-guide
hitchhikers-guide copied to clipboard
Network tutorial: wrong shortest path length
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:
len(networkx.shortest_path(Graph_Karate, 12,15))