Skip to content
Related Articles

Related Articles

Puzzle 12 | (Maximize probability of White Ball)
  • Difficulty Level : Medium
  • Last Updated : 24 Sep, 2018
GeeksforGeeks - Summer Carnival Banner

There are two empty bowls in a room. You have 50 white balls and 50 black balls. After you place the balls in the bowls, a random ball will be picked from a random bowl. Distribute the balls (all of them) into the bowls to maximize the chance of picking a white ball.

 
 
 

Explanation:
First, let us assume that we divided the balls into jars equally so each jar will contain 50 balls.
So the probability of selecting a white ball will be=probability of selecting the first jar*probability of white ball in the first jar + probability of selecting the second jar*probability of white ball in the second jar
=(1/2)*(0/50)+(1/2)*(50/50)=0.5
Since we have to maximize the probability so we will increase the probability of white ball in the first jar and keep the second probability same mean equal to 1
so we add 49 white balls with 50 black balls in the first jar and only one white ball in the second jar
so the probability will be now=

(1/2)*(49/99)+(1/2)*(1/1)=0.747

Therefore, probability of getting white ball becomes 1/2*1 + 1/2*49/99 which is approximately 3/4.

Please write comments if you find anything incorrect, or you want to share more information about the topic discussed above

Attention reader! Don’t stop learning now. Get hold of all the important DSA concepts with the DSA Self Paced Course at a student-friendly price and become industry ready.

My Personal Notes arrow_drop_up
Recommended Articles
Page :