4 3 permutations

48
PERMUTATIONS and COMBINATIONS COUNTING Dr. Felix P. Muga II Mathematics Department School of Science and Engineering Ateneo de Manila University Felix P. Muga II () PERMUTATIONS and COMBINATIONS AMC 124 1 / 21

Upload: benedict-astrologo

Post on 08-Apr-2015

379 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: 4 3 Permutations

PERMUTATIONS and COMBINATIONSCOUNTING

Dr. Felix P. Muga IIMathematics Department

School of Science and EngineeringAteneo de Manila University

Felix P. Muga II () PERMUTATIONS and COMBINATIONS AMC 124 1 / 21

Page 2: 4 3 Permutations

Introduction

A permutation of a set of distinct objects is an ordered arrangement ofthese objects.An ordered arrangement of r elements of a set is called anr -permutation.

Felix P. Muga II () PERMUTATIONS and COMBINATIONS AMC 124 2 / 21

Page 3: 4 3 Permutations

Introduction

A permutation of a set of distinct objects is an ordered arrangement ofthese objects.An ordered arrangement of r elements of a set is called anr -permutation.

Felix P. Muga II () PERMUTATIONS and COMBINATIONS AMC 124 2 / 21

Page 4: 4 3 Permutations

ExampleLet S = {1, 2, 3}. The arrangement of 3, 1, 2 is a permutation of S.

The arrangement 3, 1 is a 2-permutation of S.

Felix P. Muga II () PERMUTATIONS and COMBINATIONS AMC 124 3 / 21

Page 5: 4 3 Permutations

ExampleLet S = {1, 2, 3}. The arrangement of 3, 1, 2 is a permutation of S.

The arrangement 3, 1 is a 2-permutation of S.

Felix P. Muga II () PERMUTATIONS and COMBINATIONS AMC 124 3 / 21

Page 6: 4 3 Permutations

TheoremThe number of r -permutations of a set with n distinct elements is

P(n, r) = n(n − 1)(n − 2) · · · (n − r + 1)

P(n, r) =n!

(n − r)!

Felix P. Muga II () PERMUTATIONS and COMBINATIONS AMC 124 4 / 21

Page 7: 4 3 Permutations

TheoremThe number of r -permutations of a set with n distinct elements is

P(n, r) = n(n − 1)(n − 2) · · · (n − r + 1)

P(n, r) =n!

(n − r)!

Felix P. Muga II () PERMUTATIONS and COMBINATIONS AMC 124 4 / 21

Page 8: 4 3 Permutations

ExampleHow many ways are there to select a first-prize winner, a second-prizewinner, and a third-prize winner from 100 different people who haveentered a contest?

Felix P. Muga II () PERMUTATIONS and COMBINATIONS AMC 124 5 / 21

Page 9: 4 3 Permutations

ExampleSuppose that there are 8 runners in a race. The winner receives a goldmedal, the second-place finisher a silver medal, and the third-placefinisher receives a bronze medal. How many different ways are thereto award these medals, if all possible outcomes of the race can occurand there are no ties?

Felix P. Muga II () PERMUTATIONS and COMBINATIONS AMC 124 6 / 21

Page 10: 4 3 Permutations

ExampleSuppose that a saleswoman has to visit eight different cities. She mustbegin her trip in a specified city, but she can visit the other seven citiesin any order she wishes. How many possible orders can thesaleswoman use when visiting these cities?

Felix P. Muga II () PERMUTATIONS and COMBINATIONS AMC 124 7 / 21

Page 11: 4 3 Permutations

ExampleHow many permutations of the letters ABCDEFGH contain the stringsABC?

Felix P. Muga II () PERMUTATIONS and COMBINATIONS AMC 124 8 / 21

Page 12: 4 3 Permutations

Combinations

An r -combination of elements of a set is an unordered selection of relements from the set.

An r -combination is simply a subset of the set with r elements.

Felix P. Muga II () PERMUTATIONS and COMBINATIONS AMC 124 9 / 21

Page 13: 4 3 Permutations

Combinations

An r -combination of elements of a set is an unordered selection of relements from the set.

An r -combination is simply a subset of the set with r elements.

Felix P. Muga II () PERMUTATIONS and COMBINATIONS AMC 124 9 / 21

Page 14: 4 3 Permutations

ExampleLet S be the set {1, 2, 3, 4}. Then {1, 3, 4} is a 3-combination of S.

Felix P. Muga II () PERMUTATIONS and COMBINATIONS AMC 124 10 / 21

