Permutations and
Combinations
Chapter:6
The Basics of Counting
Sum and Product Rule Examples:
• Sarah can either take a bus or a train to get to work. If
there are 5 different bus routes and 3 different train
routes available, how many different transportation
options does Sarah have?
• Answer: 8 different transportation options. (5+3=8)
• Suppose a license plate consists of 4 letters followed by
three digits. If there are 26 possible letters and 10
possible digits, how many unique license plates can be
made?
• Answer: 26.26.26.26.10.10.10=456,976,000.
Problem: A coding club has three types of workshops:
Beginner, Intermediate, and Advanced.
• The Beginner level has 2 workshop options.
• The Intermediate level has 3 workshop options.
• The Advanced level has 2 workshop options.
Each member can sign up for one workshop from either
the Beginner or Intermediate levels, or they can take
both an Intermediate and an Advanced workshop
together.
How many total ways are there for a member to choose
their workshops?
There are 2 Beginner workshop options. There are 3 Intermediate workshop options.
Using the product rule for both workshops: 3×2=6
2+3+6=11
Permutations
• A permutation of a set of distinct objects is an
ordered arrangement these objects.
• An ordered arrangement of r elements of a set is
called an r-permutation.
• The number of r-permutations of a set with n
elements is denoted by P(n,r).
A = {1,2,3,4} 2-permutations of A include 1,2; 2,1;
1,3; 2,3; etc…
Counting Permutations
• Using the product rule we can find P(n,r)
= n*(n-1)*(n-2)* …*(n-r+1)
= n!/(n-r)!
How many 2-permutations are there for the
set {1,2,3,4}? P(4,2)
12
!
2
!
4
1
*
2
1
*
2
*
3
*
4
3
*
4 


Examples
• You have 5 different books. In how many different ways
can you arrange these 5 books on a shelf?
• The number of ways to arrange n distinct items is n!
• 5!=5×4×3×2×1=120.
• A password consists of 3 different letters chosen from the
letters A, B, C, D, and E. How many unique passwords
can be created if the order of letters matters?
• Here, n=5 and r=3.
• By using formula: 60
Example
• A team of 7 people needs to assign roles of chair,
vice-chair, and secretary. In how many different
ways can these roles be assigned?
• Use P(7,3)=7!/(7−3)! = 7×6×5=210.
Combinations
• An r-combination of elements of a set is an
unordered selection of r element from the set.
(i.e., an r-combination is simply a subset of the
set with r elements).
Let A={1,2,3,4} 3-combinations of A are
{1,2,3}, {1,2,4}, {1,3,4}, {2,3,4} (same as {3,2,4})
• The number of r-combinations of a set with n
distinct elements is denoted by C(n,r).
Example
Let A = {1,2,3}
2-permutations of A are: 1,2 2,1 1,3 3,1 2,3 3,2
6 total. Order is important
2-combinations of A are: {1,2}, {1,3}, {2,3}
3 total. Order is not important
If we counted the number of permutations of each 2-
combination we could figure out P(3,2)!
How to compute C(n,r)
• To find P(n,r), we could first find C(n,r), then
order each subset of r elements to count the
number of different orderings. P(n,r) =
C(n,r)P(r,r).
• So, C(n,r) = P(n,r) / P(r,r)
)!
(
!
!
!
)!
(
)!
(
!
)!
(
!
)!
(
!
r
n
r
n
r
r
n
r
r
n
r
r
r
r
n
n








Examples:
• A club has 10 members. How many ways can the
club choose 3 members to form a committee?
• C(10,3)=120
• An ice cream shop offers 8 different flavors. How
many ways can you choose 3 flavors for a
sundae?
• C(8,3)=56

Permutations and Combinations in discrete Mathematics

  • 1.
  • 2.
    Sum and ProductRule Examples: • Sarah can either take a bus or a train to get to work. If there are 5 different bus routes and 3 different train routes available, how many different transportation options does Sarah have? • Answer: 8 different transportation options. (5+3=8) • Suppose a license plate consists of 4 letters followed by three digits. If there are 26 possible letters and 10 possible digits, how many unique license plates can be made? • Answer: 26.26.26.26.10.10.10=456,976,000.
  • 3.
    Problem: A codingclub has three types of workshops: Beginner, Intermediate, and Advanced. • The Beginner level has 2 workshop options. • The Intermediate level has 3 workshop options. • The Advanced level has 2 workshop options. Each member can sign up for one workshop from either the Beginner or Intermediate levels, or they can take both an Intermediate and an Advanced workshop together. How many total ways are there for a member to choose their workshops? There are 2 Beginner workshop options. There are 3 Intermediate workshop options. Using the product rule for both workshops: 3×2=6 2+3+6=11
  • 4.
    Permutations • A permutationof a set of distinct objects is an ordered arrangement these objects. • An ordered arrangement of r elements of a set is called an r-permutation. • The number of r-permutations of a set with n elements is denoted by P(n,r). A = {1,2,3,4} 2-permutations of A include 1,2; 2,1; 1,3; 2,3; etc…
  • 5.
    Counting Permutations • Usingthe product rule we can find P(n,r) = n*(n-1)*(n-2)* …*(n-r+1) = n!/(n-r)! How many 2-permutations are there for the set {1,2,3,4}? P(4,2) 12 ! 2 ! 4 1 * 2 1 * 2 * 3 * 4 3 * 4   
  • 6.
    Examples • You have5 different books. In how many different ways can you arrange these 5 books on a shelf? • The number of ways to arrange n distinct items is n! • 5!=5×4×3×2×1=120. • A password consists of 3 different letters chosen from the letters A, B, C, D, and E. How many unique passwords can be created if the order of letters matters? • Here, n=5 and r=3. • By using formula: 60
  • 7.
    Example • A teamof 7 people needs to assign roles of chair, vice-chair, and secretary. In how many different ways can these roles be assigned? • Use P(7,3)=7!/(7−3)! = 7×6×5=210.
  • 8.
    Combinations • An r-combinationof elements of a set is an unordered selection of r element from the set. (i.e., an r-combination is simply a subset of the set with r elements). Let A={1,2,3,4} 3-combinations of A are {1,2,3}, {1,2,4}, {1,3,4}, {2,3,4} (same as {3,2,4}) • The number of r-combinations of a set with n distinct elements is denoted by C(n,r).
  • 9.
    Example Let A ={1,2,3} 2-permutations of A are: 1,2 2,1 1,3 3,1 2,3 3,2 6 total. Order is important 2-combinations of A are: {1,2}, {1,3}, {2,3} 3 total. Order is not important If we counted the number of permutations of each 2- combination we could figure out P(3,2)!
  • 10.
    How to computeC(n,r) • To find P(n,r), we could first find C(n,r), then order each subset of r elements to count the number of different orderings. P(n,r) = C(n,r)P(r,r). • So, C(n,r) = P(n,r) / P(r,r) )! ( ! ! ! )! ( )! ( ! )! ( ! )! ( ! r n r n r r n r r n r r r r n n        
  • 11.
    Examples: • A clubhas 10 members. How many ways can the club choose 3 members to form a committee? • C(10,3)=120 • An ice cream shop offers 8 different flavors. How many ways can you choose 3 flavors for a sundae? • C(8,3)=56