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

One Potato, Two Potato, …

Jan 10, 2016

Download

Documents

xue

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.” - PowerPoint PPT Presentation
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: One Potato, Two Potato, …

One Potato, Two Potato, …

Mathematics of Elimination

John A. Frohliger

St. Norbert College

Page 2: One Potato, Two Potato, …

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

Page 3: One Potato, Two Potato, …

Problem 338 inThe Amazing 1000 Puzzle Challenge 2 (Carlton Books )

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

Page 4: One Potato, Two Potato, …

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

210 = 1024

Then use the formula.

1024 – 2(1024 – 1000) = 976

Page 5: One Potato, Two Potato, …

The “Original” VersionThe 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.

Page 6: One Potato, Two Potato, …

The “Original” VersionThe 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.

Page 7: One Potato, Two Potato, …

Generalized Problem

• Suppose you have n people in a circle.

• Pick a number m.

• Go around removing every mth person until only one remains.

• Where was that person in the original circle?

Page 8: One Potato, Two Potato, …

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 mth person.

• We want to find R(n, m).

Page 9: One Potato, Two Potato, …

Example

• Start with n = 9 people.

• Remove every m = 3nd person.

• Find R(9, 3), the number of the last person remaining.

Page 10: One Potato, Two Potato, …

n = 9, m = 3

1

2

3

4

56

7

8

9

Page 11: One Potato, Two Potato, …

n = 9, m = 3

1

2

4

56

7

8

9

Page 12: One Potato, Two Potato, …

n = 9, m = 3

1

2

4

5

7

8

9

Page 13: One Potato, Two Potato, …

n = 9, m = 3

1

2

4

5

7

8

Page 14: One Potato, Two Potato, …

n = 9, m = 3

1

2

5

7

8

Page 15: One Potato, Two Potato, …

n = 9, m = 3

1

2

5

7

Page 16: One Potato, Two Potato, …

n = 9, m = 3

1

2

7

Page 17: One Potato, Two Potato, …

n = 9, m = 3

1

7

Page 18: One Potato, Two Potato, …

n = 9, m = 3

1

Conclusion: R(9, 3) = 1

Page 19: One Potato, Two Potato, …

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 = 3d person.

Page 20: One Potato, Two Potato, …

n = 10, m = 3

1

2

3

4

5

6

7

8

9

10

Page 21: One Potato, Two Potato, …

n = 10, m = 3

1

4

5

6

7

8

9

10 Remove the m = 3d person.

2

Page 22: One Potato, Two Potato, …

n = 10, m = 3

1

4

5

6

7

8

9

10

Instead of continuing as before,

2

Page 23: One Potato, Two Potato, …

n = 10, m = 3

1 8

4 1

5 2

6 3

7 4

8 5

9 6

10 7

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

Page 24: One Potato, Two Potato, …

n = 10, m = 3

Note: The original number for each person is m = 3 more than the new number

1 8

4 1

5 2

6 3

7 4

8 5

9 6

10 7 2 9

Old Number

New Number

Old Number

New Number

Page 25: One Potato, Two Potato, …

n = 10, m = 3

Note: The original number for each person is m = 3 more than the new number

ALMOST

1 8

4 1

5 2

6 3

7 4

8 5

9 6

10 7 2 9

Old Number

New Number

Old Number

New Number

Page 26: One Potato, Two Potato, …

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

4 1

Old Number

New Number

Old Number

New Number

Page 27: One Potato, Two Potato, …

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

4 1Conclusion:

The person was originally in the spot 4.

R(10, 3) = 4 = 1 + 3 = R(9, 3) +3

Page 28: One Potato, Two Potato, …

Key for Finding R(n, m) for n > 1

• Start with n people, numbered 1 thru n.

12

3

m - 1

m

m + 1

m + 2

n

n - 1

Page 29: One Potato, Two Potato, …

Key for Finding R(n, m) for n > 1

• Start with n people, numbered 1 thru n.

• Remove Person m.

12

3

m - 1

m + 1

m + 2

n

n - 1

Page 30: One Potato, Two Potato, …

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

12

3

m - 1

m + 1

m + 2

n

n - 1

Page 31: One Potato, Two Potato, …

Key for Finding R(n, m) for n > 1

• Renumber them 1 thru (n - 1), starting at the next person in line.

12

3

m – 1n - 1

m + 1 1

m + 22

n

n - 1

Old Number

New Number

Old Number

New Number

Page 32: One Potato, Two Potato, …

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

12

3

m – 1n - 1

m + 1 1

m + 22

n

n - 1

Page 33: One Potato, Two Potato, …

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

12

3

