589 views

1 Answer

2 votes
2 votes

Assuming uniform hashing, Pr { Xlk = 1} = Pr { h (k) = h (l)} = 1 / m, and so E[Xlk] = 1 / m.
Now define the random variable Y to be the total number of collisions, so that . The expected number of collisions
is
E[Y] = E[ ∑Xkl ], k≠l since Y = ∑Xkl
       =  ∑ E[Xkl]   k≠l       by linearity property of expectation

       = ∑ (1/m)      as  E[Xlk] = 1/m 

Now we have to do summation of the above.For that we have to no. of terms 

So no of terms such that k ≠ l   =   no of unordered pairs(a,b) in an n element set [Order does not matter since collision of a,b is same as collision (b,a) , hence we consider them once only ] 

No of unordered pairs means selection of 2 elements from n elements which can be done in nC2 ways

Hence (1/m) is repeated n(n-1)/2 times.

So E[Y] =  n(n-1)/2  *  ∑(1/m)

            =  n(n-1)/2m

So options should be corrected.

Reference : Solution of exercise 11.2-1 of http://test.scripts.psu.edu/users/d/j/djh300/cmpsc465/notes-4985903869437/solutions-to-some-homework-exercises-as-shared-with-students/3-solutions-clrs-11.pdf

Related questions

0 votes
0 votes
0 answers
1
Rahul_Rathod_ asked Dec 28, 2018
426 views
A) (1-(N / K)) ^ r b) (1-(K / N)) ^ r c) (1+(N / K)) ^ r-1 d) (1-(K / N)) ^ r-1
1 votes
1 votes
0 answers
2
hrcule asked Aug 9, 2018
515 views
Suppose we used a hash fu action H(n) to hash n distinct elements (key) into an array T of length m. What is expected number of collision, if simple uniform hashing is us...
1 votes
1 votes
1 answer
3
s_dr_13 asked Mar 6, 2019
982 views
Consider an open address hash table with uniform hashing. Out of 10 locations, 8 are occupied. What are the expected number of probes in an unsuccessful and successful se...