Skip to content

Commit 515a254

Browse files
authored
Stars and bars: add positive integer sum theorem
1 parent 2b5afd1 commit 515a254

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

src/combinatorics/stars_and_bars.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,17 @@ E.g. the solution $1 + 3 + 0 = 4$ for $n = 4$, $k = 3$ can be represented using
3939
It is easy to see, that this is exactly the stars and bars theorem.
4040
Therefore the solution is $\binom{n + k - 1}{n}$.
4141

42+
## Number of positive integer sums
43+
44+
A second theorem provides a nice interpretation for positive integers. Consider solutions to
45+
46+
$$x_1 + x_2 + \dots + x_k = n$$
47+
48+
with $x_i \ge 1$.
49+
50+
We can consider $n$ stars, but this time we can put at most _one bar_ between stars, since two bars between stars would represent $x_i=0$, i.e. an empty box.
51+
There are $n-1$ gaps between stars to place $k-1$ bars, so the solution is $\binom{n-1}{k-1}$.
52+
4253
## Number of lower-bound integer sums
4354

4455
This can easily be extended to integer sums with different lower bounds.

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy