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

  1. 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.
  2. Enter currentDancerIdsBySlot, targetDancerIdsBySlot using the field table and calculation rules, then run the tool.
  3. Read dancersChangingSlots, minimumUnrestrictedPairwiseSlotSwaps, plannedSwapSlotPairs. The explanation below defines the units, signs, ordering and any flags or placeholder values.
  4. 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 fieldMeaningValue type; see rules belowRequirement
currentDancerIdsBySlotCurrent dancer ids by slotlist of stringRequired
targetDancerIdsBySlotTarget dancer ids by slotlist of stringRequired

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 fieldMeaningValue type
dancersChangingSlotsDancers changing slotsnumber
minimumUnrestrictedPairwiseSlotSwapsMinimum unrestricted pairwise slot swapsnumber
plannedSwapSlotPairsPlanned swap slot pairslist of list of number
json
{
  "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

  1. Formation Swap Minimum Position Moves Solver — tool.io

Similar or alternative tools

Don't forget to set a bookmark for tool.io!
Privacy | Imprint | Cookies