2.3 Dijkstra on Dijkstra
You must submit this in an archive named "dijkstra.zip".
Flavor text: Dijkstra suddenly finds himself in a random graph. He must escape using only his TI-83 and his experience designing algorithms.
You must implement Dijkstra’s Shortest Path algorithm.
Your program should accept a description of an undirected graph in the following format:
| ‹graph› | ::= | ‹integer› ‹edge›* |
| ‹edge› | ::= | ‹node› >- ‹weight› -> ‹node› |
| ‹node› | ::= | ‹integer› |
| ‹weight› | ::= | ‹integer› |
You may want to write a program to generate such inputs.
Your program should accept two nodes and compute the shortest path between these nodes.
<start node> -> <node> -> <node> ... -> <end node> |
Cost: <weight> |
You must test your program on graphs of at least 1000 nodes.
Your program must output the time it took to solve the problem (not read in the input and solve the problem.)
If you want to, follow these directions instead.