Real-Life Examples of Permutations and Combinations

Real-Life Examples of Permutations and Combinations
Real-Life Examples of Permutations and Combinations — Explained Simply

Learn · With · Examples

Lottery odds, poker hands, phone lock codes, Olympic podiums, pizza orders — they’re all counting problems in disguise, and they all come down to one question: does order matter? This guide explains permutations and combinations using nothing but real, everyday examples, with interactive scenario galleries and full worked calculations.

📖 19 min read 🔀 Perm-or-combo identifier 🏅 Permutation gallery 🎟️ Combination gallery ❓ 6-question quiz

Section 01

The Difference — A Lock Code vs. A Fruit Bowl

Imagine two everyday situations. First: you’re setting a 3-digit code on a padlock using digits 1, 2, and 3. The code 1-2-3 is completely different from 3-2-1 — they open different locks (or rather, only the exact sequence you set will open yours). Order matters. This is a permutation.

Second: you’re picking 3 fruits from a bowl to make a smoothie — an apple, a banana, and an orange. It doesn’t matter if you grabbed the apple first or the orange first — you end up with the exact same smoothie ingredients either way. Order doesn’t matter. This is a combination.

💡 The One Question That Decides Everything

Every counting problem in this entire topic reduces to a single question: if I rearrange the same items, do I get something different? Yes → permutation. No → combination. Everything else is just formula mechanics built on top of that one distinction.

n!
Factorial — the building block behind every permutation and combination formula
nPr
Permutations — ordered selections
nCr
Combinations — unordered selections
1/13.98M
Odds of matching all 6 numbers in a 6/49 lottery — a real combination calculation

Section 02

Formal Definitions — The nPr and nCr Formulas

Both formulas start from the same n items, choosing r of them — they only differ in whether order counts.

P(n,r) = n! / (n − r)!
Permutations — the number of ORDERED ways to choose r items from n
C(n,r) = n! / [r! (n − r)!]
Combinations — the number of UNORDERED ways to choose r items from n

🔗 How They’re Related

Notice combinations = permutations ÷ r!. That’s not a coincidence — every unordered group of r items can be arranged in r! different orders. Combinations “collapse” all those orderings into one, because order doesn’t matter. C(n,r) = P(n,r) / r!

Section 03

Interactive: Permutation or Combination?

Click through 5 real scenarios. Try to guess before reading the reasoning — this is the exact judgment call you’ll need to make on every word problem you encounter.

  Scenario Identifier
“Assign gold, silver, and bronze medals to 3 of 10 finalists.”
PERMUTATION
Gold, silver, and bronze are three different roles. Alice-gold/Bob-silver is a completely different outcome from Bob-gold/Alice-silver, even though the same two people are involved. Order (which position each person lands in) changes the result.
“Choose 4 pizza toppings from a menu of 12.”
COMBINATION
A pizza with pepperoni-mushroom-olive-onion is the exact same pizza as onion-olive-mushroom-pepperoni. The order you listed the toppings in doesn’t create a different pizza — only the final set of 4 toppings matters.
“Set a 4-digit lock code using digits 0–9.”
PERMUTATION
1-2-3-4 and 4-3-2-1 are different codes that open different locks. Position matters — this is a permutation (specifically one that allows repeated digits, covered later).
“Pick 2 co-captains from a 15-person sports team.”
COMBINATION
Both co-captains hold the identical role — there’s no “first co-captain” and “second co-captain.” Choosing Sam-then-Priya gives the exact same pair of co-captains as Priya-then-Sam.
“Arrange 6 unique paintings in a row along a gallery wall.”
PERMUTATION
Each painting occupies a specific position on the wall (1st, 2nd, 3rd…). Swapping two paintings’ positions creates a visibly different arrangement — position matters, so this is a permutation.

Section 04

The Factorial Foundation

Both formulas are built entirely from factorials, so it’s worth getting comfortable with them first. n! (read “n factorial”) means multiply every whole number from n down to 1.

