Again we are hashing n items into k locations our model of


Question: Again we are hashing n items into k locations. Our model of hashing is that of Exercise 5.5-1. What is the probability that a location is empty? What is the expected number of empty locations? Suppose we now hash n items into the same number n of locations. What limit does the expected fraction of empty places approach as n gets large?

Exercise: We are going to compute the expected number of items that hash to any particular location in a hash table. Our model of hashing n items into a table of size k allows us to think of the process as n independent trials, each with k possible outcomes (the k locations in the table). On each trial we hash another key into the table. If we hash n items into a table with k locations, what is the probability that any one item hashes into location 1? Let Xi be the random variable that counts the number of items that hash to location 1 in trial i (so that Xi is either 0 or 1). What is the expected value of Xi? Let X be the random variable X1 + X2 + ··· + Xn. What is the expected value of X? What is the expected number of items that hash to location 1? Was the fact that we were talking about location 1 special in any way? That is, does the same expected value apply to every location?

Solution Preview :

Prepared by a verified Expert
Mathematics: Again we are hashing n items into k locations our model of
Reference No:- TGS02374327

Now Priced at $10 (50% Discount)

Recommended (95%)

Rated (4.7/5)