[Math] Combination – Infinite Sample Size

combinations

A jar contains quarters, loonies, and toonies. If four coins are selected from the jar, how many unique coin combinations are there?
The answers is 15.

The solution:
"In this question, we know there are quarters, loonies, and toonies in the jar, but no quantity has been specified!
Since no quantity has been specified, and it is possible to select the same type of coin more than once, we can treat the coins as being unlimited.
Some of the ways we can choose four coins include: LQTL
Another possible combination is QQQL.
And another possible combination is TTTT.
We need a new type of strategy to deal with this problem.
Create a chart to keep track of the number of quarters, loonies, and toonies selected.
Draw checkmarks and dividers for LQTL.
Draw checkmarks and dividers for QQQL.
And draw checkmarks and dividers for TTTT.
Notice that we can represent each combination as an arrangement of four identical checkmarks and two identical dividers.
We can arrange the four identical checkmarks and two identical dividers in: 6!/(4!2!) = 15 ways."

I did not understand 6! and 4!2!.

Thanks

Best Answer

As the cited solution suggests, we approach via stars and bars... that is, we describe every way of selecting coins as a sequence of stars and bars (or as they suggest, checkmarks and dividers, I will continue calling them stars and bars for the remainder of this post.)

One can (and should) prove that the set of possible selections of 4 coins of 3 categories is in direct bijection with (and therefore has the same number of elements as) the set of sequences of 4 stars and 2 bars.

We can describe the bijection with words as:

$$\underbrace{~~~~~~~~~~~~~~~~~~~~~~~}_{\text{stars here represent loonies}}\mid \underbrace{~~~~~~~~~~~~~~~~~~~~~~~}_{\text{stars here represent quarters}}\mid\underbrace{~~~~~~~~~~~~~~~~~~~~~~}_{\text{stars here represent toonies}}$$

For example, the sequence $\star\star\mid\star\mid\star$ represents the selection being two loonies, one quarter, and one toonie.

The sequence $\mid\mid\star\star\star\star$ on the other hand will represent our selection being just four toonies and none of the other coins.

Note: This method treats all ways of selecting a particular arrangement of coins as the same so long as the number of each type of coin is the same between the two arrangements, that is to say we treat TQQQ to be the same arrangement as QQQT.

If you did want to treat those two as being different arrangements, approach instead directly via multiplication principle getting instead an answer of $3^4=81$, not $15$.

So, we have the number of arrangements will be the number of sequences of four stars and two bars, which we should know by earlier example can be counted via binomial coefficients as $\binom{6}{2}=\frac{6!}{4!2!}=15$

Related Question