1 / 120

One Potato, Two Potato, …

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

xue
Download Presentation

One Potato, Two Potato, …

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


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

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

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

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

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

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

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

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

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

  10. n = 9, m = 3 1 2 9 8 3 7 4 6 5

  11. n = 9, m = 3 1 2 9 8 7 4 6 5

  12. n = 9, m = 3 1 2 9 8 7 4 5

  13. n = 9, m = 3 1 2 8 7 4 5

  14. n = 9, m = 3 1 2 8 7 5

  15. n = 9, m = 3 1 2 7 5

  16. n = 9, m = 3 1 2 7

  17. n = 9, m = 3 1 7

  18. n = 9, m = 3 1 Conclusion: R(9, 3) = 1

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

  20. n = 10, m = 3 1 10 2 9 3 8 4 7 5 6

  21. n = 10, m = 3 1 10 Remove the m = 3d person. 2 9 8 4 7 5 6

  22. n = 10, m = 3 Instead of continuing as before, 1 10 2 9 8 4 7 5 6

  23. n = 10, m = 3 Instead of continuing as before, renumber the remaining 9 people, starting at the next person. 1 8 10 7 2 9 9 6 8 5 4 1 7 4 5 2 Old Number New Number 63

  24. n = 10, m = 3 Note: The original number for each person is m = 3 more than the new number 1 8 10 7 2 9 9 6 8 5 4 1 7 4 5 2 Old Number New Number 63

  25. n = 10, m = 3 Note: The original number for each person is m = 3 more than the new number ALMOST 1 8 10 7 2 9 9 6 8 5 4 1 7 4 5 2 Old Number New Number 63

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

  27. 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. Conclusion: The person was originally in the spot 4. R(10, 3) = 4 = 1 + 3 = R(9, 3)+3 4 1

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

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

  30. 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 1 2 n 3 n - 1  m - 1  m + 1 m + 2

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

  32. 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 1 2 n 3 n - 1  m – 1 n - 1  m + 11 Old Number New Number m + 2 2

  33. 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 1 2 n 3 n - 1  m – 1 n - 1  m + 11 Old Number New Number m + 2 2

  34. 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). Last Person Standing R(n - 1, m)  m + 11 Old Number New Number m + 2 2

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

  36. 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 Last Person Standing R(n - 1, m) R(n, m)  m + 11 Old Number New Number m + 2 2

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

  38. Go back to n = 10, m = 3 1 10 2 9 3 8 4 7 5 6

  39. n = 10, m = 3 Remove person from Position m = 3. 1 10 2 9 8 4 7 5 6

  40. n = 10, m = 3 After we renumber the people, all of the old numbers are m = 3 more than the new, except … 1 8 10 7 2 9 9 6 8 5 4 1 7 4 5 2 6 3

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

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

  43. Modular Arithmetic • Start with a positive integer k.

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

  45. 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, • First find i + j.

  46. 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, • First find i + j. • If i + j≤ k, the answer is (i + j)(mod k) = i + j .

  47. 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, • First find i + j. • If i + j≤ k, the answer is (i + j)(mod k) = i + j . • If i + j > k, the answer is (i + j)(mod k) = i + j - k

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

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

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

More Related