Top Banner
CSRU1100 CSRU1100 Counting Counting
28

CSRU1100 Counting. Counting What is Counting “how many?” Counting is the process of determining the answer to a question of “how many?” for any given.

Dec 19, 2015

Download

Documents

Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: CSRU1100 Counting. Counting What is Counting “how many?” Counting is the process of determining the answer to a question of “how many?” for any given.

CSRU1100CSRU1100

CountingCounting

Page 2: CSRU1100 Counting. Counting What is Counting “how many?” Counting is the process of determining the answer to a question of “how many?” for any given.

What is CountingCounting

• Counting is the process of determining the answer to a question of “how many?”“how many?” for any given number of problems

• You already have a fairly decent innate sense of what it means to count for a variety of different problems.

• This lesson develops 4 rules4 rules that match your intuitions but also allow you to solve much more challenging problems

Page 3: CSRU1100 Counting. Counting What is Counting “how many?” Counting is the process of determining the answer to a question of “how many?” for any given.

ExamplesExamples

• “If there are 10 boys and 12 girls in a class, how many people are there altogether?”

• “If a car dealership sells 3 different models of cars and offers them in 4 different colors, how many different ways can you purchase a car?”

• “If a New York State license plate consists of 3 letters followed by 4 numbers, how many different license plate possibilities are there?”

Page 4: CSRU1100 Counting. Counting What is Counting “how many?” Counting is the process of determining the answer to a question of “how many?” for any given.

CountingCounting is a process of selectingprocess of selecting

• One way to view the counting process is that it considers the number of different ways you number of different ways you could select itemscould select items.

• If I ask you “how many total people are in a “how many total people are in a class that consists of 10 boys and 12 girls”class that consists of 10 boys and 12 girls” you want to rephrase this as a selection problem.

• “How many ways could I select 1 boy OR 1 girl in the class?”

Page 5: CSRU1100 Counting. Counting What is Counting “how many?” Counting is the process of determining the answer to a question of “how many?” for any given.

• Car example. “How many different ways can I “How many different ways can I select one model AND one color in order to select one model AND one color in order to make my purchase.”make my purchase.”

• License plate example. In order to choose 1 license plate I have to select “1 letter AND 1 “1 letter AND 1 letter AND 1 letter AND 1 number AND 1 letter AND 1 letter AND 1 number AND 1 number AND 1 number AND 1 number”number AND 1 number AND 1 number”

Page 6: CSRU1100 Counting. Counting What is Counting “how many?” Counting is the process of determining the answer to a question of “how many?” for any given.

It’s really an English Problem

• The hardest part in all of counting is going to be to convert each problem into a selection problem. Once you have done that then the rules we will create will answer all of our questions.

Page 7: CSRU1100 Counting. Counting What is Counting “how many?” Counting is the process of determining the answer to a question of “how many?” for any given.

Rule #1:Rule #1: Just Count ThemJust Count Them

• The most basic of all the counting rules is the following:– ““If you can count them, then just count them”If you can count them, then just count them”

• This means don’t waste your time on doing any mathematical formulas if the answer is pretty obvious. (although you can always check to see if the math would have given you the same answer).

Page 8: CSRU1100 Counting. Counting What is Counting “how many?” Counting is the process of determining the answer to a question of “how many?” for any given.

• ““How many different ways are there to flip How many different ways are there to flip two coins”two coins”

• Step 1: Treat it as a selection problem• ““How can I select a way to flip two coins?”How can I select a way to flip two coins?”– You could select “Heads, Heads”“Heads, Heads”– You could select “Tails, Tails”“Tails, Tails”– You could select “Heads, Tails”“Heads, Tails”– You could select “Tails, Heads”“Tails, Heads”

• Those are all the ways possible, so just count them.

• The answer would be 4

Page 9: CSRU1100 Counting. Counting What is Counting “how many?” Counting is the process of determining the answer to a question of “how many?” for any given.

Choosing valuesChoosing values• Once you know how to phrase the problem as a selection

problem then you have to determine what you know about each aspect of the selection.

• If “I want to select 1 boy OR 1 girl”“I want to select 1 boy OR 1 girl”– I know there are 10 total boys to select from – I know there are 12 total girls to select from

• If “I want to select 1 model AND 1 color”“I want to select 1 model AND 1 color”– I know there are 4 different models– I know there are 3 different colors

