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
- Enter firstSymbol, secondSymbol, samePosition. Use the units and conventions below.
- Run the tool. Correct any format, range, or cross-field input error before interpreting the output.
- 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 field | Meaning and units | Accepted input |
|---|---|---|
| firstSymbol | First Symbol | Required. Text; maximum UTF-16 length 8192. |
| secondSymbol | Second Symbol | Required. Text; maximum UTF-16 length 8192. |
| samePosition | Same Position | Required. Boolean. |
| Output field | Interpretation | Returned shape |
|---|---|---|
| orbitSize | Orbit Size | Required. Safe integer. |
{
"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
Similar or alternative tools
- Multiset Word Adjacent Equality Count
Count equal adjacent symbols in a supplied word.
- Lattice Word Symbol Budget
Check a lattice word's remaining symbol budget.