Question: Question 3: Size of Hash Table (20%) [this problem doesn't lack information. the criteria we have discussed in class are just two examples of how

Question 3: Size of Hash Table (20%)

[this problem doesn't lack information. the "criteria we have discussed in class" are just two examples of how it's been used]

You are given a number indicating the number of elements in the hash table implemented by open addressing with double hashing. What is the smallest size of the hash table such that the expected number of collisions is not greater than 2ln2? Think about the two criteria we have discussed in class.

Your program should read the input from the file, and output the answer to another file. The first argument is the input file name, while the second argument is the output file name. Name your program as lab4-q3.c.

Input file: An integer n, indicating the number of elements in the hash table Output file: An integer m, indicating the smallest size of a good hash table

Sample Input:

2

Sample Output:

5

Question 3: Size of Hash Table (20%) [this problem doesn't lack information.

Question 3: Size of Hash Table (20%) You are given a number indicating the number of elements in the hash table implemented by open addressing with double hashing. What is the smallest size of the hash table such that the expected number of collisions is not greater than 21n2? Think about the two criteria we have discussed in class. Your program should read the input from the file, and output the answer to another file. The first argument is the input file name, while the second argument is the output file name. Name your program as "lab4-q3.c". Input file: An integer n, indicating the number of elements in the hash table Output file: An integer m, indicating the smallest size of a good hash table Sample Input: 2 Sample Output: Question 3: Size of Hash Table (20%) You are given a number indicating the number of elements in the hash table implemented by open addressing with double hashing. What is the smallest size of the hash table such that the expected number of collisions is not greater than 21n2? Think about the two criteria we have discussed in class. Your program should read the input from the file, and output the answer to another file. The first argument is the input file name, while the second argument is the output file name. Name your program as "lab4-q3.c". Input file: An integer n, indicating the number of elements in the hash table Output file: An integer m, indicating the smallest size of a good hash table Sample Input: 2 Sample Output

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!