Permutations

←Back to Tech Tree

inventorycoverage

Permutations #

Discrete MathDifficulty: ★★☆☆☆Depth: 1Unlocks: 1

Ordered arrangements. n! and nPr formulas.

Interactive Visualization #

⏮◀◀▶▶STEP0.25x1xZOOM

t=0s

Core Concepts #

Key Symbols & Notation #

factorial symbol '!' (n! = 1*2*...*n)permutation operator 'n P k' (also written P(n,k))

Essential Relationships #

Prerequisites (1) #

Counting Principles6 atoms

Unlocks (1) #

Combinationslvl 2

Referenced by (1) #

Where this concept shows up in the operating-finance and personal-finance graphs.

From Business (1) #

[Shapley valueBusiness

Shapley value is defined as an average marginal contribution over all n! orderings of players, requiring understanding of permutation counting and enumeration](/business/shapley-value/)

Advanced Learning Details

Graph Position #

12

Depth Cost

1

Fan-Out (ROI)

1

Bottleneck Score

1

Chain Length

Cognitive Load #

6

Atomic Elements

16

Total Elements

L0

Percentile Level

L4

Atomic Level

All Concepts (5) #

Teaching Strategy #

Deep-dive lesson - accessible entry point but dense material. Use worked examples and spaced repetition.

If you’re assigning 1st/2nd/3rd place, building a password, or seating people in labeled chairs, you’re not just choosing items—you’re arranging them. That “order matters” twist is exactly what permutations count.

TL;DR:

A permutation is an ordered arrangement. Arranging all n distinct items gives n!. Choosing and ordering k distinct items from n (no repeats) gives n P k = n!/(n−k)!. Use permutations when positions are distinct and swapping items creates a new outcome.

What Is a Permutation? #

The idea: same items, different order ⇒ different outcome #

A permutation is an ordered arrangement of items. The central question permutations answer is:

How many outcomes are there when the positions matter?

You already know the multiplication rule: if you make a sequence of choices and each step has a certain number of options, you multiply those counts.

Permutations are what you get when those choices are:

Why “order matters” is a big deal #

Consider the two-letter sequence made from {A, B, C} without repeats.

That is the signature of permutations.

Three common “permutation contexts” #

  1. 1)Ranking / podiums: 1st, 2nd, 3rd are different positions.
  2. 2)Seating in labeled seats: seat #1 vs seat #2 are different.
  3. 3)Codes / strings (without repetition): first character vs second character are different.

Vocabulary you’ll see #

We’ll build both from the same counting principle: multiply the number of choices available at each position.

Notation #

We’ll derive the formulas rather than memorizing them.

Core Mechanic 1: Full Permutations and Factorials (n!) #

Why factorials appear #

Suppose you have n distinct items and you want to arrange all of them in a line.

Think in positions:

By the multiplication rule, the total number of arrangements is:

n · (n − 1) · (n − 2) · … · 2 · 1

That product is called n factorial, written n!.

Definition #

For integer n ≥ 1:

n! = ∏ᵢ₌₁ⁿ i = 1 · 2 · 3 · … · n

And by convention:

0! = 1

Why 0! = 1 (intuition, not just a rule) #

A “full permutation of 0 items” means: how many ways to arrange nothing? There is exactly one empty arrangement.

Also, the recursion for factorials works cleanly:

n! = n · (n − 1)!

If we set n = 1:

1! = 1 · 0!

But 1! = 1, so 0! must be 1.

Small examples (build intuition) #

The 6 arrangements of (A, B, C) are:

ABC, ACB, BAC, BCA, CAB, CBA.

This already grows fast; factorial growth is one reason permutation counts get large quickly.

A useful pattern: factorial cancellation #

Factorials often simplify when you divide them:

( \frac{n!}{(n−1)!} )

Work it out by expansion:

n! = n · (n − 1) · (n − 2) · … · 1

(n − 1)! = (n − 1) · (n − 2) · … · 1

So:

n! / (n − 1)! = n

This “cancellation idea” is the backbone of the n P k formula you’ll meet next.

When to use n! #

Use n! when:

If you’re not using all items (only k of them), you need k-permutations instead.

Core Mechanic 2: k-Permutations (n P k) and the n!/(n−k)! Formula #

The question k-permutations answer #

How many ordered sequences of length k can you form from n distinct items, without replacement?

Example contexts:

Build it from the multiplication rule (the “why”) #

Imagine filling k positions one by one.

Multiply them:

n P k = n · (n − 1) · (n − 2) · … · (n − k + 1)

This is already a perfectly good formula.

Convert to factorial form (the “how”) #

Factorials let us write that product compactly.

Start with n!:

n! = n · (n − 1) · (n − 2) · … · (n − k + 1) · (n − k) · (n − k − 1) · … · 2 · 1

Notice the part we want (the first k factors) is:

n · (n − 1) · … · (n − k + 1)

The “extra tail” we don’t want is:

(n − k) · (n − k − 1) · … · 1 = (n − k)!

So divide to cancel the tail:

n P k = ( \frac{n!}{(n − k)!} )

Check with a concrete example #

Suppose n = 5 and k = 3.

Direct product:

5 P 3 = 5 · 4 · 3 = 60

Factorial form:

5!/(5 − 3)! = 5!/2! = (120)/2 = 60

Matches.

Boundary cases and sanity checks #

n P n = n!/(n − n)! = n!/0! = n!/1 = n!

So k-permutation generalizes full permutation.

n P 0 = n!/(n − 0)! = n!/n! = 1

