Sub topic 2
Factorials and Arranging n Distinct Objects
Prerequisites and the factorial idea
Assume you can simplify products and fractions, read basic word problems, and use exponents. This chapter uses the multiplication principle: if one step has \(a\) choices and the next has \(b\) choices, the complete process has \(a \times b\) outcomes.
A factorial is the product of all positive integers from a number down to 1. It is written with an exclamation mark:
\[ n! = n(n-1)(n-2)\cdots 2 \times 1 \]
For example,
\[ 5! = 5 \times 4 \times 3 \times 2 \times 1 = 120 \]
By definition, \(0! = 1\). This value makes factorial formulas work consistently.
Arranging distinct objects
Suppose five distinct books must be placed on a shelf. The first position has 5 choices. After one book is used, the second position has 4 choices. The choices continue as \(3\), \(2\), and \(1\).
Therefore,
\[ 5 \times 4 \times 3 \times 2 \times 1 = 5! \]
The number of arrangements of \(n\) distinct objects in a row is:
\[ \boxed{n!} \]
“Distinct” means that the objects can be told apart. For example, five books with different titles are distinct.
If only \(r\) positions are filled from \(n\) distinct objects, the number of ordered arrangements is:
\[ n(n-1)(n-2)\cdots(n-r+1) \]
Using factorials, this becomes:
\[ \frac{n!}{(n-r)!} \]
The denominator removes the unused final factors.
| Situation | Number of arrangements |
|---|---|
| Arrange all \(n\) distinct objects | \(n!\) |
| Fill \(r\) ordered positions from \(n\) objects | \(\frac{n!}{(n-r)!}\) |
| Arrange no objects | \(0! = 1\) |
import math
n, r = 5, 3
all_objects = math.factorial(n)
three_positions = math.factorial(n) // math.factorial(n - r)
print(all_objects) # 120
print(three_positions) # 60A reliable counting pattern
For each arrangement problem:
- Identify the positions or steps.
- Count the choices available at each step.
- Multiply those choices.
- Convert the product to factorial notation when useful.
For example, the number of ways to assign a president, secretary, and treasurer from 8 people is:
\[ 8 \times 7 \times 6 = \frac{8!}{5!} = 336 \]
The roles are different, so assigning A as president and B as secretary is different from assigning B as president and A as secretary.
Exercise
How many ways can 4 distinct students be arranged in a row from a class of 7 students?
Show answer
The positions have 7, 6, 5, and 4 choices, so the answer is \(7 \times 6 \times 5 \times 4 = \frac{7!}{3!} = 840\).