Quiz 2

Permutations — Arranging Items in Order

1953 words
10 min read
Python Week 1: the first filter for runtime behavior
Visual companion
Python
Type and operator map

Python Week 1: the first filter for runtime behavior

View
Revision summary

What this note is really saying

Short form

# Permutations — Arranging Items in Order ## 🎯 Learning Objectives After completing this topic, you will be able to: - Calculate the number of **permutations** of n distinct items taken r at a time - Distinguish between permutations with and without **repetition** - Recognize when **order matters** in a counting pr...

Permutations — Arranging Items in Order

🎯 Learning Objectives

After completing this topic, you will be able to:
  • Calculate the number of permutations of n distinct items taken r at a time
  • Distinguish between permutations with and without repetition
  • Recognize when order matters in a counting problem
  • Solve problems involving arrangements, seating, and ranking
  • Understand circular permutations and when to use them

📋 Prerequisites

  • Counting Fundamentals (08-counting-fundamentals) — multiplication rule and factorial notation
  • Basic algebra: simplifying fractions

📖 Core Content

10.1 Intuition: When Order Matters

Permutations count the number of ways to arrange items where order matters. Key question: Does swapping two items create a different outcome?
  • Arranging 3 books on a shelf: ABC ≠ ACB → Order matters → Permutation
  • Choosing 3 students for a committee: {A,B,C} = {C,B,A} → Order doesn't matter → Combination (next topic)
Everyday analogy: A combination lock is actually a permutation lock! The order of numbers matters: 1-2-3 is different from 3-2-1. Real combinations (order doesn't matter) would make locks very insecure. 🔑 Key Insight: If the problem uses words like "arrange," "order," "rank," "line up," "sequence," or "first, second, third," it's likely a permutation.

10.2 Permutations of n Distinct Items Taken r at a Time

10.2.1 Intuition

You have n distinct items and want to arrange r of them in order. How many ways? Example: 10 students, choose 3 for first, second, third prizes.
  • First prize: 10 choices
  • Second prize: 9 remaining choices
  • Third prize: 8 remaining choices
10×9×8=72010 \times 9 \times 8 = 720

10.2.2 Formula

P(n,r)=n!(nr)!=n×(n1)××(nr+1)P(n, r) = \frac{n!}{(n-r)!} = n \times (n-1) \times \cdots \times (n-r+1)
Where:
  • nn = total number of items
  • rr = number of items to arrange (rnr \leq n)
  • P(n,r)P(n, r) = number of permutations

10.2.3 Verification with Example

P(10,3)=10!(103)!=10!7!=10×9×8×7!7!=10×9×8=720P(10, 3) = \frac{10!}{(10-3)!} = \frac{10!}{7!} = \frac{10 \times 9 \times 8 \times 7!}{7!} = 10 \times 9 \times 8 = 720

10.3 Permutations of All n Items

When we arrange all n items:
P(n,n)=n!P(n, n) = n!
Example: 5 books on a shelf → 5! = 120 arrangements.

10.4 Permutations with Repetition

When items can be repeated (e.g., digits in a password), the number of arrangements of n items taken r at a time with repetition allowed is:
nrn^r
Example: 4-digit PIN (digits 0-9, can repeat) → 104=10,00010^4 = 10,000

10.5 Permutations with Identical Items

When some items are identical, the number of distinct arrangements is reduced. Formula: If we have n items where n1n_1 are identical of type 1, n2n_2 of type 2, etc.:
n!n1!×n2!××nk!\frac{n!}{n_1! \times n_2! \times \cdots \times n_k!}

Example

How many distinct words can be formed from "MISSISSIPPI"? Letters: M(1), I(4), S(4), P(2) → total 11 letters.
11!1!×4!×4!×2!=39,916,8001×24×24×2=39,916,8001,152=34,650\frac{11!}{1! \times 4! \times 4! \times 2!} = \frac{39,916,800}{1 \times 24 \times 24 \times 2} = \frac{39,916,800}{1,152} = 34,650

10.6 Circular Permutations

When arranging items in a circle, rotations are considered the same. Formula: Number of circular arrangements of n distinct items:
(n1)!(n-1)!
Why? In a circle, there's no fixed starting point. Fix one item (to break the rotational symmetry) and arrange the remaining (n-1) items.

Example

In how many ways can 6 people sit around a circular table?
(61)!=5!=120(6-1)! = 5! = 120
If the table has numbered seats (fixed positions), it's a linear arrangement: 6! = 720.

10.7 Decision Flowchart

(Diagram)

10.8 Worked Examples

Example 1: Basic Permutation (Easy)

Scenario: 8 runners compete in a race. How many ways to award gold, silver, and bronze medals? Solution: This is P(8,3)P(8, 3) — choose 3 of 8 in order.
P(8,3)=8×7×6=336P(8, 3) = 8 \times 7 \times 6 = 336
Alternative: 8!5!=40320120=336\frac{8!}{5!} = \frac{40320}{120} = 336 Interpretation: There are 336 different ways the top 3 positions can be filled.

Example 2: Arranging Letters (Medium)

Scenario: How many distinct arrangements of the word "BANANA"? Solution: Letters: B(1), A(3), N(2) → total 6 letters.
6!1!×3!×2!=7201×6×2=72012=60\frac{6!}{1! \times 3! \times 2!} = \frac{720}{1 \times 6 \times 2} = \frac{720}{12} = 60
Interpretation: There are 60 distinct "words" that can be formed. Compare this with 6! = 720 if all letters were distinct — the identical letters dramatically reduce the count.

Example 3: Arrangements with Restrictions (Harder)

Scenario: How many ways can 5 men and 4 women be seated in a row if: a) No restrictions b) All women sit together c) Men and women alternate Solution: a) No restrictions: 9 people in a row → 9!=362,8809! = 362,880 b) All women together:
  • Treat the 4 women as a block: now we have 5 men + 1 block = 6 "items"
  • Arrange the 6 items: 6! = 720
  • Arrange women within the block: 4! = 24
  • Total: 720×24=17,280720 \times 24 = 17,280 c) Men and women alternate:
  • Since there are 5 men and 4 women, the row must start and end with men: M W M W M W M W M
  • Arrange men in their 5 positions: 5! = 120
  • Arrange women in their 4 positions: 4! = 24
  • Total: 120×24=2,880120 \times 24 = 2,880

