|
CS-285 -- Lab 5: Hash Table Winter Quarter 1999-2000 Electrical Engineering and Computer Science Department CC-27C, 277-7339 PurposeThe purpose of this lab assignment is to develop a better understanding of hash tables. This is accomplished by writing a hash table class and experimenting with different hash functions on the dictionary file data used in lab 1. AssignmentThe first step is to write a templated hash table class that can vary in the type of data hashed, the number of buckets, and the hash function used. The hash table class should have member functions that will do the following:
The next step involves choosing an appropriate hash function and table size for the words in the dictionary file (dict.txt) used in lab 1 and lab 4. You should implement at least four different hashing functions (select from the ones discussed in class or select your own). Experiment with the different hashing functions on hash tables of varying size. You may find it useful develop your own metric for rating each hash table configuration. Based on your experimentation you should select one of the hash functions and a particular hash table size to use as your container for the dictionary for lab 6. Lab report (due 11:00pm, the day prior to week 9 lab)The lab report should be self-contained. That is, it should be possible for someone to understand what you did and why without seeing anything other than your report. Your report should include:
As with any report you submit, correct spelling and grammar are required. In addition, your report should be submitted electronically following the Electronic Submission Guidelines. (You may wish to consult the sample report before submitting your report.) Be sure to keep copies of all your files, in case something gets lost. It may be wise to keep a diskette backup as well. IMPORTANT NOTE: Be sure to save your program for future use. We will be using this assignment in next week's lab assignment. If you have any questions, consult the instructor. This page was created by Dr. Christopher C. Taylor, copyright 1999-2000. |