Description
Shift positive parts into a weak composition.
Combinatorial counts depend on whether objects are labeled, order matters, repetitions are permitted and a prefix is already fixed. Local counts, exact integer factors and feasibility bounds answer specific questions and need not enumerate complete objects.
Shift positive parts into a weak composition.
When to use this tool
Use Combinatorics: Composition Positive Part Shift when checking the stated word, set, multiset or composition convention.
How to use the tool and how it works
- Enter positiveParts. Use the units and conventions below.
- Run the tool. Correct any format, range, or cross-field input error before interpreting the output.
- Read result. Expand result to inspect the returned fields.
Shift positive parts into a weak composition. Require bounded positive whole parts; subtract one from each, return weakParts, originalTotal and originalTotal-partCount.1
| Input field | Meaning and units | Accepted input |
|---|---|---|
| positiveParts | Positive Parts | Required. Array of finite number. Implementation limit: 128 items. |
| Output field | Interpretation | Returned shape |
|---|---|---|
| result | Returned calculated value or nested object under the stated output convention. | Required. Object. |
| result.weakParts | Weak Parts | Calculated result member: array. |
| result.originalTotal | Original Total | Calculated result member: number. |
| result.shiftedTotal | Shifted Total | Calculated result member: number. |
{
"input": {
"positiveParts": [
2,
1,
3
]
},
"output": {
"result": {
"weakParts": [
1,
0,
2
],
"originalTotal": 6,
"shiftedTotal": 3
}
}
} Limitations and assumptions
- This preserves slot positions rather than quotienting permutations; no composition count or fixed-total feasibility search is performed.
- Outputs are nested inside result. Inputs must satisfy both the field types and the cross-field conditions above. Invalid input causes an error; a successful false flag or documented placeholder is a different result.
- Numeric calculations use binary floating point unless exact decimal-integer arithmetic is explicitly stated. No hidden measurement tolerance or decimal rounding is added; nonfinite or out-of-contract results are rejected. Numeric signed-zero results are exported as zero.
Alternative or Complementary methods
Use complete objects and an appropriate exact counting, ranking or enumeration method when the local contribution is insufficient.
References
Similar or alternative tools
- Composition Zero Part Capacity
Return zero-part count and remaining allowed capacity.
- Composition Part Upper Slack
Return per-part upper-bound slack.