# Permutations of 5 children gender

I have intuitively noticed a relationship and would appreciate if someone can provide or articulate a proof relating these two simple things:

Consider all the permutations of gender for a family of 5 children. First I'll show that there are 32 permutations using factorials for permutations with repetition:

5 boys = (5!)/(5!) = 1

4 boys = (5!)/[(4!)(1!)] = 5

3 boys = (5!)/[(3!)(2!)] = 10

2 boys = (5!)/[(2!)(3!)] = 10

1 boy = (5!)/[(1!)(4!)] = 5

0 boys = (5!)/(5!) = 1

1 + 5 + 10 +10 + 5 + 1 = 32 permutations

We can also consider that there are 2 different gender possibilities for each of the 5 children. So the total outcome is 2^5 = 32.

Why does this hold true?

Is there an easier way to do the factorials if each event isn't binary? For example, if instead of gender it was one of three different colored marbles drawn at random? What if each event had 10 possible outcomes?

NOTE: The advantage of the factorials is that it provides a sample space and the ability to assign probability to each group while the second only gives the total possible outcomes

$$\sum _{k_{1}+k_{2}+\cdots +k_{m}=n}{n \choose k_{1},k_{2},\ldots ,k_{m}}=m^{n}.}$$
So, when m=2 (gender case) and n=5 (five children) you get $2^5=32$. This formula can be used for arbitary number of outcomes.