# In a bowl of jelly beans, all but 16 are red, all but 16 are green, all but 16 are blue and all but 18 are yellow. How many of each COLOR are in the bowl?

Apr 15, 2017

We have $6$ each of red, green and blue beans and $4$ yellow beans.

#### Explanation:

Let there be $R$ red beans, $G$ green beans, $B$ blue beans and $Y$ yellow beans.

As all but $16$ are red, we must have $G + B + Y = 16$. Similarly $R + B + Y = 16$, $R + G + Y = 16$ and $R + G + B = 18$.

Adding them all $3 R + 3 G + 3 B + 3 Y = 66$ i.e. (dividing by $3$) $R + G + B + Y = 22$.

Now subtracting each of the four equations one by one from this, we get

$R = G = B = 6$and $Y = 4$.

Hence, we have $6$ each of red, green and blue beans and $4$ yellow beans.