m – 1n - 1

m + 1 1

m + 22

n

n - 1

Page 34: One Potato, Two Potato, …

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 + 1 1

m + 22

Last Person Standing

R(n - 1, m)

Old Number

New Number

Old Number

New Number

Page 35: One Potato, Two Potato, …

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 + 1 1

m + 22

Last Person Standing

R(n - 1, m)

R(n, m)

Old Number

New Number

Old Number

New Number

Page 36: One Potato, Two Potato, …

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 + 1 1

m + 22

Last Person Standing

R(n - 1, m)

R(n, m)

Old Number

New Number

Old Number

New Number

Page 37: One Potato, Two Potato, …

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

Page 38: One Potato, Two Potato, …

Go back to n = 10, m = 3

1

2

3

4

5

6

7

8

9

10

Page 39: One Potato, Two Potato, …

n = 10, m = 3

1

4

5

6

7

8

9

10

Remove person from Position m = 3. 2

Page 40: One Potato, Two Potato, …

n = 10, m = 3

1 8

4 1

5 2

6 3

7 4

8 5

9 6

10 7

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

2 9

Page 41: One Potato, Two Potato, …

n = 10, m = 3

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

1 8

4 1

5 2

6 3

7 4

8 5

9 6

10 7 2 9 … New Position 8 was Old Position 1 and New Position 9 was Old Position 2.

Page 42: One Potato, Two Potato, …

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 …

1 8

4 1

5 2

6 3

7 4

8 5

9 6

10 7 2 9

To make sense of this, we need to talk about …

Page 43: One Potato, Two Potato, …

Modular Arithmetic

• Start with a positive integer k.

Page 44: One Potato, Two Potato, …

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.

Page 45: One Potato, Two Potato, …

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.

Page 46: One Potato, Two Potato, …

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 .

Page 47: One Potato, Two Potato, …

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

Page 48: One Potato, Two Potato, …

Example with k = 12

• The numbers are 1, 2, 3, …, 11, 12.

Page 49: One Potato, Two Potato, …

Example with k = 12

• The numbers are 1, 2, 3, …, 11, 12.

• (3 + 7)(mod 12) = 10

Page 50: One Potato, Two Potato, …

Example with k = 12

• The numbers are 1, 2, 3, …, 11, 12.

• (3 + 7)(mod 12) = 10

• (9 + 7)(mod 12) = 16 – 12 = 4

Page 51: One Potato, Two Potato, …

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!

Page 52: One Potato, Two Potato, …

Math on a Clock

• The numbers are 1, 2, 3, …, 11, 12.

Page 53: One Potato, Two Potato, …

Math on a Clock

• The numbers are 1, 2, 3, …, 11, 12.

• 7 hours after 3 o’clock, the time is

(3 + 7)(mod 12) = 10 o’clock.

Page 54: One Potato, Two Potato, …

Math on a Clock

• The numbers are 1, 2, 3, …, 11, 12.

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

Page 55: One Potato, Two Potato, …

One more time with n = 10, m = 3

1

2

3

4

5

6

7

8

9

10

Page 56: One Potato, Two Potato, …

One more time with n = 10, m = 3

1

4

5

6

7

8

9

10

Remove person from Position m = 3. 2

Page 57: One Potato, Two Potato, …

One more time with n = 10, m = 3

1 8

4 1

5 2

6 3

7 4

8 5

9 6

10 7

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

Page 58: One Potato, Two Potato, …

One more time with n = 10, m = 3

1 8

4 1

5 2

6 3

7 4

8 5

9 6

10 7

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

Page 59: One Potato, Two Potato, …

One more time with n = 10, m = 3

1 8

4 1

5 2

6 3

7 4

8 5

9 6

10 7

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

Page 60: One Potato, Two Potato, …

“Almost” Formula for R(n, m)

For n > 1,

R(n, m) = R(n – 1, m) + m

Page 61: One Potato, Two Potato, …

Actual Formula for R(n, m)

For n > 1,

R(n, m) = (R(n – 1, m) + m)(mod n)

Page 62: One Potato, Two Potato, …

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

Page 63: One Potato, Two Potato, …

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

Page 64: One Potato, Two Potato, …

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

Page 65: One Potato, Two Potato, …

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)

Page 66: One Potato, Two Potato, …

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

Page 67: One Potato, Two Potato, …

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)

Page 68: One Potato, Two Potato, …

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

Page 69: One Potato, Two Potato, …

Continuing the Pattern

n R(n, 2)=(R(n -1,2) + 2)(mod n)

2 1

3 3

4 1

5 3

6 5

7 7

8 1

9 3

