One Potato, Two Potato, … Mathematics of Elimination John A. Frohliger St. Norbert College.

Slides:



Advertisements
Similar presentations
LESSON 1.3 ESTIMATION.
Advertisements

5.1 Rules for Exponents Review of Bases and Exponents Zero Exponents
Copyright © Cengage Learning. All rights reserved.
Solving Systems of three variables
Algebraic Expressions
Fraction IX Least Common Multiple Least Common Denominator
Factors, Primes & Composite Numbers
VEDIC MATHEMATICS. Vedas The Vedas, written around BCE, are ancient Indian texts containing a record of human experience and knowledge Thousands.
CALENDAR.
DIVIDING INTEGERS 1. IF THE SIGNS ARE THE SAME THE ANSWER IS POSITIVE 2. IF THE SIGNS ARE DIFFERENT THE ANSWER IS NEGATIVE.
Patterns and Sequences
4.4.1 Generalised Row Echelon Form
Year 5 Term 3 Unit 6b Day 1.
Patterns and sequences We often need to spot a pattern in order to predict what will happen next. In maths, the correct name for a pattern of numbers is.
Brought To You By- Tutorial Services-The Math Center
The 5S numbers game..
Order of Operations Lesson
Chapter 1 Algebra, Mathematical Models, and Problem Solving
Columbus State Community College
The basics for simulations
Discrete Math Recurrence Relations 1.
Word Sort integers, addition, even numbers, odd numbers prime numbers, composite numbers, negative integer, positive numbers, whole numbers, subtraction,
Factoring Polynomials
Factoring Quadratics — ax² + bx + c Topic
The Game of Algebra or The Other Side of Arithmetic The Game of Algebra or The Other Side of Arithmetic © 2007 Herbert I. Gross by Herbert I. Gross & Richard.
Review for 2nd Nine Weeks Exam
Columbus State Community College
Presented by: Tutorial Services The Math Center
Factors, Prime Numbers & Composite Numbers
Chapter 8 Exploring Polynomial Functions
The Game of Algebra or The Other Side of Arithmetic The Game of Algebra or The Other Side of Arithmetic © 2007 Herbert I. Gross by Herbert I. Gross & Richard.
The upside of negativity Subtracting Negative Integers! Video # 8 about integers.
Interesting Integers!.
Discrete Mathematics Math 6A Homework 5 Solution.
 Multiply Numbers Written in Scientific Notation 8 th Grade Math September 4, 2013 Ms. DeFreese.
Adding and Subtracting Integers
Chapter 1: Expressions, Equations, & Inequalities
Focus Questions: Best no’s less than the product of 2 and r 15 – 2r 2.The product of 6 and t divided by t − 7 3. The quotient of h and 4 plus.
Quantitative Analysis (Statistics Week 8)
Fraction IX Least Common Multiple Least Common Denominator
Ch. 1: Number Relationships
Solving One-Step Equations
More Two-Step Equations
4.5 Solve Quadratic Equations by Finding Square Roots
Factoring Trinomials.
This packet is intended to help refresh and reinforce your understanding of some basic Mathematical concepts. As you prepare to take the COMPASS exam,
LONG DIVISION CAN BE EASY!.
MathOnMonday® Presents: Building Math Courage® A program designed for Adults or Kids who have struggled to learn their Math in the traditional classroom!
Scientific Notation Remember how?.  The coefficient must be greater than or equal to 1 and less than 10.  Must be base 10  The exponent shows the number.
§ 11.4 The Binomial Theorem.
1 Lesson Dividing with Integers. 2 Lesson Dividing with Integers California Standard: Number Sense 2.3 Solve addition, subtraction, multiplication,
An Interactive Tutorial by S. Mahaffey (Osborne High School)
Place value What do we mean by place value?
Topic 16 Sorting Using ADTs to Implement Sorting Algorithms.
Introduction to Recursion and Recursive Algorithms
Using Lowest Common Denominator to add and subtract fractions
Click the red dot …..to begin.. If this is your first time, click..the red dot. If this is not..your first time, click the blue dot.
Order of Operations And Real Number Operations
MA 1128: Lecture 06 – 2/15/11 Graphs Functions.
The Pigeonhole Principle Alan Kaylor Cline. The Pigeonhole Principle Statement Children’s Version: “If k > n, you can’t stuff k pigeons in n holes without.
The Nature of Mathematical Reasoning
Tutorial 11 of CSCI2110 Number of Sequence & Recursion Tutor: Zhou Hong ( 周宏 )
KS3 Mathematics N4 Powers and roots
Mr Barton’s Maths Notes
Scientific Notation.
Significant Figure Rules RulesExamples The following are always significant Non zero digits Zeros between non zero digits Zero to the right of a non zero.
SPLASH! 2012 QUADRATIC RECIPROCITY Michael Belland.
The Further Mathematics Support Programme Our aim is to increase the uptake of AS and A level Mathematics and Further Mathematics to ensure that more.
Presentation transcript:

