# Even though two implementations of a hash table may require the same average number of comparisons,.

Even though two implementations of a hash
table may require the same average number of comparisons, their distributions
might be different. The following experiment will examine this possibility for
linear probing and double hashing. You will need two disjoint lists of names:
one with at least 1000 names and the other with at least 10,000 names.

a. For both of the collision resolution
schemes linear probing and double hashing, calculate the load factor that
results in an average of 1.5 comparisons for an unsuccessful search of a hash
table holding 100 objects. For this load factor, what

Even though two implementations of a hash
table may require the same average number of comparisons, their distributions
might be different. The following experiment will examine this possibility for
linear probing and double hashing. You will need two disjoint lists of names:
one with at least 1000 names and the other with at least 10,000 names.

a. For both of the collision resolution
schemes linear probing and double hashing, calculate the load factor that
results in an average of 1.5 comparisons for an unsuccessful search of a hash
table holding 100 objects. For this load factor, what is the required size of
the hash table?

b. Create two hash tables of the
appropriate size and two corresponding empty lists, which will hold counts. Use
linear probing for one table and double hashing for the other. Inside a loop
that iterates 1000 times, do the following:

Clear the hash tables.

Randomly choose 100 names from the list of
1000 and insert them into the tables.

Randomly choose 100 names from the list of
10,000 and search the tables for each name.

(Each search will be unsuccessful because
the two lists have no names in common.)

Count the number of comparisons made in
each table for the 100 searches and record the count in the list corresponding
to the table. After the iteration is complete, each list should contain 1000
values. Each of these values is the total number of comparisons required to
search for 100 names. Compute and display the average and standard deviation of
each list. We expect the average number of comparisons for both hash tables to
be equal to 150 (1.5 times 100).

## Calculate the price of your order

550 words
We'll send you the first draft for approval by September 11, 2018 at 10:52 AM
Total price:
\$26
The price is based on these factors:
Number of pages
Urgency
Basic features
• Free title page and bibliography
• Unlimited revisions
• Plagiarism-free guarantee
• Money-back guarantee
On-demand options
• Writer’s samples
• Part-by-part delivery
• Overnight delivery
• Copies of used sources
Paper format
• 275 words per page
• 12 pt Arial/Times New Roman
• Double line spacing
• Any citation style (APA, MLA, Chicago/Turabian, Harvard)

# Our guarantees

Delivering a high-quality product at a reasonable price is not enough anymore.
That’s why we have developed 5 beneficial guarantees that will make your experience with our service enjoyable, easy, and safe.

### Money-back guarantee

You have to be 100% sure of the quality of your product to give a money-back guarantee. This describes us perfectly. Make sure that this guarantee is totally transparent.

### Zero-plagiarism guarantee

Each paper is composed from scratch, according to your instructions. It is then checked by our plagiarism-detection software. There is no gap where plagiarism could squeeze in.

### Free-revision policy

Thanks to our free revisions, there is no way for you to be unsatisfied. We will work on your paper until you are completely happy with the result.