10 5

11 7

12 9

13 11

14 13

15 15

16 1

Page 70: One Potato, Two Potato, …

The Pattern

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

Page 71: One Potato, Two Potato, …

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.

Page 72: One Potato, Two Potato, …

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)

Page 73: One Potato, Two Potato, …

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 2k is the highest power of 2 less

than n, R(n, 2) = 2(n – 2n) + 1.

Page 74: One Potato, Two Potato, …

Solution to Problem 338 The Amazing 1000 Puzzle

Challenge 2Of the 1000 original soldiers, the last one left was in position R(1000, 2).

Page 75: One Potato, Two Potato, …

Solution to Problem 338 The Amazing 1000 Puzzle

Challenge 2Of the 1000 original soldiers, the last one left was in position R(1000, 2).

1. The highest power of 2 less than 1000 is 29 = 512.

Page 76: One Potato, Two Potato, …

Solution to Problem 338 The Amazing 1000 Puzzle

Challenge 2Of the 1000 original soldiers, the last one left was in position R(1000, 2).

1. The highest power of 2 less than 1000 is 29 = 512.

2. The last soldier was in position R(1000, 2) = 2(1000 – 512) + 1 = 977

Page 77: One Potato, Two Potato, …

Comparison to Answer in the Book

Our Solution:

1.The highest power of 2 less than 1000 is 29 = 512.

2.The last soldier was in position R(1000, 2) = 2(1000 – 512) + 1 = 977

Page 78: One Potato, Two Potato, …

Comparison to Answer in the Book

Our Solution:

1.The highest power of 2 less than 1000 is 29 = 512.

2.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 210 = 1024.

2.The last soldier was in position1024 – 2(1024 – 1000)= 976

Page 79: One Potato, Two Potato, …

Comparison to Answer in the Book

Our Solution:

1.The highest power of 2 less than 1000 is 29 = 512.

2.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 210 = 1024.

2.The last soldier was in position1024 – 2(1024 – 1000)= 976

The Book’s Answer is Correct

Page 80: One Potato, Two Potato, …

Comparison to Answer in the Book

Our Solution:

1.The highest power of 2 less than 1000 is 29 = 512.

2.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 210 = 1024.

2.The last soldier was in position1024 – 2(1024 – 1000)= 976

The Book’s Answer is Correct, if you start counting at 0 instead of 1.

Page 81: One Potato, Two Potato, …

Finding R(n, 2) using Base 2

Usually, we write numbers in base 10 (decimal) notation.

20712 x 103 + 7 x 101 + 1

Page 82: One Potato, Two Potato, …

Finding R(n, 2) using Base 2

In base 2, numbers are written as a sequence of 0’s and 1’s.

1101 = 13 (base 10)

1 x 23 + 1 x 22 + 1

Page 83: One Potato, Two Potato, …

Finding R(n, 2) using Base 2

1. Take n.

(1000)

1. Take n in base 2

(111110100)

Page 84: One Potato, Two Potato, …

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

(111110100)

2. Remove the leading 1.

(11110100)

Page 85: One Potato, Two Potato, …

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

(111110100)

2. Remove the leading 1.

(11110100)

3. Add a 0 at the end.

(111101000)

Page 86: One Potato, Two Potato, …

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.

(976 + 1 = 977)

1. Take n in base 2

(111110100)

2. Remove the leading 1.

(11110100)

3. Add a 0 at the end.

(111101000)

4. Change the last 0 to 1.

(111101001 = 977)

Page 87: One Potato, Two Potato, …

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.

(976 + 1 = 977)

1. Take n in base 2

(111110100)

2. Remove the leading 1.

(11110100)

3. Add a 0 at the end.

(111101000)

4. Change the last 0 to 1.

(111101001 = 977)

(Shortcut: Move the 1 from beginning to end.)

Page 88: One Potato, Two Potato, …

R(n, m) for m ≠ 2

n R(n, 3)=(R(n - 1,3) + 3)(mod n)

2 2

3 2

4 1

5 4

6 1

7 4

8 7

9 1

10 4

11 7

12 10

13 13

14 2

15 5

16 8

Page 89: One Potato, Two Potato, …

R(n, m) for m ≠ 2

n R(n, 4)=(R(n - 1,4) + 4)(mod n)

2 1

3 2

4 2

5 1

6 5

7 2

8 6

9 1

10 5

11 9

12 1

13 5

14 9

15 13

16 1

Page 90: One Potato, Two Potato, …

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

