Two bags are to be put with $5$ red and $7$ white balls. How must one divide the balls so we get the least chance of drawing a red ball? The complete question is
Two bags are to be put altogether with $5$ red and $7$ white balls, neither bags being empty. How must one divide the balls as to give a person who draws one ball from either bag the least chance of drawing a red ball?
Let $a$ be number of red balls and $b$ be number of white balls in in bag 1. Similarly, $c$ and $d$ are the red and white balls in bag 2.
I need to minimise  
$$p =  0.5 (\frac{a}{a+b} + \frac{c}{c+d})$$
$0.5$ being the probability of picking one of the two bags. 
Beyond this point I am stuck. More related to optimization than probability I guess.  Can anyone explain the approach to this problem?
Thanks in advance
Vikrant
 A: Let's see if we can answer this without any strenuous calculation. You correctly noted that the probability is given by
$$p = .5\left(\frac{a}{a+b} + \frac{c}{c+d}\right)$$
We can see that it suffices to minimize the expression inside. Well, we know that neither of the two bags are empty. This means that $1 \leqslant (a+b), (c+d) \leqslant 11$. In particular, we have
$$\frac{a}{a+b} + \frac{c}{c+d} \geqslant \frac{a}{11}+\frac{c}{11} = \frac{a+c}{11} = \frac{5}{11}$$
This gives us a lower bound on the probability, so if we can find a configuration which achieves this minimum, we're done. But this is easy to do; simply put $a = 5, c = 0, b = 6$ and $d = 1$; in other words, segregate all of the red balls and all but one white ball into one bag, and put one white ball into the remaining bag so that it is not empty.
A: I remember a puzzle that went something like this: There are $500$ gold coins and $500$ silver coins. They are to be distributed to two bags, and you are allowed to choose one bag at random, and pick one coin. How will you maximize the chance of getting a gold coin ?
The fairly obvious answer was $499$ gold + $500$ silver in one, and $1$ gold in the other, almost raising P(gold) to $\frac34$
Here you are to minimize P(red) which is the same as maximize P(white), and the same logic as in the puzzle would divide as $5$ red +$6$ white in one, and $1$ white in the other.
A: HINT
let bag 1 be $B_1$, we have$$B_1 = P(red) = \frac{a}{b}$$
let bag 2 be $B_2$, we have$$B_2 = P(red) = \frac{5-a}{12-b}$$
then, $$P =  0.5 (\frac{a}{b} + \frac{5-a}{12-b})$$
