Skip to content

Main content

Multiset Swap Orbit Size Tool

Count the orbit of one explicit pair under a single swap, including equal symbols and identical-position swaps.

Loading tool…

Description

Return the orbit size of exchanging two supplied positions.

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 orbit size of exchanging two supplied positions.

When to use this tool

Use Multiset Swap Orbit Size when checking the stated word, set, multiset or composition convention.

How to use the tool and how it works

  1. Enter firstSymbol, secondSymbol, samePosition. 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 orbitSize. Use the output convention below.

Return the orbit size of exchanging two supplied positions. Require equal symbols when samePosition; orbitSize is one for a repeated position or equal symbols, otherwise two.1

Input fieldMeaning and unitsAccepted input
firstSymbolFirst SymbolRequired. Text; maximum UTF-16 length 8192.
secondSymbolSecond SymbolRequired. Text; maximum UTF-16 length 8192.
samePositionSame PositionRequired. Boolean.
Output fieldInterpretationReturned shape
orbitSizeOrbit SizeRequired. Safe integer.
json
{
  "input": {
    "firstSymbol": "A",
    "secondSymbol": "B",
    "samePosition": false
  },
  "output": {
    "orbitSize": 2
  }
}

Limitations and assumptions

  • This is the identity/swap action on the supplied pair, not the full permutation orbit of a multiset.
  • 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.

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/multiset-swap-orbit-size — tool.io

Similar or alternative tools