CS 223 Out-Labs

Mike's Outlab 2 Submission Instructions
E-mail your completed assignment to mthiesen@gmail.com. Attach all of your source code (.java files), a sample run (should be a .txt file), and your report to your e-mail. Do not send any .class files. Do not zip up or archive the files. Please use Microsoft Word for your reports. If you can't use MS Word, print out your report and bring it with you to your lab. I have no way to view Word Perfect files or MS Works files, so you must print them out and give them to me in person if you want them graded!
IMPORTANT: Your subject line should follow the following format:

 CS223-xx outlab2 Name 

Where xx is your section number and Name is your name. This lets me use filters to keep my inbox manageable. The 8am-10am lab is section 02 and the 10am-noon lab is section 03.

Example of a correct subject line:
CS223-02 outlab2 John Doe

Questions
If you have any questions, feel free to e-mail me at mthiesen@gmail.com. Please put the word "Question" (without quotes) in the subject line somewhere. This will allow my filter to pick up the question and ensure it doesn't get lost in the flood of e-mail I get each week. Also, my consulting hours are on Wednesdays from 10am-noon in EPS110 if you need to see me personally for help.

Out-Lab 1:  Implement a Thesaurus using Hashing

Due: in one week (September 16, 2004) at the beginning of lab.

Description

The problem you are to solve: Hand in
This week there will be no hardcopy to hand in. You will just demo your program to show Mike that you have this much working. He may want to take a look at your source code to see how you are doing it.

Out-Lab 2:  Handle Collisions Differently and Vary the Hash Function

Due: in one weeks (September 23) at the beginning of lab.

Using the lab you wrote last week, change the way you are handling collisions and the hash function.

  1. As you change your code, you should probably keep backup copies of the original, unchanged code. Do this each time after you get something working, then change it for a new hash function, or collision resolution strategy.
  2. First, use Chaining to handle collisions. You should adjust the table size so the load factor is about one. Remember, you must keep the table size prime.
  3. Next, use double hashing. You can decide on the second hash function. The table size should be the same as you used for linear probing.
  4. Choose one of the above collision resolution method (the one you feel was the most efficient for this problem) and change the hash function used to see if that makes a difference in the number of collisions. Possibilities:
Hand in:
  1. Make a table (or two) to show the number of collisions as you varied the collision resolution methods and the hash function. Explain what you tried, and try to analyze the variables used in terms of efficiency and programmer time to implement. (This will be about one-third your grade, so spend some time on this report)
  2. Hand in your source code along with the above. Trial runs are not necessary if you got a chance to demo your program.

Out-Lab 3--Build a Binary Search Tree

Due date:  This is a one week lab. It will be due at the beginning of lab, September 30.

Grading Criteria

Out-Lab 4--Solve a Programming Contest Problem

Due date:  This is a two week lab. It will be due at the beginning of lab, October 14.

Out-Lab 5--Code a Red-Black tree

Out-Lab 6--Moving on a checkerboard

Out-Lab 7--Store a graph, then find a shortest path

Part 1-- Store a graph
  1. Store the graph: you may use either an adjacency list or an adjacency matrix. They both present their own problems.
  2. You can use any of the code from the library or past assignments
  3. You should enter the data from the file airport.txt. The format we decided on has the number of nodes on the first line, the names of all the nodes on the next n lines, and on each remaining line it has a node, then a distance to an adjacent node, the adjacent node name, for however many nodes are adjacent. Take a look at the file to see exactly what is used for separators.
  4. An example of the type of graph you should be able to store is in the diagram at right.

Part 2--A Shortest Path Problem

  1. You are to write a program that allows the user to enter the graph at right (or another similar to it), from a file cities.txt, then finds the shortest path from a city the user chooses to all other cities in the graph.
  2. You can use any of the Java library or any code you have previously written.
  3. The I/O is up to you, but should be user friendly, allowing the user to give a file name where the data is located, and should output the shortest path to all the cities from the given city.