advanced mathematics counting techniques. addition rule events (tasks) a and b are mutually...

Post on 12-Jan-2016

214 Views

Category:

Documents

2 Downloads

Preview:

Click to see full reader

TRANSCRIPT

Advanced Mathematics

Counting Techniques

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.

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.

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

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.

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.

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

Example 4Find the value of each of the following:

(a) 6!

(b)1!

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

(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)

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)

)!rn(

!n

12...)1rn()rn(

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

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

Permutation (cont'd)

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)

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

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

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

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

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

!r)!rn(

!n

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

nCr

n

Combination (cont'd)

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)

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

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.

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

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)

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

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)

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.

?)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)

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?

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)

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?

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)

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)

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?

(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)

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.

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)

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.

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)

Exercise 2D: 2, 12, 14

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

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

top related