Skip to content
Free public beta until December 4, 2026: every course is open, no card needed. After that, the first chapter of each course stays free and full access is a one-time $39 ($19 for up to 100 founding members chosen for helpful feedback). Your progress is kept. How the beta works

Review — permutations and combinations

~10 min

The single question that decides which formula a counting problem needs — does rearranging the chosen items produce a genuinely different outcome? — is worth re-sharpening before this course starts building arrangements and selections with symmetry and repetition layered on top.

Say the choice out loud. Then ask whether "in what order" makes sense as a follow-up question. "Rank the top 3 finishers" clearly needs an order, so it's a permutation. "Pick 3 people for a committee" implies no ranking, so it's a combination. If the follow-up question sounds absurd, trust that reaction. It's a combination.

A permutation is an ordered selection of r items from n distinct items, counted by P(n,r) = \dfrac{n!}{(n-r)!}; a combination is the same selection with order thrown away, counted by C(n,r) = \binom{n}{r} = \dfrac{n!}{r!\,(n-r)!}. Every combination corresponds to exactly r! permutations — the orderings of that same chosen group — which is precisely the factor C(n,r) divides out of P(n,r). Deciding which one a problem needs always comes down to the same question: does swapping two chosen items produce a genuinely different outcome, or the exact same one counted twice? The moment a selection problem also has repeated or interchangeable items, this r!-per-group overcount stops being uniform, which is exactly why Chapter 2 needs a sharper tool than either formula alone.

Quick review

Practice from earlier coursework, pulled in for this topic.

From Discrete Mathematics I — Logic, Proof, and Structure

The most reliable test for choosing between a permutation and a combination is...

Correct! 🎉 Not quite.

Right on try — credit. Right — the answer had already been shown, so no credit this time. Next try is worth Answer shown after three tries — this one no longer earns credit. You chose to see the answer — this one earns no credit.

Surface wording is not reliable -- 'select a lineup' sounds like a plain choice but assigns order.

Why

The swap test asks about the actual structure of the outcome, which settles the question every time wording might not.

From Discrete Mathematics I — Logic, Proof, and Structure

A 5-card poker hand is dealt, then sorted by rank afterward for display. Does the later sorting step make the deal itself a permutation?

Correct! 🎉 Not quite.

Right on try — credit. Right — the answer had already been shown, so no credit this time. Next try is worth Answer shown after three tries — this one no longer earns credit. You chose to see the answer — this one earns no credit.

Why

A processing step performed on an already-counted group never retroactively adds order to that group's own count.

From Discrete Mathematics I — Logic, Proof, and Structure

Assigning a starting pitcher and a closer from the same 12-player roster is a...

Correct! 🎉 Not quite.

Right on try — credit. Right — the answer had already been shown, so no credit this time. Next try is worth Answer shown after three tries — this one no longer earns credit. You chose to see the answer — this one earns no credit.

Why

Starting pitcher and closer are distinct roles -- swapping the two players changes who does what, a permutation.

Formula

Permutations of n items taken r at a time

also known as: P(n,r) or nPr

Recalled from College Algebra · Counting, permutations, combinations, and probability — first taught there.

🔖

The number of ways to arrange r items chosen from n distinct items, where order matters, is P(n,r) = \frac{n!}{(n-r)!}.

This is just the counting principle, run r times in a row. The first position in the arrangement can be filled by any of the n items. The second position can be filled by any of the n - 1 items that remain (one has been used). The third by any of the n-2 remaining, and so on, down to the rth position, which has n - (r-1) = n - r + 1 choices left. Multiply across all r positions: P(n,r) = n \cdot (n-1) \cdot (n-2) \cdots (n - r + 1). That product has exactly r factors, starting at n and counting down. To see it equals \frac{n!}{(n-r)!}, write n! in full and notice the tail end cancels: n! = \bigl[n(n-1)\cdots(n-r+1)\bigr] \cdot (n-r)!, so dividing both sides by (n-r)! leaves exactly the product above.

Formula

Combinations of n items taken r at a time

also known as: C(n,r), nCr, or n choose r

Recalled from College Algebra · Counting, permutations, combinations, and probability — first taught there.