10.9 Edge Cases & Gotchas

When r > n

P(n,r)P(n, r) is defined as 0 when r>nr > n — you can't arrange more items than you have.

The Difference Between "Distinct" and "Identical"

Always check if objects are distinct (every item different) or if some are identical. Identical items drastically reduce the number of distinct permutations.

Zero Factorial

0!=10! = 1 — there's exactly one way to arrange zero objects (do nothing). This convention makes formulas work.

10.10 Why This Matters

Permutations appear in:
  • Probability: Calculating probabilities of specific arrangements
  • Cryptography: Password strength analysis
  • Genetics: DNA sequence analysis
  • Scheduling: Creating tournament brackets, seating charts
  • Statistics: The number of possible rankings in non-parametric tests

📐 Key Formulas / Concepts

SituationFormulaExample
Permutations (no repetition)P(n,r)=n!(nr)!P(n,r) = \frac{n!}{(n-r)!}10 items choose 3 in order: 720
All items arrangedn!n!5 books on a shelf: 120
With repetition allowednrn^r4-digit PIN: 10,000
With identical itemsn!n1!n2!nk!\frac{n!}{n_1! n_2! \cdots n_k!}"BANANA": 60
Circular arrangements(n1)!(n-1)!6 people around table: 120
Distinguishable from nn itemsn!ni!\frac{n!}{\prod n_i!}Arranging letters with repeats

⚠️ Common Pitfalls

Pitfall 1: Confusing Permutations and Combinations

The mistake: Using permutations when order doesn't matter, or vice versa. Why it happens: Both count selections, and the word "choose" is used for both. How to avoid: Ask "Does swapping two selected items create a different outcome?" If yes → permutation. If no → combination.

Pitfall 2: Forgetting to Divide by Identical Item Factorials

The mistake: Computing n!n! for arrangements with identical items. Why it happens: The formula n!n! is drilled in, and students forget to adjust for identical items. Correction: When items are identical, swapping them doesn't create a new arrangement. Divide by the factorial of each count of identical items.

Pitfall 3: Confusing Linear and Circular Permutations

The mistake: Using n!n! for circular arrangements. Why it happens: A circle seems like just another arrangement. Correction: In a circle, rotations are identical. Fix one item and arrange the rest: (n1)!(n-1)!. Only use n!n! if there are fixed positions (numbered seats).

📝 Practice Questions

