CSE 4308/5360 - Assignments - Assignment 1 (Programming 1)

Due date: Tuesday, September 11, 2007, 11:59pm.

Solution

Task

The above map describes road connections between some cities in Germany and in England. Implement a search algorithm that can find a route between any two cities. In particular, your implementation should include the following function:

(find_route origin destination)

that computes a route between origin and destination, and prints out both the length of the route and the list of all cities that lie on that route. For example,

(find_route Bremen Frankfurt)

should have the following output:

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

and

(find_route London Frankfurt)

should have the following output:

distance: infinity
route:
none

Grading

The assignments will be graded out of 50 points for CSE 4308 and out of 60 points for CSE 5360. Students registered in CSE 4308 are welcome to solve the CSE 5360 part of the assignment for extra credit. In other words, if your program always finds a solution when a solution exists, you get 40 points. If your program handles correctly cases were no solution exists you get an extra 10 points. For the CSE 5360 part, if your program always finds the shortest route you get an extra 10 points.

No late submissions will be accepted, as solutions will be posted on the Web shortly after the submission deadline.

How to submit

Implementations in LISP, C, C++, and Java will be accepted. If you would like to use another language, please first check with the instructor via e-mail.

Submit a zipped directory (no other forms of compression accepted) via e-mail to athitsos AT uta DOT edu, with subject "CSE 4308/5360, assignment 1". THE ATTACHMENT SHOULD NOT EXCEED 800KB in size. The directory should contain source code (no compiled binaries), and a file called readme.txt, which should specify precisely:

Insufficient or unclear instructions will be penalized by up to 20 points. Code that does not run on at least one of the gamma and omega machines gets zero points.

Some hints