Visual Tools
Calculators
Tables
Mathematical Keyboard
Converters
Other Tools


Partial Permutations


Press ▶ Play to build all P(n, r) arrangements, or Step ▶ to advance one ball at a time. Switch balls / letters and adjust n and r.
● BallsA Letters
n =3?
r =2?
Speed
P(3, 2) = 6Press Play or Step to beginSOURCE (n = 3)123BUILD AREA (r = 2)#1#2
Building partial permutations
P(3, 2) = 3! / (3−2)! = 3 × 2 = 6
Choose and arrange r items out of n — order matters, no repetition. Each step builds the family of arrangements starting with one fixed first item; there are n such families, each containing (n−1)! / (n−r)! arrangements.





Key Terms



Key Terms

Partial permutation — an ordered selection of rr items from a set of nn distinct items, with no item reused. The count is P(n,r)=n!/(nr)!P(n, r) = n! / (n - r)!.

$P(n, r)$ — standard notation for the number of partial permutations of size rr taken from nn items. Also written nPr_nP_r or PrnP^n_r.

Order matters — two selections with the same items in different positions count as different partial permutations. This is what distinguishes partial permutations from combinations.

Position — a slot in the arrangement, numbered #1\#1 through #r\#r from left to right in the build area.

First-item group — the family of partial permutations that share the same item in position #1\#1. There are nn such groups, each containing (n1)!/(nr)!(n - 1)! / (n - r)! partial permutations.

Source row — the set of nn available items shown at the top of the scene. Items already placed in the current build are dimmed.

Getting Started

The tool opens with n=3n = 3 and r=2r = 2, ready to build. The scene splits into three areas:

• A source row at the top showing all nn available items.

• A build area in the middle with exactly rr slots labeled #1\#1 through #r\#r.

• A completed section below, where every finished partial permutation is filed under the row matching its first item.

To run the visualization:

• Press ▶ Play to auto-build all P(n,r)P(n, r) partial permutations.

• 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 header in the top right shows P(n,r)=totalP(n, r) = \text{total} alongside a live status line such as *Step X (item name): kk / (n1)!/(nr)!(n-1)!/(n-r)!* while building, or *Complete · total / total* when done.

The Build Area

The build area is where one partial permutation at a time is constructed. Unlike a full permutation, only rr slots appear — not nn. The label above the area reads *BUILD AREA (r = R)* with the current rr.

What to watch:

Empty slot outlines with dashed borders, labeled #1,#2,,#r\#1, \#2, \dots, \#r. The label tells you the position number being filled.

• When a ball is in flight from the source row to a slot, a dotted guide line in that ball's color traces the trajectory.

• Each ball lands in its assigned slot and stays put until the partial permutation completes.

• In the source row above, every item already placed in the current build (plus the one in flight) is dimmed to indicate it's out of play.

• When all rr slots are filled, a flash ring briefly pulses around the build area. The completed arrangement is then copied to the appropriate first-item row in the completed section below.

Adjusting n and r

Two steppers in the control bar control the size:

n sets the size of the source set — the pool of available items.

r sets the number of positions to fill. The constraint rnr \leq n is enforced; if you reduce nn below the current rr, the tool clamps rr down automatically.

Common combinations:

n=3,r=2n = 3, r = 2: P(3,2)=6P(3, 2) = 6 partial permutations.

n=4,r=2n = 4, r = 2: P(4,2)=12P(4, 2) = 12 partial permutations.

n=4,r=3n = 4, r = 3: P(4,3)=24P(4, 3) = 24 partial permutations.

n=5,r=3n = 5, r = 3: P(5,3)=60P(5, 3) = 60 partial permutations.

n=5,r=5n = 5, r = 5: P(5,5)=120P(5, 5) = 120 — this is the full permutation case, where r=nr = n and the formula reduces to n!n!.

Changing either nn or rr resets the build, refreshes the formula in the header, and reorganizes the completed grid into the new number of first-item rows.

Grouping by First Item

The completed section organizes partial permutations into first-item groups — every arrangement starting with the same item appears in the same row.

There are exactly nn groups (one per item in the source set), and each group holds exactly (n1)!/(nr)!(n - 1)! / (n - r)! partial permutations. So the total is:

n×(n1)!(nr)!=n!(nr)!=P(n,r)n \times \frac{(n - 1)!}{(n - r)!} = \frac{n!}{(n - r)!} = P(n, r)


This is the visual proof of the partial permutation formula. Pick any item to put in position #1\#1: nn choices. For each choice, fill the remaining r1r - 1 positions with r1r - 1 items chosen in order from the remaining n1n - 1 items: (n1)!/(nr)!(n - 1)! / (n - r)! ways. Multiply.

Each group row in the completed area has:

• A tinted background in a faint version of the group's color.

• A colored accent stripe on the left edge.

• A left-side avatar showing the first item — a colored circle with the item's number in balls mode, or the letter in letters mode.

• Mini partial-permutation cards, each one a full arrangement of rr items starting with that first item.

Transport Controls

The control bar offers four transport buttons plus a speed slider:

(Step back) — walks the animation one step backward. Useful for re-examining a single partial permutation or pausing mid-build.