Q1: Basic Permutation
How many ways can 5 people be arranged in a line?
<details> <strong>Solution</strong>
P(5,5)=5!=5×4×3×2×1=120P(5,5) = 5! = 5 \times 4 \times 3 \times 2 \times 1 = 120
120\boxed{120}
</details> > **Q2: Partial Permutation** > > A class has 12 students. How many ways can a president, vice-president, and secretary be chosen? > > <details> <strong>Solution</strong> > > $P(12,3) = 12 \times 11 \times 10 = 1,320$ > > $\boxed{1,320}$ </details> > **Q3: With Identical Items** > > </strong> > > How many distinct words can be formed from "BOOKKEEPER"? > > <details> <strong>Solution</strong> > > Letters: B(1), O(2), K(2), E(2), P(1), R(1) → total 10 letters. > > $\frac{10!}{1! \times 2! \times 2! \times 2! \times 1! \times 1!} = \frac{3,628,800}{2 \times 2 \times 2} = \frac{3,628,800}{8} = 453,600$ > > $\boxed{453,600}$ </details> > **Q4: Circular Arrangement** > > </strong> > > In how many ways can 7 friends sit around a campfire (circular arrangement)? > > <details> <strong>Solution</strong> > > $(7-1)! = 6! = 720$ > > If the campfire had designated seating (positions marked), it would be $7! = 5,040$. > > $\boxed{720}$ </details> > **Q5: With Repetition** > > </strong> > > How many 3-letter sequences can be formed from the 26 letters if repetition is allowed? > > <details> <strong>Solution</strong> > > $26^3 = 17,576$ > > $\boxed{17,576}$ </details> > **Q6: Restrictions** > > </strong> > > How many ways can 4 men and 3 women be seated in a row if the men must sit together? > > <details> <strong>Solution</strong> > > Treat the 4 men as one block: now we have 1 block + 3 women = 4 items. > > Arrange 4 items: $4! = 24$ Arrange men within block: $4! = 24$ > > Total: $24 \times 24 = 576$ > > $\boxed{576}$ </details> > **Q7: Evaluate P(12,4)** > > </strong> > > Compute $P(12,4)$ using the formula. > > <details> <strong>Solution</strong> > > $P(12,4) = \frac{12!}{(12-4)!} = \frac{12!}{8!} = 12 \times 11 \times 10 \times 9 = 11,880$ > > $\boxed{11,880}$ </details> > **Q8: True or False** > > </strong> > > Determine if each statement is true or false: > > a) $P(5,3) = P(5,2)$ b) $P(7,7) = 7!$ c) $P(10,1) = 10$ > > <details> <strong>Solution</strong> > > a) **False.** $P(5,3) = 5 \times 4 \times 3 = 60$, while $P(5,2) = 5 \times 4 = 20$. They're different. > > b) **True.** Arranging all 7 items: $P(7,7) = 7! = 5,040$. > > c) **True.** $P(10,1) = 10$. There are 10 ways to choose 1 item from 10. </details> > **Q9: Application** > > </strong> > > A license plate has 2 letters (A-Z) followed by 4 digits (0-9). Letters and digits can repeat. How many possible plates? If letters cannot repeat, how many? > > <details> <strong>Solution</strong> > > **With repetition allowed:** $26^2 \times 10^4 = 676 \times 10,000 = 6,760,000$ > > **Without repetition (letters):** $P(26,2) \times 10^4 = 26 \times 25 \times 10,000 = 650 \times 10,000 = 6,500,000$ > > $\boxed{6,760,000 \text{ with repetition},\ 6,500,000 \text{ without}}$ </details> > **Q10: Advanced Restriction** > > </strong> > > How many ways can the letters of "ALGEBRA" be arranged if the two As must NOT be together? > > <details> <strong>Solution</strong> > > **Step 1:** Total arrangements of "ALGEBRA": Letters: A(2), L(1), G(1), E(1), B(1), R(1) → 7 letters $\frac{7!}{2!} = \frac{5040}{2} = 2520$ > > **Step 2:** Arrangements where As are together: Treat AA as one block: now we have 6 items (block + L, G, E, B, R) $6! = 720$ (No need to divide by 2! for the As since they're a block and identical) > > **Step 3:** Arrangements where As are NOT together: $2520 - 720 = 1800$ > > $\boxed{1,800}$ </details> * * * ## 🔗 Cross-References - **Next topic:** [Combinations](/notes/01-foundation-bsma1002-stats-1-week06-10-combinations) — selecting items when order doesn't matter - **Previous:** [Counting Fundamentals](/notes/01-foundation-bsma1002-stats-1-week05-08-counting-fundamentals) — the multiplication rule - **Week 7 (Probability):** Using permutations to calculate probabilities - **Week 11 (Binomial Distribution):** The binomial coefficient - **BSMA1001-maths-1:** Factorial notation from mathematics [Join Discord](https://discord.gg/gE2m4Qrdqv) [Previous**Counting Fundamentals**](/notes/01-foundation-bsma1002-stats-1-week05-08-counting-fundamentals)[Next**Combinations**](/notes/01-foundation-bsma1002-stats-1-week06-10-combinations)
Document outline

Keep your place and jump directly to a heading.

Table of Contents
System Normal // Awaiting Context

Intelligence Hub

Navigate the knowledge graph to generate context. The Hub adapts dynamically to surface backlinks, related notes, and metadata insights.