39
Advanced Mathematics Counting Techniques

Advanced Mathematics Counting Techniques. Addition Rule Events (tasks) A and B are mutually exclusive (no common elements/outcomes) and n(A) = a, n(B)

Embed Size (px)

Citation preview

Page 1: Advanced Mathematics Counting Techniques. Addition Rule Events (tasks) A and B are mutually exclusive (no common elements/outcomes) and n(A) = a, n(B)

Advanced Mathematics

Counting Techniques

Page 2: Advanced Mathematics Counting Techniques. Addition Rule Events (tasks) A and B are mutually exclusive (no common elements/outcomes) and n(A) = a, n(B)

Addition RuleEvents (tasks) A and B are mutually exclusive (no common elements/outcomes) and

n(A) = a, n(B) = b n(A or B) = a + b

In other words there are a + b ways to do A or B.

Page 3: Advanced Mathematics Counting Techniques. Addition Rule Events (tasks) A and B are mutually exclusive (no common elements/outcomes) and n(A) = a, n(B)

Example 1If you are going to have ice cream or pie for dessert, there are two choices (vanilla or butter pecan) if you have ice cream, and three choices (apple, cherry, or blueberry) if you have pie.

Therefore there are 2 + 3 = 5 choices for dessert.

If you are going to choose from one category or anther category, then you add the number of choices in each category.

Page 4: Advanced Mathematics Counting Techniques. Addition Rule Events (tasks) A and B are mutually exclusive (no common elements/outcomes) and n(A) = a, n(B)

Multiplication Rule

If there are 'a' ways to do event A and then 'b' ways to do event B, then there are a×b ways to do A and B.

n(A) = a, n(B) = b n(A and B) = a b

Page 5: Advanced Mathematics Counting Techniques. Addition Rule Events (tasks) A and B are mutually exclusive (no common elements/outcomes) and n(A) = a, n(B)

Example 2Let’s entail pie with ice cream on top, i.e., one must choose a flavour of pie and a flavour of ice cream. Note that one must first choose a flavour of pie and then choose a flavour of ice-cream.

Therefore there are 3 × 2 = 6.

When one must make a choice from one category and a choice from another category, one multiplies the numbers of choices in the two categories.

Page 6: Advanced Mathematics Counting Techniques. Addition Rule Events (tasks) A and B are mutually exclusive (no common elements/outcomes) and n(A) = a, n(B)

Example 3Customers now have a choice of cheesecake (chocolate, lemon, raspberry, and strawberry) or pie (with ice-cream). How many possible desserts are available to customers (they cannot have both)?

4 + (3 × 2) = 10 possible desserts.

Page 7: Advanced Mathematics Counting Techniques. Addition Rule Events (tasks) A and B are mutually exclusive (no common elements/outcomes) and n(A) = a, n(B)

Factorial Notation (n!)For n as a positive integer, n factorial is defined byn! = n(n – 1)(n – 2) … 21

0! = 1

Note that n! can also be written asn! = n(n – 1)! = n(n – 1)(n – 2)! and so on

Page 8: Advanced Mathematics Counting Techniques. Addition Rule Events (tasks) A and B are mutually exclusive (no common elements/outcomes) and n(A) = a, n(B)

Example 4Find the value of each of the following:

(a) 6!

(b)1!

(c) 12!/(10!)(2!)

Page 9: Advanced Mathematics Counting Techniques. Addition Rule Events (tasks) A and B are mutually exclusive (no common elements/outcomes) and n(A) = a, n(B)

(a) 6! = 654321 = 720

(b)1! = 1

(c) 12!/(10!)(2!) = 121110!/(10!)(2!) = 66

Exercise 1: 2, 13, 20, 22, 35, 44