One Potato, Two Potato, … Mathematics of Elimination John A. Frohliger St. Norbert College

Selecting Someone to be “It” Stand around in a circle and go from person to person chanting, “One potato, two potatoes, three potatoes, four, five potatoes, six potatoes, seven potatoes, more.” Whoever was indicated when we got to “more” was out of the circle. Continue playing “One Potato” in this manner until only one person was left. That person was “It.”

Problem 338 inThe Amazing 1000 Puzzle Challenge 2 (Carlton Books ) Decimated In Roman times, soldiers who were to be punished were forced to form a line, and every tenth one was executed. This is the origin of the word “decimate.” If you were one of 1000 soldiers lined up in a circle, with every second soldier being executed until only one remained, in which position would you want to be in order to survive?

Solution in the Back (You want to start in position) 976. Take 2 to the power of 10, which gives you the lowest number above = 1024 Then use the formula – 2(1024 – 1000) = 976

The “Original” Version The Josephus Problem Flavius Josephus, first century Jewish historian. According to legend, during the Jewish-Roman war, Josephus and forty soldiers were trapped by the Roman army. They decided to commit suicide instead of surrendering to the Romans. Their plan was to form a circle and kill every third one until none remained.

The “Original” Version The Josephus Problem Josephus did not want to die, so he figured out which position would be the last one standing and took that position. Once he was the only one left, he allowed himself to be captured by the Romans.

Generalized Problem Suppose you have n people in a circle. Pick a number m. Go around removing every m th person until only one remains. Where was that person in the original circle?

Notation for Finding the Solution Number the people from 1 to n. Start the count at Person 1. Let R(n, m) be the number of the person (in the original lineup) who remains until the end if we remove every m th person. We want to find R(n, m).

Example Start with n = 9 people. Remove every m = 3 nd person. Find R(9, 3), the number of the last person remaining.

n = 9, m =

1 2 7

1 7

1 Conclusion: R(9, 3) = 1

New Example Find R(10, 3). (Same example as before, with n raised from 9 to 10) Start with n = 10 people. Remove every m = 3 d person.

n = 10, m =

n = 10, m = Remove the m = 3 d person. 2

n = 10, m = Instead of continuing as before, 2

n = 10, m = Instead of continuing as before, renumber the remaining 9 people, starting at the next person. Old Number New Number Old Number New Number 2 9

n = 10, m = 3 Note: The original number for each person is m = 3 more than the new number Old Number New Number Old Number New Number

n = 10, m = 3 Note: The original number for each person is m = 3 more than the new number ALMOST Old Number New Number Old Number New Number

n = 10, m = 3 We know from the n = 9, m = 3 example, that the last remaining person is the one newly numbered R(9, 3) = Old Number New Number Old Number New Number

n = 10, m = 3 We know from the n = 9, m = 3 example, that the last remaining person is the one newly numbered R(9, 3) = Conclusion: The person was originally in the spot 4. R(10, 3) = 4 = = R(9, 3) +3

Key for Finding R(n, m) for n > 1 Start with n people, numbered 1 thru n  m - 1 m m + 1 m + 2 n n - 1 

Key for Finding R(n, m) for n > 1 Start with n people, numbered 1 thru n. Remove Person m  m - 1 m + 1 m + 2 n n - 1 

