This preview has intentionally blurred sections. Sign up to view the full version.View Full Document
Unformatted text preview: IE 170 Laboratory 6: Hash Tables Dr. T.K. Ralphs Due March 13, 2006 1 Laboratory Description and Procedures 1.1 Learning Objectives You should be able to do the following after completing this laboratory. 1. Understand the use of hash tables. 2. Understand how to implement a hash table using both chaining and open addressing. 3. Understand the time-space tradeoff. 4. Develop an appreciation for the dramatic changes in performance that can result from subtle changes in implementation. 5. Develop an ability to analyze the tradeoffs between various implementations of the same data structure. 6. Understand when to use the various implementations of hash tables. 1.2 Key Words You should be able to define the following key words after completing this laboratory. 1. Hash table 2. Open addressing 3. Chaining 4. Time-space tradeoff 1.3 Scenario You are an employee in the IT department of the telephone service provider Phones’R’Us. As part of the new enhanced caller ID service that Phones’R’Us is planning to roll out, they must implement an extremely fast reverse lookup procedure by which one can look up the name, address, and other miscellaneous information of any of any subscriber using just their phone number. This reverse lookup database will be stored on small local servers in each switching office, so it is not practical to simply place the information in an array that has one entry for each possible phone number. It is also not possible to predict what additional exchanges will be used in the future. The phone numbers themselves are not assigned randomly, but the patterns used for assignment 1 are not predictable ahead of time. Therefore, it is decided that a hash table is needed to store the customer information for extremely fast reverse lookup. Because of the unpredictability of the telecom market, it is not known whether phone numbers will need to be deleted on a regular basis. This depends on the competitiveness of the company in a tumultuous market. You have therefore been asked to do a preliminary study of the various implementations of hash tables to determine the best course of action under various scenarios. 1.4 Design and Analysis For hash tables, the running time is dominated by comparison operations, so in this lab, we will study the number of comparisons needed to perform various operations on a hash table using several implementations. Hash tables illustrate several of the principles that are central to our study ofimplementations....
View Full Document
- Spring '07
- Systems Engineering, hash function, Cuckoo hashing, double hashing, Quadratic probing