# ambidextrous mathematician. combinations problem

Please help me solve this problem. At first it seemed to be easy, but I got stuck.

An ambidextrous mathematician with a very short attention span keeps two video game credit cards, one in each of her two front pockets. One game card has credit for 5 games. The other game card has for 4 games. The mathematician pays for a video game with a credit card selected from a random pocket and replaces the credit card once it is used to pay for the game.

a) What is the probability that when the mathematician uses the last credit from one of her two cards, then the other contains 4 credits? b) 3 credits?

Thank you!

• @GerryMyerson very helpful, thank you Mar 8, 2014 at 22:44

Without loss of generality we may assume that the $4$-game card is in the left pocket, and the $5$-game card in the right pocket.
Either (i) there are $4$ credits left on the $4$-card or (ii) $4$ left on the $5$-card.
Event (i) has probability $\frac{1}{2^5}$, since she must have gone to the right pocket $5$ times in a row.
Event (ii) can happen in $4$ ways, RLLLL, LRLLL, LLRLL, and LLLRL, so has probability $\frac{4}{2^5}$.
We leave the more difficult $3$ credits left problem to you. You can imitate the explicit listing of possibilities. But it may save some time to use machinery to count the relevant words in the alphabet consisting of the letters L and R. For larger numbers, we certainly would want to use machinery.