Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

image text in transcribed

Topology

image text in transcribed

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

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Advances In Databases And Information Systems 25th European Conference Adbis 2021 Tartu Estonia August 24 26 2021 Proceedings Lncs 12843

Authors: Ladjel Bellatreche ,Marlon Dumas ,Panagiotis Karras ,Raimundas Matulevicius

1st Edition

3030824713, 978-3030824716

More Books

Students also viewed these Databases questions

Question

Why are x and R charts used together?

Answered: 1 week ago