you are using simple chaining to handle collisions, and there are 4 buckets in
your hash table, what happens when inserting the following key values
How does this show problems with the
you switch to using linear probing collision resolution and a larger number of
buckets i.e. 16 buckets, where each contains one value, what will the resulting
structure look like for the same key values from part a?
Will this improve search performance for those
values when compared to the chaining approach?
for Question 1:
should provide a hash function. The hash functions in these
cases can be simplified to using k% Number_of_buckets,
where % is the modulus/remainder operator, to split the input key
values among the buckets. (This is the same approach as is used in the
example in the slides this week for both chaining and linear
out the resulting data structure with the key values inserted into the
Linear hashing is one approach to hashing values to a dynamically
changing file. Briefly outline this approach and
illustrate the approach using the following record key values
may assume that each block can contain two records, that the initial file
contains two blocks (M = 2), and that splits will occur whenever an insert
causes an insert into an overflow bucket.
Change your approach to instead split when, after inserting, the load factor
> 0.75. Will this result in the same hash table? Illustrate your answer.
(load factor = number of all keys currently in table / number of (regular
non-overflow) buckets currently in table*max items per bucket)
What is the "Birthday paradox/Birthday problem"
and how is it relevant to hash tables?
What is a "Random Oracle"
and why is it not a hashing algorithm?