# Problem of the Week Problem D More Surprise Cupcakes

## Problem

As part of their opening day celebration, Benny’s Bakery made 150 cupcakes. The cupcakes all looked identical on the outside, but 6 of them had caramel inside. Customers who bought a cupcake with caramel won a free cake. The cupcakes were randomly arranged and customers were allowed to choose their own cupcakes.

Lin was the first customer in line and bought two cupcakes. Ming was next and also bought two cupcakes. What is the probability that at least one of Ming’s cupcakes had caramel inside?

## Solution

To start, we will count the total number of ways to select the first four cupcakes. There are 150 ways to select the first cupcake. For each of these possible selections, there are 149 ways to select the second cupcake. So there are $$150\times 149=22\,350$$ ways to select the first two cupcakes. For each of these possible selections, there are 148 ways to select the third cupcake. That means there are $$22\,350\times 148=3\,307\,800$$ ways to select the first three cupcakes. For each of these possible selections, there are a further 147 ways to select the fourth cupcake. So in total, there are $$3\,307\,800\times 147=486\,246\,600$$ ways to select the first four cupcakes. That’s a lot of choices!

Of the 150 available cupcakes, 6 contain caramel and $$150-6=144$$ do not. Once a cupcake with caramel is selected, the number of available cupcakes with caramel decreases by 1. Similarly, once a cupcake without caramel is selected, the number of available cupcakes without caramel decreases by 1.

We now have two choices on how to approach this problem; a direct approach or an indirect approach.

• Direct Approach: Determine the total number of ways that Ming can select at least one cupcake with caramel, and then calculate the associated probability.

• Indirect Approach: Determine the total number of ways that Ming can select two cupcakes without caramel, then calculate the associated probability and subtract this result from 1, because these are complementary events.

We will present three solutions. The first uses an indirect approach, and the second uses a direct approach. The third solution also uses an indirect approach and gives a much simpler solution to the problem.

Solution 1: Indirect Approach

In how many ways can Ming select two cupcakes without caramel? We will look at four cases relating to Lin’s cupcakes and calculate the number of ways to select the first four cupcakes for each case.

Case 1: Lin selects two cupcakes without caramel.
The number of possible selections is $$144\times 143\times 142\times 141= 412\,293\,024$$.

Case 2: Lin selects a cupcake with caramel and then a cupcake without caramel.
The number of possible selections is $$6\times 144\times 143\times 142= 17\,544\,384$$.

Case 3: Lin selects a cupcake without caramel and then a cupcake with caramel.
The number of possible selections is $$144\times 6\times 143\times 142= 17\,544\,384$$.

Case 4: Lin selects two cupcakes with caramel.
The number of possible selections is $$6\times 5\times 144\times 143= 617\,760$$.

Thus, the total number of ways in which Ming can select two cupcakes without caramel is $$412\,293\,024+17\,544\,384+17\,544\,384+617\,760=447\,999\,552$$. To calculate the probability, we will divide this result by the total number of ways to select four cupcakes. $P(\mbox{Ming selects two cupcakes without caramel})=\frac{447\,999\,552}{486\,246\,600}=\frac{3432}{3725}$ The probability of Ming selecting at least one cupcake with caramel is equal to 1 minus the probability of Ming selecting two cupcakes without caramel. $P(\mbox{Ming selects at least one cupcake with caramel})= 1-\frac{3432}{3725}=\frac{293}{3725}\approx 0.079$ Thus, the probability of Ming selecting at least one cupcake with caramel is $$\frac{293}{3725}$$, or approximately 8%.

Solution 2: Direct Approach

There are more possibilities to consider when using the direct approach, so we will use a table to show the number of ways for Ming to select at least one cupcake with caramel. Let $$C$$ represent a cupcake with caramel, and $$X$$ represent a cupcake without caramel. So $$CX$$ represents the possibility that the first cupcake contained caramel but the second did not. The possible cases are shown in the table.

Lin’s Cupcakes Ming’s Cupcakes Calculation Number of Possibilities
$$CC$$ $$CX$$ $$6\times 5\times 4\times 144$$ $$17\,280$$
$$CC$$ $$XC$$ $$6\times 5\times 144\times 4$$ $$17\,280$$
$$CC$$ $$CC$$ $$6\times 5\times 4\times 3$$ $$360$$
$$CX$$ $$CX$$ $$6\times 144\times 5\times 143$$ $$617\,760$$
$$CX$$ $$XC$$ $$6\times 144\times 143\times 5$$ $$617\,760$$
$$CX$$ $$CC$$ $$6\times 144\times 5\times 4$$ $$17\,280$$
$$XC$$ $$CX$$ $$144\times 6\times 5\times 143$$ $$617\,760$$
$$XC$$ $$XC$$ $$144\times 6\times 143\times 5$$ $$617\,760$$
$$XC$$ $$CC$$ $$144\times 6\times 5\times 4$$ $$17\,280$$
$$XX$$ $$CX$$ $$144\times 143\times 6\times 142$$ $$17\,544\,384$$
$$XX$$ $$XC$$ $$144\times 143\times 142\times 6$$ $$17\,544\,384$$
$$XX$$ $$CC$$ $$144\times 143\times 6\times 5$$ $$617\,760$$

Adding the numbers in the rightmost column of the previous table, we find that the total number of possibilities is $$38\,247\,048$$. $P(\mbox{Ming selects at least one cupcake with caramel})= \frac{38\,247\,048}{486\,246\,600}=\frac{293}{3725}\approx 0.079$ Thus, the probability of Ming selecting at least one cupcake with caramel is $$\frac{293}{3725}$$, or approximately $$8\%$$.

Solution 3: Ignore Lin’s Cupcakes

It turns out there is a simpler way to solve this problem if we ignore Lin’s cupcakes. We can do this because we don’t know how many of Lin’s cupcakes had caramel, so removing her cupcakes from the solution does not change the probability that at least one of Ming’s cupcakes has caramel. In fact when a customer buys two cupcakes, the probability that at least one cupcake has caramel is the same, regardless of where that customer is in line, as long as we don’t know how many cupcakes with caramel have already been purchased. We will use the indirect approach, so we will first calculate the probability Ming selects two cupcakes without caramel. Since we are ignoring Lin’s cupcakes, there are $$150\times 149=22\,350$$ ways to select the two cupcakes, and $$144\times 143=20\,592$$ ways to select both cupcakes without caramel. Thus, \begin{aligned} P(\mbox{Ming selects two cupcakes \emph{without} caramel})&=\frac{20\,592}{22\,350}=\frac{3432}{3725}\\ P(\mbox{Ming selects \emph{at least one} cupcake with caramel})&= 1-\frac{3432}{3725}=\frac{293}{3725}\approx 0.079\end{aligned} Thus, the probability of Ming selecting at least one cupcake with caramel is $$\frac{293}{3725}$$, or approximately $$8\%$$.