Description
Return one binomial block decision for combination unranking.
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.
Return one binomial block decision for combination unranking.
When to use this tool
Use Combination Unranking One Binomial Block when checking the stated word, set, multiset or composition convention.
How to use the tool and how it works
- Enter n, k, rank. Use the units and conventions below.
- Run the tool. Correct any format, range, or cross-field input error before interpreting the output.
- Read skip, nextRank, blockSize. Inspect skip before interpreting the associated values.
Return one binomial block decision for combination unranking. Require whole 1 <= k <= n <= 128 and exact nonnegative decimal rank; blockSize = binomial(n-1,k-1), skip means rank >= block, nextRank subtracts the block only then.1
The exact binomial coefficient uses the shared calculation behind Pascal row; this helper returns only the local factor or summand described above.2
| Input field | Meaning and units | Accepted input |
|---|---|---|
| n | N | Required. Safe integer; minimum 1; maximum 128. |
| k | K | Required. Safe integer; minimum 1. |
| rank | Rank | Required. Text; maximum UTF-16 length 8192. Integer syntax: optional + or - and 1-128 decimal digits; leading zeros accepted. Apply the sign restriction above. |
| Output field | Interpretation | Returned shape |
|---|---|---|
| skip | Rank is at least this local block size; no global rank upper bound is checked. | Required. Boolean. |
| nextRank | Next Rank | Required. Text; maximum UTF-16 length 8192. |
| blockSize | Block Size | Required. Text; maximum UTF-16 length 8192. |
{
"input": {
"n": 5,
"k": 2,
"rank": "5"
},
"output": {
"skip": true,
"nextRank": "1",
"blockSize": "4"
}
} Limitations and assumptions
- No global rank upper bound or complete combination is checked; a large rank may pass this single step while being globally invalid.
- 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
- Combinatorics: Combination Prefix Minimum Tail
Return the lexically minimum tail after a combination prefix.
- Combinatorics: Combination Complement Index Map
Return complementary zero-based combination indexes.