one potato, two potato, …

Post on 10-Jan-2016

61 Views

Category:

Documents

0 Downloads

Preview:

Click to see full reader

DESCRIPTION

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

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 )

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?

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

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.

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.

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?

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

Example

• Start with n = 9 people.

• Remove every m = 3nd person.

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

n = 9, m = 3

1

2

3

4

56

7

8

9

n = 9, m = 3

1

2

4

56

7

8

9

n = 9, m = 3

1

2

4

5

7

8

9

n = 9, m = 3

1

2

4

5

7

8

n = 9, m = 3

1

2

5

7

8

n = 9, m = 3

1

2

5

7

n = 9, m = 3

1

2

7

n = 9, m = 3

1

7

n = 9, m = 3

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

n = 10, m = 3

1

2

3

4

5

6

7

8

9

10

n = 10, m = 3

1

4

5

6

7

8

9

10 Remove the m = 3d person.

2

n = 10, m = 3

1

4

5

6

7

8

9

10

Instead of continuing as before,

2

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Go back to n = 10, m = 3

1

2

3

4

5

6

7

8

9

10

n = 10, m = 3

1

4

5

6

7

8

9

10

Remove person from Position m = 3. 2

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

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.

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 …

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

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

One more time with n = 10, m = 3

1

2

3

4

5

6

7

8

9

10

One more time with n = 10, m = 3

1

4

5

6

7

8

9

10

Remove person from Position m = 3. 2

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

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

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

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

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

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

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

Solution to Problem 338 The Amazing 1000 Puzzle

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

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.

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

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

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

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

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.

Finding R(n, 2) using Base 2

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

20712 x 103 + 7 x 101 + 1

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

Finding R(n, 2) using Base 2

1. Take n.

(1000)

1. Take n in base 2

(111110100)

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)

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)

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)

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

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

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

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

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?

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,

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

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

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!

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

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 5th person, then the 10th, then the 15th, 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!

top related