Return to Index

15-200
Lab #2 - Spell Checker

Due: Friday, May 27, 2005

Overview

This assignment isn't really a big assignment. It is really more of a working example of separate chaining hash tables.

It asks you to write really, really little code. Instead, you should simply read through the code we've give you, add a little bit of instrumentation, and test it out with the different hash functions and a few different hash table sizes.

Once you think you understand why it behaves as it does, write us a really short (but clear, concise, &c) report and tell us why the hash functions behave as they do. Also, please tell us how changing the hash table size affects performance.

Specifics

Please implement the following stubbed functions, according to the specification in the provided source code:

Then, spell check some large test documents using the provided dictionary with each of the provided getAddr(String word) methods. Use different hash table sizes -- perhaps 1/2 the dictionary size, the dictionary size, and double the dictionary size.

Lastly write a brief report describing and explaining what you observed. Please include your report and source code with your submission.

Provided Materials