retagged by
770 views
0 votes
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
retagged by

2 Answers

0 votes
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

Related questions

0 votes
0 votes
1 answer
2
Anshul_S asked Oct 26, 2016
461 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 votes
0 votes
1 answer
3
Ray Tomlinson asked Aug 9, 2023
481 views
Numerical Answer Type Que?(please Try to give some ahortcut trick also or important concept is there to solve that question )
0 votes
0 votes
1 answer
4
Lucky sunda asked Dec 15, 2016
313 views