First time here? Checkout the FAQ!
+1 vote

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 (2.2k points) 2 18 36
retagged by | 128 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 Active (1.1k points) 3 4 10
selected by

Quick search syntax
tags tag:apple
author user:martin
title title:apple
content content:apple
exclude -tag:apple
force match +apple
views views:100
score score:10
answers answers:2
is accepted isaccepted:true
is closed isclosed:true
Top Users Oct 2017
  1. Arjun

    23398 Points

  2. Bikram

    17078 Points

  3. Habibkhan

    8264 Points

  4. srestha

    6296 Points

  5. Debashish Deka

    5438 Points

  6. jothee

    4978 Points

  7. Sachin Mittal 1

    4772 Points

  8. joshi_nitish

    4348 Points

  9. sushmita

    3964 Points

  10. Rishi yadav

    3804 Points

Recent Badges

Notable Question KISHALAY DAS
Notable Question sh!va
Notable Question abhijeetbzu
Great Question jothee
Popular Question rahul sharma 5
Nice Question mohit kumar 5
Notable Question rishu_darkshadow
Nice Comment Pranay Datta 1
Copy Editor Shivansh Gupta
Nice Comment KULDEEP SINGH 2
27,324 questions
35,176 answers
33,279 users