Page 15: 4 3 Permutations

Binomial Coefficient

C(n, r) denotes the number of r -combinations of a set with n distinctelements.

C(n, r) =(n

r

)and is called a binomial coefficient.

Felix P. Muga II () PERMUTATIONS and COMBINATIONS AMC 124 11 / 21

Page 16: 4 3 Permutations

ExampleC(4, 2) = 6, since the 2-combinations of {a, b, c, d} are the six subsets

{a, b}, {a, c}, {a, d},{b, c}, {b, d}, {c, d}.

Felix P. Muga II () PERMUTATIONS and COMBINATIONS AMC 124 12 / 21

Page 17: 4 3 Permutations

TheoremThe number of r -combinations of a set with n elements, where n is anonnegative integer and r is an integer with 0 ≤ r ≤ n, equals

C(n, r) =n!

r !(n − r)!.

Felix P. Muga II () PERMUTATIONS and COMBINATIONS AMC 124 13 / 21

Page 18: 4 3 Permutations

CorollaryLet n and r be nonnegative integers with r ≤ n. Then

C(n, r) = C(n, n − r).

Felix P. Muga II () PERMUTATIONS and COMBINATIONS AMC 124 14 / 21

Page 19: 4 3 Permutations

ExampleHow many ways are there to select three contestants from a10-member programming team?

Solution.C(10, 3) =

10!

3!7!= 120.

Felix P. Muga II () PERMUTATIONS and COMBINATIONS AMC 124 15 / 21

Page 20: 4 3 Permutations

ExampleHow many ways are there to select three contestants from a10-member programming team?

Solution.C(10, 3) =

10!

3!7!= 120.

Felix P. Muga II () PERMUTATIONS and COMBINATIONS AMC 124 15 / 21

Page 21: 4 3 Permutations

ExampleHow many bit strings of length 20 contains exactly twelve 1s?

Solution.C(20, 12) =

20!

12!7!= 125, 970.

Felix P. Muga II () PERMUTATIONS and COMBINATIONS AMC 124 16 / 21

Page 22: 4 3 Permutations

ExampleHow many bit strings of length 20 contains exactly twelve 1s?

Solution.C(20, 12) =

20!

12!7!= 125, 970.

Felix P. Muga II () PERMUTATIONS and COMBINATIONS AMC 124 16 / 21

Page 23: 4 3 Permutations

ExampleA club has 25 members.

1 How many ways are there to choose four members of the club toserve on an executive committee?Solution.C(25, 4) = 12, 650.

2 How many ways are there to choose a president, vice-president,secretary and treasurer of the club?Solution.P(25, 4) = 303, 600.

Felix P. Muga II () PERMUTATIONS and COMBINATIONS AMC 124 17 / 21

Page 24: 4 3 Permutations

ExampleA club has 25 members.

1 How many ways are there to choose four members of the club toserve on an executive committee?

Solution.C(25, 4) = 12, 650.

2 How many ways are there to choose a president, vice-president,secretary and treasurer of the club?Solution.P(25, 4) = 303, 600.

Felix P. Muga II () PERMUTATIONS and COMBINATIONS AMC 124 17 / 21

Page 25: 4 3 Permutations

ExampleA club has 25 members.

1 How many ways are there to choose four members of the club toserve on an executive committee?Solution.C(25, 4) = 12, 650.

2 How many ways are there to choose a president, vice-president,secretary and treasurer of the club?Solution.P(25, 4) = 303, 600.

Felix P. Muga II () PERMUTATIONS and COMBINATIONS AMC 124 17 / 21

Page 26: 4 3 Permutations

ExampleA club has 25 members.

1 How many ways are there to choose four members of the club toserve on an executive committee?Solution.C(25, 4) = 12, 650.

2 How many ways are there to choose a president, vice-president,secretary and treasurer of the club?

Solution.P(25, 4) = 303, 600.

Felix P. Muga II () PERMUTATIONS and COMBINATIONS AMC 124 17 / 21

Page 27: 4 3 Permutations

ExampleA club has 25 members.

1 How many ways are there to choose four members of the club toserve on an executive committee?Solution.C(25, 4) = 12, 650.

2 How many ways are there to choose a president, vice-president,secretary and treasurer of the club?Solution.P(25, 4) = 303, 600.

Felix P. Muga II () PERMUTATIONS and COMBINATIONS AMC 124 17 / 21

Page 28: 4 3 Permutations

