Hands-On Mathematics for Deep Learning
上QQ阅读APP看书,第一时间看更新

Multinomial coefficient

We know from the binomial theorem (which you likely learned in high school) that the following is true:

Then, the trinomial is as follows:

Say we have n pieces of candy and there are blue- and red-colored candies. The different ways that we can pick the candies is defined as , which is read as n choose k.

The multinomial coefficient is as follows:

This way, we spread n items over k positions, where the ith position has ni items.

For example, say we're playing cards and we have four players. A deck of cards has 52 cards and we deal 13 cards to each player. So, the number of possible ways that we can distribute the cards is as follows:

This is absolutely massive!

This is where Stirling's formula comes to the rescue. It allows us to approximate the answer.