Sets and Counting Copyright © Cengage Learning. All rights reserved. 6.4 Permutations and Combinations Copyright © Cengage Learning.
Download ReportTranscript Sets and Counting Copyright © Cengage Learning. All rights reserved. 6.4 Permutations and Combinations Copyright © Cengage Learning.
Slide 1
6
Sets and Counting
Copyright © Cengage Learning. All rights reserved.
Slide 2
6.4
Permutations and Combinations
Copyright © Cengage Learning. All rights reserved.
Slide 3
Permutations and Combinations
Certain classes of counting problems come up frequently,
and it is useful to develop formulas to deal with them.
3
Slide 4
Example 1 – Casting
Ms. Birkitt, the English teacher at Brakpan Girls High
School, wanted to stage a production of R. B. Sheridan’s
play, The School for Scandal. The casting was going well
until she was left with five unfilled characters and five
seniors who were yet to be assigned roles. The characters
were Lady Sneerwell, Lady Teazle, Mrs. Candour, Maria,
and Snake; while the unassigned seniors were April, May,
June, Julia and Augusta.
How many possible assignments are there?
4
Slide 5
Example 1 – Solution
To decide on a specific assignment, we use the following
algorithm:
Step 1: Choose a senior to play Lady Sneerwell; 5 choices.
Step 2: Choose one of the remaining seniors to play Lady
Teazle; 4 choices.
Step 3: Choose one of the now remaining seniors to play
Mrs. Candour; 3 choices.
5
Slide 6
Example 1 – Solution
cont’d
Step 4: Choose one of the now remaining seniors to play
Maria; 2 choices.
Step 5: Choose the remaining senior to play Snake;
1 choice.
Thus, there are 5 4 3 2 1 = 120 possible
assignments of seniors to roles.
6
Slide 7
Permutations and Combinations
What the situation in Example 1 has in common with many
others is that we start with a set—here the set of seniors—
and we want to know how many ways we can put
the elements of that set in order in a list.
In this example, an ordered list of the five seniors—say,
1. May
2. Augusta
3. June
7
Slide 8
Permutations and Combinations
4. Julia
5. April
corresponds to a particular casting:
Cast
Lady Sneerwell
May
Lady Teazle
Augusta
Mrs. Candour
June
Maria
Julia
Snake
April
8
Slide 9
Permutations and Combinations
We call an ordered list of items a permutation of those
items.
If we have n items, how many permutations of those items
are possible? We can use a decision algorithm similar to
the one we used in the Example 1 to select a
permutation.
9
Slide 10
Permutations and Combinations
Step 1: Select the first item; n choices.
Step 2: Select the second item; n – 1 choices.
Step 3: Select the third item; n – 2 choices.
...
Step n – 1: Select the next-to-last item; 2 choices.
Step n: Select the last item; 1 choice.
Thus, there are n (n – 1) (n – 2) . . . 2 1 possible
permutations.
We call this number n factorial, which we write as n!
10
Slide 11
Permutations and Combinations
Permutations
A permutation of n items is an ordered list of those items.
The number of possible permutations of n items is given by
n factorial, which is
n! = n (n – 1) (n – 2) . . . 2 1
for n a positive integer, and
0! = 1.
11
Slide 12
Permutations and Combinations
Visualizing Permutations
Permutations of 3 colors in a flag:
12
Slide 13
Permutations and Combinations
Quick Example
The number of permutations of five items is
5! = 5 4 3 2 1 = 120.
Sometimes, instead of constructing an ordered list of all the
items of a set, we might want to construct a list of only
some of the items.
So, we can generalize our definition of permutation to allow
for the case in which we use only some of the items, not all.
13
Slide 14
Permutations and Combinations
Check that, if r = n below, this is the same definition we
give for permutation of n items.
Permutations of n items taken r at a time
A permutation of n items taken r at a time is an ordered
list of r items chosen from a set of n items. The number of
permutations of n items taken r at a time is given by
P(n, r) = n (n – 1) (n – 2) . . . (n – r + 1)
(there are r terms multiplied together). We can also write
14
Slide 15
Permutations and Combinations
Quick Example
The number of permutations of six items taken two at a
time is
P(6, 2) = 6 5 = 30
which we could also calculate as
15
Slide 16
Permutations and Combinations
For ordered lists we used the word permutation; for
unordered sets we use the word combination.
Permutations and Combinations
A permutation of n items taken r at a time is an ordered list
of r items chosen from n. A combination of n items taken r
at a time is an unordered set of r items chosen from n.
Visualizing
16
Slide 17
Permutations and Combinations
Note
Because lists are usually understood to be ordered, when
we refer to a list of items, we will always mean an ordered
list. Similarly, because sets are understood to be
unordered, when we refer to a set of items we will always
mean an unordered set.
In short:
Lists are ordered. Sets are unordered.
17
Slide 18
Permutations and Combinations
Quick Example
There are six permutations of the three letters a, b, c taken
two at a time:
1. a, b; 2. b, a;
3. a, c;
4. c, a; 5. b, c;
6. c, b.
There are six lists containing two of the letters a, b, c.
There are three combinations of the three letters a, b, c
taken two at a time:
1. {a, b}; 2. {a, c}; 3. {b, c}.
There are three sets containing two of the letters a, b, c.
18
Slide 19
Permutations and Combinations
How do we count the number of possible combinations of
n items taken r at a time? The number of permutations is
P(n, r), but each set of r items occurs r! times because this
is the number of ways in which those r items can be
ordered.
So, the number of combinations is P(n, r)/r!.
19
Slide 20
Permutations and Combinations
Combinations of n items taken r at a time
The number of combinations of n items taken r at a time
is given by
We can also write
20
Slide 21
Permutations and Combinations
Quick Example
The number of combinations of six items taken two at a
time is
which we can also calculate as
21
Slide 22
Permutations and Combinations
Note
There are other common notations for C(n, r). Calculators
often have nCr . In mathematics we often write
which is
also known as a binomial coefficient.
Because C(n, r) is the number of ways of choosing a set of
r items from n, it is often read “n choose r.”
22
6
Sets and Counting
Copyright © Cengage Learning. All rights reserved.
Slide 2
6.4
Permutations and Combinations
Copyright © Cengage Learning. All rights reserved.
Slide 3
Permutations and Combinations
Certain classes of counting problems come up frequently,
and it is useful to develop formulas to deal with them.
3
Slide 4
Example 1 – Casting
Ms. Birkitt, the English teacher at Brakpan Girls High
School, wanted to stage a production of R. B. Sheridan’s
play, The School for Scandal. The casting was going well
until she was left with five unfilled characters and five
seniors who were yet to be assigned roles. The characters
were Lady Sneerwell, Lady Teazle, Mrs. Candour, Maria,
and Snake; while the unassigned seniors were April, May,
June, Julia and Augusta.
How many possible assignments are there?
4
Slide 5
Example 1 – Solution
To decide on a specific assignment, we use the following
algorithm:
Step 1: Choose a senior to play Lady Sneerwell; 5 choices.
Step 2: Choose one of the remaining seniors to play Lady
Teazle; 4 choices.
Step 3: Choose one of the now remaining seniors to play
Mrs. Candour; 3 choices.
5
Slide 6
Example 1 – Solution
cont’d
Step 4: Choose one of the now remaining seniors to play
Maria; 2 choices.
Step 5: Choose the remaining senior to play Snake;
1 choice.
Thus, there are 5 4 3 2 1 = 120 possible
assignments of seniors to roles.
6
Slide 7
Permutations and Combinations
What the situation in Example 1 has in common with many
others is that we start with a set—here the set of seniors—
and we want to know how many ways we can put
the elements of that set in order in a list.
In this example, an ordered list of the five seniors—say,
1. May
2. Augusta
3. June
7
Slide 8
Permutations and Combinations
4. Julia
5. April
corresponds to a particular casting:
Cast
Lady Sneerwell
May
Lady Teazle
Augusta
Mrs. Candour
June
Maria
Julia
Snake
April
8
Slide 9
Permutations and Combinations
We call an ordered list of items a permutation of those
items.
If we have n items, how many permutations of those items
are possible? We can use a decision algorithm similar to
the one we used in the Example 1 to select a
permutation.
9
Slide 10
Permutations and Combinations
Step 1: Select the first item; n choices.
Step 2: Select the second item; n – 1 choices.
Step 3: Select the third item; n – 2 choices.
...
Step n – 1: Select the next-to-last item; 2 choices.
Step n: Select the last item; 1 choice.
Thus, there are n (n – 1) (n – 2) . . . 2 1 possible
permutations.
We call this number n factorial, which we write as n!
10
Slide 11
Permutations and Combinations
Permutations
A permutation of n items is an ordered list of those items.
The number of possible permutations of n items is given by
n factorial, which is
n! = n (n – 1) (n – 2) . . . 2 1
for n a positive integer, and
0! = 1.
11
Slide 12
Permutations and Combinations
Visualizing Permutations
Permutations of 3 colors in a flag:
12
Slide 13
Permutations and Combinations
Quick Example
The number of permutations of five items is
5! = 5 4 3 2 1 = 120.
Sometimes, instead of constructing an ordered list of all the
items of a set, we might want to construct a list of only
some of the items.
So, we can generalize our definition of permutation to allow
for the case in which we use only some of the items, not all.
13
Slide 14
Permutations and Combinations
Check that, if r = n below, this is the same definition we
give for permutation of n items.
Permutations of n items taken r at a time
A permutation of n items taken r at a time is an ordered
list of r items chosen from a set of n items. The number of
permutations of n items taken r at a time is given by
P(n, r) = n (n – 1) (n – 2) . . . (n – r + 1)
(there are r terms multiplied together). We can also write
14
Slide 15
Permutations and Combinations
Quick Example
The number of permutations of six items taken two at a
time is
P(6, 2) = 6 5 = 30
which we could also calculate as
15
Slide 16
Permutations and Combinations
For ordered lists we used the word permutation; for
unordered sets we use the word combination.
Permutations and Combinations
A permutation of n items taken r at a time is an ordered list
of r items chosen from n. A combination of n items taken r
at a time is an unordered set of r items chosen from n.
Visualizing
16
Slide 17
Permutations and Combinations
Note
Because lists are usually understood to be ordered, when
we refer to a list of items, we will always mean an ordered
list. Similarly, because sets are understood to be
unordered, when we refer to a set of items we will always
mean an unordered set.
In short:
Lists are ordered. Sets are unordered.
17
Slide 18
Permutations and Combinations
Quick Example
There are six permutations of the three letters a, b, c taken
two at a time:
1. a, b; 2. b, a;
3. a, c;
4. c, a; 5. b, c;
6. c, b.
There are six lists containing two of the letters a, b, c.
There are three combinations of the three letters a, b, c
taken two at a time:
1. {a, b}; 2. {a, c}; 3. {b, c}.
There are three sets containing two of the letters a, b, c.
18
Slide 19
Permutations and Combinations
How do we count the number of possible combinations of
n items taken r at a time? The number of permutations is
P(n, r), but each set of r items occurs r! times because this
is the number of ways in which those r items can be
ordered.
So, the number of combinations is P(n, r)/r!.
19
Slide 20
Permutations and Combinations
Combinations of n items taken r at a time
The number of combinations of n items taken r at a time
is given by
We can also write
20
Slide 21
Permutations and Combinations
Quick Example
The number of combinations of six items taken two at a
time is
which we can also calculate as
21
Slide 22
Permutations and Combinations
Note
There are other common notations for C(n, r). Calculators
often have nCr . In mathematics we often write
which is
also known as a binomial coefficient.
Because C(n, r) is the number of ways of choosing a set of
r items from n, it is often read “n choose r.”
22