2 3 4 5 6 7 8 9 10 11 12 132 1 3 1 3 5 7 1 3 5 7 9 113 2 2 1 4 1 4 7 1 4 7 10 134 1 2 2 1 5 2 6 1 5 9 1 55 2 1 2 2 1 6 3 8 3 8 1 66 1 1 3 4 4 3 1 7 3 9 3 97 2 3 2 4 5 5 4 2 9 5 12 68 1 3 3 1 3 4 4 3 1 9 5 139 2 2 3 2 5 7 8 8 7 5 2 11

10 1 2 4 4 2 5 7 8 8 7 5 211 2 1 4 5 4 1 4 6 7 7 6 412 1 1 1 3 3 1 5 8 10 11 11 10

n

m

2 3 4 5 6 7 8 9 10 11 12 132 1 3 1 3 5 7 1 3 5 7 9 113 2 2 1 4 1 4 7 1 4 7 10 134 1 2 2 1 5 2 6 1 5 9 1 55 2 1 2 2 1 6 3 8 3 8 1 66 1 1 3 4 4 3 1 7 3 9 3 97 2 3 2 4 5 5 4 2 9 5 12 68 1 3 3 1 3 4 4 3 1 9 5 139 2 2 3 2 5 7 8 8 7 5 2 11

10 1 2 4 4 2 5 7 8 8 7 5 211 2 1 4 5 4 1 4 6 7 7 6 412 1 1 1 3 3 1 5 8 10 11 11 10

n

m

Page 91: One Potato, Two Potato, …

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

2 3 4 5 6 7 8 9 10 11 12 132 1 3 1 3 5 7 1 3 5 7 9 113 2 2 1 4 1 4 7 1 4 7 10 134 1 2 2 1 5 2 6 1 5 9 1 55 2 1 2 2 1 6 3 8 3 8 1 66 1 1 3 4 4 3 1 7 3 9 3 97 2 3 2 4 5 5 4 2 9 5 12 68 1 3 3 1 3 4 4 3 1 9 5 139 2 2 3 2 5 7 8 8 7 5 2 11

10 1 2 4 4 2 5 7 8 8 7 5 211 2 1 4 5 4 1 4 6 7 7 6 412 1 1 1 3 3 1 5 8 10 11 11 10

n

m

2 3 4 5 6 7 8 9 10 11 12 132 1 3 1 3 5 7 1 3 5 7 9 113 2 2 1 4 1 4 7 1 4 7 10 134 1 2 2 1 5 2 6 1 5 9 1 55 2 1 2 2 1 6 3 8 3 8 1 66 1 1 3 4 4 3 1 7 3 9 3 97 2 3 2 4 5 5 4 2 9 5 12 68 1 3 3 1 3 4 4 3 1 9 5 139 2 2 3 2 5 7 8 8 7 5 2 11

10 1 2 4 4 2 5 7 8 8 7 5 211 2 1 4 5 4 1 4 6 7 7 6 412 1 1 1 3 3 1 5 8 10 11 11 10

n

m

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

Page 92: One Potato, Two Potato, …

Variation

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

Page 93: One Potato, Two Potato, …

Variation

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

• You want to be the last person standing.

Page 94: One Potato, Two Potato, …

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.

Page 95: One Potato, Two Potato, …

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?

Page 96: One Potato, Two Potato, …

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

2 3 4 5 6 7 8 9 10 11 12 132 1 3 1 3 5 7 1 3 5 7 9 113 2 2 1 4 1 4 7 1 4 7 10 134 1 2 2 1 5 2 6 1 5 9 1 55 2 1 2 2 1 6 3 8 3 8 1 66 1 1 3 4 4 3 1 7 3 9 3 97 2 3 2 4 5 5 4 2 9 5 12 68 1 3 3 1 3 4 4 3 1 9 5 139 2 2 3 2 5 7 8 8 7 5 2 11

10 1 2 4 4 2 5 7 8 8 7 5 211 2 1 4 5 4 1 4 6 7 7 6 412 1 1 1 3 3 1 5 8 10 11 11 10

n

m

2 3 4 5 6 7 8 9 10 11 12 132 1 3 1 3 5 7 1 3 5 7 9 113 2 2 1 4 1 4 7 1 4 7 10 134 1 2 2 1 5 2 6 1 5 9 1 55 2 1 2 2 1 6 3 8 3 8 1 66 1 1 3 4 4 3 1 7 3 9 3 97 2 3 2 4 5 5 4 2 9 5 12 68 1 3 3 1 3 4 4 3 1 9 5 139 2 2 3 2 5 7 8 8 7 5 2 11

10 1 2 4 4 2 5 7 8 8 7 5 211 2 1 4 5 4 1 4 6 7 7 6 412 1 1 1 3 3 1 5 8 10 11 11 10

