Skip to content

Using the Dijkstra’s algorithm find the shortest path between each pair of nodes in a network. The graph is an undirected graph defined by a set of Nodes-N, a set of Routers-R, and set of Edges-E that connects N and R.

License

Notifications You must be signed in to change notification settings

ashwin2507/Dijkstra-For-Routers

Repository files navigation

Dijkstra For Routers

Language used: Python 2.7

Using the Dijkstra’s algorithm find the shortest path between each pair of nodes in a network. The graph is an undirected graph defined by a set of Nodes-N, a set of Routers-R, and set of Edges-E that connects N and R.

Nodes.txt ---> Contains all nodes.

Routers.txt ---> Contains all routers.

Edges.txt ---> Contains all possible connections.

  1. Find the shortest path between nodes using Dijkstra Algorithm.
  2. There are two modes of the program: list-all-paths and list_path_to

Use the command: alias python2="python2.7" --> Now, if you want to print all paths use python2 Dijkstra.py 1 and If you want a particular path from source to destination then use python2 Dijkstra.py 2 src dest

replace the src and dest with suitable vertex from the given edges or nodes. The Program once compiled will give a message that the output file has been created and you can check the output in Routes.txt file.

About

Using the Dijkstra’s algorithm find the shortest path between each pair of nodes in a network. The graph is an undirected graph defined by a set of Nodes-N, a set of Routers-R, and set of Edges-E that connects N and R.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages