GATE CSE
First time here? Checkout the FAQ!
x
+3 votes
194 views

Suppose there are $11$ slots in a Hash Table. At an instant there are $5$ empty slots and a new element $x$ is inserted in Hash Table. What is the the probablity that new element fits without collision?

I think it should be $\frac{5}{11}$ but answer given says :::

EDIT :: Actual question is

asked in DS by Boss (8.6k points)  
edited by | 194 views

1 Answer

+3 votes

Given number of free slots available = 5

  Total number of slots  =  11

  So probability that collision will not occur on insertion  = n(Favourable outcome) / n(Total outcome)

                                                                                 = n(free slots) / n(total slots)

                                                                                 = 5 / 11

Hence 5 / 11 is correct..

answered by Veteran (66.5k points)  
habib you are wrong ...5/11 is the probabilty of choosing a free slot among the 11 slots

but when you want to insert a key without collision you must insert it in one of the five free slots which gives probability of 1/5
But bro actually the thing is the key may be anything..It is  not  fixed..So it may go to any of the entries of the table..

So how r u guaranteeing that only 5 slots will be total outcome??
So what is the correct answer guys ? 5/11 or 1/5???
5/11 is correct


Top Users May 2017
  1. akash.dinkar12

    3152 Points

  2. pawan kumarln

    1616 Points

  3. sh!va

    1580 Points

  4. Arjun

    1326 Points

  5. Devshree Dubey

    1230 Points

  6. Angkit

    1028 Points

  7. Debashish Deka

    1012 Points

  8. Bikram

    972 Points

  9. LeenSharma

    810 Points

  10. srestha

    662 Points

Monthly Topper: Rs. 500 gift card
Top Users 2017 May 22 - 28
  1. pawan kumarln

    242 Points

  2. Ahwan

    138 Points

  3. joshi_nitish

    112 Points

  4. jjayantamahata

    104 Points

  5. Aditya GN

    63 Points


22,725 questions
29,056 answers
65,052 comments
27,565 users