Given n red balls and m blue balls and some containers, how would you distribute those balls among the containers such that the probability of picking a red ball is maximized, assuming that the user randomly chooses a container and then randomly picks a ball from that.
ake all your N red balls and put them one by one in one container after another until you have no balls left. If there are containers left (i.e. without red balls), take your blue balls and distribute them as you like into the remaining containers. If there are no containers left, take all your blue balls and put them in one arbitrary container.
ReplyDeletekeep red ball in one container and remaining balls in other.
ReplyDeletethe probability of container having red ball is 1.
and the other is (n-1)/(n+m-1).
can u elaborate this
ReplyDeletePut all blue balls in one container.. And distribute the red balls equally in all containers including the one selected for blue balls. In this case, if you have X containers.. Probability of selecting the container having blue balls is just 1/X.. where probability of red ball containers is (X-1)/X.. And even if the container having blue balls is selected at the worst case, you have a minimal probability of getting red ball from there also as we distributed the red balls equally in all containers...
ReplyDeleteput all blue balls in one container..and put one red ball in each of the remaining containers...the remaining red balls put in the container containing blue balls..
ReplyDeletei agree with above solution......
ReplyDeleteANS:-
ReplyDeletenswer:-
Put one red ball in each of x containers. Now put the left red balls that is n – x in the last container and all blue balls in the same container.
Now the probability of the red ball is increased.
PS- The number of red balls has to be more than the number of containers.