Skip to content

Network tutorial: wrong shortest path length #167

@hsxavier

Description

@hsxavier

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))

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions