WORKED DEFAULT
Check the calculation with the default inputs
For total 8, three ordered positive parts, and maximum 4, inclusion-exclusion leaves 12 compositions.
- Count unboundedC(n-1,k-1)
- Exclude oversizeinclusion-exclusion
- Return12
COMPOSITIONS / CAPPED PARTS
Count ordered positive k-part compositions of n when every part is at most a supplied maximum m.
METHOD / WORKED EXAMPLE
Count ordered positive k-part compositions of n when every part is at most a supplied maximum m. The result panel keeps the defining recurrence or counting identity visible so the output can be checked independently.
WORKED DEFAULT
For total 8, three ordered positive parts, and maximum 4, inclusion-exclusion leaves 12 compositions.
READ THE RESULT
The maximum-part constraint distinguishes this from the existing unbounded positive-composition count.
ASSUMPTIONS AND LIMITS
A zero count can mean the total lies outside the feasible interval k through km.
COMMON QUESTIONS
Start from positive stars and bars, then use inclusion-exclusion to remove assignments where selected parts exceed the maximum. The indexing, equivalence relation, and counted objects are stated in the method and worked example. Inputs must be whole numbers inside the displayed domain; the page never rounds a decimal into an accepted index. This ties the answer to one explicit convention instead of silently mixing sequence offsets or combinatorial interpretations.
The maximum-part constraint distinguishes this from the existing unbounded positive-composition count. Small boundary cases and the displayed recurrence or identity provide useful independent checks. Recompute the displayed recurrence or closed form with the same inputs and compare its previous terms or counting factors. That check supports this bounded result, but it does not transfer the interpretation to a different sequence or counting object.
A zero count can mean the total lies outside the feasible interval k through km. The implementation uses integer arithmetic internally and refuses results beyond the safe display boundary. Combinatorial and recurrence values can grow rapidly even when the inputs look small. The conservative cap prevents browser stalls and avoids presenting an unsafe floating-point integer as exact; larger work needs arbitrary-precision software and independent resource controls.
RELATED TOOLS
Use boundary
Start from positive stars and bars, then use inclusion-exclusion to remove assignments where selected parts exceed the maximum.
sum_j (-1)^j C(k,j) C(n-jm-1,k-1).