Key for Finding R(n, m) for n > 1 Start with n people, numbered 1 thru n. Remove Person m. There are now n – 1 people remaining  m - 1 m + 1 m + 2 n n - 1 

Key for Finding R(n, m) for n > 1 Renumber them 1 thru (n - 1), starting at the next person in line  m – 1 n - 1 m m n n - 1  Old Number New Number Old Number New Number

Key for Finding R(n, m) for n > 1 Renumber them 1 thru (n - 1), starting at the next person in line. Old Number = New Number + m Old Number New Number Old Number New Number  m – 1 n - 1 m m n n - 1 

Key for Finding R(n, m) for n > 1 Renumber them 1 thru (n - 1), starting at the next person in line. Old Number = New Number + m ALMOST Old Number New Number Old Number New Number  m – 1 n - 1 m m n n - 1 

Key for Finding R(n, m) for n > 1 Of the remaining n – 1 people, the last person standing has new number R(n – 1, m). m m Last Person Standing R(n - 1, m)  Old Number New Number Old Number New Number

Key for Finding R(n, m) for n > 1 The last person was originally in position R(n, m) = R(n – 1, m) + m m m Last Person Standing R(n - 1, m) R(n, m)  Old Number New Number Old Number New Number

Key for Finding R(n, m) for n > 1 The last person was originally in position R(n, m) = R(n – 1, m) + m ALMOST m m Last Person Standing R(n - 1, m) R(n, m)  Old Number New Number Old Number New Number

Let’s get rid of the “ALMOST” part.

Go back to n = 10, m =

n = 10, m = Remove person from Position m = 3. 2

n = 10, m = After we renumber the people, all of the old numbers are m = 3 more than the new, except … 2 9

n = 10, m = 3 After we renumber the people, all of the old numbers are m = 3 more than the new, except … … New Position 8 was Old Position 1 and New Position 9 was Old Position 2.

n = 10, m = 3 … New Position 8 was Old Position 1 and New Position 9 was Old Position 2. After we renumber the people, all of the old numbers are m = 3 more than the new, except … To make sense of this, we need to talk about …

Modular Arithmetic Start with a positive integer k.

Modular Arithmetic Start with a positive integer k. In arithmetic mod k, the numbers are 1, 2, 3, …, k. You don’t list 0, negative numbers or numbers greater than k.

Modular Arithmetic Start with a positive integer k. In arithmetic mod k, the numbers are 1, 2, 3, …, k. You don’t list 0, negative numbers or numbers greater than k. To add numbers i and j, modulo k, 1.First find i + j.

Modular Arithmetic Start with a positive integer k. In arithmetic mod k, the numbers are 1, 2, 3, …, k. You don’t list 0, negative numbers or numbers greater than k. To add numbers i and j, modulo k, 1.First find i + j. 2.If i + j ≤ k, the answer is (i + j)(mod k) = i + j.

Modular Arithmetic Start with a positive integer k. In arithmetic mod k, the numbers are 1, 2, 3, …, k. You don’t list 0, negative numbers or numbers greater than k. To add numbers i and j, modulo k, 1.First find i + j. 2.If i + j ≤ k, the answer is (i + j)(mod k) = i + j. 3.If i + j > k, the answer is (i + j)(mod k) = i + j - k

Example with k = 12 The numbers are 1, 2, 3, …, 11, 12.

Example with k = 12 The numbers are 1, 2, 3, …, 11, 12. (3 + 7)(mod 12) = 10

Example with k = 12 The numbers are 1, 2, 3, …, 11, 12. (3 + 7)(mod 12) = 10 (9 + 7)(mod 12) = 16 – 12 = 4

Example with k = 12 The numbers are 1, 2, 3, …, 11, 12. (3 + 7)(mod 12) = 10 (9 + 7)(mod 12) = 16 – 12 = 4 Hey, you’ve done this before!

Math on a Clock The numbers are 1, 2, 3, …, 11, 12.

Math on a Clock The numbers are 1, 2, 3, …, 11, hours after 3 o’clock, the time is (3 + 7)(mod 12) = 10 o’clock.

