WeakCompositions
The weak compositions of into parts: ordered sequences of non-negative integers summing to , unlike IntegerCompositions where every part must be positive.
✓ checked against that system · ! checked, with disagreements (hover a chip)OEIS
A178300✓WeakCompositions(n, k)the sequences of non-negative parts summing to Combinatorica
Compositions[n, k]Typed signatures
| Type | Package | Applies |
|---|---|---|
(integer<0..>, integer<0..>) -> indexed_collection<list<integer>> | combinatorics | always |
Examples
About
| Examples | 2 |
|---|---|
| Checked against | Combinatorica 2 agree |
| Crosswalk | OEISCombinatorica |
Implementation
mapped
combinatoricapackages/oracle/src/mappings.tsCombinatorica's Compositions[n, k] allows zero parts: ours is WeakCompositions, not the strict IntegerCompositions.
See also: IntegerCompositions