🔖

The number of ways to choose r items from n distinct items, where order does not matter, is C(n,r) = \binom{n}{r} = \frac{n!}{r!\,(n-r)!}.

Start from P(n,r), which counts every arrangement of r chosen items. Each unordered group of r items corresponds to many of those arrangements — specifically, every one of the r! ways to reorder that same group is a different permutation but the exact same combination. So P(n,r) overcounts each combination by a factor of r!, and dividing it out gives the true count: C(n,r) = \frac{P(n,r)}{r!} = \frac{n!/(n-r)!}{r!} = \frac{n!}{r!\,(n-r)!}.

Watch the count collapse when order stops mattering

Choose 3 of the 5 people, then toggle order matters on and off and compare the two counts.

Loading interactive…

Worked example

Ordered vs. unordered, same numbers

  1. 1

    Eight runners compete. In how many ways can gold, silver, and bronze be awarded, and separately, in how many ways can a 3-person relay roster (no assigned order) be chosen?

  2. 2

    Medals are distinct ordered positions, so this is P(8,3); the roster has no internal order, so this is C(8,3).

  3. 3

    P(8,3) = \dfrac{8!}{5!} = 8 \cdot 7 \cdot 6; C(8,3) = \dfrac{P(8,3)}{3!}.

  4. 4
    \boxed{P(8,3)=336, \quad C(8,3)=56}

    336 is exactly 56 \cdot 3! — every roster corresponds to 6 ordered medal assignments.

Loading interactive…

Worked example

A count that's neither, at first glance

  1. 1

    How many distinct 5-card poker hands can be dealt from a 52-card deck?

  2. 2

    The order the 5 cards arrive in never changes what hand a player holds, so this is unordered: a combination, not a permutation.

  3. 3

    Compute C(52,5) = \dfrac{52!}{5!\,47!}.

  4. 4
    \boxed{2{,}598{,}960 \text{ hands}}

Loading interactive…

Who uses this

Database query planning

A database index that returns the top k ranked results (a search engine's top-10 links, a leaderboard's top-3) is counting permutations — which k items and their order both matter. A database index that returns any k matching rows with no guaranteed order is counting combinations. Query planners actually cost these differently: producing an ordered top-k typically needs a sort step a plain unordered filter never pays for, a real performance difference traceable straight back to P(n,k) carrying that extra k! factor C(n,k) doesn't.

Check your understanding (counts toward your progress)

Assigning 3 distinct job titles to 3 of 8 employees is:

Correct! 🎉 Not quite.

Right on try — credit. Right — the answer had already been shown, so no credit this time. Next try is worth Answer shown after three tries — this one no longer earns credit. You chose to see the answer — this one earns no credit.

Each employee gets a DIFFERENT title -- swapping two employees' titles changes who has which job, so order matters.

Why

Distinct titles are distinct ordered positions -- a permutation, P(8,3).

Ask whether swapping which employee gets which title changes who ends up with which job.

In how many ways can 1st, 2nd, and 3rd place be awarded among 6 finalists?

Correct! 🎉 Not quite.

Right on try — credit. Right — the answer had already been shown, so no credit this time. Next try is worth Answer shown after three tries — this one no longer earns credit. You chose to see the answer — this one earns no credit.

Why

P(6,3) = 6 * 5 * 4 = 120.

Correct answer

Also accepted:

Why

A solver computes P(10,4) for a problem that turns out to have no meaningful order among the 4 chosen items. The answer is:

Correct! 🎉 Not quite.

Right on try — credit. Right — the answer had already been shown, so no credit this time. Next try is worth Answer shown after three tries — this one no longer earns credit. You chose to see the answer — this one earns no credit.

Why

P(n,r) overcounts an unordered selection by r! -- every group of r items is counted once per ordering. Dividing by 4! recovers C(10,4).

Recall exactly how many times P(n,r) counts each unordered group of r items -- that repeat count is the correction factor.

A password uses 4 distinct letters from a 26-letter alphabet, order mattering. How many passwords are possible?

Correct! 🎉 Not quite.