• If “I want to select the license plate”“I want to select the license plate”– I know there are 10 different digits– I know there are 26 different letters

Page 10: CSRU1100 Counting. Counting What is Counting “how many?” Counting is the process of determining the answer to a question of “how many?” for any given.

Rule #2:Rule #2: The OR RuleThe OR Rule

• Once you have the problem phrased as a selection problem and you have figured out the values for each part then the math begins.

• If you have terms that are combined using the word OROR then add the termsadd the terms

Page 11: CSRU1100 Counting. Counting What is Counting “how many?” Counting is the process of determining the answer to a question of “how many?” for any given.

ExampleExample

• How many different ways are there to buy a vehicle How many different ways are there to buy a vehicle if a dealership has 7 different cars and 4 different if a dealership has 7 different cars and 4 different trucks?trucks?

• Phrase it as a selection problem• How many ways could I select 1 car OROR 1 truck?– 7 choices for cars– 4 choices for trucks

• Its an OR problem so add them• 7 + 4 = 11

Page 12: CSRU1100 Counting. Counting What is Counting “how many?” Counting is the process of determining the answer to a question of “how many?” for any given.

Rule #3:Rule #3: The AND RuleThe AND Rule• If you have terms that are combined using the word

ANDAND then multiply the valuesmultiply the values• ““How many different ways can you buy a shirt that How many different ways can you buy a shirt that

comes in 5 different styles each of which comes in 6 comes in 5 different styles each of which comes in 6 different colors.”different colors.”

• Phrase it as a selection “How many ways can I select 1 shirt that has a style ANDAND a color”– 5 choices for style– 6 choices for color

• It’s an AND problem– 5*6 = 30

Page 13: CSRU1100 Counting. Counting What is Counting “how many?” Counting is the process of determining the answer to a question of “how many?” for any given.

Playing the LotteryPlaying the Lottery

• ““How many ways can the winning numbers of a pick How many ways can the winning numbers of a pick 4 lottery occur if each number can be 0-9 and you 4 lottery occur if each number can be 0-9 and you have to pick 4 numbers in order”have to pick 4 numbers in order”

• Phrase it as a selection: “How many ways can I pick 1 digit AND 1 digit AND 1 digit AND 1 digit?”

• 10 choices for each digit• AND problem• 10 * 10 * 10 * 10 = 10000

Page 14: CSRU1100 Counting. Counting What is Counting “how many?” Counting is the process of determining the answer to a question of “how many?” for any given.

Sometimes The Values ChangeSometimes The Values Change• ““How many ways could you pick three people from a How many ways could you pick three people from a

classroom of 30 to be president, vice-president and classroom of 30 to be president, vice-president and secretary?”secretary?”

• Phrase it as a selection: “How many ways could I select 1 president AND 1 VP AND 1 secretary?”

• So it’s a multiplication problem• How many choices for president

– 30 choices (because there are 30 students)• How many choices for VP

– 29 choices, since we selected on person to be president, they can’t also be VP

• How many choices for secretary– 28 choices

Page 15: CSRU1100 Counting. Counting What is Counting “how many?” Counting is the process of determining the answer to a question of “how many?” for any given.

Rule #4:Rule #4: If order does NOT matterIf order does NOT matter

• Pick a possible answer to a counting problem• Do you get a different answer if you put things

in a different order?• If you do NOTNOT get a different answer– Divide your result by n! where n is the number of Divide your result by n! where n is the number of

items you have selecteditems you have selected

Page 16: CSRU1100 Counting. Counting What is Counting “how many?” Counting is the process of determining the answer to a question of “how many?” for any given.

Factorial SidebarFactorial Sidebar

• There is a mathematical concept called factorial.• It is a quick abbreviation for a longer multiplication.• 5! Means “5 factorial”• 10! • 0! • You cannot do factorials on negative numbers

Page 17: CSRU1100 Counting. Counting What is Counting “how many?” Counting is the process of determining the answer to a question of “how many?” for any given.

More FactorialMore Factorial

• Factorial is just a multiplication process• 5! = 5 x 4 x 3 x 2 x 1• 3! = 3 x 2 x 1• 10! = 10 x 9 x 8 x 7 x 6 x 5 x 4 x 3 x 2 x 1• 0! = 1

Page 18: CSRU1100 Counting. Counting What is Counting “how many?” Counting is the process of determining the answer to a question of “how many?” for any given.

