Question: in Java eclipse Purpose The purpose of this assignment is to assist you to learn the hash function and hash table. Skills The purpose of

in Java eclipse
Purpose
The purpose of this assignment is to assist you to learn the hash function and hash table.
Skills
The purpose of this assignment is to help you practice the following skills that are essential to your success in this course / in school / in this field / in professional life beyond school:
- Describe hash table
- Design hash function
- Describe collisions and how to handle collisions- Open addressing (linear probing, quadratic probing, and double hashing), separate chaining
- Explain load factor and rehashing
Knowledge
This assignment will also help you to become familiar with the following important content knowledge in this discipline:
- Hash function
- Collision - Open addressing, Separate chaining ( or closed addressing)
- Load factor and rehashing
Tasks
1. Implement MyMap using open addressing with linear probing - Create a new concrete class that implements MyMap using open addressing with linear probing. For simplicity, use \(\mathrm{f}(\mathrm{key})=\mathrm{key}\%\) size as the hash function, where size is the hash-table size. Initially, the hash-table size is 4. The table size is doubled whenever the load factor exceeds the threshold (0.5).
2. Implement MyMap using open addressing with quadratic probing - Create a new concrete class that implements MyMap using open addressing with quadratic probing. For simplicity, use \( f(\) key \()=\left(k e y+j^{2}\right)\%\) size as the hash function, where size is the hash-table size and \(\mathrm{j}=0\). Initially, the hash-table size is 4. The table size is doubled whenever the load factor exceeds the threshold (0.5).
3. Implement MyMap using open addressing with double hashing - Create a new concrete class that implements MyMap using open addressing with double hashing. For simplicity, use \(\mathrm{f}(\mathrm{key})=\mathrm{key}\%\) size, and \(\mathrm{f}^{\prime}(\mathrm{key})=\) PRIME -(key \% PRIME) as the first hash function and the secondary hash function, where size is the hash-table size and PRIME is a prime smaller than the size. For example, we use 7 for a hash-table size of 11. Initially, the hash-table size is 4. The table size is doubled whenever the load factor exceeds the threshold (0.5).
in Java eclipse Purpose The purpose of this

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 Programming Questions!