Topology
CSV file contents
| u | v | w | x | y | z |
u | 0 | 7 | 3 | 5 | 9999 | 9999 |
v | 7 | 0 | 3 | 9999 | 4 | 9999 |
w | 3 | 3 | 0 | 4 | 8 | 9999 |
x | 5 | 9999 | 4 | 0 | 7 | 9 |
y | 9999 | 4 | 8 | 7 | 0 | 2 |
z | 9999 | 9999 | 9999 | 9 | 2 | 0 |
In this assignment, you are to implement Dijkstra's algorithm to compute the shortest path tree and the cost of least-cost paths for a given node in the network Requirements: 1. First, your program has to read the costs of all links in a given network from "topology.csv file (provided on Moodle). In this file, the first row and the first column refer to the names of the nodes (from u to z) Other cells show the cost of links between the row node and the column node (meaning two nodes are neighbors). The cost value *9999" indicates an infinity cost (meaning two nodes are not neighbors). Your program has to take the name of the topology file as a command line argument. python dijkstras_algorithm.py topology.csv 2. Next, your program has to take a node's name as an input from a command line and print the shortest path tree and the cost of least-cost paths for this node. Sample run: atat: python dijkstras algorithm.py topology.csv Please, provide the node's name: u Shortest path tree for node u: ux, u, uw, wy, vyz Costs of least-cost paths for node u: u:0, 7:6, W:3, 3:5, y: 10, 3:12 3. The computation of the shortest path tree and the costs of least-cost paths has to be implemented with Dijkstra's algorithm. 4. Please, comment your code thoroughly, explaining the steps of Dijkstra's algorithm and the overall flow of your program (e.g. parsing of input file, generating shortest path tree output, etc.) In addition, please, properly specify any sources you have used. 5. Create a "readme.pdf" in which specify Python version you have used, instructions of how to run your program, and screenshots of some sample program runs. 6. Submit zipped folder with your Python source code and the readme.pdf file on Moodle
D 3 W 8_yas SZ SU CV In this assignment, you are to implement Dijkstra's algorithm to compute the shortest path tree and the cost of least-cost paths for a given node in the network Requirements: 1. First, your program has to read the costs of all links in a given network from "topology.csv file (provided on Moodle). In this file, the first row and the first column refer to the names of the nodes (from u to z) Other cells show the cost of links between the row node and the column node (meaning two nodes are neighbors). The cost value *9999" indicates an infinity cost (meaning two nodes are not neighbors). Your program has to take the name of the topology file as a command line argument. python dijkstras_algorithm.py topology.csv 2. Next, your program has to take a node's name as an input from a command line and print the shortest path tree and the cost of least-cost paths for this node. Sample run: atat: python dijkstras algorithm.py topology.csv Please, provide the node's name: u Shortest path tree for node u: ux, u, uw, wy, vyz Costs of least-cost paths for node u: u:0, 7:6, W:3, 3:5, y: 10, 3:12 3. The computation of the shortest path tree and the costs of least-cost paths has to be implemented with Dijkstra's algorithm. 4. Please, comment your code thoroughly, explaining the steps of Dijkstra's algorithm and the overall flow of your program (e.g. parsing of input file, generating shortest path tree output, etc.) In addition, please, properly specify any sources you have used. 5. Create a "readme.pdf" in which specify Python version you have used, instructions of how to run your program, and screenshots of some sample program runs. 6. Submit zipped folder with your Python source code and the readme.pdf file on Moodle D 3 W 8_yas SZ SU CV