ExampleHow many bit strings contain exactly eight 0s and ten 1s if every 0must be immediately followed by a 1?

Solution.We have a set of 10 elements where 8 elements of the same kindwhich is a 01 and 2 elements of the same kind which is a 1.Hence, there are C(10, 8) = C(10, 2) = 45 strings satisfying the givencondition.

Felix P. Muga II () PERMUTATIONS and COMBINATIONS AMC 124 18 / 21

Page 29: 4 3 Permutations

ExampleHow many bit strings contain exactly eight 0s and ten 1s if every 0must be immediately followed by a 1?

Solution.We have a set of 10 elements where 8 elements of the same kindwhich is a 01 and 2 elements of the same kind which is a 1.Hence, there are C(10, 8) = C(10, 2) = 45 strings satisfying the givencondition.

Felix P. Muga II () PERMUTATIONS and COMBINATIONS AMC 124 18 / 21

Page 30: 4 3 Permutations

Example

How many bit strings of length 10 contain at least three 1s and at least three 0s?

Solution.

Case 1. There are exactly three 1s and exactly seven 0s.

C(10, 3) = C(10, 7) = 120.

Case 2. There are exactly four 1s and exactly six 0s.

C(10, 4) = C(10, 6) = 210.

Case 3. There are exactly five 1s and exactly five 0s.

C(10, 5) = 252.

Case 4. There are exactly six 1s and exactly four 0s.

C(10, 6) = C(10, 4) = 210.

Case 5. There are exactly seven 1s and exactly three 0s.

C(10, 7) = C(10, 3) = 120.

Felix P. Muga II () PERMUTATIONS and COMBINATIONS AMC 124 19 / 21

Page 31: 4 3 Permutations

Example

How many bit strings of length 10 contain at least three 1s and at least three 0s?

Solution.

Case 1. There are exactly three 1s and exactly seven 0s.

C(10, 3) = C(10, 7) = 120.

Case 2. There are exactly four 1s and exactly six 0s.

C(10, 4) = C(10, 6) = 210.

Case 3. There are exactly five 1s and exactly five 0s.

C(10, 5) = 252.

Case 4. There are exactly six 1s and exactly four 0s.

C(10, 6) = C(10, 4) = 210.

Case 5. There are exactly seven 1s and exactly three 0s.

C(10, 7) = C(10, 3) = 120.

Felix P. Muga II () PERMUTATIONS and COMBINATIONS AMC 124 19 / 21

Page 32: 4 3 Permutations

Example

How many bit strings of length 10 contain at least three 1s and at least three 0s?

Solution.

Case 1. There are exactly three 1s and exactly seven 0s.

C(10, 3) = C(10, 7) = 120.

Case 2. There are exactly four 1s and exactly six 0s.

C(10, 4) = C(10, 6) = 210.

Case 3. There are exactly five 1s and exactly five 0s.

C(10, 5) = 252.

Case 4. There are exactly six 1s and exactly four 0s.

C(10, 6) = C(10, 4) = 210.

Case 5. There are exactly seven 1s and exactly three 0s.

C(10, 7) = C(10, 3) = 120.

Felix P. Muga II () PERMUTATIONS and COMBINATIONS AMC 124 19 / 21

Page 33: 4 3 Permutations

Example

How many bit strings of length 10 contain at least three 1s and at least three 0s?

Solution.

Case 1. There are exactly three 1s and exactly seven 0s.

C(10, 3) = C(10, 7) = 120.

Case 2. There are exactly four 1s and exactly six 0s.

C(10, 4) = C(10, 6) = 210.

Case 3. There are exactly five 1s and exactly five 0s.

C(10, 5) = 252.

Case 4. There are exactly six 1s and exactly four 0s.

C(10, 6) = C(10, 4) = 210.

Case 5. There are exactly seven 1s and exactly three 0s.

C(10, 7) = C(10, 3) = 120.

Felix P. Muga II () PERMUTATIONS and COMBINATIONS AMC 124 19 / 21

Page 34: 4 3 Permutations

Example

How many bit strings of length 10 contain at least three 1s and at least three 0s?

Solution.

Case 1. There are exactly three 1s and exactly seven 0s.

C(10, 3) = C(10, 7) = 120.

Case 2. There are exactly four 1s and exactly six 0s.

C(10, 4) = C(10, 6) = 210.

Case 3. There are exactly five 1s and exactly five 0s.

C(10, 5) = 252.

Case 4. There are exactly six 1s and exactly four 0s.

