The Gateway to Computer Science Excellence
First time here? Checkout the FAQ!
x

hashing [closed]

0 votes
116 views

closed with the note: Duplicate: https://gateoverflow.in/78539/me-hashing
asked in Programming by Boss (6.6k points)
closed by | 116 views
$\frac{5}{11}$ ?
ans is 1/5.

2 Answers

0 votes
Answer : 5/11

Of 11 indexes only 2,3,8,9,10 are free after hashing.

So prob for free collision = 5/11
answered by Loyal (4k points)
0 votes
1. (12*2 + 5)%11 = 7

2. (44*2 + 5)%11 = 5

3. (13*2 + 5)%11 = 9

4. (88*2 + 5)%11 = 5

5. (23*2 + 5)%11 = 7

like 94 -> 6 , 11 -> 5 , 39->6 , 20 -> 1, 16 -> 4 , 5->4;

Free slots are : 0,2,3,8,10

.: Probability that x will not collide is : 5/11.
answered by Active (1.7k points)


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

29,017 questions
36,844 answers
91,385 comments
34,723 users