There is exactly one sequence of length 0: the empty sequence.

A decision table: permutations vs other counts #

Use this to avoid the most common confusion.

SituationReplacement?Order matters?Tool
Arrange all n distinct itemsNoYesn!
Choose and order k from nNoYesn P k = n!/(n−k)!
Choose k from n (order irrelevant)NoNo(This is combinations; unlocked next)
Choose with repeats allowedYesDependsDifferent formulas (not this node)

Interpreting n P k as “pick then arrange” #

Another way to see the structure:

That viewpoint leads naturally to combinations later:

n P k = (number of k-element sets) · (number of ways to order k items)

And “number of ways to order k items” is k!.

So you’ll soon see the relationship:

n P k = (n C k) · k!

Don’t worry about n C k yet—just remember: permutations count ordered outcomes; combinations will count unordered ones.

Application/Connection: Modeling Real Problems and Linking to Combinations #

Turning words into n, k, and “order?” #

Most permutation mistakes come from translating the story incorrectly. A reliable workflow:

  1. 1)Identify positions: Are there labeled roles (1st/2nd/3rd, seat 1/2/3, President/Vice/etc.)?
  2. 2)Check uniqueness: Can an item/person be used more than once?
  3. 3)Extract n and k:
  1. 4)If no repeats and order matters → use n P k.

Example application types #

1) Rankings and awards #

If 10 runners compete and you award gold/silver/bronze, you’re filling 3 distinct ranks:

10 P 3 = 10 · 9 · 8

2) Assigning distinct roles #

If you pick a chair, secretary, and treasurer from 12 people:

12 P 3

3) Seating in a row #

If 7 people sit in a row of 7 seats:

7!

If only 4 of them sit (4 seats to fill) from 7 people:

7 P 4

A key conceptual bridge to combinations #

Often the only difference between a permutation problem and a combination problem is whether we care about the order.

Take the same three winners from 10 runners:

The relationship:

n P k = (n C k) · k!

Interpretation:

Why permutations are foundational in discrete math and CS #

Permutations aren’t just a counting trick.

Quick growth intuition (why pacing matters) #

Factorials explode:

nn!
5120
840,320
103,628,800
151,307,674,368,000

So, whenever you see n! or n P k, it’s worth pausing to ask: is the model correct? Are repeats allowed? Are we accidentally counting the same outcome multiple times?

That careful translation skill is the main thing this node is training.

Worked Examples (3) #

Example 1: Podium finishes (order matters) #

A race has 9 runners. How many ways can gold, silver, and bronze be awarded (no ties)?

  1. Identify positions: gold, silver, bronze are 3 distinct ranks ⇒ order matters.

  2. No runner can take two medals ⇒ without replacement.

  3. Set n = 9, k = 3.

  4. Use k-permutations: 9 P 3 = 9 · 8 · 7.

  5. Compute:

    9 · 8 · 7 = 72 · 7 = 504.

Insight: Any time roles are labeled (1st/2nd/3rd), you’re arranging people into positions, so permutations apply.

Example 2: Arrange all items (factorial) #

How many different orders can 6 distinct books be placed on a shelf?

  1. All 6 books are used, and left-to-right order matters.

  2. This is a full permutation of n = 6 distinct items.

  3. Use factorial: 6! = 6 · 5 · 4 · 3 · 2 · 1.

  4. Compute stepwise:

    6 · 5 = 30

    30 · 4 = 120

    120 · 3 = 360

    360 · 2 = 720

    720 · 1 = 720.

Insight: When you arrange all n distinct items, the count is exactly the product of remaining choices at each position: n!.

Example 3: Using the factorial form to compute quickly #

Compute 12 P 5 and simplify using factorial cancellation.

  1. Use the formula: 12 P 5 = 12!/(12 − 5)! = 12!/7!.

  2. Expand only what’s needed:

    12! = 12 · 11 · 10 · 9 · 8 · 7!

    7! = 7!

  3. Cancel 7!:

    12!/7! = 12 · 11 · 10 · 9 · 8.

  4. Multiply:

    12 · 11 = 132

    132 · 10 = 1320

    1320 · 9 = 11880

    11880 · 8 = 95040.

Insight: Factorial form is less about computing gigantic factorials and more about cancellation—expand just enough to cancel (n−k)!.

Key Takeaways #

Common Mistakes #

Practice #

easy

A club has 11 members. In how many ways can it choose a president, vice president, and secretary (three different people)?

Hint: These are 3 distinct roles, so order matters. No person can hold two roles.

Show solution

n = 11, k = 3.

11 P 3 = 11 · 10 · 9 = 990.

medium

How many 4-letter sequences can you form from the letters {A, B, C, D, E, F} if no letter can repeat?

Hint: You are filling 4 positions from 6 distinct letters without replacement.

Show solution

n = 6, k = 4.

6 P 4 = 6 · 5 · 4 · 3 = 360.

(Equivalently, 6!/2! = 720/2 = 360.)

hard

Simplify and compute: 15 P 6.

Hint: Write 15 P 6 = 15!/9! and expand only down to 10.

Show solution

15 P 6 = 15!/9!.

15! = 15 · 14 · 13 · 12 · 11 · 10 · 9!

So 15!/9! = 15 · 14 · 13 · 12 · 11 · 10.

Compute:

15 · 14 = 210

210 · 13 = 2730

2730 · 12 = 32760

32760 · 11 = 360360

360360 · 10 = 3,603,600.

Connections #

Next node: Combinations

Related ideas you’ll likely use soon:

Quality: A (4.5/5)

← back to treebrowse all →