3 votes 3 votes 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 DS hashing + – thor asked Nov 30, 2016 • edited Nov 30, 2016 by thor thor 856 views answer comment Share Follow See all 0 reply Please log in or register to add a comment.
3 votes 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.. Habibkhan answered Nov 30, 2016 Habibkhan comment Share Follow See all 4 Comments See all 4 4 Comments reply Lokesh . commented Nov 30, 2016 reply Follow Share 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 2 votes 2 votes Habibkhan commented Nov 30, 2016 reply Follow Share 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?? 0 votes 0 votes User007 commented Dec 9, 2016 reply Follow Share So what is the correct answer guys ? 5/11 or 1/5??? 0 votes 0 votes Lokesh . commented Dec 16, 2016 reply Follow Share 5/11 is correct 1 votes 1 votes Please log in or register to add a comment.