copyright © cengage learning. all rights reserved. 6 sets and counting

22
1 Copyright © Cengage Learning. All rights reserved. 6 Sets and Counting

Upload: morgan-thoburn

Post on 30-Mar-2015

213 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Copyright © Cengage Learning. All rights reserved. 6 Sets and Counting

Copyright © Cengage Learning. All rights reserved.

6 Sets and Counting

Page 2: Copyright © Cengage Learning. All rights reserved. 6 Sets and Counting

Copyright © Cengage Learning. All rights reserved.

6.4 Permutations and Combinations

Page 3: Copyright © Cengage Learning. All rights reserved. 6 Sets and Counting

3

Permutations and Combinations

Certain classes of counting problems come up frequently,

and it is useful to develop formulas to deal with them.

Page 4: Copyright © Cengage Learning. All rights reserved. 6 Sets and Counting

4

Example 1 – Casting

Ms. Birkitt, the English teacher at Brakpan Girls HighSchool, wanted to stage a production of R. B. Sheridan’splay, The School for Scandal. The casting was going welluntil she was left with five unfilled characters and fiveseniors who were yet to be assigned roles. The characterswere 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?

Page 5: Copyright © Cengage Learning. All rights reserved. 6 Sets and Counting

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.

Page 6: Copyright © Cengage Learning. All rights reserved. 6 Sets and Counting

6

Example 1 – Solution

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.

cont’d

Page 7: Copyright © Cengage Learning. All rights reserved. 6 Sets and Counting

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

Page 8: Copyright © Cengage Learning. All rights reserved. 6 Sets and Counting

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

Page 9: Copyright © Cengage Learning. All rights reserved. 6 Sets and Counting

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.

Page 10: Copyright © Cengage Learning. All rights reserved. 6 Sets and Counting

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!

Page 11: Copyright © Cengage Learning. All rights reserved. 6 Sets and Counting

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.

Page 12: Copyright © Cengage Learning. All rights reserved. 6 Sets and Counting

12

Permutations and Combinations

Visualizing Permutations

Permutations of 3 colors in a flag:

Page 13: Copyright © Cengage Learning. All rights reserved. 6 Sets and Counting

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.

Page 14: Copyright © Cengage Learning. All rights reserved. 6 Sets and Counting

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

Page 15: Copyright © Cengage Learning. All rights reserved. 6 Sets and Counting

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

Page 16: Copyright © Cengage Learning. All rights reserved. 6 Sets and Counting

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

Page 17: Copyright © Cengage Learning. All rights reserved. 6 Sets and Counting

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.

Page 18: Copyright © Cengage Learning. All rights reserved. 6 Sets and Counting

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 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 six lists containing two of the letters a, b, c.

There are three sets containing two of the letters a, b, c.

Page 19: Copyright © Cengage Learning. All rights reserved. 6 Sets and Counting

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 !.

Page 20: Copyright © Cengage Learning. All rights reserved. 6 Sets and Counting

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

Page 21: Copyright © Cengage Learning. All rights reserved. 6 Sets and Counting

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

Page 22: Copyright © Cengage Learning. All rights reserved. 6 Sets and Counting

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.”