So how do we use Rule #4So how do we use Rule #4

• ““How many different ways can I create a How many different ways can I create a committee of three students from the 30 committee of three students from the 30 students in our class?”students in our class?”

• So we go through the normal process and figure out that we are selecting:– 1 student AND 1 student AND 1 student

• And the values are– 30, 29 and 28.

Page 19: CSRU1100 Counting. Counting What is Counting “how many?” Counting is the process of determining the answer to a question of “how many?” for any given.

Does Order Matter?Does Order Matter?

• To invoke rule #4 you need to figure out whether order matters. How do you do this, you make up some examples.

• I could choose “Sally, Bill, and Chris”• Would it be different if I chose “Chris, Bill and

Sally”• For this example the answer is “NO” so

therefore order does NOT matter.order does NOT matter.

Page 20: CSRU1100 Counting. Counting What is Counting “how many?” Counting is the process of determining the answer to a question of “how many?” for any given.

Only when Order does NOT MatterOnly when Order does NOT Matter

• We invoke rule #4 when order does NOT matter.

• Thus we need to use rule #4 in this example.• So we figure out how many values we had to

choose. 3• And thus we divide our answer by 3!• (30 * 29 * 28) / 3!

Page 21: CSRU1100 Counting. Counting What is Counting “how many?” Counting is the process of determining the answer to a question of “how many?” for any given.

A further clarifications on Rule #4A further clarifications on Rule #4

• Rule #4 gets slightly trickier because we have to know when to ask about order.

• If I ask you to choose a car model and a color, you might say that the order I make these choices does not matter and thus want to invoke rule #4.

• This would be wrong.

Page 22: CSRU1100 Counting. Counting What is Counting “how many?” Counting is the process of determining the answer to a question of “how many?” for any given.

Sometimes Order is irrelevantSometimes Order is irrelevant• Examples like the car model and color actually are

irrelevant when it comes to order.• Order only doesn’t matter if you can envision a

circumstance where order might matter.• Order would matter when picking three people if we

were assigning them specific roles like president, vice-president and secretary. Then changing the order would produce a different answer.

• Thus, whether order matters makes a difference and we need to think about if we need to invoke rule #4.

Page 23: CSRU1100 Counting. Counting What is Counting “how many?” Counting is the process of determining the answer to a question of “how many?” for any given.

ProblemsProblems

• How many different possibilities are there in the PowerBall lottery? Powerball asks the player to choose 5 unique numbers (1 – 53) in any order and then choose a special extra number (1-42).

• How do I select one ticket? I select 1 number AND 1 number AND 1 number AND 1 number AND 1 number. Then I have to select 1 bonus number.

Page 24: CSRU1100 Counting. Counting What is Counting “how many?” Counting is the process of determining the answer to a question of “how many?” for any given.

• For the first 5 numbers, I have 53 different choices for the first number, 52 for the second and so on.

• 53 * 52 * 51 * 50 * 49 Does order matter?• Well order isn’t irrelevant because I can

envision a situation where it does matter and situation where it doesn’t matter.

• In this case it doesn’t matter (picking 10 followed by 17 is no different then picking 17 followed by 10)

Page 25: CSRU1100 Counting. Counting What is Counting “how many?” Counting is the process of determining the answer to a question of “how many?” for any given.

• So we need to divide by some factorial value.• What value? Well, how many values did we

have to select. 5• So we divide by 5!• Now we still have the bonus number to worry

about which is an independent choice from the first 5 (i.e. you can repeat a number from the first set, and you can only choose from 1-42).

• Well we have 42 choices for this number.

Page 26: CSRU1100 Counting. Counting What is Counting “how many?” Counting is the process of determining the answer to a question of “how many?” for any given.

• So we take our first half AND our second half and we end up with

• ((53*52*51*50*49)/5!)*42 = • 120526770 different ways of picking numbers

Page 27: CSRU1100 Counting. Counting What is Counting “how many?” Counting is the process of determining the answer to a question of “how many?” for any given.

Permutation

P(n, r) = n! (n-r)!

Number of permutations for r items chosen from a total of n items.

Order matters.

Page 28: CSRU1100 Counting. Counting What is Counting “how many?” Counting is the process of determining the answer to a question of “how many?” for any given.

Combination

C(n,r) = P(n,r) = n! r! r!(n-r)!

Choose r items from n.Order does not matter.