n

m

Page 97: One Potato, Two Potato, …

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

you could pick m = 11.

2 3 4 5 6 7 8 9 10 11 12 132 1 3 1 3 5 7 1 3 5 7 9 113 2 2 1 4 1 4 7 1 4 7 10 134 1 2 2 1 5 2 6 1 5 9 1 55 2 1 2 2 1 6 3 8 3 8 1 66 1 1 3 4 4 3 1 7 3 9 3 97 2 3 2 4 5 5 4 2 9 5 12 68 1 3 3 1 3 4 4 3 1 9 5 139 2 2 3 2 5 7 8 8 7 5 2 11

10 1 2 4 4 2 5 7 8 8 7 5 211 2 1 4 5 4 1 4 6 7 7 6 412 1 1 1 3 3 1 5 8 10 11 11 10

n

m

2 3 4 5 6 7 8 9 10 11 12 132 1 3 1 3 5 7 1 3 5 7 9 113 2 2 1 4 1 4 7 1 4 7 10 134 1 2 2 1 5 2 6 1 5 9 1 55 2 1 2 2 1 6 3 8 3 8 1 66 1 1 3 4 4 3 1 7 3 9 3 97 2 3 2 4 5 5 4 2 9 5 12 68 1 3 3 1 3 4 4 3 1 9 5 139 2 2 3 2 5 7 8 8 7 5 2 11

10 1 2 4 4 2 5 7 8 8 7 5 211 2 1 4 5 4 1 4 6 7 7 6 412 1 1 1 3 3 1 5 8 10 11 11 10

n

m

Page 98: One Potato, Two Potato, …

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?

Page 99: One Potato, Two Potato, …

But, what if you don’t know how many people are in the circle?

• Answer: No, there is no such “magic” number m.

Page 100: One Potato, Two Potato, …

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.

Page 101: One Potato, Two Potato, …

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.

Page 102: One Potato, Two Potato, …

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?

Page 103: One Potato, Two Potato, …

Answer: Yes!

Page 104: One Potato, Two Potato, …

Answer: Yes!m = 2520 works for any n up to 10.

2 3 4 5 6 7 8 9 10 11 12 132515 2 3 2 2 3 5 8 3 8 4 11 42516 1 3 3 4 6 2 6 2 8 5 1 82517 2 2 3 5 2 6 3 9 6 4 1 92518 1 2 4 2 6 4 2 9 7 6 4 132519 2 1 4 3 2 1 8 7 6 6 5 22520 1 1 1 1 1 1 1 1 1 2 2 132521 2 3 4 5 6 7 8 9 10 1 2 12522 1 3 1 3 5 7 1 3 5 8 10 102523 2 2 1 4 1 4 7 1 4 8 11 122524 1 2 2 1 5 2 6 1 5 10 2 42525 2 1 2 2 1 6 3 8 3 9 2 5

n

m

2 3 4 5 6 7 8 9 10 11 12 132515 2 3 2 2 3 5 8 3 8 4 11 42516 1 3 3 4 6 2 6 2 8 5 1 82517 2 2 3 5 2 6 3 9 6 4 1 92518 1 2 4 2 6 4 2 9 7 6 4 132519 2 1 4 3 2 1 8 7 6 6 5 22520 1 1 1 1 1 1 1 1 1 2 2 132521 2 3 4 5 6 7 8 9 10 1 2 12522 1 3 1 3 5 7 1 3 5 8 10 102523 2 2 1 4 1 4 7 1 4 8 11 122524 1 2 2 1 5 2 6 1 5 10 2 42525 2 1 2 2 1 6 3 8 3 9 2 5

n

m

Page 105: One Potato, Two Potato, …

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

Page 106: One Potato, Two Potato, …

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

Page 107: One Potato, Two Potato, …

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

Page 108: One Potato, Two Potato, …

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.

Page 109: One Potato, Two Potato, …

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.

Page 110: One Potato, Two Potato, …

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

Page 111: One Potato, Two Potato, …

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.

Page 112: One Potato, Two Potato, …

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!

Page 113: One Potato, Two Potato, …

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.

Page 114: One Potato, Two Potato, …

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

Page 115: One Potato, Two Potato, …

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.

Page 116: One Potato, Two Potato, …

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?

Page 117: One Potato, Two Potato, …

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 5th person, then the 10th, then the 15th, and so on. Who is the last one standing?

Page 118: One Potato, Two Potato, …

Things to Think About

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

Page 119: One Potato, Two Potato, …

Things to Think About

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

Page 120: One Potato, Two Potato, …

Thank You!