C(10, 6) = C(10, 4) = 210.

Case 5. There are exactly seven 1s and exactly three 0s.

C(10, 7) = C(10, 3) = 120.

Felix P. Muga II () PERMUTATIONS and COMBINATIONS AMC 124 19 / 21

Page 35: 4 3 Permutations

Example

How many bit strings of length 10 contain at least three 1s and at least three 0s?

Solution.

Case 1. There are exactly three 1s and exactly seven 0s.

C(10, 3) = C(10, 7) = 120.

Case 2. There are exactly four 1s and exactly six 0s.

C(10, 4) = C(10, 6) = 210.

Case 3. There are exactly five 1s and exactly five 0s.

C(10, 5) = 252.

Case 4. There are exactly six 1s and exactly four 0s.

C(10, 6) = C(10, 4) = 210.

Case 5. There are exactly seven 1s and exactly three 0s.

C(10, 7) = C(10, 3) = 120.

Felix P. Muga II () PERMUTATIONS and COMBINATIONS AMC 124 19 / 21

Page 36: 4 3 Permutations

Example

How many bit strings of length 10 contain at least three 1s and at least three 0s?

Solution.

Case 1. There are exactly three 1s and exactly seven 0s.

C(10, 3) = C(10, 7) = 120.

Case 2. There are exactly four 1s and exactly six 0s.

C(10, 4) = C(10, 6) = 210.

Case 3. There are exactly five 1s and exactly five 0s.

C(10, 5) = 252.

Case 4. There are exactly six 1s and exactly four 0s.

C(10, 6) = C(10, 4) = 210.

Case 5. There are exactly seven 1s and exactly three 0s.

C(10, 7) = C(10, 3) = 120.

Felix P. Muga II () PERMUTATIONS and COMBINATIONS AMC 124 19 / 21

Page 37: 4 3 Permutations

Example

How many bit strings of length 10 contain at least three 1s and at least three 0s?

Solution.

Case 1. There are exactly three 1s and exactly seven 0s.

C(10, 3) = C(10, 7) = 120.

Case 2. There are exactly four 1s and exactly six 0s.

C(10, 4) = C(10, 6) = 210.

Case 3. There are exactly five 1s and exactly five 0s.

C(10, 5) = 252.

Case 4. There are exactly six 1s and exactly four 0s.

C(10, 6) = C(10, 4) = 210.

Case 5. There are exactly seven 1s and exactly three 0s.

C(10, 7) = C(10, 3) = 120.

Felix P. Muga II () PERMUTATIONS and COMBINATIONS AMC 124 19 / 21

Page 38: 4 3 Permutations

Example

How many bit strings of length 10 contain at least three 1s and at least three 0s?

Solution.

Case 1. There are exactly three 1s and exactly seven 0s.

C(10, 3) = C(10, 7) = 120.

Case 2. There are exactly four 1s and exactly six 0s.

C(10, 4) = C(10, 6) = 210.

Case 3. There are exactly five 1s and exactly five 0s.

C(10, 5) = 252.

Case 4. There are exactly six 1s and exactly four 0s.

C(10, 6) = C(10, 4) = 210.

Case 5. There are exactly seven 1s and exactly three 0s.

C(10, 7) = C(10, 3) = 120.

Felix P. Muga II () PERMUTATIONS and COMBINATIONS AMC 124 19 / 21

Page 39: 4 3 Permutations

Example

How many bit strings of length 10 contain at least three 1s and at least three 0s?

Solution.

Case 1. There are exactly three 1s and exactly seven 0s.

C(10, 3) = C(10, 7) = 120.

Case 2. There are exactly four 1s and exactly six 0s.

C(10, 4) = C(10, 6) = 210.

Case 3. There are exactly five 1s and exactly five 0s.

C(10, 5) = 252.

Case 4. There are exactly six 1s and exactly four 0s.

C(10, 6) = C(10, 4) = 210.

Case 5. There are exactly seven 1s and exactly three 0s.

C(10, 7) = C(10, 3) = 120.

Felix P. Muga II () PERMUTATIONS and COMBINATIONS AMC 124 19 / 21

Page 40: 4 3 Permutations

Example

How many bit strings of length 10 contain at least three 1s and at least three 0s?

Solution.

Case 1. There are exactly three 1s and exactly seven 0s.

C(10, 3) = C(10, 7) = 120.

Case 2. There are exactly four 1s and exactly six 0s.

C(10, 4) = C(10, 6) = 210.