Step ▶ (Step forward) — advances one ball into one slot. Stop after each step to read the partial arrangement so far.

▶ Play / ⏸ Pause — runs the animation continuously until all P(n,r)P(n, r) partial permutations are built, then auto-pauses.

↺ Reset — clears the completed section 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 slot and follow the dotted guide line in detail.

Mode Switch

The Mode switch at the start of the control bar toggles how each item is rendered:

Balls mode (default) — items appear as colored circles. The first-item avatar in each completed group is a circle with the item's number. Best for tracking position and group membership visually.

Letters mode — items appear with letter labels (A, B, C, …). The first-item avatar in each completed group is just the letter, colored to match. Best for reading off the sequence in each partial permutation and matching it to algebraic notation like (A,C)(A, C) or (B,A,D)(B, A, D).

The encoding is consistent across the source row, the build slots, the flying ball, every mini card in the completed grid, and the right-panel narration. Switching modes mid-animation is safe — the build state preserves; only the rendering changes.

Right Panel and Progress

The right panel narrates the build as it unfolds, anchored by the header *Building partial permutations* with the full formula P(n,r)=n!/(nr)!=n×(n1)×=totalP(n, r) = n! / (n - r)! = n \times (n - 1) \times \dots = \text{total}.

A StepRow is added for each first-item group as soon as a partial permutation in that group either starts building or completes. Each StepRow shows:

• The first item as a chip plus its name — for instance, *First item: A*.

• A progress counter like k/((n1)!/(nr)!)k / ((n - 1)!/(n - r)!) tracking how many partial permutations in this group have completed.

• A short narration of the structure: *Position 1 is locked to A. The next r1r - 1 positions are filled from B, C, D, or E in (n1)×(n2)×=M(n - 1) \times (n - 2) \times \dots = M ways.* When r=1r = 1 the narration adjusts: with only one position, the outcome is just the first item alone.

When all groups complete, every StepRow shows *done* with a checkmark, and the header counter reaches total/total\text{total} / \text{total}.

What Is a Partial Permutation

A partial permutation is an ordered selection of rr items from a set of nn distinct items, with no item used twice. The count of such selections is:

P(n,r)=n!(nr)!=n×(n1)××(nr+1)P(n, r) = \frac{n!}{(n - r)!} = n \times (n - 1) \times \dots \times (n - r + 1)


The formula collapses to n!n! when r=nr = n — the full permutation. When r<nr < n, the multiplication stops after rr factors instead of continuing all the way down to 11.

Examples:

• Picking a 11st, 22nd, and 33rd place from 88 runners: P(8,3)=8×7×6=336P(8, 3) = 8 \times 7 \times 6 = 336 podiums.

• Choosing a president and a vice-president from 1010 candidates: P(10,2)=90P(10, 2) = 90 outcomes.

• Forming a 44-digit code from 1010 digits with no repeats: P(10,4)=5040P(10, 4) = 5040 codes.

The partial permutation is the right model whenever you need both *which* items and *what order* — and reuse is not allowed.

For deeper coverage of the formula and its derivation, see the partial permutation without repetition section on the permutations theory page.

Deriving P(n,r) Step by Step

Apply the multiplication principle of counting one position at a time:

Position $\#1$: any of the nn items. nn choices.

Position $\#2$: any of the remaining n1n - 1 items. n1n - 1 choices.

Position $\#3$: any of the remaining n2n - 2 items. n2n - 2 choices.

\dots

Position $\#r$: any of the remaining nr+1n - r + 1 items. nr+1n - r + 1 choices.

Multiply the rr factors:

P(n,r)=n×(n1)×(n2)××(nr+1)P(n, r) = n \times (n - 1) \times (n - 2) \times \dots \times (n - r + 1)


This product equals n!/(nr)!n! / (n - r)! because the rr factors are exactly the top rr terms of n!n!, with the bottom nrn - r terms canceled by the (nr)!(n - r)! in the denominator.

The tool visualizes the equivalent factoring: fix the first item (nn ways), then arrange r1r - 1 of the remaining n1n - 1 items in order ((n1)!/(nr)!(n - 1)!/(n - r)! ways). Every row in the completed section is one of those nn first-item families.

Related Concepts

Full permutation — the case r=nr = n, where every item from the source set is used. Formula P(n,n)=n!P(n, n) = n!.

Permutation with repetition — relaxes the no-reuse rule, allowing the same item in multiple positions. Formula nrn^r, which is larger than P(n,r)P(n, r).

Permutation with identical items — handles a source set where some items are indistinguishable. Divides n!n! by the factorial of each repeat group's size.

Circular permutation — arrange items around a circle where rotations are identical. Formula (n1)!(n - 1)!.

Combination — the unordered companion of the partial permutation. Drops the order requirement, so C(n,r)=P(n,r)/r!C(n, r) = P(n, r) / r!.

Multiplication principle — the foundational counting rule that produces P(n,r)P(n, r) as the product of choices at each successive position.

Combinatorics calculator — to compute P(n,r)P(n, r) for arbitrary values of nn and rr, see the partial permutation calculator.