Lab 10
In lab activity
## Overview In this assignment you will experiment with filling the [`HashTable`](https://gitlab.com/MSOE/y19q3cs2852/blob/master/src/wk8/HashTable.java) class developed in lecture and augmented as part of your homework. You may work alone or with one partner. Results should be recorded on the handout to be turned in at the end of lab. ## Assignment ### First Pass Write a program that will create a `HashTable<String>` object and add all of the words in [words.txt](/taylor/files/words.txt) and then displays the following: * The number of collisions * The size of the largest bucket * The number of empty buckets * The actual load factor (not the value of the `loadFactorThreshold` Record your results in the table to be handed in. * Set the load factor threshold to 0.5 and fill out the next row of the table. * Set the load factor threshold to 0.25 and fill out the next row of the table. ### Additional Passes * Repeat the first pass using [`String2`](String2.java) objects instead of `String`s. Record your results. * Repeat the first pass using [`String3`](String3.java) objects instead of `String`s. Record your results. ### Analysis 1. What is the largest load factor threshold that will result in the smallest number of collisions when using `String2`? Explain how you estimated/determined this. 2. Develop an algorithm to determine the health of the hash table. The health should be a number between 0.0 and 1.0 where 0.0 is poor health and 1.0 is perfect health. * Describe your algorithm and implement it (you do not need to turn in your code) * Complete the final table on the handout entering your health score for each of the scenarios above. ### If Time Permits Recollect the previous data using the [top-1m.csv](/taylor/files/top-1m.csv) file (you can just treat each line in the file as a word). How well does your analysis hold up with this different data set? ## Acknowledgements This assignment was written by [Dr. Taylor](/taylor). ## Due Date This assignment is due at the end of lab.

Tuesday, 14-May-2019 04:50:33 CDT