Kevin Bacon plus other Graph algorithms

Due by Tuesday, May 4 at noon.

Please keep all of your homework files in the Lectures/04-22 directory. cs35handin will collect it from there.

For this last homework of the semester, you must complete the following:

  1. A completed working version of the Kevin Bacon game which should work with the KevinBacon.java test function in the Lectures/04-22 directory. To complete it successfully, you need to complete the code for Breadth-First Search provided as a handout in class. Extras will be available on my door if you have lost yours.

    Here are the complete results for Kevin Bacon to test your algorithm.

  2. A completed working version of Topological sort which should work with the Topological.java test function in the Lectures/04-22 directory. To complete it successfully, you need to complete the code for Depth-First Search provided as a handout in class. (Extras on my door if you lost it.) In addition, you need to write the function which prints the final topological sort.

  3. A completed working version of Dijkstra's algorithm whose pseudo-code was provided in class. (Extras on my door.) You should include a sample graph of your own as a text file called dijkstra.txt, and you should write Dijkstra.java to test it. All of the code for Dijskstra's algorithm should be contained in the Graph.java file. You are encouraged to use the Binary Heap implementation of a Priority Queue. The source code is not provided, but you the Javadoc is provided, as are the class files (in the Lectures/04-27 directory).

Due by Tuesday, May 4 at noon.