# The worker with two bags problem.

A worker carries two bags. Each of the bags initially contains N nails. Whenever the worker needs a nail, he takes it from a bag picked at random. At some point the worker picks an empty bag. Find the probability that the other bag contains exactly m nails.

My reasoning:

The desired probability: $$C_2^1 \cdot P(|A| = 0\ and\ |B| = m)$$, where A, B - sets of nails in each bag. Then we can "divide" this probability (I suppose that I deal with independent events):

$$P(|A| = 0\ and\ |B| = m) = P(|A| = 0) \cdot P(|B| = m);$$

$$P(|A| = 0) = (\frac{1}{2})^N$$, where $$|A| = |B| = N$$ (initial condition).

$$P(|B| = m) = (\frac{1}{2})^{N - m}$$

Result: $$C_2^1 \cdot P(|A| = 0\ and\ |B| = m)$$ = $$C_2^1 \cdot (\frac{1}{2})^{2N - m}$$

Am I wrong or it is correct?

An easier way to think about it is like this: consider picking bag $$1$$ a success and bag $$2$$ a failure. The probability of bag $$1$$ being empty and bag $$2$$ having $$m$$ nails is the probability of $$N$$ successes and $$N-m$$ failures. This is an easy binomial calculation: $${2N-m\choose N}\frac{1}{2^{2N-m}}$$. For the next pick, we want the worker to choose the empty bag, so we multiply that by $$\frac{1}{2}$$ to get $${2N-m\choose N}\frac{1}{2^{2N-m+1}}$$. However the reverse scenario also counts (bag $$1$$ having $$m$$ and bag $$2$$ being empty). This amounts to $$N-m$$ successes and $$N$$ failures. By the same logic, we get $${2N-m\choose N-m}\frac{1}{2^{2N-m+1}}$$ Add these two possibilities together and we get $${2N-m\choose N}\frac{1}{2^{2N-m+1}}+{2N-m\choose N-m}\frac{1}{2^{2N-m+1}}$$
• Just one more thing. The given sum simplifies to $$\binom{2n-m}{n} 2^{m-2n}.$$ May 16 '20 at 23:09