Proof of stars and bars by a bijection with subsets
Builds on Combinations with repetitionBijective functionBijection principleNumber of k-element subsetsSymmetry of binomial coefficientsBijective iff it has a two-sided inverse
Proof
We match the multisets with the solutions, and the solutions with subsets of positions of the bars. Let be the -element set and put .
- Fix a bijection from to .
- A multiset of size on is a function with . Send it to the tuple .
- This tuple solves in natural numbers, since the sum over is the sum over the .
- Conversely, a solution gives the multiset . The two maps are mutually inverse. So multisets and solutions are equinumerous.
- Let be the set of solutions. For , put and for .
- Then for , so . Also .
- Hence are distinct elements of . Let be the set .
- Conversely, let have elements. List them in increasing order as , and put and .
- Put for . Each because .
- The sum telescopes: . So lies in .
- For this solution, for every . So .
- Starting from a solution, the list of step 6 is the increasing listing of . Step 9 then returns . So .
- By the inverse criterion, is a bijection from to the set of -element subsets of .
- By the number of -element subsets, there are such subsets. Numbering them and composing with gives , as in the bijection principle.
- Since and , we have and . By the symmetry of binomial coefficients, .
- By step 4, the number of multisets of size on is also .
Idea
Write a solution as a row of stars, split into groups by bars. The row has places, and the solution is determined by which places hold bars. So solutions match subsets of places, and there are of them.
Reading path
To understand this page from the ground up, read these 51 pages in order. The foundations come first. The path takes the proofs Proof of the number of k-element subsets by induction, Proof that a composition of injections is injective, Proof that a function is bijective iff it has a two-sided inverse, Proof of the complement principle, Proof of Pascal's rule from the recursive definition, Proof that a composition of surjections is surjective, Proof of the symmetry of binomial coefficients from the factorial formula, Proof of the factorial formula for binomial coefficients by induction, Proof of the rule of sum, Proof of the bijection principle.
- Binomial coefficient definition
- Cardinality of a finite set definition
- Combination definition
- Combinations with repetition definition
- Element definition
- Factorial definition
- Proposition concept
- Proof of Pascal's rule from the recursive definition proof
- Set definition
- Conjunction definition
- Implication definition
- Predicate definition
- Pascal's rule statement
- Empty set object
- Ordered pair definition
- Intersection definition
- Existential quantifier definition
- Universal quantifier definition
- Proof of the factorial formula for binomial coefficients by induction proof
- Cartesian product definition
- Disjoint sets definition
- Subset definition
- Uniqueness quantifier definition
- Factorial formula for binomial coefficients statement
- Binary relation definition
- Proof of the symmetry of binomial coefficients from the factorial formula proof
- Function definition
- Symmetry of binomial coefficients statement
- Codomain definition
- Function composition definition
- Identity function definition
- Injective function definition
- Surjective function definition
- Left inverse definition
- Right inverse definition
- Proof that a composition of injections is injective proof
- Proof that a composition of surjections is surjective proof
- Bijective function definition
- Composition of injections is injective statement
- Composition of surjections is surjective statement
- Proof of the rule of sum proof
- Proof that a function is bijective iff it has a two-sided inverse proof
- Rule of sum statement
- Bijective iff it has a two-sided inverse statement
- Proof of the bijection principle proof
- Proof of the complement principle proof
- Bijection principle statement
- Complement principle statement
- Proof of the number of k-element subsets by induction proof
- Number of k-element subsets statement
- Proof of stars and bars by a bijection with subsets proof
Where this leads
1 page builds on this one.
Further reading
About this page
| Tag | KB70806JGH |
|---|---|
| URI | m2://KB70806JGH |
| Kind | proof |
| Writing | W0 stub |
| MSC | 05A10 |
| Proves | Stars and bars |
| Uses | Combinations with repetition, Bijective function, Bijection principle, Number of k-element subsets, Symmetry of binomial coefficients, Bijective iff it has a two-sided inverse |
| Changed | 4 November 2026 |
Markdown · JSON · Edit on GitHub
What this page 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 page is. They do not measure its truth.
What links here
No page links to this page yet.