Applications of Modular Arithmetic
Applications of Modular Arithmetic
MODERN WORLD
Textbook: Aufmann, R., Lockwood, J., Nation, R., Clegg, D., Epp, S., Abad, E. Jr. Mathematics
in the Modern World. (Rex Book Store, Inc., Manila, Philippines). 2018.
Applications of Modular Arithmetic
• Example: A purchase order for the book The Mathematical Tourist by Ivars Peterson includes
the ISBN 978-0-716-73250-5. Is this a valid ISBN?
• Example: The first twelve digits of the ISBN of a book are 978-971-23-9357-? Determine the
check digit.
• Example: The first twelve digits of the ISBN of a book are 978-052-10-9091-? Determine the
check digit.
• Another coding scheme is the UPC (Universal Product Code) which is
used in grocery stores. It is used with the purpose of tracking trade items.
• The UPC is a 12-digit number such that the last digit is also called the
check digit and is computed using modular arithmetic.
• The formula for the check digit of a UPC is given by
d12 = 10 - (3d1+d2+3d3+d4+3d5+d6+3d7+d8+3d9+d10+3d11) mod 10.
If d12 = 10 then the check digit is 0.
• Example: Is 0-14285-00278-9 a valid UPC?
• Example: Find the check digit for the UPC of the Century Tuna can with the first eleven digits
7-48485-10040-?
• Note: Similar to UPC is EAN (European Article Numbers also called International Article
Numbers). The UPC is used in US and Canada while EAN is used in Europe, Asia and
Australia. EAN is a 13-digit number with the computation of the check digit similar to that of
ISBN.
• Example: Find the check digit for the EAN of this eraser with the first 12 digits 4-806021-
38381?
• Luhn algorithm is a coding method used in credit cards, automated teller
machine card, etc. which uses modular arithmetic.
• Example: Using Luhn algorithm, check your own atm card number if it is valid.