Student Explorations Modular Arithmetic in Mathematics Modular Arithmetic Introduction What is the sum of 8 and 7? Do you know that in some contexts it can be 3? How do you figure out when you will meet your friend if the time is 8:00 now and you will meet her in 7 hours? In this activity, we will learn the mathematics behind problems such as this and how to apply the mathematical understanding to other situations. Elementary Arithmetic 1. What is the sum of 5 and 2? What is the sum of 7 and 5? What is the sum of 8 and 26? 2. Show how you could arrive at your answers using the number lines below. 5 +2 -3 -2 -1 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 7 +5 -3 -2 -1 0 1 2 8 + 26 -3 -2 -1 0 1 2 We would like to thank Dina Zolotusky for the ideas she contributed to this SEM activity. Copyright © 2012 by the National Council of Teachers of Mathematics, Inc. www.nctm.org. All rights reserved. For personal use only. 1 Student Explorations in Mathematics, May 2012 Modular Arithmetic 3. Let’s add time using a typical 12-hour clock. Show how you arrived at your answers using the figures below. a. It is now 5 o’clock; what time will it be in 2 hours? 4. Compare your answers from questions 1, 2, and 3. Explain why the sum of 5 and 2 (or 7 and 5) is the same on the number line and on the clock, but the sum of 8 and 26 is not. b. What time will it be 5 hours after 7 o’clock? 5. In the space at the bottom of this page, create a number line for question 3c, and then show your work on it. Compare the number line you invented with those in your group. Identify the similarities and differences between the number lines. The clocks from question 3 should be familiar. Recall that one full day on Earth is 24 hours, which is represented by twice around the 12-hour clock. For questions 6–15, consider the following scenario: c. What is 26 hours after 8 o’clock? Time is quite different on the planet Orlandus. One full day on Orlandus is 30 hours, which is twice around a 15-hour clock. 6. Explain which of the following clocks (on the next page) would not be useful to tell time on Orlandus. Share your reasons with your group. 2 Student Explorations in Mathematics, May 2012 Modular Arithmetic a. A 12-hour clock b. add 15 to 5? b. A 15-hour clock c. add 47 to 7? c. A 30-hour clock d. A 50-hour clock 7. In a way, the clock is a type of counting machine. We can count up or count down. Using a 15-hour clock, what are the results when you— hink about how you would answer question 7 using a T 15‑hour clock or a 30-hour clock. Mathematicians solve big problems by understanding little ones. One strategy you can use when a problem seems overwhelming is to adapt the strategy that worked when solving a simpler and more familiar problem. Let’s do that here to develop a strategy. Think about a 12-month calendar. 8. Izzy’s family planned a vacation 25 months from July 2012. What year and month is their family vacation? Explain your strategy. 9. Izzy’s mom purchased a savings bond that is fully mature after 1000 months. Name the year and month that is 1000 months after July 2012. a. subtract 5 from 11? Explain your strategy to a group member. 3 Student Explorations in Mathematics, May 2012 Modular Arithmetic 10. Apply your strategy to answer the following questions. b. the value of 5 represents. a. Today is Monday; what day will it be in 13 days? c. t he value that (5 + 5 + 5 + 5 + 5 + 5 + 5 + 5 + 5 + 5) represents. b. It is now December; what month was it 26 months ago? Notice that the situation in question 11 can be more compactly written as 53 = 10(5) + 3. In either case, understanding what each value {3, 5, 10, and 53} represents is important. c. It is 8 o’clock now; what time will it be in 100 hours? 12.Try this: Write a story (or a situation) that can be explained by 115 = 7(15) + 10. d. Izzy had 67 sillybands and gave 8 of his friends the same number of sillybands. How many were left? 13. How is the situation in question 12 the same as a division problem? Try it: Divide 115 by 15. 11. Izzy decides to share his 53 M&M’s® with four friends. This situation can be explained mathematically by 53 = (5 + 5 + 5 + 5 + 5 + 5 + 5 + 5 + 5 + 5) + 3. Based on the situation, explain what— 14. Explain how the value of the remainder in question 13 is related to the 10 in question 12. a. the values of 3 and 53 represent. Notice that 115 = 7(15) + 10 can also be written as p = q(d ) + r. This is known as the integer division algorithm, and it shows how the product, p, is related to the divisor, d, quotient, q, and remainder, r. 4 Student Explorations in Mathematics, May 2012 Modular Arithmetic 15. Rewrite your work in question 11 in p = q(d ) + r form: Making a Generalization or Rule 16. Identify the key information needed to answer question 10. How is this information related to the general terms you used in question 15? Let’s go back to question 10 and rewrite the solutions using the division algorithm form. For example, if today is Monday, what day will it be in 13 days? The solution for this example is 13 = 1(7) + 6. • If it is now December, what month was it 26 months ago? Because the remainder r is dependent on the product p and divisor d, mathematicians invented a way to write this using a shortcut or symbol: p(mod d ) = r , or p ≡ r (mod d ) This is read as “p mod d is r.” The question, “What hour is it 44 hours after 2 o’clock on a 12-hour clock?” is answered by 44(mod 12) = 8. That is, the solution is the same as 8 hours past 2 o’clock, or 10 o’clock. • If it is 8 o’clock now, what time will it be in 100 hours? • Izzy had 67 sillybands and gave 8 of his friends the same number of sillybands. How many were left? When different problems can be solved using the same strategy, mathematicians try to understand the similarities among the problems and develop a rule. This rule can then be used to answer future questions that have the same characteristics or similarities. We have one representation of that rule as p = q(d) + r. Let’s examine another representation. 5 17.What arithmetic operations does the shorthand “mod” represent? For instance, the symbol 3 in the expression 6 3 3 means multiply 6 by 3 (thus, add 6 to itself 3 times). Share your idea from question 17 with your group. 18. The mod symbol is itself shorthand for the Latin word modulus, which means a small measure. Explain why you think mathematicians may have chosen modulus or mod to describe the relationship between 44, 12, and 8 in question 17. Student Explorations in Mathematics, May 2012 Modular Arithmetic Modular Arithmetic b. For what value of p is p(mod 21) always 0? When we perform mod operations, we are doing modular arithmetic. Sometimes it is referred to as clock arithmetic (although it can be applied to more than just clocks) because numbers “wrap around” when they reach a fixed quantity. 19. Let’s do some modular arithmetic. Evaluate the following: c. D etermine all possible values of d ≤ 4 so that 2 ≤ 60 (mod d) ≤ 4. a. 10(mod 3) = b. 55(mod 7) = c. 27(mod 9) = d. 96(mod 13) = Applications of Modular Arithmetic Did you know that mod, modulo, or modulus is used often in real life? Modular arithmetic is often used in coding information. The United States Postal Service (USPS) uses modular arithmetic to detect errors or forgeries of money orders. You can view a copy of a money order online at https://www.usps.com/shop/accepting-money-orders.htm. The serial number of a USPS money order is 11 digits long. The first 10 digits of the serial number (8810024532) are followed by a security check digit (7). If the money order is genuine, then the 10-digit number modulo 9 will be equal to the check digit. 22. Money order A has a serial number of 51177875501. Money order B has a serial number of 88100245327. Using modular arithmetic, determine if the money orders are genuine. 20. Determine the values of d so that 15(mod d ) = 3. 21. a. Izzy passes out 60 pieces of candy. Determine the value of d so that 60(mod d ) = 0. 6 Student Explorations in Mathematics, May 2012 Modular Arithmetic 23. Referring back to question 22, what is the next largest serial number that can be issued for Money order A using the modulo 9 security check system with the same check digit? Can you … • investigate how modular arithmetic is used to create ISBNs (International Standard Book Numbers) for books? • complete the addition and multiplication tables on the next page using mod 6? The values of (1 + 3)(mod 6) and (4 + 5)(mod 6) are provided. • explain the difference between modular arithmetic and number-base arithmetic? Describe your solution strategy to your group. 24. How can we produce a list of all the possible serial numbers for USPS money orders with the check digit of 1? Assume that the serial number needs to begin with a nonzero digit. • create unique 15-digit serial numbers (with a 2-digit check code) to encode a class set of calculators? • research the method known as casting out nines? Did you know that … • modular arithmetic was introduced by mathematician Carl Friedrich Gauss in 1801? • Gauss developed a formula that uses modular arithmetic to predict the date of Easter Sunday? • modular arithmetic can be used to prove the divisibility rules for 3 and 9? • international bank account numbers (IBANs) use modulo 97 to identify account errors? 25. Many other companies also include a security check to guard against forgeries. Avis® uses a single-digit modulo with a single-digit check number as the car identification number. Identify the check digit for this car rental receipt and determine the modulus if the receipt is genuine. 7 Student Explorations in Mathematics, May 2012 Modular Arithmetic + 0 1 2 3 4 5 0 1 1 2 3 4 5 0 4 1 2 2 3 3 4 0 3 3 4 2 5 5 Resources Ask Dr. Math. “Mod, Modulo, and Modular Arithmetic.” Drexel University Goodwin College of Professional Studies. http://mathforum.org/library/drmath/view /62930.html. Deaf Education Access for Computational Science. 2002. “Modular Mathematics.” The Shodor Education Foundation. http://www.shodor.org/succeedhi/succeedhi/ modularmath/introduction-content.html. “A Latin Dictionary.” Perseus Digital Library, Tufts University. Oxford: Clarendon Press, 1879. http://www.perseus.tufts. edu/hoppertext?doc=Perseus%3Atext%3A1999.04 .0059%3Aentry%3Dmodulus. Mathematica Ludibunda. “Smart Joe.” http://mathematica.ludibunda.ch/smart-joe6.html. United States Postal Service. 2012. “Accepting Money Orders.” https://www.usps.com/shop/acceptingmoney-orders.htm. Mathematical Content Elementary arithmetic; Clock arithmetic; Modular arithmetic; Integer division algorithm; Factors; Basic number theory; Check digit; Real-world applications; Problem solving. MathBoys. “Math Words, and Some Other Words of Interest: Definition of Modulus.” http://pballew.net/arithme1.html. Student Explorations in Mathematics is published electronically by the National Council of Teachers of Mathematics, 1906 Association Drive, Reston, VA 20191-1502. The five issues per year appear in September, November, January, March, and May. Pages may be reproduced for classroom use without permission. Editorial Panel Chair: Co-Editor: Editorial Panel: Field Editor: Board Liaison: Editorial Manager: Production Editor: Production Specialist: 8 Mary Lou Metz, Indiana University of Pennsylvania, mlmetz@iup.edu Cheryl Adeyemi, Virginia State University, cadeyemi@vsu.edu Darshan Jain, Adlai E. Stevenson High School, Illinois, djainm7712@gmail.com Larry Linnen, University of Colorado–Denver, llinnen@q.com Sharon McCready, Department of Education, Nova Scotia, Canada, mccreasa@gov.ns.ca Anthony Stinson, Clayton State University, Morrow, GA, anthonystinson@clayton.edu Ed Nolan, Montgomery County Public Schools, Rockville, Maryland, edward_c_nolan@mcpsmd.org Latrenda Knighten, Melrose Elementary School, Baton Rouge, Louisiana, ldknighten@aol.com Beth Skipper, NCTM, bskipper@nctm.org Luanne Flom, NCTM Rebecca Totten, NCTM Student Explorations in Mathematics, May 2012