Transcript Chapter 2

Chapter 2

Section 2.4

Permutations and Combinations

Permutations A

permutation

of a set of

n

elements taken

r

at a time is the number of ways you can pick

r

elements from a set of

n

elements and put them in a list (or attach a label to them). This is denoted with the symbol

n P r

can be computed with the formula to the right.

and

n P r

n

!

(

n

r

)!

Example (previous): If 10 horses run a race in how many different ways can they finish in 1 st , 2 nd , and 3 rd place?

This is the number of ways to pick from the 10 horses 3 of them to label (or list) as 1 st , 2 nd and 3 rd . This we denote as 10

P

3 and is computed as shown below.

10

P

3  10 !

( 10  3 )!

 10 !

 7 !

10  9  8  7  6  5  4  3  2  1 7  6  5  4  3  2  1  10  9  8  720 This is what we got before. Notice that when you are dividing factorials there will be a great deal of canceling. This will make some of the computations easier.

Permutations When the choice of one option restricts the number of choices with the next option (such as in the example of running a race) in the Fundamental Counting Principle we call this a

permutation

. A permutation of a set of

n

things where you want to select

r

of them and also put them in a list or label them is denoted

n P r

.

For example if we run a race with 4 people {Abby (A), Britton (B), Cathy (C), Donna (D)} and want to know how many ways they can finish in 1 st and second place the answer is 4

P

2 . The number in the set is 4 and the number we are selecting out is 2, but we are labeling the two we select as 1 st place and 2 nd place.

From this we get 4

P

2 =12 from the previous example. How is this done in general?

To get the value

n P r

have

r

start with the number

n

and count down by 1 each time until you numbers (factors) you are multiplying together.

start with 4 start with 6 4

P

2 = 4  3 =12 6

P

3 = 6  5  4 =120 2 factors 3 factors start with 10 10

P

5 = 10  9  8  7  6 = 30,240 5 factors start with 100 100

P

4 = 100  99  98  97 = 94,109,400 4 factors

Factorials A number followed by an exclamation point (!) is called a

factorial

. The way you find the value of it is to start with the number and multiply each smaller integer until you get to 1.

1! = 1 2! = 2  1 = 2 3! = 3  2  1 = 6 4! = 4  3  2  1 = 24 5! = 5  4  3  2  1 = 120 6! = 6  5  4  3  2  1 = 720 Pronounced "one factorial" Pronounced "two factorial" Pronounced "three factorial" Pronounced "four factorial" Pronounced "five factorial" Pronounced "six factorial" There is one strange exception to this and that is zero factorial is 1 (i.e. 0! =1).

The factorial calculation idea will make counting some things much easier.

A formula for Permutations Using Factorials.

There is a short formula for permutations that uses the factorial symbol.

n P r

 

n n

!

r

 !

The grouping symbols mean to do the subtraction in the denominator before taking the factorial. (Notice lots of cancellation happens.) In an 8 dog race the number of ways the dogs can win (1 st ), place (2 nd ), and show (3 rd ) is what?

8

P

3  ( 8 8  !

3 )!

 8 5 !

!

 8  7  5  6  4 5   3  4 2   3 1  2  1  8  7  6  336

Permutations of Identical Items How many ways can the letters in the word "TIMES" be arranged?

There are five letter that can occupy one of 5 positions. We can think of it either in terms of the Fundamental Counting Principle or a permutation.

Fundamental Counting Principle 5 4 3 2 1 = 5  4  3  2  1=120 1 st 2 nd 3 rd 4 th 5 th Permutation 5

P

5  5 !

( 5  5 )!

 5 !

0 !

 5  4  3  2  1  120 1 The difficulty that exists is if a letter is repeated. The you must divide by the factorial of the number of times each of the repeated letters is repeated. Find the number of ways to arrange the letters in the "ASSISTANT".

There are 9 letters total we want to arrange. The letter S is repeated 3 times, the letter A is repeated 2 times, and the letter T is repeated 2 times.

3 !

 2 !

 9 !

2 !

 1 !

 1 !

 9  8  7  6  5  4  3  2  1 ( 3  2  1 )  ( 2  1 )  ( 2  1 )  1  1  362 , 880  15 , 120 24 S A T I N

Combinations A

combination

of a set of

n

elements taken

r

at a time is the number of ways you can pick

r

elements from a set of

n

elements. This is denoted with the symbol

n C r

and can be computed with the formula to the right. (Note the distinction with a permutation is that you are just picking them not putting them in a list.)

n C r

n

!

r

!

 (

n

r

)!

Example: A class of 25 students has to elect 4 officers: a president, vice-president, secretary and treasurer. How many ways can this be done if a student can hold only one office?

From the set of 25 we are picking 4 people and attaching the labels: president, vice-president, secretary and treasures, so it is 25

P

4 .

25

P

4  25 !

( 25  4 )!

 25 !

 21 !

25  24  23  22  303 , 600 A class of 25 students has to elect 4 student council representatives. How many ways can this be done?

From the set of 25 we are picking 4 and doing nothing else, so this is 25

C

4 .

25

C

4  25 4 !

 ( 25 !

 4 )!

 25 !

4 !

 21 !

 25  24  23  22 4  3  2  1  25  23  22  12 , 650

