Honors Project CSE 3318 - Shortes Paths


Figure 1: A visual representation of the road system described in file input1.txt. Implement Dijkstra's Algorithm to find the best route between any two cities. Your program will be called find_route.c. It will ask the user for a file name and a source and a destination. Argument input_filename is the name of a text file such as input1.txt, that describes road connections between cities in some part of the world. For example, the road system described by file input1.txt can be visualized in Figure 1 shown above. You can assume that the input file is formatted in the same way as input1.txt: each line contains three items. The last line contains the items "END OF INPUT", and that is how the program can detect that it has reached the end of the file. The other lines of the file contain, in this order, a source city, a destination city, and the length in kilometers of the road connecting directly those two cities. Each city name will be a single word (for example, we will use New_York instead of New York), consisting of upper and lowercase letters and possibly underscores.

IMPORTANT NOTE: MULTIPLE INPUT FILES WILL BE USED TO GRADE THE ASSIGNMENT. FILE input1.txt IS JUST AN EXAMPLE. YOUR CODE SHOULD WORK WITH ANY INPUT FILE FORMATTED AS SPECIFIED ABOVE.

The program will compute a route between the origin city and the destination city, and will print out both the length of the route and the list of all cities that lie on that route.


     Sample run 1:
Enter filename: input.txt 
Enter origin city: Bremen 
Enter destination city: Frankfurt

distance: 455 km
route: 
Bremen to Dortmund, 234 km 
Dortmund to Frankfurt, 221 km 

     Sample run 2:
Enter filename: input.txt 
Enter origin city: London
Enter destination city: Frankfurt

distance: infinity
route: 
none 

Requirements


Presentation

Present your work to instructor by the demo deadline (see top of page).
When you finished the project and are ready to present it, contact the instructor to arrange a day and time to present. The quality of the presentation will be graded out of 10 points, but the presentation itself is mandatory and will be used by the instructor to determine your understanding of the problem and the solution. For example, if during the presentation you do not know what the algorithm does at any specific step or why it does that, you would not pass the entire project. You should present the project as soon as you are done with the code, while it is all still fresh in your mind.
During the presentation, you will:
  1. give applications of this algorithm
  2. demo all components of the project
  3. present the method (general algorithm) and show how it works (on paper). Use visualization tools (it can be simply drawing on paper).
  4. open the source code and explain which piece of code implements specific parts of the method you are implementing
  5. discuss implementation choices, and
  6. lessons learnt.


Suggestions

Pay close attention to all specifications on this page, including specifications about output format, submission format. Even in cases where the program works correctly, points will be taken off for non-compliance with the instructions given on this page (such as a different format for the program output, wrong compression format for the submitted code, and so on). The reason is that non-compliance with the instructions makes the grading process significantly (and unnecessarily) more time consuming.


Due Dates


How to submit

The assignment should be submitted via Canvas. Submit a ZIPPED directory called honors_project_sp.zip (no other forms of compression accepted, contact the instructor or TA if you do not know how to produce .zip files). The directory should contain source code. Including binaries that work on omega is optional. The submission should also contain a file called README, which should specify precisely:

Insufficient or unclear instructions will be penalized by up to 10 points.

Grading

The assignment will be graded out of 100 points.
A score of 80 or higher is needed to pass the project.