The Mode switch at the left of the control bar toggles between ● Balls (numbered coloured balls) and A Letters (letter labels). Learn more about the mode switch
The n stepper sets the number of items from 3 to 5; changing it resets the build and updates (n−1)! in the header. Learn more about adjusting n
Step ▶ moves one ball into the next slot, ◀ Back undoes one step, ▶ Play builds every arrangement, ↺ Reset clears the grid, and the Speed slider (0.3 to 3) sets the pace. Learn more about the transport controls
The two lines at the top right of the scene show (n−1)! with its total and the status: Arrangementsk of the total, or Complete. Learn more about getting started
Red ball 1 is the anchor: it sits in the solid FIXED slot at the top of the ring in every arrangement and stays dimmed in the source row. Learn more about the anchor
The other slots of the build ring are numbered clockwise from #2; each ball flies in along a dotted guide line, and a flash ring marks a full ring. Learn more about the build ring
Finished arrangements are added under COMPLETED as small ring cards, each with the anchor on top, counted as k/(n−1)!. Learn more about the completed grid
Press ▶ Play to build all (n−1)! circular arrangements, or Step ▶ to advance one ball at a time. The first item is anchored at the top so rotations aren't counted twice.
● BallsA Letters
n =3?
Speed
Circular permutations
3! / 3 = (3−1)! = 2 × 1 = 2
Arrange n items around a circle, where rotations of an arrangement are considered the same. Anchoring one item at a reference position breaks the rotational symmetry; the other n−1 can then be freely permuted.
1Anchor: Red0 / 2
Red is fixed at the top of the ring to anchor the arrangement against rotation. The remaining 2 items (Blue and Green) can be arranged in the other 2 positions in (3−1)! = 2 distinct ways. If we did not fix one item, every arrangement would be counted 3 times — once per rotation — so we divide 3! by 3.
Circular permutation — an arrangement of n distinct items around a circle where arrangements that differ only by rotation are considered identical.
Anchor — the item fixed at a reference position to break the rotational symmetry. Once anchored, the other items are arranged relative to it.
Rotational symmetry — the property that rotating a circular arrangement by any number of positions produces an arrangement that should be counted as the same one.
Linear permutation — for comparison: an arrangement of n items in a line, counted by n!. The circular case factors out the n rotations, giving n!/n=(n−1)!.
Reference position — the slot on the circle where the anchor is placed. In this tool, the top of the build ring.
Getting Started
The tool opens with n=3 items ready to build. The scene is split into three areas:
• A source row at the top showing the available items.
• A build ring in the middle with n slots arranged around a circle. The top slot is labeled FIXED and already holds the anchor.
• A completed grid below, where every finished circular arrangement is recorded as a mini circle card.
To run it:
• Press ▶ Play to build all (n−1)! arrangements automatically.
• Press Step ▶ to advance one ball at a time.
• Press ◀ to step backward through the animation.
• Adjust the Speed slider to control how fast play advances.
The badge in the top right shows the formula (n−1)! for the current n and the running count k/(n−1)! so progress against the total is always visible.
n = 3, idle, frozen
The anchor is already seated: Red at the top of the ring, dimmed in the source, with two dashed slots waiting — the symmetry spent before the first move.
The frozen frame above is the opening position, and it already contains the scenario's one big idea: before anything runs, the anchor is in place. Red sits at the top of the ring, dimmed in the source row, holding the reference position no arrangement will ever move it from.
Only two dashed slots remain — so even at rest, the frame announces the count: two free positions, 2!=2 circular arrangements. The circle's symmetry has been spent before the first ball flies.
The Anchor
The tool's central pedagogical move is the anchor: the first item is fixed at the top slot of the build ring throughout every arrangement. This is what makes the count (n − 1)! instead of n!.
Without anchoring, every circular arrangement would be counted n times — once for each rotation that brings a different item to the top. Anchoring eliminates that redundancy: by pinning one item, only one representative of each rotation class ever appears.
The visual shows this directly:
• The top slot has a solid border and a FIXED label above it.
• The other slots have dashed borders and are numbered #2,#3,…,#n clockwise around the ring.
• Only the dashed slots get filled by the animation. The anchor never moves.
• In the source row, the anchor item stays dimmed throughout — it's out of play because it's already placed.
n = 3 complete, frozen
Two ring cards, both crowned by the same red anchor, differing only in which neighbor sits clockwise — the whole of (3−1)! = 2.
The frozen frame above is the complete n=3 run, and it is the anchor argument at its most checkable: two cards, both crowned by the same red ball, differing only in whether Blue sits clockwise-next or Green does. Try to draw a third circular arrangement of three items — every attempt is one of these two, rotated.
Had the tool not anchored, it would have produced 3!=6 rings — this pair plus four rotated duplicates. The anchor is not a restriction on the mathematics; it is a choice of representative for each rotation class, made once and enforced visually.
Adjusting n
Demon = 4: six rings
Step 0 of 5
The n stepper in the control bar sets the number of items. The visual layout supports:
• n = 3 — produces (3−1)!=2 arrangements. The minimum interesting case: with one anchor, only two items vary.
• n = 4 — produces (4−1)!=6 arrangements. Three items rotate around the anchor.
• n = 5 — produces (5−1)!=24 arrangements. Mini cards shrink to fit a 6-column grid.
Changing n resets the build state: the build ring repopulates with new slots, the source row updates, the completed grid empties, and the formula in the top-right corner refreshes.
The counts grow quickly — by n=5 you're already at 24 distinct circular arrangements, which is why the visual caps there. For larger n, use a calculator: (6−1)!=120, (7−1)!=720, (10−1)!=362,880.
n = 4 complete, frozen
Six ring cards in two rows: (4−1)! = 3! — a round table of four holds exactly as many seatings as a straight bench of three.
The frozen frame above is the middle setting completed: n=4, six ring cards in two rows of three. Six is a familiar number here — it is 3!, the linear permutations of the three unanchored items, which is exactly what the circular count reduces to once the anchor is pinned.
Comparing the three settings is the quickest way to feel the formula: 2, 6, 24 — the factorial sequence, shifted down by one. A circular table of n guests always has exactly as many seatings as a straight bench of n−1.
The Build Ring
DemoOne ring, slot by slot
Step 0 of 5
The build ring is the live workspace where one arrangement at a time is constructed:
• The top slot (slot #1) is the anchor. Always filled with the first item, never modified.
• The other slots are numbered #2 through #n going clockwise. They fill in order as the animation runs.
• When a ball is in flight from the source row to a slot, a dotted guide line traces the path in the ball's own color, so you can track which item is moving where.
• In the source row above, an item that's already been placed in the current arrangement (or is the anchor) is dimmed. Only available items appear in full opacity.
• When all slots are filled, a flash ring briefly pulses around the build area. The completed arrangement is then copied to the grid below and the ring resets for the next one.
n = 3 mid-build, frozen
The second arrangement under way: Green landed in slot #2, Blue riding its dotted guide to #3, and the FIXED anchor untouched at the top.
The frozen frame above catches the second arrangement mid-build: Green has landed in slot #2, Blue is riding its dotted guide toward #3, and the anchor watches from the top, untouched as always.
Note what the ring's geometry does to the build: unlike the straight build areas of the other permutation tools, the slots here have no left or right — only clockwise-from-the-anchor. Position is meaningful purely as relation to the fixed point, which is the circular idea in miniature.
Transport Controls
DemoSlow speed, Back, n = 5
Step 0 of 5
The control bar offers four transport buttons plus a speed slider:
• ◀ (Step back) — walks the animation one step backward. Useful for re-examining an arrangement or pausing mid-build.
• Step ▶ (Step forward) — advances one ball into one slot of the ring. Stop after each step to read off the partial arrangement.
• ▶ Play / ⏸ Pause — runs the animation continuously until all (n−1)! arrangements are built, then auto-pauses.
• ↺ Reset — clears the completed grid and starts over from the first arrangement.
The Speed slider controls how fast play advances. At higher speeds the fly and land timings shrink proportionally; at slower speeds you can clearly see each ball travel from source to its assigned slot and watch the dotted guide line in detail.
Mode Switch
The Mode switch at the start of the control bar toggles how items are rendered:
• Balls mode (default) — items appear as colored circles. Better for seeing positional structure at a glance and for tracking which item went where in the completed grid.
• Letters mode — items appear with letter labels. Better for reading off the actual sequence in each arrangement and matching it to algebraic notation like (A,B,C,D).
The encoding is consistent across the source row, the build ring, the flying ball, and every mini card in the completed grid. The anchor keeps its identity across modes — it's always the first item, always at the top of every ring.
The narration panel on the right also adapts to the current mode, so prose references match the visual.
The Completed Grid
Below the build ring, the completed section catalogs every arrangement the tool has produced. Each entry is a mini circle card showing:
• The anchor at the top of its own small ring.
• The other n−1 items in their assigned positions for that arrangement.
The grid layout adapts to n:
• n = 3: 2 cards in 2 columns.
• n = 4: 6 cards in 3 columns.
• n = 5: 24 cards in 6 columns.
Card size shrinks as the count grows so the whole catalog fits within the scene. A counter above the grid shows the running tally k/(n−1)!. When all arrangements complete, the counter reaches the total and the animation auto-pauses, leaving every distinct circular permutation visible side by side.
n = 5 complete, frozen
The full catalog: twenty-four ring cards in six columns, one per rotation class — every way five guests can circle a table.
The frozen frame above is the full catalog at the tool's largest setting: n=5, twenty-four ring cards in a six-column grid, every one crowned by the same anchor. This is the complete answer to "how many ways can five people sit at a round table" — drawn, not just computed.
Scan any column of cards and the uniqueness argument runs itself: no two rings agree, because with the anchor fixed, agreement anywhere would force agreement everywhere. Twenty-four is also 4! — the linear permutations of the four free guests, which is all a round table really asks for.
What Is a Circular Permutation
A circular permutation is an arrangement of n distinct items around a circle, with the convention that two arrangements are the same if one is a rotation of the other. The count of distinct circular permutations is:
Pcirc(n)=(n−1)!
The classic setting is a round table with n guests. If you labeled the seats 1 through n and counted arrangements, you would get n! — but a round table doesn't have labeled seats. Spinning the table doesn't change who is next to whom, which is the only structural information a circular arrangement carries.
The formula applies to any cyclic arrangement where positions matter only relative to each other: people around a campfire, keys on a circular keyring, beads on a closed loop, or steps in a periodic schedule.
For deeper coverage, see the circular permutation section on the permutations theory page.
Why (n-1)! Instead of n!
Two equivalent derivations of (n−1)!.
By symmetry. Start with all n! linear arrangements. Wrap each one into a circle by joining the ends. Every distinct circular arrangement corresponds to exactly n different linear ones — you can read the same circle starting from any of the n positions. So divide:
nn!=(n−1)!
By anchoring. Fix one item at a reference position. The remaining n−1 items occupy the other n−1 positions, in any order. That's a linear permutation of n−1 items, which is (n−1)!. No double counting, because the anchor uniquely identifies each rotation class.
The tool uses the anchoring approach because it produces unique arrangements directly. You never have to build n! candidates and then collapse n-fold redundancy — every arrangement on screen is already a distinct circular permutation, as the completed grid shows card by card.
Combinations — selecting items where order doesn't matter. The companion concept to permutations.
Necklace and bracelet counting — generalizations where reflections (flips) are also factored out alongside rotations. The bracelet count for n≥3 is (n−1)!/2.
Cyclic groups — the algebraic structure behind rotational symmetry. The group of rotations of a circle with n marked positions is Z/nZ.
Combinatorics calculator — to compute (n−1)! for arbitrary n values beyond the visual cap, see the circular permutation calculator.
Permutation with repetition — reusing items around a circle breaks the rotation argument, because rotations of a repeated pattern can coincide.