edited by
400 views

2 Answers

3 votes
3 votes

(C) 1/1004 is the right answer.

EXPLANATION :

For the first element, the probability to be hashed to any location is 1

Since the hash function is k mod 100.

For the upcoming 4 key values, all should hash to the same slot, probability of which is 1/100 for each.

So, probability that all the values are hashed to the same slot will be

P = (1)*(1/100)* (1/100)* (1/100)* (1/100)

   =(1/1004)

3 votes
3 votes

Now. consider the simple case. In how many ways can I map all the 5 points(A,B,C,D,E) to point '1' ? Only 1 way.

SImilarly, to the point '2' ? Only 1 way.

So, for each point in codomain, there is only 1 way in which all the points in domain get mapped to it.

So, considering all the ways, there 100 ways/cases in which we can map all the points in domain to any single point in codomain.

Now, lets consider the sample space.

How many functions can we have? We can have $100^{5}$.

So, answer = 100/$100^{5}$ = 1/$100^{4}$

Related questions

0 votes
0 votes
1 answer
1
Himanshu1 asked Dec 16, 2015
783 views
0 votes
0 votes
1 answer
2
1 votes
1 votes
1 answer
3
s_dr_13 asked Mar 6, 2019
983 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...
0 votes
0 votes
1 answer
4
Rohan Mundhey asked Nov 9, 2016
693 views
Consider a Hash table containing ‘n’ keys and ‘k’ slots. Each key will hash into a slot in the given Hash table. (Assume collisions are resolved by chaining).1)Wh...