Example 4 (cont'd)

Page 10: Advanced Mathematics Counting Techniques. Addition Rule Events (tasks) A and B are mutually exclusive (no common elements/outcomes) and n(A) = a, n(B)

PermutationsPermutations refer to the number of ways to select and arrange r objects from n objects.

Notation: nPr or nPr

There are n choices to select the first object, (n – 1) choices to select the second object, and so n(n – 1) to select and arrange the first two objects, and so on.nPr = n(n – 1)(n – 2) … (n – r + 1)

Page 11: Advanced Mathematics Counting Techniques. Addition Rule Events (tasks) A and B are mutually exclusive (no common elements/outcomes) and n(A) = a, n(B)

)!rn(

!n

12...)1rn()rn(

12...)rn()1rn(...)1n(n

)1rn)(2rn(...)1n(nPrn

Permutation (cont'd)

Page 12: Advanced Mathematics Counting Techniques. Addition Rule Events (tasks) A and B are mutually exclusive (no common elements/outcomes) and n(A) = a, n(B)

Note that the order in which the objects appear is important in permutations.

That means

ABCACBBACBCACABCBA

are all different arrangements for the three objects

Permutation (cont'd)

Page 13: Advanced Mathematics Counting Techniques. Addition Rule Events (tasks) A and B are mutually exclusive (no common elements/outcomes) and n(A) = a, n(B)

Example 5Find each of the following:

(a)5P0 = 1 (There is only 1 way to select and arrange 0 object --- do nothing)

(b)5P5 = 5! = 120

(c)5P2 = 5 4 = 20

Page 14: Advanced Mathematics Counting Techniques. Addition Rule Events (tasks) A and B are mutually exclusive (no common elements/outcomes) and n(A) = a, n(B)

Example 6In how many ways can 3 students out of a group of 5 students be seated in a straight line?

The first seat can be filled in 5 ways (any one of 5 students). The second and third seats can be filled in 4 and 3 ways respectively. Using multiplication rule, the 3 seats can be filled in 5 4 3 = 60 ways.

Or using formula: 5P3 = 5 4 3 = 60

Page 15: Advanced Mathematics Counting Techniques. Addition Rule Events (tasks) A and B are mutually exclusive (no common elements/outcomes) and n(A) = a, n(B)

Example 7In how many ways can 4 students out of a group of 15 students be seated in a straight line?

The first seat can be filled in 15 ways (any one of 15 students).The second, third and fourth seats can be filled in 14, 13 and 12 ways respectively.

So the 4 seats can be filled in

15x14x13x12 = 32760

Or using the formula 15P4 = 32760

Page 16: Advanced Mathematics Counting Techniques. Addition Rule Events (tasks) A and B are mutually exclusive (no common elements/outcomes) and n(A) = a, n(B)

Example 8(Example 7) Amy and Bob are two students in the group. What is the probability that they sit next to each other?

P(Amy and Bob together) = 213123 / 32760 (why?) = 1/35

Exercise 2A: 1, 4, 8, 10

Exercise 2B: 3, 7, 10, 15, 18, 20

Page 17: Advanced Mathematics Counting Techniques. Addition Rule Events (tasks) A and B are mutually exclusive (no common elements/outcomes) and n(A) = a, n(B)

CombinationsCombinations refer to the number of ways to select (no arrangements) r objects from n objects.

Notation: nCr , nCr, or

There are n choices to select the first object, (n – 1) choices to select the second object, and so n(n – 1)/2! to choose the first two objects, and so on.nCr = n(n – 1)(n – 2) … (n – r + 1)/r!

r

n

Page 18: Advanced Mathematics Counting Techniques. Addition Rule Events (tasks) A and B are mutually exclusive (no common elements/outcomes) and n(A) = a, n(B)

!r)!rn(

!n

!r/)1rn)(2rn(...)1n(nr

nCr

n

Combination (cont'd)

Page 19: Advanced Mathematics Counting Techniques. Addition Rule Events (tasks) A and B are mutually exclusive (no common elements/outcomes) and n(A) = a, n(B)

Note that the order in which the objects appear is not important in combinations.

That means

ABCACBBACBCACABCBA

are all considered to be the same.

Combination (cont'd)

Page 20: Advanced Mathematics Counting Techniques. Addition Rule Events (tasks) A and B are mutually exclusive (no common elements/outcomes) and n(A) = a, n(B)

Example 9Find each of the following:

(a)5C0 = 1 (There is only 1 way to choose 0 object --- do nothing)

(b)5C5 = 1 (There is only 1 way to choose all objects)

(c)5C2 = 5 4 / 2! = 10

(d)5C3 = 5 4 3 / 3! = 10

Page 21: Advanced Mathematics Counting Techniques. Addition Rule Events (tasks) A and B are mutually exclusive (no common elements/outcomes) and n(A) = a, n(B)

Example 10Prove that nCr = nCn-r

nCn-r = n! / [(n-r)!(n-(n-r))!] = n! / [(n-r)! r!] = nCr

Choose r objects leaves (n – r) objects behind. So the number of ways to choose r objects from n unlike objects is the same as the number of ways to choose (n – r) objects from n.

Page 22: Advanced Mathematics Counting Techniques. Addition Rule Events (tasks) A and B are mutually exclusive (no common elements/outcomes) and n(A) = a, n(B)

Example 11Consider 5 different objects: A, B, C, D and E. How many ways are there of choosing 2 objects from these 5 objects.

Page 23: Advanced Mathematics Counting Techniques. Addition Rule Events (tasks) A and B are mutually exclusive (no common elements/outcomes) and n(A) = a, n(B)

Listing

AB BC CD DEAC BD CEAD BEAE

number of ways = 10

(Note that AB and BA refer to the same combination.)

By formula 5C2 = 5!/(2!3!) = 10Exercise 3A: 2, 9, 18, 20, 34

Example 11 (cont'd)

Page 24: Advanced Mathematics Counting Techniques. Addition Rule Events (tasks) A and B are mutually exclusive (no common elements/outcomes) and n(A) = a, n(B)

Example 12In the game of Lotto, players are required to selected 6 numbers out of 45 numbers. How many different groups of 6 numbers can be chosen from 45 numbers? What is the probability of winning the first division if the player just plays one game?

Repeat the above calculations for Power Ball Lotto. (Players select 5 numbers out of 45 and then one power ball (number) from another set of 45 numbers.)

Page 25: Advanced Mathematics Counting Techniques. Addition Rule Events (tasks) A and B are mutually exclusive (no common elements/outcomes) and n(A) = a, n(B)

456

7

455

8

Tuesday Lotto

45!n C 8145060

6! 39!

1P(winning 1st division) 1.23 10

8145060Power Ball Lotto :

45!n C 45 45 54979155

5! 40!

1P(winning 1st division) 1.82 10

54979155

Example 12 (cont'd)

Page 26: Advanced Mathematics Counting Techniques. Addition Rule Events (tasks) A and B are mutually exclusive (no common elements/outcomes) and n(A) = a, n(B)

Example 13In a common form of the card game poker, a hand of 5 cards is dealt to each player from a deck of 52 cards.

(a) What is the total number of possible hands?

(b) How many different flush hands (5 cards, all from 1 suit)?

(c) How many full house hands (3 cards of one kind, 2 of another)?

Try some other hands.

Page 27: Advanced Mathematics Counting Techniques. Addition Rule Events (tasks) A and B are mutually exclusive (no common elements/outcomes) and n(A) = a, n(B)

?)why(37442

412

3

413)housefull(n

?)why(5148!8!5

!134

5

134)flush(n

9605982!47!5

!52

5

52)total(n

Note that the above flush hands include royal flush and straight flush.

Example 13 (cont'd)

Page 28: Advanced Mathematics Counting Techniques. Addition Rule Events (tasks) A and B are mutually exclusive (no common elements/outcomes) and n(A) = a, n(B)

Example 14A committee of 4 is to be formed from a nominated list of 5 men and 6 women. How many committees can be formed where there are more women than men?

Page 29: Advanced Mathematics Counting Techniques. Addition Rule Events (tasks) A and B are mutually exclusive (no common elements/outcomes) and n(A) = a, n(B)

more women than men (3 women and 1 man) or (4 women)

n(3 W and 1 M) = 6C3 5C1 = 20 5 = 100

n(4 W) = 6C4 = 15

n(more women than men) = 100 + 15 = 115

Example 14 (cont'd)

Page 30: Advanced Mathematics Counting Techniques. Addition Rule Events (tasks) A and B are mutually exclusive (no common elements/outcomes) and n(A) = a, n(B)

Example 15How many 4 digit even numbers greater than 4000 can be formed using the digits 0 to 8 if repetition of digits is not permitted?

Page 31: Advanced Mathematics Counting Techniques. Addition Rule Events (tasks) A and B are mutually exclusive (no common elements/outcomes) and n(A) = a, n(B)

The two requirements that must be looked at first are:--- numbers greater than 4000 (first digit: 4 to 8) and --- even numbers (last digit: 0, 2, 4, 6, 8)So the tasks of choosing the first digit and the last digit are not mutually exclusive.

Split up the possible numbers into disjoint cases:--- first digit = 5 or 7 and last digit = 0, 2, 4, 6, 8--- first digit = 4, 6 or 8 and last digit = remaining 4 even

Example 15 (cont'd)

Page 32: Advanced Mathematics Counting Techniques. Addition Rule Events (tasks) A and B are mutually exclusive (no common elements/outcomes) and n(A) = a, n(B)

first digit = 5 or 7 and last digit = 0, 2, 4, 6 or 8There are 2 ways to choose the first digit and 5 ways to choose the last digit. So in this case the possible numbers formed = 2 7 6 5 = 420.

first digit = 4, 6 or 8 and last digit = remaining 4 evenThere are 3 ways to choose the first digit and 4 ways to choose the last digit. So in this case the possible numbers formed = 3 7 6 4 = 504.

Using addition rule, the required numbers can be formed in 420 + 504 = 924 ways.

Example 15 (cont'd)

Page 33: Advanced Mathematics Counting Techniques. Addition Rule Events (tasks) A and B are mutually exclusive (no common elements/outcomes) and n(A) = a, n(B)

Example 16In how many ways can the letters of the word HISTORY be arranged

(a) without restrictions(b) With the letters I and S together in the order IS(c) with the letters I and S together(d) with the letters I and S apart(e) with the letters T, O and R together?

Page 34: Advanced Mathematics Counting Techniques. Addition Rule Events (tasks) A and B are mutually exclusive (no common elements/outcomes) and n(A) = a, n(B)

(a) n(without restrictions) = 7P7 = 7! = 5040

(b)Consider I and S as a single object “IS”. Hence there are 6 objects to be arranged.n(“IS” together in this order) = 6! = 720

(c) Now “IS” can be “SI” and there are 2! ways to arrange the two objects within the group.n(“IS” together) = 2 720 = 1440

(d)n(I and S apart) = 5040 – 1440 = 3600

(e) 3! ways to arrange T, O and R within the group.n(“TOR” together) = 3! 5! = 720

Example 16 (cont'd)

Page 35: Advanced Mathematics Counting Techniques. Addition Rule Events (tasks) A and B are mutually exclusive (no common elements/outcomes) and n(A) = a, n(B)

Example 17Three letters are chosen from the word COUNT and two digits are chosen from the digits 1 to 6. The chosen letters and digits are then arranged to form 5 character passwords. No letter or digit is used more than once. Find the total number of passwords that can be formed.

Page 36: Advanced Mathematics Counting Techniques. Addition Rule Events (tasks) A and B are mutually exclusive (no common elements/outcomes) and n(A) = a, n(B)

n(3 letters) = 5C3 = 10

n(2 digits) = 6C2 = 15There are 10 15 combinations of 3 letters and 2 digits. These 5 characters can be arranged in 5! ways. Hencen(possible passwords) = 5! 10 15 = 18000

Example 17 (cont'd)

Page 37: Advanced Mathematics Counting Techniques. Addition Rule Events (tasks) A and B are mutually exclusive (no common elements/outcomes) and n(A) = a, n(B)

Example 18Suppose a group of 5 people is in a room. Find the probability that at least 2 of the people have the same birthday.

Same birthday refers to the month and the day, not necessarily the same year. Also, ignore leap year and assume that each day in the year is equally likely as a birthday.

Page 38: Advanced Mathematics Counting Techniques. Addition Rule Events (tasks) A and B are mutually exclusive (no common elements/outcomes) and n(A) = a, n(B)

First consider the probability that no 2 people among 5 people have the same birthday.

P(none of the 5 people have the same birthday)= 365P5 / (365)5 (why?) 0.973

P(at least 2 of the 5 people do have the same birthday)= 1 – 0.973 (why?)= 0.027

Extend the above method for more than 5 people. How many people is required to make the above probability at least 0.5?

Example 18 (cont'd)

Page 39: Advanced Mathematics Counting Techniques. Addition Rule Events (tasks) A and B are mutually exclusive (no common elements/outcomes) and n(A) = a, n(B)

Exercise 2D: 2, 12, 14

Exercise 2C: 4, 13, 21, 25, 31

Exercise 3B: 2, 10, 15, 21, 37, 39