# N choose k choose j

The Android mobile game "Pocket Tanks" has 295 unique weapons. For each match, 20 weapons are inserted into a list. Of those 20, players alternately draw weapons until all are exhausted, leaving each player with 10 weapons.

I'm trying to think of how many combinations of weapons exist. Is this "(295 choose 20) choose 10"? If so this evaluates to an extremely large number. It's large enough that "(295 choose 20) choose 10" in WolframAlpha can't evaluate. You have to calculate the first parenthetical, then evaluate the remaining piece.

• Note that $\binom{\binom{295}{20}}{10}$ would be the number of ways to choose $10$ distinct (but otherwise unrelated) lists of $20$ weapons each. That is a large number indeed. Nov 13, 2014 at 12:28

As you thought, it would actually be $\binom{295}{20} \binom{20}{10}$. This is because you're selecting every combination of 20 and then every configuration of which 10 weapons the first player received.

This can alternatively be represented as a multinomial with three categories.

$$\binom{n}{k_1, k_2, k_3}$$

$n =$ Total number of weapons $= 295$
$k_1 =$ Player 1's Weapons $= 10$
$k_2 =$ Player 2's Weapons $= 10$
$k_3 =$ Unused Weapons $= 275$

So, the total number of combinations is

$$\binom{295}{10, 10, 275} = \frac{295!}{10!\ 10!\ 275!}$$

This is still ludicrous to evaluate, but since it's a division, you can split up some of the work so that Wolfram Alpha doesn't pass out trying to evaluate it.

## Edit:

In fact, representing it like this allows Wolfram Alpha to tackle it directly without passing out and gives you a result.

$$\binom{295}{10, 10, 275} = 979,092,999,029,074,303,631,255,812,346,789,256$$

• What field of math is this? I don't recall learning expressing multinomials in this format? Nov 13, 2014 at 12:03
• The field would be combinatorics, but you may learn combinatorics from numerous different places and classes (such as probability). That is the multinomial coefficient notation. If you don't believe me, Wikipedia Nov 13, 2014 at 12:06
• I've only ever seen n choose k math in subsets. More notably, for the lottery. Finding the possible number of results is fascinating. But I'd never seen the (n/k1, k2, k3) notation before. Thanks for the link. I'll read up on that. Nov 13, 2014 at 12:15
• It's TeX formatting is \binom{n}{k_1, k_2, k_3, ..., k_m}, for future reference. Nov 13, 2014 at 12:17
• Just occurred to me that there can be duplicate weapons in a match, for either player. That's a different question altogether. Nov 13, 2014 at 13:18

The number of combinations is $$\binom{295}{20}\binom{20}{10}=\frac{295!}{10!10!275!}$$ In the first expression the first factor represents the number of possibilities of choosing $20$ out of $295$. The second factor represents the number of possibilities of choosing $10$ out of $20$.

Note that in the second expression number $20$ is not present (except as summation of $10$ and $10$). This because the 'step in between' of inserting them in a list is somehow irrelevant.

• The number 20 is present, in a way, in the number 275. Nov 13, 2014 at 11:26
• Yes, but only due to the requirements of a multinomial that every $k_i$ must sum together to equal $n$. Nov 13, 2014 at 11:28
• Rather, the $10$ and $10$ of the player's weapon counts are more present than the intermediate $20$, so I wouldn't say that $20$ is present at all. Nov 13, 2014 at 11:28
• I go along with @Axoren. Nov 13, 2014 at 11:29
• I see. 20 is as present as 285 is, only a sum of terms in the factorials. Nov 13, 2014 at 11:35

The number of ways to choose 20 weapons from 295 is $295\choose20$. The number of ways to choose 10 weapons from 20 is $20\choose10$, which is the same number as possible matches given a set of 20 weapons, since 10 weapons go to both players. So the total number of possible matches is ${295\choose20}{20\choose10}$.