Case 3. There are exactly five 1s and exactly five 0s.

C(10, 5) = 252.

Case 4. There are exactly six 1s and exactly four 0s.

C(10, 6) = C(10, 4) = 210.

Case 5. There are exactly seven 1s and exactly three 0s.

C(10, 7) = C(10, 3) = 120.

Felix P. Muga II () PERMUTATIONS and COMBINATIONS AMC 124 19 / 21

Page 41: 4 3 Permutations

Example

How many bit strings of length 10 contain at least three 1s and at least three 0s?

Solution.

Case 1. There are exactly three 1s and exactly seven 0s.

C(10, 3) = C(10, 7) = 120.

Case 2. There are exactly four 1s and exactly six 0s.

C(10, 4) = C(10, 6) = 210.

Case 3. There are exactly five 1s and exactly five 0s.

C(10, 5) = 252.

Case 4. There are exactly six 1s and exactly four 0s.

C(10, 6) = C(10, 4) = 210.

Case 5. There are exactly seven 1s and exactly three 0s.

C(10, 7) = C(10, 3) = 120.

Felix P. Muga II () PERMUTATIONS and COMBINATIONS AMC 124 19 / 21

Page 42: 4 3 Permutations

Example

How many bit strings of length 10 contain at least three 1s and at least three 0s?

Continuation.There are 120 + 210 + 252 + 210 + 120 = 912 strings containing at least three 1s andat least three 0s.

Felix P. Muga II () PERMUTATIONS and COMBINATIONS AMC 124 20 / 21

Page 43: 4 3 Permutations

Example

How many bit strings of length 10 contain at least three 1s and at least three 0s?

Continuation.There are 120 + 210 + 252 + 210 + 120 = 912 strings containing at least three 1s andat least three 0s.

Felix P. Muga II () PERMUTATIONS and COMBINATIONS AMC 124 20 / 21

Page 44: 4 3 Permutations

ExampleLet S be a set with n distinct elements. How many subsets does Shave including the empty set and itself?

Solution.

|P(S)| = 2n.

However, |P(S)| = C(n, 0) + C(n, 1) + · · ·+ C(n, n − 1) + C(n, n).

Thus, 2n = C(n, 0) + C(n, 1) + · · ·+ C(n, n − 1) + C(n, n).

Felix P. Muga II () PERMUTATIONS and COMBINATIONS AMC 124 21 / 21

Page 45: 4 3 Permutations

ExampleLet S be a set with n distinct elements. How many subsets does Shave including the empty set and itself?

Solution.

|P(S)| = 2n.

However, |P(S)| = C(n, 0) + C(n, 1) + · · ·+ C(n, n − 1) + C(n, n).

Thus, 2n = C(n, 0) + C(n, 1) + · · ·+ C(n, n − 1) + C(n, n).

Felix P. Muga II () PERMUTATIONS and COMBINATIONS AMC 124 21 / 21

Page 46: 4 3 Permutations

ExampleLet S be a set with n distinct elements. How many subsets does Shave including the empty set and itself?

Solution.

|P(S)| = 2n.

However, |P(S)| = C(n, 0) + C(n, 1) + · · ·+ C(n, n − 1) + C(n, n).

Thus, 2n = C(n, 0) + C(n, 1) + · · ·+ C(n, n − 1) + C(n, n).

Felix P. Muga II () PERMUTATIONS and COMBINATIONS AMC 124 21 / 21

Page 47: 4 3 Permutations

ExampleLet S be a set with n distinct elements. How many subsets does Shave including the empty set and itself?

Solution.

|P(S)| = 2n.

However, |P(S)| = C(n, 0) + C(n, 1) + · · ·+ C(n, n − 1) + C(n, n).

Thus, 2n = C(n, 0) + C(n, 1) + · · ·+ C(n, n − 1) + C(n, n).

Felix P. Muga II () PERMUTATIONS and COMBINATIONS AMC 124 21 / 21

Page 48: 4 3 Permutations

ExampleLet S be a set with n distinct elements. How many subsets does Shave including the empty set and itself?

Solution.

|P(S)| = 2n.

However, |P(S)| = C(n, 0) + C(n, 1) + · · ·+ C(n, n − 1) + C(n, n).

Thus, 2n = C(n, 0) + C(n, 1) + · · ·+ C(n, n − 1) + C(n, n).

Felix P. Muga II () PERMUTATIONS and COMBINATIONS AMC 124 21 / 21