A Formula for Combinations There is a formula for finding combinations that uses factorials rather than trying to list all of the different combinations. This is given to the right.

n C r

  

n r

  

n

!

r

!

(

n

r

)!

Again notice all the cancellation that occurs in the examples below.

4

C

2    4 2    4 !

2 !

 ( 4  2 )!

 4 !

2 !

 2 !

 4  3  2  1 ( 2  1 )  ( 2  1 )  4  3 2  1  12 2  6 7

C

4    7 4    7 !

4 !

 3 !

 7  6  5  4  3  2  1 ( 4  3  2  1 )  ( 3  2  1 )  7  6  5 3  2  1  35 100

C

3    100 3    100 !

3 !

 97 !

 100  99  98  97 !

( 3  2  1 )  97 !

 100  99  98 3  2  1  161 , 700

Examples In how many ways can a committee of 5 US Senators be selected?

There are 100 US Senators and we want to know how many ways can 5 be chosen. This is a combination of 5 people selected from a set of 100.

100

C

5    100 5    100 !

5 !

 95 !

 100  99  98  97  96  95 !

( 5  4  3  2  1 )  95 !

 100  99  98  97  96 5  4  3  2  1  75 , 287 , 520 In how many different ways can a 7 card poker hand be dealt from a deck? In a standard deck of cards there are 52. We want to know in how many ways can you choose 7 of them.

52

C

7    52 7    52 !

7 !

 45 !

 52  51  50  49  48  47  46  45 !

( 7  6  5  4  3  2  1 )  45 !

 133 , 784 , 560 In how many different ways can 6 lottery balls be chosen from 49? ( Ohio Lottery ) 49

C

6    49 6    49 !

6 !

 43 !

 49  48  47  46  45  44  43 !

( 6  5  4  3  2  1 )  43 !

 13 , 983 , 816

Example In how many ways can a baseball team of 9 players make a batting order?

What we want to do is select all 9 players and order them from 1 to 9. This is a permutation. It would be : 9

P

9  9 !

( 9  9 )!

 9 !

0 !

 9  8  7  6  5  4  3  2  1  362 , 880 A coed softball team has 13 players, 7 are boys and 6 are girls. How many ways can a starting line-up be selected that consists of 5 boys and 5 girls?

This makes use of both the Fundamental Counting Principle and Combinations 7

C

5 Ways to choose boys 6

C

5 Ways to choose girls 7

C

5  6

C

5  7 !

5 !

 2 !

 6 !

5 !

 1 !

 7  6 2  1  6 1  21  6  126 A basketball coach has 15 players on the team 6 guards, 5 forwards and 4 centers. How many ways can he choose a line up of 2 guards, 2 forwards and 1 center. 6

C

2 choose guards 5

C

2 choose forwards 4

C

1 choose centers 6

C

2  5

C

2  4

C

1  6 2   5 1  5 2   4 1  4 1  15  10  4  600

Pascal's Triangle

n

Pascal's Triangle

organizes the information in the combination formula into a triangle where each is a set of a particular size

n

and each column are the subsets of a certain size

r

. Here is the table below.

0 1 2 3 4 5 6 Notice the entry in the 4 th row and 2 nd column is 6. Remember 4

C

2 =

6

.

0

r

1 1 2 3 1 1 1 1 2 3 1 This table is built from the famous "upside down L" pattern that the entries above and to the right and directly above give the entry below.

4 1 4 3

6

1 4 1 5 1 5 10 10 5 1 5 + 10 = 15 3 + 1 = 4 6 1 6 15 20 15 6 1 Each row can be gotten from the previous one.

This table is very useful in figuring out what (

x

+

y

)

n

is multiplied out.

(

x

+

y

) 2 =

x

2 + 2

xy

+

y

2 (

x

+

y

) 3 =

x

3 + 3

x

2

y

+ 3

xy

2 +

y

3 (Look in row 2) (Look in row 3) (

x

+

y

) 4 =

x

4 + 4

x

3

y

+ 6

x

2

y

2 + 4

xy

3 +

y

4 (

x

+

y

) 5 =

x

5 + 5

x

4

y

+ 10

x

3

y

2 + 10

x

2

y

3 + 5

xy

4 +

y

5 (Look in row 4) (Look in row 5)

Total Number of Subsets of a Set The entries in each row of Pascal's Triangle represent the subsets of a set all the different sizes. If we add them up going across each row we get the total number of subsets.

r n

0 1 2 3 4 5 6 Subsets 0 1 2 1 1 1 1 2 1 1 = 2 0 2 = 2 1 4 = 2 2 The number of subsets of a set with

n

elements is 2

n

. For example, a set with 10 elements has 2 10 = 1024 subsets.

3 1 3 3 1 8 = 2 3 4 5 1 1 4 5 6 10 4 10 1 5 1 16 = 2 4 32 = 2 5 Notice the number of subsets doubles each time you add a single element.

6 1 6 15 20 15 6 1 64 = 2 6 Example A pizza store stocks 6 toppings for a pizza: pepperoni, sausage, ham, mushroom, green pepper, onion. a) How many 3 topping pizzas are there?

6

C

3    6 3    20 b) How many different types of pizzas can this store make?

6

C

0  6

C

1 1  6  6

C

2  6

C

3  6

C

4  15  20  15   6

C

5  6

C

6 6  1  64  2 6