Project: Perfect hashing

1. Introduction

The goal of this project is to understand the "perfect hashing" strategy for optimizing hash tables when all the keys are known ahead of time. This project is analogous to the optimal BST project; in both cases we take advantage of knowing the keys of the map before anything else happens, and I anticipate students finding both projects to be among the hardest of the semester. Perfect hashing, however, does not involve dynamic programming.

This appears as Project 7.3 in the book on page 563.

2. Set up

The code base for this project is the same as in the linear-probing project. In this project your work is in the class PerfectHashMap.

3. Implementing perfect hashing

Do parts a-c.

4. Turn in

Copy the file you modified (PerfectHashMap) to your turn-in folder /cslab/class/cs345/(your id)/perfecthash .

To keep up with the course, this should be finished by May 1.


Thomas VanDrunen
Last modified: Mon Mar 16 16:08:29 CDT 2020