Start New Discussion within our Software Development Community

list of 28,500 words (read in from text file), one word per line
Do not actually store the words in the hash tables; rather use integer arrays initialized to all zeros. If a word hashes to position i, simply increment the value in position i. In running your trials, use an
array of size 5701.

(not sure what the output should look like) I have started the code with the hashing but I dont know how to do it without storeing the words in a table

For each function, report the average chain length (for chains w/ values), the
number of empty chains and the longest five chains.
Report on the “goodness” of the functions used based on the:
just some ideas for criteria, many others are possible. Write as output statements in your program.
** ( I have some code for chains but not sure on how to report on "goodness")**
The number of chains of length zero is less than 10% of all chains.
The length of the longest chain will be less than eight times the expected length
of the average chain.
Hashing Functions:
add the Unicode values of the characters in the word, save as a long
integer and obtain the remainder using 5701
( Unicode sample would help)
For each of the following character strings s, compute the location
h(s) = ns mod 5701
for this string in a hash table of size 5701, where ns is the (generally,
extremely large) integer that is obtained by mapping each symbol in s to a
number between 0 and 127 and using these as a “digits” of a base-128
integer.

Excellent. You have demonstrated your ability to copy your assignment (did you get the author's permission?) and paste it here. What do you expect will happen next?

DaniWeb Member Rules (which you agreed to when you signed up) include:
"Do provide evidence of having done some work yourself if posting questions from school or work assignments"
http://www.daniweb.com/community/rules

Post what you have done so far and someone will help you from there.

This article has been dead for over six months. Start a new discussion instead.