5! = 5 × 4 × 3 × 2 × 1 = 120
The number of ways to arrange 5 distinct items in a row
nn!Real meaning
0!1By definition — there’s exactly 1 way to arrange nothing
1!1One item — only one arrangement possible
2!22 books on a shelf: AB or BA
3!63 runners crossing the finish line, in order
4!244 people seated around a table
5!1205 songs in a playlist order
6!7206 books arranged on a shelf
10!3,628,80010 runners in a full race ranking

⚠️ Why 0! = 1

This trips people up constantly. Think of factorial as “number of ways to arrange these items.” With zero items, there’s exactly one way to arrange them: do nothing. An empty arrangement is still one valid arrangement — so 0! = 1, not 0.

Section 07

The “Does Order Matter?” Test

A reliable 3-step process for any word problem you encounter:

1

Swap two of your chosen items — does the outcome change?

If choosing Alice-then-Bob gives a genuinely different result than Bob-then-Alice (different roles, different positions), order matters → permutation. If it’s the same outcome either way → combination.

2

Check for distinct roles or positions

Ranks (1st/2nd/3rd), seats, digit positions, and named roles (president/treasurer) all signal permutation. A “set” or “group” with no internal distinction signals combination.

3

Check if repetition is allowed

If the same item can be chosen more than once (like PIN digits or dice rolls), you need the “with repetition” formula — covered in Section 9 — regardless of whether order matters.

⚠️ The Most Common Mistake

Students often default to combinations because the formula “feels simpler.” But most everyday scenarios with roles, rankings, sequences, or codes are permutations. Always run the swap test in Step 1 before picking a formula.

Section 08

Worked Example — Building a Real Password System

Let’s combine everything into one realistic problem: a website requires passwords with exactly 2 different letters (no repeats) followed by 3 digits (digits CAN repeat). How many total passwords are possible?

1

Break it into two independent parts

Part A: choosing 2 different letters in order. Part B: choosing 3 digits, repeats allowed. We’ll solve each separately, then multiply.

2

Solve Part A — the letters

2 letters, no repeats, order matters (AB ≠ BA as passwords) → this is a permutation. P(26,2) = 26 × 25 = 650 possible letter pairs.

3

Solve Part B — the digits

3 digits, repeats allowed, order matters → permutation with repetition. 10 × 10 × 10 = 1,000 possible digit sequences.

4

Apply the multiplication principle

Every letter-pair can be combined with every digit-sequence — so multiply the two results together.

Part A (letters): P(26,2) = 26 × 25 = 650
Part B (digits): 10³ = 1,000

Total passwords = 650 × 1,000
= 650,000 possible passwords

🔗 The Multiplication Principle

Whenever a problem splits into independent stages (letters, THEN digits), multiply the number of possibilities at each stage. This single rule — the fundamental counting principle — is what lets you break any complex real-world counting problem into smaller, solvable permutation and combination pieces.

Section 09

Permutations and Combinations with Repetition

The formulas above assume each item can only be chosen once. Real life often allows repeats — here’s how the math changes.

Permutations WITH repetition — n choices, repeated r times, order matters. This is how PIN codes and license plates are counted.
C(n + r − 1, r)
Combinations WITH repetition (“stars and bars”) — choosing r items from n types, repeats allowed, order doesn’t matter

Worked Example — Ice Cream Scoops

An ice cream shop has 5 flavors. You order 3 scoops, and you’re allowed to repeat a flavor (like 2 scoops chocolate + 1 scoop vanilla). Order doesn’t matter — a cup with chocolate-chocolate-vanilla is the same order regardless of which scoop went in first.

n = 5 flavors, r = 3 scoops, repetition allowed, order doesn’t matter
C(n + r − 1, r) = C(5 + 3 − 1, 3) = C(7,3)
= 7! / [3! × 4!] = (7×6×5) / 6
= 35 possible ice cream orders

Section 10

Pascal’s Triangle Connection

Every entry in Pascal’s Triangle IS a combination value. Row n, position k gives you exactly C(n,k) — no calculation required, just count and look it up.

n=01
n=11   1
n=21   2   1
n=31   3   3   1
n=41   4   6   4   1
n=51   5   10   10   5   1
n=61   6   15   20   15   6   1