Right on try — credit. Right — the answer had already been shown, so no credit this time. Next try is worth Answer shown after three tries — this one no longer earns credit. You chose to see the answer — this one earns no credit.

Why

P(26,4) = 26 * 25 * 24 * 23 = 358,800.

Correct answer

Also accepted:

Why

Order matters and letters can't repeat -- that signature points to one specific formula from this section, not the other.

Fill the 4 positions one at a time, using one fewer available letter at each step, then multiply those four counts together.

Practice: Permutations vs. combinations, and counting them (5 problems · doesn’t affect your progress)

A teacher selects 2 students from a class of 10 to attend a conference together, with no distinction between the two roles. Is finding the number of possible pairs a permutation or a combination?

Correct! 🎉 Not quite.

Right on try — credit. Right — the answer had already been shown, so no credit this time. Next try is worth Answer shown after three tries — this one no longer earns credit. You chose to see the answer — this one earns no credit.

Choosing WHICH 2 students matters, but nothing here assigns them different roles -- swapping the two doesn't create a new outcome.

Selecting without regard to order is exactly what the combination formula is built for; the product rule alone doesn't account for the overcounting a plain multiplication would produce.

The answer doesn't depend on which specific students are chosen -- the lack of distinct roles makes this a combination every time.

Why

No roles distinguish the two selected students, so swapping them doesn't create a new outcome -- an unordered selection, a combination.

A combination, since the 2 selected students have no distinct roles

In how many ways can 1st, 2nd, and 3rd place be awarded among 6 finalists?

Correct! 🎉 Not quite.

Right on try — credit. Right — the answer had already been shown, so no credit this time. Next try is worth Answer shown after three tries — this one no longer earns credit. You chose to see the answer — this one earns no credit.

Why

P(6,3) = 6 * 5 * 4 = 120.

Correct answer

Also accepted:

Why

120

In how many ways can a 3-person subcommittee be chosen from 6 members, with no assigned roles?

Correct! 🎉 Not quite.

Right on try — credit. Right — the answer had already been shown, so no credit this time. Next try is worth Answer shown after three tries — this one no longer earns credit. You chose to see the answer — this one earns no credit.

Why

C(6,3) = 6! / (3! * 3!) = 20.

Correct answer

Also accepted:

Why

20

A playlist app arranges 5 of a user's 12 favorite songs into a specific play order for a road trip. How many different orderings are possible?

Correct! 🎉 Not quite.

Right on try — credit. Right — the answer had already been shown, so no credit this time. Next try is worth Answer shown after three tries — this one no longer earns credit. You chose to see the answer — this one earns no credit.

Why

P(12,5) = 12 * 11 * 10 * 9 * 8 = 95,040.

Correct answer

Also accepted:

Why

Fill the 5 positions one at a time, using one fewer remaining song at each step, then multiply.

95040

A 4-person team is chosen from 15 employees to work on a project, with one of the 4 additionally designated as team lead. Which count is needed for 'team plus lead' as a single selection?

Correct! 🎉 Not quite.

Right on try — credit. Right — the answer had already been shown, so no credit this time. Next try is worth Answer shown after three tries — this one no longer earns credit. You chose to see the answer — this one earns no credit.

This ignores the lead designation entirely -- once one of the 4 is singled out as lead, two teams with the same 4 people but different leads are different outcomes.

P(15,4) treats all 4 positions as fully ordered, but only ONE role (lead) is distinguished -- the other 3 remain interchangeable teammates.

The lead isn't a separate addition to the count -- it's a choice made from within the already-selected team, which multiplies the team count, not adds to it.

Why

First choose the 4-person team with the combination formula C(15,4), then separately choose which of those 4 is lead (4 ways) -- multiplying the two stages together, not treating all 4 positions as ordered.

Break this into two stages: choosing the team of 4 (unordered), then picking the lead from within that team (a separate choice).

Ask whether the 3 non-lead teammates are distinguished from each other in any way -- if not, only the lead position needs special treatment.

C(15,4) * 4, choosing the team then picking the lead from within it

Feeling good about this section?

Take the section quiz

Every answer gets a full explanation at the end.

Graph settings

Calculator

Sign in to save highlights

Insert an equation

  • No matches.