Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Excel File: Create a Python program Dijkstra.py to compute Dijkstra's algorithm. You could use Python 2 or Python 3, whichever you prefer. But you need
Excel File:
Create a Python program "Dijkstra.py" to compute Dijkstra's algorithm. You could use Python 2 or Python 3, whichever you prefer. But you need to let me know which version it is. Instructions: 1. 2. a. Read link state data from "LinkState.csv". In this file, the first row and the first column are the name of the nodes (From A to J). Other cells show the costs between the row node and the column node (hence these two nodes are neighbors). For convenience, number 1000" means infinity, as the two nodes are not neighbors. Your program should be able to print source tree and cost regarding to a node give by user in command line. A sample command line output should like this: b. Please type the node name and click Enter: (User input) Source tree for node A: ACB, ACE, ACF, ACDHGI, ACDHGJ Cost for node A A:0, B:4, C:1, D:4, E:6, F:7, G:8, H:6, I:10, J:9 The computations of shortest path and source tree must be done with Dijkstra's algorithm. (I know there are other shortest path algorithms) Please, please create enough comments for me to understand your code. c. d. Create a Python program "Dijkstra.py" to compute Dijkstra's algorithm. You could use Python 2 or Python 3, whichever you prefer. But you need to let me know which version it is. Instructions: 1. 2. a. Read link state data from "LinkState.csv". In this file, the first row and the first column are the name of the nodes (From A to J). Other cells show the costs between the row node and the column node (hence these two nodes are neighbors). For convenience, number 1000" means infinity, as the two nodes are not neighbors. Your program should be able to print source tree and cost regarding to a node give by user in command line. A sample command line output should like this: b. Please type the node name and click Enter: (User input) Source tree for node A: ACB, ACE, ACF, ACDHGI, ACDHGJ Cost for node A A:0, B:4, C:1, D:4, E:6, F:7, G:8, H:6, I:10, J:9 The computations of shortest path and source tree must be done with Dijkstra's algorithm. (I know there are other shortest path algorithms) Please, please create enough comments for me to understand your code. c. d
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started