24
Chris Morgan, MATH G160 [email protected] January 30, 2012 Lecture 9 Chapter 4.1: Combinations 1

Chris Morgan, MATH G160 [email protected] January 30, 2012 Lecture 9 Chapter 4.1: Combinations 1

Embed Size (px)

Citation preview

Page 1: Chris Morgan, MATH G160 csmorgan@purdue.edu January 30, 2012 Lecture 9 Chapter 4.1: Combinations 1

Chris Morgan, MATH [email protected]

January 30, 2012Lecture 9

Chapter 4.1: Combinations

1

Page 2: Chris Morgan, MATH G160 csmorgan@purdue.edu January 30, 2012 Lecture 9 Chapter 4.1: Combinations 1

2

Page 3: Chris Morgan, MATH G160 csmorgan@purdue.edu January 30, 2012 Lecture 9 Chapter 4.1: Combinations 1

Combinations

• In some problems (e.g. dealing cards) we do not care

about the order that the objects are in. In this case, we

deal with combinations rather than permutations:

– If order matters Permutations

– If order does not matter Combinations

• Since order doesn’t matter, then we are counting some

objects multiple times:

Here we take into account the fact that we are counting r

multiple times.

)!(!

!

rnr

n

r

nCrn

3

Page 4: Chris Morgan, MATH G160 csmorgan@purdue.edu January 30, 2012 Lecture 9 Chapter 4.1: Combinations 1

Does order really matter?

Say we have three balls in a box – one red, one black, and

one white; and we randomly choose 2 balls from the box,

one at a time:

If order matters, then totally we have 6 possible outcomes:

• {white, red}, {red, white}, {white, black}, {black,

white},

{red, black}, and {black, red }

If order does not matter, then totally we have 3

possible results:

• {white, red}, {white, black} and {black, red}

4

Page 5: Chris Morgan, MATH G160 csmorgan@purdue.edu January 30, 2012 Lecture 9 Chapter 4.1: Combinations 1

Calculating Combinations

• There should be a button on most calculators to

perform permutations.

• There should also be a button allowing you to

perform combinations.

• If there is not, all calculators should have a factorial

button (!) which allows you to compute using the formula.

rnC

rnP

5

Page 6: Chris Morgan, MATH G160 csmorgan@purdue.edu January 30, 2012 Lecture 9 Chapter 4.1: Combinations 1

Combinations example (Ia)

• A child has 7 different toys in his toy box. He is only

allowed to take three of his toys with him on a family

outing. How many different sets of toys can he take?

– Suppose his toys are T1, T2,T3, T4, T5, T6, T7

•Remember: order does NOT matter

– Therefore, choosing (T1& T2) is the same

as choosing (T2& T1)

6

Page 7: Chris Morgan, MATH G160 csmorgan@purdue.edu January 30, 2012 Lecture 9 Chapter 4.1: Combinations 1

Combinations example (Ib)

Since there are few enough possibilities, let’s list them just for fun:

T1, T2 T2, T3 T3, T4 T4, T5 T5, T6 T6, T7T1, T3 T2, T4 T3, T5 T4, T6 T5, T7T1, T4 T2, T5 T3, T6 T4, T7T1, T5 T2, T6 T4, T7T1, T6 T2, T7T1, T7

Notice, for example, that T1,T2 is counted, but T2,T1 is not counted. This is because the order does not matter; therefore, they are treated as the same event.

1012

120

!3!2

!5

)!25(!2

!525

C

7

Page 8: Chris Morgan, MATH G160 csmorgan@purdue.edu January 30, 2012 Lecture 9 Chapter 4.1: Combinations 1

Combinations example (II)

The U.S. Senate consists of 100 senators, 2 from each of the 50 states. A committee consisting of 5 senators is to be formed.

- How many different committees are possible?

- How many are possible if no state can have more than 1 senator on the committee?

520,287,755100 C

320,800,67!5

92*94*96*98*100

8

Page 9: Chris Morgan, MATH G160 csmorgan@purdue.edu January 30, 2012 Lecture 9 Chapter 4.1: Combinations 1

Combinations example (III)

What is the probability to have at least one king in a 5-card poker hand from 52 cards?

- Number of poker hands?

- Number of hands with at least one king?[Hint: First find the number of hands with no king and then

find the compliment…]

960,598,2)!552(!5

!52552

C

304,712,1)!548(!5

!48548

C

656,886304,712,1960,598,2

341.0960,598,2

656,886P (at least one

king)9

Page 10: Chris Morgan, MATH G160 csmorgan@purdue.edu January 30, 2012 Lecture 9 Chapter 4.1: Combinations 1

Ordered Partitions

!!...!

!

,...,, 2121 kk mmm

m

mmm

m

10

Page 11: Chris Morgan, MATH G160 csmorgan@purdue.edu January 30, 2012 Lecture 9 Chapter 4.1: Combinations 1

Ordered Partitions example (17)

Suppose you have six different types of flowers and

three planters. In how many ways can you put three

flowers in the first planer, two flowers in the second

planter, and one flower in the final planter?

11

Page 12: Chris Morgan, MATH G160 csmorgan@purdue.edu January 30, 2012 Lecture 9 Chapter 4.1: Combinations 1

Ordered Partitions example (17b)

• Flowers: F1, F2, F3, F4, F5, F6• Planters: P1, P2, P3

Planter 1 Planter 2 Planter 3F1, F2, F3 F4, F5 F6F1, F2, F3 F4, F6 F5F1, F2, F3 F5, F6 F4F1, F2, F4 F3, F5 F6Etc….

12

Page 13: Chris Morgan, MATH G160 csmorgan@purdue.edu January 30, 2012 Lecture 9 Chapter 4.1: Combinations 1

Ordered Partitions example (17c)

How many ways are there?

We can refer to this as a multinomial coefficient

60!1!2!3

!6

1,2,3

6

13

Page 14: Chris Morgan, MATH G160 csmorgan@purdue.edu January 30, 2012 Lecture 9 Chapter 4.1: Combinations 1

Ordered Partitions example (18a)

What is the probability that in a game of Hearts, one

player gets all of the Hearts? Hearts is played with 4

people; each player is dealt 13 cards from a

standard 52-card deck.

14

Page 15: Chris Morgan, MATH G160 csmorgan@purdue.edu January 30, 2012 Lecture 9 Chapter 4.1: Combinations 1

Ordered Partitions example (18b)

Total possible dealings:

One player gets all the hearts:

P(one player gets all hearts) =

!13!13!13!13

!52

13,13,13,13

52

!13!13!13

!39

13,13,13

39

1210*57.1!52

!39!13

!13!13!13!13!52!13!13!13

!39

15

Page 16: Chris Morgan, MATH G160 csmorgan@purdue.edu January 30, 2012 Lecture 9 Chapter 4.1: Combinations 1

Remember…

• Always more than one way to solve a problem• If you don’t know which method to use to solve a problem, that’s OK! There is not always one definitive method!• A good approach is to imagine yourself doing the event described• When you want to count the possible outcomes, keep very close track to ALL the decisions you have to make and apply the basic counting rule

General rule of thumb: - choosing with replacement BCR - choosing without replacement, order matters

Permutations - choosing without replacement, order does not matter

Combinations

16

Page 17: Chris Morgan, MATH G160 csmorgan@purdue.edu January 30, 2012 Lecture 9 Chapter 4.1: Combinations 1

More examples…

A fair coin is flipped 8 times, what is the probability to see exactly 4 heads in the 8 tosses?

First, find number of total possible flips:2 * 2 * 2 * 2 * 2 * 2 * 2 * 2 = 28 = 256

Then, find possibilities with exactly four heads:NOT 2 * 2 * 2 * 2! Why not?

P(exactly 4 heads) = 70/256 = 0.273

8 4

8! 8!70

4!( )! 4!(4 4)!n k

nC C

k n k

17

Page 18: Chris Morgan, MATH G160 csmorgan@purdue.edu January 30, 2012 Lecture 9 Chapter 4.1: Combinations 1

More examples…

What is the probability to be dealt a poker hand with two Aces?

First, find total number of poker hands:

Then, find possibilities with exactly 2 Aces:

P(2 aces) = 103,776/2,598,960 = 0.04

776,1033

48

2

4

52 52! 52!2,598,960

5 5!(52 5)! 5!47!

18

Page 19: Chris Morgan, MATH G160 csmorgan@purdue.edu January 30, 2012 Lecture 9 Chapter 4.1: Combinations 1

More examples…

If five fair die are tossed, what is the probability they will all show different faces?

First, find total number of outcomes:6 * 6 * 6 * 6 * 6 = 65 = 7,776

Then, find possibilities (number of die) with different faces:

6 * 5 * 4 * 3 * 2 = 6! = 720

P(different faces) = 720/7,776 = 0.0926

19

Page 20: Chris Morgan, MATH G160 csmorgan@purdue.edu January 30, 2012 Lecture 9 Chapter 4.1: Combinations 1

More examples…

4 tennis players (two teams of two) are to be chosen from

12 players at a club. Two of them really dislike each other

and refuse to be on the same court as the other one. How

many possible combinations of four players are possible?

[Hint: When and why do we add and/or multiply?]

We can add together the combinations of when those two

players aren’t on the court and when they are on the

court:

4502402101

2

3

10

4

10

20

Page 21: Chris Morgan, MATH G160 csmorgan@purdue.edu January 30, 2012 Lecture 9 Chapter 4.1: Combinations 1

More examples…

What is the probability of winning a jackpot in

a lottery that requires that you have 5 correct

numbers out of 30 numbers?

000007.01

)(530

C

winP

21

Page 22: Chris Morgan, MATH G160 csmorgan@purdue.edu January 30, 2012 Lecture 9 Chapter 4.1: Combinations 1

A final example…

An ordinary deck of 52 cards is shuffled and dealt. What is

the probability that:

(a) the seventh card is an ace?

(b) the first ace occurs on the seventh card dealt?

22

Page 23: Chris Morgan, MATH G160 csmorgan@purdue.edu January 30, 2012 Lecture 9 Chapter 4.1: Combinations 1

A final example…

(a)the seventh card is an ace?

First, look at all 7 card combos:

[notice we used a permutation because order matters]

Then, the probability the last card is any specific card:

So we take:

P(7th card is an Ace) = 0769.013

1

!45

!52752 P

51 6

51!( )*4 ( )*4

(51 6)!P

23

51!*4 145!

52! 1345!

Page 24: Chris Morgan, MATH G160 csmorgan@purdue.edu January 30, 2012 Lecture 9 Chapter 4.1: Combinations 1

A final example…

(b) the first ace occurs on the seventh card dealt?

Possible outcomes where 1st Ace is on the 7th card?

P(1st Ace is on 7th card) = = 0.0524

4*!42

!484*648 P

24

48!*4

42!52!45!