GATE CSE
First time here? Checkout the FAQ!
x
+1 vote
107 views

Suppose we used a hash function H(n) to hash ‘n’ distinct elements (keys) into an array T of length ‘m’. What is the expected number of colliding pairs of elements, if we used simple uniform hashing?

asked in DS by Active (1.9k points)  
retagged by | 107 views

1 Answer

0 votes
Best answer
There are nC2 pairs that may collide with probability each=1/m

i.e. (n2-n)/2m which is theta option C.
answered by Junior (803 points)  
selected by


Top Users Aug 2017
  1. Bikram

    4902 Points

  2. ABKUNDAN

    4704 Points

  3. akash.dinkar12

    3480 Points

  4. rahul sharma 5

    3158 Points

  5. manu00x

    3012 Points

  6. makhdoom ghaya

    2480 Points

  7. just_bhavana

    2388 Points

  8. stblue

    2138 Points

  9. Tesla!

    2060 Points

  10. joshi_nitish

    1758 Points


25,014 questions
32,140 answers
74,824 comments
30,185 users