Grocery on Distributed Algorithms

T1: More than Counting

Reminder: This post contains 484 words · 2 min read · by Xianbin

A Small Problem

\(\textbf{Question 1.}\) If you have \(n\) elements you wish to divide into \(y\) distinct piles of size \(n_1,n_2,\ldots,n_y\), how many possibilities?

The answer is

\[{n \choose {n_1,n_2,\ldots,n_y }}= \frac{n!}{n_1!n_2!\ldots,n_y!}\]

A Higher Binomial Theorem

\(\textbf{Multinomial Formula}\). For all \(n,y \in \mathbb{N}\), for all pairwise commuting variables \(x_1,\ldots,x_y\), we have \((x_1+x_2+\ldots+x_y)^n = \sum_{n_1,\ldots,n_y: \sum_{i=1}^y n_i = n}{n \choose {n_1,\ldots,n_y}}x_1^{n_1}x_2^{n_2}\ldots x_y^{n_y}\)