Math on a Clock The numbers are 1, 2, 3, …, 11, hours after 3 o’clock, the time is (3 + 7)(mod 12) = 10 o’clock. 7 hours after 9 o’clock, the time is (9 + 7)(mod 12) = 16 – 12 = 4 o’clock.

One more time with n = 10, m =

One more time with n = 10, m = Remove person from Position m = 3. 2

One more time with n = 10, m = After we renumber the people, all of the old numbers are m = 3 more than the new … 2 9

One more time with n = 10, m = After we renumber the people, all of the old numbers are m = 3 more than the new … … mod 10! 2 9 (8 + 3)(mod 10) = 1

One more time with n = 10, m = After we renumber the people, all of the old numbers are m = 3 more than the new … … mod 10! 2 9 (9 + 3)(mod 10) = 2

“Almost” Formula for R(n, m) For n > 1, R(n, m) = R(n – 1, m) + m

Actual Formula for R(n, m) For n > 1, R(n, m) = (R(n – 1, m) + m)(mod n)

Disclaimer for Those Who Already Knew Modular Arithmetic Frequently, in arithmetic mod k, the numbers used are 0, 1, … k – 1, instead of 1, 2, 3, …, k. To add numbers i and j, modulo k, First find i + j. If 0 ≤ i + j < k, the answer is (i + j)(mod k) = i + j ; If k ≤ i + j, the answer is (i + j)(mod k) = i + j – k (*)

Disclaimer for Those Who Already Knew Modular Arithmetic Frequently, in arithmetic mod k, the numbers used are 0, 1, … k – 1, instead of 1, 2, 3, …, k. To add numbers i and j, modulo k, First find i + j. If 0 ≤ i + j < k, the answer is (i + j)(mod k) = i + j ; If k ≤ i + j, the answer is (i + j)(mod k) = i + j – k (*) * Actually, you get (i + j)(mod k) by taking i + j and subtracting enough copies of k until the answer is from 0 to k – 1 (or 1 to k in our case).

Pattern of R(n, 2) In the original problem, n = 1000 and m = 2. Look at the pattern leading up to R(1000, 2). R(2, 2) = 1 (Do it yourself.)

Pattern of R(n, 2) In the original problem, n = 1000 and m = 2. Look at the pattern leading up to R(1000, 2). R(2, 2) = 1 (Do it yourself.) R(3, 2) = (R(2, 2) + 2)(mod 3)

Pattern of R(n, 2) In the original problem, n = 1000 and m = 2. Look at the pattern leading up to R(1000, 2). R(2, 2) = 1 (Do it yourself.) R(3, 2) = (R(2, 2) + 2)(mod 3) = (1 + 2)(mod 3) = 3(mod 3) = 3

Pattern of R(n, 2) In the original problem, n = 1000 and m = 2. Look at the pattern leading up to R(1000, 2). R(2, 2) = 1 (Do it yourself.) R(3, 2) = (R(2, 2) + 2)(mod 3) = (1 + 2)(mod 3) = 3(mod 3) = 3 R(4, 2) = (R(3, 2) + 2)(mod 4)

Pattern of R(n, 2) In the original problem, n = 1000 and m = 2. Look at the pattern leading up to R(1000, 2). R(2, 2) = 1 (Do it yourself.) R(3, 2) = (R(2, 2) + 2)(mod 3) = (1 + 2)(mod 3) = 3(mod 3) = 3 R(4, 2) = (R(3, 2) + 2)(mod 4) = (3 + 2)(mod 4) = 5(mod 4) = 1

Continuing the Pattern n R(n, 2) =(R(n -1,2) + 2)(mod n)

The Pattern If n is a power of 2, R(n, 2)=1

The Pattern If n is a power of 2, R(n, 2)=1 If n is not a power of 2, ♦Find the highest power of 2 that is less than n.

The Pattern If n is a power of 2, R(n, 2)=1 If n is not a power of 2, ♦Find the highest power of 2 that is less than n. ♦Starting at that number, count odd numbers until you get to n. That’s R(n, 2)

