After the table of part a has been filled describe the


Question: When a computer program is compiled, the compiler builds a symbol table for storing information about the identifiers used in the program. A scheme is needed to quickly decide whether a given identifier has already been stored in the table and, if not, to store the new identifier. A hash function is often used to locate a position in the table at which to store information about an item. For simplicity, assume that the items to be stored are integers, that the hash table can hold 17 items in positions 0-16, and that the hash function h(x) is given by h(x) = x mod 17. Linear probing is used for collision resolution.

a. Using the hash function and collision resolution scheme described, store the sequence of values 23, 14, 52, 40, 24, 18, 33, 58, 50. Give the location in the table at which each is stored.

b. After the table of part (a) has been filled, describe the process to search for 58 in the table. Describe the process to search (unsuccessfully) for 41 in the table.

Solution Preview :

Prepared by a verified Expert
Database Management System: After the table of part a has been filled describe the
Reference No:- TGS02432134

Now Priced at $15 (50% Discount)

Recommended (92%)

Rated (4.4/5)