• retagged by
1,427 views
0 0 votes
consider the following keys that are hashed into table in the order using giving hash function h(i)=(2i+5)mod11

12,44,13,88,23,94,11,39,20,16,5 Assume hash tables has locations from 0to 10.If hash table uses chaining to handle the collisions what is the probability of new elements'x' fit inside hash table without any collision

I am getting answer 0.5

2 Answers

0 0 votes
The numbers will be hased as:

12 => 7

44 => 5

13 => 9

88 => 5

23 => 7

94 => 6

11 => 5

39 => 6

20 => 1

16 => 4

5 => 4

Hence, Slots that would be occupied will be (1, 4, 5, 6, 7, 9).

So the required probability= 5/11 = 0.45
Position:
Show:

Related questions

61 61 votes
5 answers 5 answers
25.4k
25.4k views
Arjun asked Feb 12, 2020
25,352 views
Consider a double hashing scheme in which the primary hash function is $h_1(k)= k \text{ mod } 23$, and the secondary hash function is $h_2(k)=1+(k \text{ mod } 19)$. Ass...
0 0 votes
1 answers 1 answer
774
774 views
srestha asked May 8, 2019
774 views
Consider a hash table with $n$ slots that uses chaining for collision resolution, table is initially empty. What is the probability that after $4$ keys are inserted then ...
0 0 votes
1 1 answer
745
745 views
Anshul_S asked Oct 26, 2016
745 views
Given a hash table with 6 keys and 10 slots, with simple uniform hashing. If collisions are resolved by chaining then the probability that first slot ends up empty?
0 0 votes
1 1 answer
1.5k
1.5k views
aashish1406 asked Aug 9, 2023
1,456 views
Numerical Answer Type Que?(please Try to give some ahortcut trick also or important concept is there to solve that question ) Suppose the hash function were instead $h(k)...