The Pattern If n is a power of 2, R(n, 2)=1 If n is not a power of 2, ♦Find the highest power of 2 that is less than n. ♦Starting at that number, count odd numbers until you get to n. That’s R(n, 2) ♦That is, if 2 k is the highest power of 2 less than n, R(n, 2) = 2(n – 2 n ) + 1.

Solution to Problem 338 The Amazing 1000 Puzzle Challenge 2 Of the 1000 original soldiers, the last one left was in position R(1000, 2).

Solution to Problem 338 The Amazing 1000 Puzzle Challenge 2 Of the 1000 original soldiers, the last one left was in position R(1000, 2). 1.The highest power of 2 less than 1000 is 2 9 = 512.

Solution to Problem 338 The Amazing 1000 Puzzle Challenge 2 Of the 1000 original soldiers, the last one left was in position R(1000, 2). 1.The highest power of 2 less than 1000 is 2 9 = The last soldier was in position R(1000, 2) = 2(1000 – 512) + 1 = 977

Comparison to Answer in the Book Our Solution: 1.The highest power of 2 less than 1000 is 2 9 = The last soldier was in position R(1000, 2) = 2(1000 – 512) + 1 = 977

Comparison to Answer in the Book Our Solution: 1.The highest power of 2 less than 1000 is 2 9 = The last soldier was in position R(1000, 2) = 2(1000 – 512) + 1 = 977 Book’s Solution: 1.The lowest power of 2 greater than 1000 is 2 10 = The last soldier was in position 1024 – 2(1024 – 1000) = 976

Comparison to Answer in the Book Our Solution: 1.The highest power of 2 less than 1000 is 2 9 = The last soldier was in position R(1000, 2) = 2(1000 – 512) + 1 = 977 Book’s Solution: 1.The lowest power of 2 greater than 1000 is 2 10 = The last soldier was in position 1024 – 2(1024 – 1000) = 976 The Book’s Answer is Correct

Comparison to Answer in the Book Our Solution: 1.The highest power of 2 less than 1000 is 2 9 = The last soldier was in position R(1000, 2) = 2(1000 – 512) + 1 = 977 Book’s Solution: 1.The lowest power of 2 greater than 1000 is 2 10 = The last soldier was in position 1024 – 2(1024 – 1000) = 976 The Book’s Answer is Correct, if you start counting at 0 instead of 1.

Finding R(n, 2) using Base 2 Usually, we write numbers in base 10 (decimal) notation x x

Finding R(n, 2) using Base 2 In base 2, numbers are written as a sequence of 0’s and 1’s = 13 (base 10) 1 x x

Finding R(n, 2) using Base 2 1.Take n. (1000) 1.Take n in base 2 ( )

Finding R(n, 2) using Base 2 1.Take n. (1000) 2.Subtract the highest power of 2 less than n. (1000 – 512 = 488) 1.Take n in base 2 ( ) 2.Remove the leading 1. ( )

Finding R(n, 2) using Base 2 1.Take n. (1000) 2.Subtract the highest power of 2 less than n. (1000 – 512 = 488) 3.Multiply by 2. (2 x 488 = 976) 1.Take n in base 2 ( ) 2.Remove the leading 1. ( ) 3.Add a 0 at the end. ( )

Finding R(n, 2) using Base 2 1.Take n. (1000) 2.Subtract the highest power of 2 less than n. (1000 – 512 = 488) 3.Multiply by 2. (2 x 488 = 976) 4.Add 1. ( = 977) 1.Take n in base 2 ( ) 2.Remove the leading 1. ( ) 3.Add a 0 at the end. ( ) 4.Change the last 0 to 1. ( = 977)

Finding R(n, 2) using Base 2 1.Take n. (1000) 2.Subtract the highest power of 2 less than n. (1000 – 512 = 488) 3.Multiply by 2. (2 x 488 = 976) 4.Add 1. ( = 977) 1.Take n in base 2 ( ) 2.Remove the leading 1. ( ) 3.Add a 0 at the end. ( ) 4.Change the last 0 to 1. ( = 977) (Shortcut: Move the 1 from beginning to end.)

R(n, m) for m ≠ 2 n R(n, 3) =(R(n - 1,3) + 3)(mod n)

