Formation Swap Minimum Position Moves Solver
Solve actual fixed-identity formation permutation with deterministic minimum unrestricted pair swaps and moving-dancer count; not Euclidean position assignment, sequential crossing paths, collision avoidance or stage-coordinate transforms.
Description
A fixed-identity formation permutation has a minimum unrestricted pair-swap count.
A fixed-identity formation permutation has a minimum unrestricted pair-swap count. It does not minimize physical travel.1
Enter aligned nonempty unique exact dancer-ID lists through 128 entries with identical identity sets. Return number changing slots, minimum pair swaps and deterministic zero-based swap pairs.
When to use Formation Swap Minimum Position Moves Solver
Use Formation Swap Minimum Position Moves Solver when you need to evaluate the supplied records under the calculation and evidence rules below. No coordinate assignment, collision avoidance or crossing-path plan is solved.
Prepare the annotated dance, timing, rehearsal or inventory records requested. Supply caller rules, evidence flags and local reference values; distinguish beats, bars, counts and seconds.
How to use Formation Swap Minimum Position Moves Solver and understand its results
- Prepare the annotated dance, timing, rehearsal or inventory records requested. Supply caller rules, evidence flags and local reference values; distinguish beats, bars, counts and seconds.
- Enter currentDancerIdsBySlot, targetDancerIdsBySlot using the field table and calculation rules, then run the tool.
- Read dancersChangingSlots, minimumUnrestrictedPairwiseSlotSwaps, plannedSwapSlotPairs. The explanation below defines the units, signs, ordering and any flags or placeholder values.
- If the tool reports an input issue, correct the values and run it again. Apply the stated assumptions when interpreting a successfully returned result.
| Input field | Meaning | Value type; see rules below | Requirement |
|---|---|---|---|
| currentDancerIdsBySlot | Current dancer ids by slot | list of string | Required |
| targetDancerIdsBySlot | Target dancer ids by slot | list of string | Required |
Enter aligned nonempty unique exact dancer-ID lists through 128 entries with identical identity sets. Return number changing slots, minimum pair swaps and deterministic zero-based swap pairs.
fix slots left to right by swapping in each target identity Units, indexing, boundary conditions and exceptional cases are defined in the calculation rules above.
| Output field | Meaning | Value type |
|---|---|---|
| dancersChangingSlots | Dancers changing slots | number |
| minimumUnrestrictedPairwiseSlotSwaps | Minimum unrestricted pairwise slot swaps | number |
| plannedSwapSlotPairs | Planned swap slot pairs | list of list of number |
{
"input": {
"currentDancerIdsBySlot": [
"A",
"B",
"C",
"D"
],
"targetDancerIdsBySlot": [
"B",
"A",
"D",
"C"
]
},
"output": {
"dancersChangingSlots": 4,
"minimumUnrestrictedPairwiseSlotSwaps": 2,
"plannedSwapSlotPairs": [
[
0,
1
],
[
2,
3
]
]
}
} Limitations and assumptions
No coordinate assignment, collision avoidance or crossing-path plan is solved.
Numeric inputs, where present, must be finite. Follow the calculation-specific rules for overflow, underflow and exceptional cases. Numeric lists are limited to 10,000 entries; string lists to 128 strings of at most 128 characters each. The rules above may impose smaller limits. Missing required fields, extra fields, wrong value types and violations of the calculation rules are input errors.
Alternative or Complementary methods
Use Line Spacing Even Interval Checker: Even line spacing is checked from ordered one-axis positions. Signed errors show compressed and enlarged gaps. For a complementary task, use Across The Floor Passes Per Group Math: Sequential floor groups include a possible smaller remainder group. Reset time occurs only between group passes.
References
Similar or alternative tools
- Line Spacing Even Interval Checker
Even line spacing is checked from ordered one-axis positions. Signed errors show compressed and enlarged gaps.
- Across The Floor Passes Per Group Math
Sequential floor groups include a possible smaller remainder group. Reset time occurs only between group passes.