How to Use
Enter n and k:
- Count: C(n+k-1,k-1)
- List: All distributions
- Stars/bars: Visual
Stars and Bars
n stars (items) and k-1 bars (dividers). Any arrangement gives a weak composition. Total positions: n+k-1. Choose k-1 for bars: C(n+k-1,k-1). Beautiful correspondence between arrangements and distributions!
Applications
Distributing identical items (cookies to children), polynomial terms (x+y+z)^n count, multivariate power series, integer lattice points, and random allocation problems all use weak compositions.
Step-by-Step Instructions
- 1Enter n items.
- 2Enter k bins.
- 3Compute count.
- 4View distributions.
- 5See stars/bars.