CSC 210 Program #5Shortcut |
||||||||||
LogisticsGo...
DescriptionPlease implement Dijkstra's Algorithm to find the shortest path in a graph. Input to the algorithm is a starting vertex. The output is the shortest path to all the remaining vertices in the graph. Yes. It is cool. ImplementationImplementation details:
Examples/Files I'll provide some graph examples (files) for you to munge. The format is:
An example (from page 670 of our textbook) is:
I will create more examples for you over the course of the next week. GradingYou know the drill by now, eh. By the due date, please place your work for Program #5 in your folder on the k: drive. I'll be looking for:
Of course, your code must be beautiful and follow the class coding guidelines. Code that does not meet this metric will be served a harsh brand of grading justice.
EtcHey, if you like graphics, you can do programming problem 12.7 on page 677 instead. Hey (again), look at this fun interactive Dijkstra from some Japanese guy: http://www-b2.is.tokushima-u.ac.jp/~ikeda/suuri/dijkstra/Dijkstra.shtml May 20, 2006 Hey guys, I have slightly modified the file format. It's very straightforward... here are some samples for you:
Also, here's my Java to read this format: program05/Program05Prep.java Please note that the japan2 file references nodes by number in the .edges section. I haven' coded that up in my reader yet. Everything's on the k: drive as well. good luck... yow, bill |
...