Skip to content

Main content

Combinatorics: Combination Complement Index Map Tool

Map a sorted unique combination of zero-based indices to its ordered universe complement, not a generic value-set lookup.

Loading tool…

Description

Return complementary zero-based combination indexes.

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 complementary zero-based combination indexes.

When to use this tool

Use Combinatorics: Combination Complement Index Map when checking the stated word, set, multiset or composition convention.

How to use the tool and how it works

  1. Enter universeSize, indices. 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 complementary zero-based combination indexes. Require universeSize 0..128 and strictly increasing unique in-range integer indices; enumerate universe indexes not in indices.1

Input fieldMeaning and unitsAccepted input
universeSizeUniverse SizeRequired. Safe integer.
indicesIndicesRequired. Array of finite number. Implementation limit: 128 items.
Output fieldInterpretationReturned shape
resultReturned calculated value or nested object under the stated output convention.Required. Object.
result.complementIndicesComplement IndicesCalculated result member: array.
json
{
  "input": {
    "universeSize": 5,
    "indices": [
      0,
      3
    ]
  },
  "output": {
    "result": {
      "complementIndices": [
        1,
        2,
        4
      ]
    }
  }
}

Limitations and assumptions

  • This handles index sets only, without element labels, combination ranking or arbitrary input-order preservation.
  • 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-complement-index-map — tool.io

Similar or alternative tools