Skip to content

Main content

Combinatorics: Combination Prefix Minimum Tail Tool

Construct the lexicographically smallest remaining tail of a sorted zero-based combination prefix, with infeasible tails empty and no full combination enumeration.

Loading tool…

Description

Return the lexically minimum tail after a combination prefix.

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 the lexically minimum tail after a combination prefix.

When to use this tool

Use Combinatorics: Combination Prefix Minimum Tail when checking the stated word, set, multiset or composition convention.

How to use the tool and how it works

  1. Enter prefix, choose, universeSize. Use the units and conventions below.
  2. Run the tool. Correct any format, range, or cross-field input error before interpreting the output.
  3. Read result. Expand result to inspect the returned fields.

Return the lexically minimum tail after a combination prefix. Require bounded universe/choose and a strictly increasing zero-based in-range prefix no longer than choose; fill consecutive indexes after the last prefix value when enough remain, otherwise empty tail with feasible false.1

Input fieldMeaning and unitsAccepted input
prefixPrefixRequired. Array of finite number. Implementation limit: 128 items.
chooseChooseRequired. Safe integer.
universeSizeUniverse SizeRequired. Safe integer.
Output fieldInterpretationReturned shape
resultReturned calculated value or nested object under the stated output convention.Required. Object.
result.minimumTailLexically minimum consecutive tail when feasible; empty can mean either complete or infeasible, so inspect the flag.Calculated result member: array.
result.feasibleWhether the stated local constraints hold; this need not establish a valid complete object or procedure.Calculated result member: boolean.
json
{
  "input": {
    "prefix": [
      1,
      3
    ],
    "choose": 4,
    "universeSize": 7
  },
  "output": {
    "result": {
      "minimumTail": [
        4,
        5
      ],
      "feasible": true
    }
  }
}

Limitations and assumptions

  • An empty tail can also mean a successfully complete combination; inspect feasible separately.
  • 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

  1. Calculation and input contract: combinatorics/combination-prefix-minimum-tail — tool.io

Similar or alternative tools