AOCP/Multinomial Coefficients: Difference between revisions
From charlesreid1
(fix typos: missing comma after \dots in last formula, add missing article in heading ("the Binomial Theorem"), normalize comma spacing, replace "ks" with $k_i$ in prose (via update-page on MediaWiki MCP Server)) |
|||
| Line 7: | Line 7: | ||
We can generalize this approach and define the multinomial coefficient. | We can generalize this approach and define the multinomial coefficient. | ||
More compactly, let n denote the sum of the | More compactly, let n denote the sum of the $k_i$: | ||
<math> | <math> | ||
\binom{n}{k_1 , k_2 , \dots , k_m } = \dfrac{n!}{k_1 ! k_2 ! \dots k_m !} \qquad k_i \in \mathbb{Z}, k_i \geq 0 | \binom{n}{k_1, k_2, \dots, k_m} = \dfrac{n!}{k_1 ! k_2 ! \dots k_m !} \qquad k_i \in \mathbb{Z}, k_i \geq 0 | ||
</math> | </math> | ||
| Line 16: | Line 16: | ||
<math> | <math> | ||
\binom{k_1 + k_2 + \dots + k_m}{k_1 , k_2 , \dots , k_m } = \dfrac{(k_1 + k_2 + \dots + k_m)!}{k_1 ! k_2 ! \dots k_m !} \qquad k_i \in \mathbb{Z}, k_i \geq 0 | \binom{k_1 + k_2 + \dots + k_m}{k_1, k_2, \dots, k_m} = \dfrac{(k_1 + k_2 + \dots + k_m)!}{k_1 ! k_2 ! \dots k_m !} \qquad k_i \in \mathbb{Z}, k_i \geq 0 | ||
</math> | </math> | ||
===Generalization of Binomial Theorem=== | ===Generalization of the Binomial Theorem=== | ||
The binomial theorem gives a formula that allows powers of binomial sums to be expanded in terms of binomial coefficients: | The binomial theorem gives a formula that allows powers of binomial sums to be expanded in terms of binomial coefficients: | ||
| Line 36: | Line 36: | ||
<math> | <math> | ||
\binom{k_1 + k_2 + \dots + k_m}{k_1, k_2, \dots k_m} = \binom{k_1 + k_2}{k_1} \binom{k_1 + k_2 + k_3}{k_1 + k_2} \dots \binom{k_1 + k_2 + \dots + k_m}{k_1 + \dots + k_{m-1}} | \binom{k_1 + k_2 + \dots + k_m}{k_1, k_2, \dots, k_m} = \binom{k_1 + k_2}{k_1} \binom{k_1 + k_2 + k_3}{k_1 + k_2} \dots \binom{k_1 + k_2 + \dots + k_m}{k_1 + \dots + k_{m-1}} | ||
</math> | </math> | ||
Latest revision as of 04:54, 20 June 2026
Volume 1
Chapter 1: Basic Concepts: Multinomial Coefficients
Definition
We can generalize this approach and define the multinomial coefficient.
More compactly, let n denote the sum of the $k_i$:
$ \binom{n}{k_1, k_2, \dots, k_m} = \dfrac{n!}{k_1 ! k_2 ! \dots k_m !} \qquad k_i \in \mathbb{Z}, k_i \geq 0 $
or,
$ \binom{k_1 + k_2 + \dots + k_m}{k_1, k_2, \dots, k_m} = \dfrac{(k_1 + k_2 + \dots + k_m)!}{k_1 ! k_2 ! \dots k_m !} \qquad k_i \in \mathbb{Z}, k_i \geq 0 $
Generalization of the Binomial Theorem
The binomial theorem gives a formula that allows powers of binomial sums to be expanded in terms of binomial coefficients:
$ (x+y)^n = \sum_{0 \leq k \leq n} \binom{n}{k} x^k y^{(n-k)} $
There is an analogous expansion for powers of multinomial sums (sums of multiple terms), in terms of these multinomial coefficients:
$ (x_1 + x_2 + \dots + x_m)^n = \sum_{k_1 + k_2 + \dots + k_m = n} \binom{n}{k_1, k_2, \dots, k_m} x_1^{k_1} x_2^{k_2} \dots x_m^{k_m} $
Any multinomial coefficient can also be expressed in terms of binomial coefficients:
$ \binom{k_1 + k_2 + \dots + k_m}{k_1, k_2, \dots, k_m} = \binom{k_1 + k_2}{k_1} \binom{k_1 + k_2 + k_3}{k_1 + k_2} \dots \binom{k_1 + k_2 + \dots + k_m}{k_1 + \dots + k_{m-1}} $
Related Pages
Flags
| The Art of Computer Programming notes from reading Donald Knuth's Art of Computer Programming
Volume 1: Fundamental Algorithms Mathematical Foundations: AOCP/Infinite Series · AOCP/Binomial Coefficients · AOCP/Multinomial Coefficients AOCP/Harmonic Numbers · AOCP/Fibonacci Numbers Puzzles/Exercises:
Volume 2: Seminumerical Algorithms AOCP/Random Numbers · AOCP/Positional Number Systems AOCP/Floating Point Arithmetic · AOCP/Euclids Algorithm AOCP/Factoring into Primes · AOCP/Polynomial Arithmetic AOCP/Power Series Manipulation
Volume 3: Sorting and Searching AOCP/Internal Sorting · AOCP/Optimal Sorting · AOCP/External Sorting AOCP/Binary Tree Searching · AOCP/Hashing AOCP/Combinatorics · AOCP/Multisets · Rubiks Cube/Permutations
AOCP/Combinatorial Algorithms · AOCP/Boolean Functions AOCP/Five Letter Words · Rubiks Cube/Tuples AOCP/Generating Permutations and Tuples
|