Question: The code creates an LPHashTable and sets the hash weights to { 0 , 1 , 2 , 3 , 4 , 3 , 2

The code creates an LPHashTable and sets the hash weights to {0,1,2,3,4,3,2,1,0} in that order.
This task concerns compung weights that opmise inseron of a specific list of names in an
LPHashTable. Inseron is opmised if it uses the least number of probes. There may be more than
one combinaon of weights that achieve this.
1. On the assignment page you will find a program called DataMaker.java. You will use this to
generate your personal custom list, , of 36 usernames from students.txt.
2. You will then write a program called Optimize.java that, for every possible combinaon of
weights, evaluates the number of probes required for inseron of usernames in an
LPHashTable of size 37. It will output a single line containing two integers: (a) the least number of
probes required, and (b) the number of weight combinaons that achieve this. Thus if the
output is
444
then the least number of probes to insert all the usernames was 44, and there were 4 different
combinaons (sets of 9 weights) that achieved a probe count of 44.
The DataMaker program accepts two command line inputs: (i) YOUR username, and (ii) the
number of usernames required in :
java DataMaker
It will generate list , outpung it to the screen. You should use file redirecon to pipe this to a file
called mydata.txt. Your Optimize program will read in this file.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!