Weak Composition
A weak composition of a nonnegative integer is an ordered tuple of nonnegative
integers whose sum is
. It differs from a composition,
whose parts must be positive. For example,
and
are distinct weak compositions of 3 (Tesler 2019).
For a positive integer , the number of weak compositions of
into
parts is
To count them, arrange
stars and
separators in a row. The numbers of stars before, between, and after the separators
are the ordered parts. Choosing the separator positions gives the binomial
coefficient above. For
, there is one weak composition of each positive length,
consisting entirely of zeros. There is also one empty weak composition of 0 (Tesler
2019).
See also
Composition, Multinomial Coefficient, PartitionExplore with Wolfram|Alpha
References
Tesler, G. "Integer Compositions and Partitions and Set Partitions." Math 184A, Winter 2019. https://mathweb.ucsd.edu/~gptesler/184a/slides/184a_ch5slides_19-handout.pdf.Cite this as:
Weisstein, Eric W. "Weak Composition." From MathWorld--A Wolfram Resource. https://mathworld.wolfram.com/WeakComposition.html