Math 2.0

statement theorem

Stars and bars

Statement

Let nn and kk be natural numbers with n≥1n \ge 1. Then the number of multisets of size kk with elements in an nn-element set is ( ⁣(nk) ⁣)=(n+k−1k).\left(\!\binom{n}{k}\!\right) = \binom{n + k - 1}{k}. Equivalently, this is the number of solutions (x1,…,xn)(x_1, \dots, x_n) of x1+⋯+xn=kx_1 + \dots + x_n = k in natural numbers.

Remarks

The proof writes a multiset as a row of kk stars and n−1n - 1 bars. The bars separate the stars into nn groups, one group for each element. The number of solutions in positive integers is (k−1n−1)\binom{k - 1}{n - 1} for k≥1k \ge 1. This is the number of compositions of kk into nn parts.

Explanations

L1 human

To share kk identical sweets among nn children, put the kk sweets in a row and insert n−1n - 1 dividers. There are k+n−1k + n - 1 positions, and you choose which kk of them are sweets.

What this node needs for W1
  • an inventory row: the row of the inventory that the node accounts for (0 of 1)

The writing levels say how complete the text of a node is. They do not measure its truth.

What this needs

To read this node, read these 3 nodes in this order. The foundations come first, and the list ends with this node.

Each node uses the nodes above it. The colour of the bar on a box shows the evidence level, and the box also gives it as text. The list below has the same nodes.
  • no evidence level
  1. Binomial coefficient definition
  2. Combinations with repetition definition
  3. Stars and bars statement

Sources

  1. Web https://en.wikipedia.org/wiki/Stars_and_bars_(combinatorics), Theorem two