R(n, m) for m ≠ 2 n R(n, 4) =(R(n - 1,4) + 4)(mod n)

R(n, m) for various values of n and m

I don’t see nice patterns for m ≠ 2. Do you?

Variation Suppose you are Person 1, and you get to choose the number m.

Variation Suppose you are Person 1, and you get to choose the number m. You want to be the last person standing.

Variation Suppose you are Person 1, and you get to choose the number m. You want to be the last person standing. That is, you want R(n, m) = 1.

Variation Suppose you are Person 1, and you get to choose the number m. You want to be the last person standing. That is, you want R(n, m) = 1. Can you pick the right m?

Yes, if you know n. For instance, if n = 7,

Yes, if you know n. For instance, if n = 7, you could pick m = 11.

But, what if you don’t know how many people are in the circle? Is there some “magic” m that will work no matter how many people you start with? That is, is there an m so that R(n, m) = 1 for every n?

But, what if you don’t know how many people are in the circle? Answer: No, there is no such “magic” number m.

But, what if you don’t know how many people are in the circle? Answer: No, there is no such “magic” number m. For any m, if n happens to be m - 1, then Person 1 is the first person to be eliminated.

But, what if you don’t know how many people are in the circle? Answer: No, there is no such “magic” number m. Example: If you pick m = 6 but there are n = 5 people, you are the first one out.

What if you know roughly how many people there are? Suppose you don’t know exactly what n is, but you know it’s less than some number N. Could you find an m such that R(n, m) = 1 for any such n? For example, can you find a “magic” m if you know n ≤ 10?

Answer: Yes!

m = 2520 works for any n up to 10.

How Did He Do That? If I am Person 1 and there are n people in the circle, I can eliminate the person right before me if I chose m = n

How Did He Do That? If I am Person 1 and there are n people in the circle, I can eliminate the person right before me if I chose m = n or m = 2n

How Did He Do That? If I am Person 1 and there are n people in the circle, I can eliminate the person right before me if I chose m = n or m = 2n or m = 3n

How Did He Do That? If I am Person 1 and there are n people in the circle, I can eliminate the person right before me if I chose m = n or m = 2n or m = 3n or m equals any multiple of n, that is, if m = kn for any positive integer k.

How Did He Do That? After the person before me is eliminated, there are now n - 1 people and the count restarts at me. As before, the next time around, the person before me will be eliminated if m happens to be a multiple of n - 1.

How Did He Do That? After that person is eliminated, there are now n - 2 people remaining and the count restarts at me. Again, the new person before me will be eliminated if m happens to be a multiple of n - 2. And so on...

Moral: If I choose m to be any multiple of n, n - 1, n - 2, …, 3, 2, then each time around, the person right before me is eliminated.

Moral: If I choose m to be any multiple of n, n - 1, n - 2, …, 3, 2, then each time around, the person right before me is eliminated. I will be the last person standing!

Moral: If I choose m to be any multiple of n, n - 1, n - 2, …, 3, 2, then each time around, the person right before me is eliminated. I will be the last person standing! So if I know there are no more than N people in the circle, I can choose m to be any common multiple of N, N -1, N -2, …, 3, 2.

Moral: If I choose m to be any multiple of n, n - 1, n - 2, …, 3, 2, then each time around, the person right before me is eliminated. I will be the last person standing! So if I know there are no more than N people in the circle, I can choose m to be any common multiple of N, N -1, N -2, …, 3, 2. (m = N! works, but it’s pretty big.)

Moral: In our example where n is no bigger than N = 10, a common multiple of 2, 3, …, 10 is m = 5 x 7 x 8 x 9 = 2520.

Things to Think About If you are Person 2 or Person 3, or somebody else, is there a way of finding the right m so that you are the last person standing?

Things to Think About What if, instead of a single static m, it’s a sequence of numbers? For example, if the sequence is 5, 10, 15, …, first you remove the 5 th person, then the 10 th, then the 15 th, and so on. Who is the last one standing?

Things to Think About Is there a “magic” sequence of numbers so that Person 1 is always the last person standing?

Things to Think About Is there a “magic” sequence so that Person 2 (or 3 or …) is the last one standing?

Thank You!