Permutations and combinations are fundamental concepts in combinatorics, dealing with the arrangement and selection of objects from a set.
Factorials
Before diving into permutations and combinations, it's essential to understand factorials.
The factorial of a non-negative integer n, denoted by n!, is the product of all positive integers less than or equal to n.
n!=n×(n−1)×(n−2)×⋯×3×2×1
By definition, 0!=1.
Example:
5!=5×4×3×2×1=120
Permutations
Permutations refer to the arrangement of objects where the order matters. If you change the order of the objects, it's considered a different permutation.
1. Permutations of n distinct objects taken r at a time
The number of permutations of n distinct objects taken r at a time is given by the formula:
P(n,r)=(n−r)!n!
Example 1: Arranging a subset
How many ways can you arrange 3 different books on a shelf from a selection of 5 different books?
Here, n=5 (total books) and r=3 (books to arrange).
P(5,3)=(5−3)!5!=2!5!=2×15×4×3×2×1=5×4×3=60
There are 60 ways to arrange the books.
2. Permutations of n distinct objects taken n at a time
This is a special case where r=n. The formula simplifies to:
P(n,n)=(n−n)!n!=0!n!=1n!=n!
Example 2: Arranging all objects
How many different ways can the letters of the word "MATH" be arranged?
Here, n=4 (total letters) and r=4 (all letters are used).
P(4,4)=4!=4×3×2×1=24
There are 24 different arrangements.
3. Permutations with Repetition (Identical Objects)
If there are n objects where n1 are of one type, n2 are of a second type, ..., nk are of a k-th type, and n1+n2+⋯+nk=n, then the number of distinct permutations is:
n1!n2!…nk!n!
Example 3: Arranging letters with repetition
How many distinct arrangements can be made from the letters of the word "MISSISSIPPI"?
Here, n=11 (total letters).
M: 1 (n1=1)
I: 4 (n2=4)
S: 4 (n3=4)
P: 2 (n4=2)
Number of distinct arrangements = 1!4!4!2!11!=1×24×24×239,916,800=115239,916,800=34,650
There are 34,650 distinct arrangements.
Combinations
Combinations refer to the selection of objects where the order does not matter. If you select a group of objects, changing the order in which you picked them does not create a new combination.
1. Combinations of n distinct objects taken r at a time
The number of combinations of n distinct objects taken r at a time is given by the formula:
C(n,r)=(rn)=r!(n−r)!n!
Note that C(n,r)=r!P(n,r). This shows that for every r! permutations, there is only 1 combination.
Example 4: Selecting a committee
A committee of 3 people is to be chosen from a group of 7 people. How many different committees can be formed?
Here, n=7 (total people) and r=3 (people to choose). The order of selection does not matter for a committee.
C(7,3)=3!(7−3)!7!=3!4!7!=(3×2×1)(4×3×2×1)7×6×5×4×3×2×1=3×2×17×6×5=7×5=35
There are 35 different committees that can be formed.
Example 5: Selecting items from a menu
A student needs to choose 2 subjects from a list of 4 optional subjects. How many ways can the student choose the subjects?
Here, n=4 (total subjects) and r=2 (subjects to choose). The order of choosing subjects does not matter.
C(4,2)=2!(4−2)!4!=2!2!4!=(2×1)(2×1)4×3×2×1=212=6
There are 6 ways to choose the subjects.
Key Difference: Order Matters vs. Order Does Not Matter
- Permutations: Use when the order or arrangement of the selected items is important (e.g., arranging books, forming a password, assigning positions).
- Combinations: Use when only the selection or group of items is important, and their order does not change the outcome (e.g., choosing a committee, selecting lottery numbers, picking cards).