20
Chapter 11: Counting Methods

Chapter 11: Counting Methods. Counting by Systematic Listing One-part tasks: each item in the list is identified by one feature Multi-part tasks: items

Embed Size (px)

Citation preview

Page 1: Chapter 11: Counting Methods. Counting by Systematic Listing One-part tasks: each item in the list is identified by one feature Multi-part tasks: items

Chapter 11: Counting Methods

Page 2: Chapter 11: Counting Methods. Counting by Systematic Listing One-part tasks: each item in the list is identified by one feature Multi-part tasks: items

Counting by Systematic Listing

• One-part tasks: each item in the list is identified by one feature

• Multi-part tasks: items in the list are identified by more than one feature (ex a playing card has a suit and a value)

11.1

Page 3: Chapter 11: Counting Methods. Counting by Systematic Listing One-part tasks: each item in the list is identified by one feature Multi-part tasks: items

Two-part tasks: Using Tables

• Example: Determine the number of two-digit numbers that can be made using 2,4 and 7 for each digit

• Example: Determine how many ways you can pick two people from the group of Andria, Bridget, Connor and Dylan.

11.1

Page 4: Chapter 11: Counting Methods. Counting by Systematic Listing One-part tasks: each item in the list is identified by one feature Multi-part tasks: items

Multi-part tasks with Tree Diagrams

• #62: Determine the number of odd, non-repeating three digit numbers that can be written using digits from the set {0,1,2,3}

• Emma, Finn, Garrett and Hannah have tickets for 4 reserved seats in a row at a concert. In how many ways can they seat themselves so that Emma and Garrett are not beside each other?

11.1

Page 5: Chapter 11: Counting Methods. Counting by Systematic Listing One-part tasks: each item in the list is identified by one feature Multi-part tasks: items

Uniformity Criterion

• A multi-part task is said to satisfy the uniformity criterion if the number of choices for any particular part is the same no matter which choices were selected for previous parts

11.2

Page 6: Chapter 11: Counting Methods. Counting by Systematic Listing One-part tasks: each item in the list is identified by one feature Multi-part tasks: items

Fundamental Counting Principle(FCP)

• For a task that consists of k separate parts and satisfies the uniformity criterion

• Suppose there are n1 ways to do the first task, n2 ways to do the second, etc

• Then total number of ways to complete the task is

n1 × n2 × … × nk

11.2

Page 7: Chapter 11: Counting Methods. Counting by Systematic Listing One-part tasks: each item in the list is identified by one feature Multi-part tasks: items

ExampleUsing the digits 0,1,2,3,4,5,6,7,8,9, how many 4 digit numbers are there such that

a)0 isn’t used for first, repetition is okay

b)0 isn’t used for first, repetition is not okay

c)Number must begin and end with odd digit, no repetition

d)Number is odd and greater than 5000, repetition is okay

e)Number is inclusively between 5001 and 8000, repetition is not okay

11.2

Page 8: Chapter 11: Counting Methods. Counting by Systematic Listing One-part tasks: each item in the list is identified by one feature Multi-part tasks: items

Factorials and Arrangements

• n! = n × (n-1) × (n-2) × … 2 × 1

• 0! = 1

• The total number of different ways to arrange n distinct objects is n!

11.2

Page 9: Chapter 11: Counting Methods. Counting by Systematic Listing One-part tasks: each item in the list is identified by one feature Multi-part tasks: items

Permutations

• P(n,r) represents the number of arrangements (called permutations) of n distinct things taken r at a time

P(n,r) = n! / (n – r)!• Permutations are applied only when

repetitions are not allowed and order matters.

11.3

Page 10: Chapter 11: Counting Methods. Counting by Systematic Listing One-part tasks: each item in the list is identified by one feature Multi-part tasks: items

Combinations

• C(n,r) represents the number of subsets (or combinations) of n distinct things taken r at a time

C(n,r) = P(n,r)/r! = n!/r!(n-r)!• Combinations are applied only when

repetitions are not allowed and order does NOT matter

11.3

Page 11: Chapter 11: Counting Methods. Counting by Systematic Listing One-part tasks: each item in the list is identified by one feature Multi-part tasks: items

Guidelines for Choosing Counting Method

• If selected items can be repeated, use FCP

• If selected items cannot be repeated and order is important, use permutations

• If selected items cannot be repeated and order isn’t important, use combinations

11.3

Page 12: Chapter 11: Counting Methods. Counting by Systematic Listing One-part tasks: each item in the list is identified by one feature Multi-part tasks: items

Pascal’s Triangle

C(n,r) gives the number in the rth spot of of the nth row

11.4

Page 13: Chapter 11: Counting Methods. Counting by Systematic Listing One-part tasks: each item in the list is identified by one feature Multi-part tasks: items

Binomial Theorem

• For any positive integer n,

(x + y)n = C(n,0)xn + C(n,1)xn-1y + C(n,2)xn-2y2 + … +

C(n,n-1)xyn-1 + C(n,n)yn

11.4

Page 14: Chapter 11: Counting Methods. Counting by Systematic Listing One-part tasks: each item in the list is identified by one feature Multi-part tasks: items

Counting and Gambling

• In a standard deck of cards, each card has a suit (clubs, spades, hearts or diamonds) and a rank (2,3,4,5,6,7,8,9,10, Jack, Queen, King, Ace).

• There are 4×13 =52 cards in total

• A poker hand has 5 different cards from the deck

Page 15: Chapter 11: Counting Methods. Counting by Systematic Listing One-part tasks: each item in the list is identified by one feature Multi-part tasks: items

Counting Problems with “Not”

• Sometimes it is easier to find the number of ways to NOT do A, so we can use

n(A) = n(U) – n(A’)Example: how many 5 card hands in poker

contain at least one card that is not a club?

11.5

Page 16: Chapter 11: Counting Methods. Counting by Systematic Listing One-part tasks: each item in the list is identified by one feature Multi-part tasks: items

Counting Problems with “Or”

• If A and B are any two sets then

n(A B)= n(A) + n(B) – n(A B)Example: If a single card is drawn from a

standard 52 card deck, how many ways are there to draw a card that is a face card or is hearts?

11.5

Page 17: Chapter 11: Counting Methods. Counting by Systematic Listing One-part tasks: each item in the list is identified by one feature Multi-part tasks: items

Poker Hands

How many hands in total? C(52,5)

How many full houses?

How many two pairs?

How many no pairs?

Page 18: Chapter 11: Counting Methods. Counting by Systematic Listing One-part tasks: each item in the list is identified by one feature Multi-part tasks: items

Probability

• The odds/probability that an event E will occur is denoted by P(E) and is given by

P(E) = n(E)/n(S)

Where S denotes all possible outcomes.

Ex. Odds of getting a royal flush in poker

are 4/2,598,960 = 1 in 649,740

12.1

Page 19: Chapter 11: Counting Methods. Counting by Systematic Listing One-part tasks: each item in the list is identified by one feature Multi-part tasks: items

Poker Odds

• Odds = 1/frequency, or in other words, odds are 1 in the frequency amount

Page 20: Chapter 11: Counting Methods. Counting by Systematic Listing One-part tasks: each item in the list is identified by one feature Multi-part tasks: items

Properties of Probability

• 0 ≤ P(E) ≤ 1

• The probability of an impossible event is 0

• The probability of a certain event is 1

• If E denotes an event occurring then E’ denotes the event NOT occurring

P(E) = 1 – P(E’)

• P(A or B) = P(A) + P(B) – P(A and B)

12.1