Permutation Cycle Diagram

A permutation as an arrow diagram on the points 1..n. The learner traces orbits until they close into cycles, steps through powers to see the order as the lcm of the cycle lengths, traces compositions point by point (right to left), builds a permutation from transpositions with a parity counter, follows a conjugate-and-multiply step, or steps through Foata's cycles-to-word transition map and its inverse.

Used in: Group Theory

Props

PropTypeDefaultDescription
titlestringby mode, e.g. "Cycle diagram of a permutation"Title bar text.
mode"cycles" | "compose" | "commutator" | "transpositions" | "transition"inferred: word/direction -> transition, factors -> transpositions, compose -> compose, else cyclescycles: arrow diagram of σ; click points to trace orbits (optional powers and sign panels). compose: wiring diagram of στ = σ∘τ (τ applied first), traced point by point; the title bar swaps to τσ. commutator: step through τστ⁻¹ (relabel σ's cycles by τ) and σ⁻¹(τστ⁻¹), comparing moved points (normal subgroups of A_n). transpositions: click pairs of points to multiply transpositions onto a product until it equals σ, with a decomposition list. transition: Foata's map, canonical largest-first cycles -> word (forward) or word -> cycles by cutting before each left-to-right maximum (inverse).
nnumberlargest point mentionedDegree: permutations act on 1..n (1 to 12). Points beyond n extend it, with a notice.
permutationstring | number[]by mode: cycles "(1 2 4)(3 5)(6)", compose "(1 2)", commutator "(1 2)(3 4)", transpositions "(1 2 3 4 5)", transition [2, 5, 4, 3, 1]σ. Cycle notation "(1 3 5)(2 4)" (non-disjoint cycles are composed right to left), one-line "[3, 5, 4, 1, 2]" or "3 5 4 1 2", or an array of images [3, 5, 4, 1, 2]. Transpositions mode: the target. Transition mode: the permutation fed to the forward map (with direction "inverse" and no word, the word is its image, so the inverse recovers it).
composestring | number[]compose "(1 2 3)", commutator "(1 2 5)"τ, the second permutation, same formats as permutation. Compose mode: the product shown is στ (apply τ first, then σ). Commutator mode: the 3-cycle τ used to form τστ⁻¹.
wordstring | number[][4, 3, 5, 1, 2]Transition mode, inverse direction: the word (each of 1..n once), e.g. [4, 1, 3, 6, 2, 5, 7] or "4 1 3 6 2 5 7". Giving it implies direction "inverse".
direction"forward" | "inverse""forward" ("inverse" when word is given)Transition mode: forward = cycles to word (erase parentheses); inverse = word to cycles (cut before records). The learner can switch.
factorsstring | string[]none (empty product)Transpositions mode: a product already built, written as in mathematics, rightmost applied first: "(1 3)(1 2)" or ["(1 3)", "(1 2)"].
layout"circle" | "cycles""circle"Cycles mode: points 1..n in order around one circle, or one ring per cycle. The learner can switch in the title bar.
hideCyclesbooleanfalseCycles mode: start with every cycle uncoloured and the notation unknown; the learner discovers each cycle by tracing its orbit ("Show all cycles" reveals them). Ignored with showPowers.
showPowersbooleanfalseCycles mode: a k slider (0 to the order) redraws the arrows of σ^k; per-cycle k mod ℓ chips show when each cycle returns home, and σ^k = e first at k = lcm of the cycle lengths.
powernumber1Cycles mode with showPowers: the starting exponent k (clamped to 0..order).
showParityCounterbooleanfalseCycles mode: a sign panel (each ℓ-cycle = ℓ − 1 transpositions, total r, sgn = (−1)^r, checked against the inversion count). Transpositions mode: parity of the running count and of every decomposition found, with the sign of σ once several agree.
swappedbooleanfalseCompose mode: start with τσ (σ applied first) instead of στ.
stepnumber0Starting step (0-based). Commutator: 0-3 (start, conjugate, multiply, compare). Transition forward: 0-5 (one-line, cycles, rotate, order, erase, read); inverse: 0-4 (word, records, cut, cycles, assemble). Compose: number of points already traced (n = whole product known).
editablebooleantrueShow input fields so the learner can type their own σ (and τ, or word).
controlsstring[]all controls shownIds of the hideable panels and readouts to show (see the controls registry, e.g. panel.powers, panel.sign, readout.parity, readout.parity-sign, commutator.normal-subgroup, transition.inverse). Core controls always show. A panel switched on by showPowers or showParityCounter appears only when its id is listed too. Page building fills this from the subject's topic scope.