Look at row n=6: the entries are C(6,0)=1, C(6,1)=6, C(6,2)=15, C(6,3)=20, and so on. Each number is the sum of the two numbers diagonally above it — which is exactly Pascal’s Rule: C(n,k) = C(n−1,k−1) + C(n−1,k).

💡 Where You’ve Actually Seen This

Pascal’s Triangle is also the coefficients of a binomial expansion — (a+b)⁶ expands using exactly the row-6 numbers: 1, 6, 15, 20, 15, 6, 1. It’s the same combinatorics showing up in algebra, probability, and even genetics (Punnett square ratios follow these same patterns).

Section 11

Real-World Domains

🔐

Cryptography

Key space size for a cipher is a permutation calculation — the number of possible keys directly determines how brute-forceable an encryption scheme is.

🧬

Genetics

Counting possible DNA sequences, or the number of ways alleles can combine in offspring, relies directly on permutation and combination formulas.

🏆

Tournament Brackets

The number of possible ways a single-elimination bracket can play out, or how many unique round-robin schedules exist, is pure combinatorics.

📅

Scheduling

Assigning employees to shifts, or students to exam time slots, is a permutation/combination problem — especially when constraints (no repeats, fixed roles) apply.

🧪

Quality Control

Choosing a random sample of r items from a batch of n to inspect for defects is a classic combination — order of inspection doesn’t matter.

🎲

Game Design

Loot drop tables, card game deck compositions, and probability balancing in games all rely on combinatorics to calculate fair odds.

Section 12

Code Examples — Python

Using math.perm() and math.comb() (Python 3.8+)

Python
import math

# Olympic podium — 3 medals from 8 finalists, order matters
print(math.perm(8, 3))     # 336

# Lottery — choose 6 numbers from 49, order doesn't matter
print(math.comb(49, 6))    # 13983816

# Password letters — 2 of 26, no repeats, order matters
print(math.perm(26, 2))    # 650

# Pizza toppings — choose 3 of 8, order doesn't matter
print(math.comb(8, 3))     # 56

# PIN code — permutation WITH repetition (not built into math module)
pin_combos = 10 ** 4
print(pin_combos)          # 10000

# Ice cream scoops — combination WITH repetition (stars and bars)
ice_cream = math.comb(5 + 3 - 1, 3)
print(ice_cream)          # 35

Generating the actual arrangements with itertools

Python
from itertools import permutations, combinations

runners = ['A', 'B', 'C', 'D']

# All ordered podium outcomes (top 3 of 4 runners)
podiums = list(permutations(runners, 3))
print(len(podiums))      # 24  =  4P3
print(podiums[:3])
# [('A','B','C'), ('A','B','D'), ('A','C','B'), ...]

# All unordered committees (any 3 of 4 people)
committees = list(combinations(runners, 3))
print(len(committees))   # 4  =  4C3
print(committees)
# [('A','B','C'), ('A','B','D'), ('A','C','D'), ('B','C','D')]

Section 13

Knowledge Quiz

Click a question to expand it, then pick your answer.

If swapping the order of your chosen items changes the result (different roles, positions, or sequence), it’s a permutation. If the same items in any order count as the same outcome, it’s a combination.
0! = 1 by definition. Think of factorial as “number of ways to arrange these items” — with zero items, there’s exactly one way to arrange them: the empty arrangement. This convention also keeps the nPr and nCr formulas working correctly when r = n.
The three roles are distinct (line leader ≠ door holder ≠ paper collector), so order/role matters — this is a permutation. P(20,3) = 20 × 19 × 18 = 6,840.
A hand of {A♠, K♥, 7♦, 3♣, 2♠} is the same hand no matter which card was dealt first. Since order doesn’t affect the outcome, it’s counted with combinations: C(52,5) = 2,598,960.
PIN digits can repeat (like 1-1-2-2) and order matters (position 1 ≠ position 2). This is “permutation with repetition”: n choices raised to the power of r positions → 10⁴ = 10,000.
Every entry in Pascal’s Triangle is a combination: row n, position k gives C(n,k). Row 6’s entries (1,6,15,20,15,6,1) are C(6,0) through C(6,6) — and indeed C(6,3) = 20.

Comments

No comments yet. Why don’t you start the discussion?

Leave a Reply

Your email address will not be published. Required fields are marked *