

Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
A programming assignment for a university course, cop 3503h, where students are required to implement graph data structures in java and run dijkstra's and ford's algorithms to find the shortest path in a graph. The assignment includes instructions on how to implement the graph data structure, input and output specifications, and restrictions. Students are expected to write a complete program, including comments with their name, assignment title, and date.
Typology: Assignments
1 / 2
This page cannot be seen from the preview
Don't miss anything!


Title: “Program Assignment 3: Graph Shortest Path Problems” Points: 100 points – 60pts for coded portion, 40 points for written analysis Due Date: Monday December 2, 2002 (last day of class) Objectives: (1) To implement graph data structures in Java. (2) To implement two classical graph shortest path algorithms. Description: Create a Java program that will produce the shortest path through (1) a positively weighted directed graph using Dijkstra’s algorithm and (2) a directed graph with negative weights using Ford’s algorithm. Note: Ford’s algorithm works for either positive or negative edge weights, for our purposes here, use only Dijkstra for positively weighted graphs and use Ford exclusively for negatively weighted graphs. Do this according to the steps shown below:
Output Specification: For each graph in the input, your program must select the appropriate shortest path algorithm (Dijkstra or Ford, and indicate which was selected) to execute on the graph and produce a listing of the shortest path in the graph (in proper order) as well as the length (weight) of this path. For example, given the graph shown above and assuming the start vertex was A and the destination vertex was E, your program should output the following: Ford’s algorithm was selected Shortest path is: A, B, D, E Length (weight) of this path is: 11 Deliverables: (1) Source code file on a floppy disk with the following information: Your name, COP 3503H, Assignment title, and Date. (2) The write-up for this assignment described in other parts of this document. (3) Place hard copies of (1) and (2) along with your disk in a large envelope, so that you do not need to fold the printouts or your report. CLEARLY, label the envelope with the following information: your name, COP 3503H, Assignment title, and the date. Write-up: A complete write-up is one of the deliverables for this assignment. A separate document (see the course web-site) describes the make-up of this write-up. In this write-up there will be no order analysis as we have done in the past. This time you will need to describe the approach you took to implement this assignment. Describe any difficulties that you encountered. If you had to do the program again, what would you change, if anything, about your implementation? Page 2