Download as pdf or txt
Download as pdf or txt
You are on page 1of 5

121

UNIT XII. MATHEMATICAL SYSTEMS


by Bryan Joshua V. Bacani

Overview

This unit introduces you to the concept of modular arithmetic. As a preview, it is a part of a larger branch of
mathematics, the group theory. Basically, modular arithmetic deals with the remainders obtained from dividing two
integers. Simple as it may sound, but the contributions to the society include the development of barcodes, credit card
numbers, and improvements in the field of cryptology – the science of breaking secret codes.

Learning Objectives:

At the end of this unit, I will be able to:


1. understand the concept of modular arithmetic;
2. perform arithmetic operations involving modulo;
3. determine the additive and multiplicative inverses of modulo; and
4. apply modular arithmetic in real-life situations.

Setting Up (Unit 12)

Name: _______________________________________________________Score: ______________________________

Course/Year/Section: ___________________________________________ Date: _______________________________

Direction: Show your step-by-step solution in answering each problem if it is necessary then box your final answers. For
fill in the blank questions, simply supply the answer on the blank.

1. If seven days ago was a Saturday, then the day after tomorrow would be _____________________.

2. It is currently 9 PM. What will it be after 121 hours?

3. What would be the last two digits of the expression 224?

Lesson Proper

Introduction to Modular Arithmetic

Modular arithmetic, sometimes called as modulus arithmetic, in its simplest sense is a part of the study of group
theory dealing with the remainders obtained from dividing integers with a specific natural number called the modulo of the
operation or mod (Berggren, n.d.; Mathematics in the Modern World, 2018, p. 291-292; Parsons, n.d.). Two of the best
illustrations of modular arithmetic are clocks and the days in a week but let us concentrate with the former.

Several clocks we use have the 12-hour design. When using this, we usually affix AM or PM to indicate if the time
we are reporting is in the morning or in the afternoon/evening. For example, we state time in the afternoon, as one hour
past noon or 1 PM and not 13:00 as it should be the case since 13 comes after 12. Well, this may be valid when you are
in the military because they use the 24-hour format of time reporting. But even when they use that format, they report
00:00 when the clock strikes midnight not 24:00. This also happens in phones with a 24-hour time format setting.
122
It has been a convention in clocks to have a zero point at number 12 which tells us that when the hour hand
points to 12, the counting resets to zero and that the next number is one and so on until it reaches number 12 again.
When we speak of time, the numbers 1, 13, 25, 37, 49,… all mean either 1 AM or 1 PM and so is true with 2, 14, 26, 38,
50,… which all mean either 2 AM or 2 PM. Through this, we can see a pattern: 13 = 1 + a multiple of 12; 26 = 2 + a
multiple of 12; 51 = 3 + multiple of 12. In an alternate sense, 1 is obtained as a remainder when you divide 13 by 12, 2
when 26 and 12 are divided, and 3 for the division of 51 and 12. In this specific situation, modular arithmetic or arithmetic
modulo n comes in.

Using the language of mathematics, the “remainder of 13 divided by 12 is 1” can be written as

13 ≡ 1 mod 12

read as “13 is congruent to 1 mod or modulo 12” (Parsons, n.d.). This specific mathematical statement is called a
congruence. How does a modular arithmetic become a congruence such as the one previously mentioned? “Two integers
!"#
a and b are said to be congruent modulo n, where n is a natural number, if $ is an integer. In this case, we write a ≡ b
mod n. The number n is called the modulus. The statement a ≡ b mod n is called a congruence” (Mathematics in the
Modern World, 2018, p. 293).

If we apply the definition of congruent modulo n to the previous example, we have two integers 13 and 12 where a
= 13 and b = 12. The n in this case would be 1. If we determine the value of (a-b)/n, we get a value of 1 which is an
integer; therefore, the congruence is true because the condition that the answer of (a-b)/n must be an integer was
satisfied. Another example is 20 ≡ 4 mod 6. If we do the same thing, the value of (a-b)/n is 2.6666… or 8/3, which is
clearly not an integer; thus, the statement 20 ≡ 4 mod 6 is not a true congruence.

Arithmetic Operations on Modulo

In evaluating a modular expression, the first step is to perform the arithmetic operation then divide it by the
modulo or modulus. Take note that the answer will always be the remainder.

A. Addition Modulo

ü (16 + 12) mod 5


=> 28 mod 5
=> 28/5 = 5 r 3
=> (16 +12) mod 5 = 3

ü (100 + 2) mod 0
=> 102 mod 0
=> 102/0 is undefined, so the answer for (100 + 2) mod 0 is undefined.

B. Subtraction Modulo

ü (24 - 8) mod 10
=> 16 mod 10
=> 16/10 = 1 r 6
=> (24 – 8) mod 10 = 6

ü (7 – 23) mod 7
=> -16 mod 7

In this case, you cannot proceed with the usual step of dividing the answer with the modulo
because 16 = (7)(2) + 2 while -16 = (3)(7) + 5, the remainders 2 and 5 are not equal. You need to find a
value of x such that -16 ≡ x mod 7. Based on the definition of true congruence of modulo n, the value of x
shall satisfy the condition that (-16 – x)/7 is an integer. You can do so by substituting all values less than
the modulo including zero (in this case, plug-in 0 to 6) to the expression (-16 – x)/7 until you obtain an
answer that is an integer. For this case, the value of x is 5. Whatever value you may obtain, provided that
it satisfies the aforementioned condition, it will automatically be the answer for the given modular
expression; thus, (7 – 23) mod 7 = 5.

C. Multiplication Modulo

ü (15*3) mod 6
=> 45 mod 6
=> 45/6 = 7 r 3
=> (15*3) mod 6 = 3

ü (-6*6) mod 5
=> -36 mod 5**
**Note that the method to determine the answer is the same with how we solved for the answer on the
second example under subtraction modulo.
=> (-6*6) mod 5 = 4
123
Additive and Multiplicative Inverses in Modular Arithmetic

A. Additive Inverse

In standard arithmetic, two numbers are said to be additive inverses of each other if their sum is 0. For
example, the additive inverse of 4 is -4 because 4 + (-4) = 0, and vice versa. In modular arithmetic, the additive
inverse is a whole number smaller than the modulus such that when it is added to a certain number, the sum divided
by the modulus results to a zero remainder.

Example: Find the additive inverse of 12 in mod 18 arithmetic.

Solution: (x + 12) ≡ 0 mod 18


ü To solve for x, simply equate the expression on the left side with 18 then evaluate.
ü The additive inverse of 12 in mod 18 arithmetic is 6. Conversely, the additive inverse of 6 in mod 18
arithmetic is 12.

B. Multiplicative Inverse

Rules of standard arithmetic say that two numbers are said to be multiplicative inverses of each other if their
product is 1. The same principle is applied to modular arithmetic except that the multiplicative inverse of a certain
number is always a natural number unlike in standard arithmetic, one of the values can be an irrational number.

Example: Find the multiplicative inverse of 5 in mod 4 arithmetic.

Solution: 5x ≡ 1 mod 4
ü To get x, plug-in all values less than the modulus to the variable then determine if the congruence holds
true using the definition of congruent modulo n.
ü Alternatively, substitute all values less than the modulo to the variable then divide the resulting answer to
the modulo. If the remainder is 1, then that value of x is the multiplicative inverse of 5 in mod 4 arithmetic.
ü The value of x that satisfies the congruence is 1; thus, 1 is the multiplicative inverse of 5 in mod 4
arithmetic. Conversely, 5 is the multiplicative inverse of 1 in mod 4 arithmetic.

Applications of Modular Arithmetic

A. International Standard Book Number (ISBN)

This is used as a product identifier much like the bar codes we see on goods. ISBN facilitates the ease for
publishers, booksellers, libraries, and the like for inventory and sales monitoring purposes (International ISBN
Agency, n.d.). Most books that are publicly circulated are registered with an ISBN.

Figure __. Anatomy of an ISBN.


Source: International ISBN Agency, n.d.

As seen from Figure __, you can see that there are five significant elements of an ISBN. According to the
agency’s website, these parts serve different purposes. The EAN Prefix or prefix is a 3-digit element – either 978
or 979 - that is based on the international barcode standards (Pearce, 2019; International ISBN Agency, n.d.).
The registration group and registrant elements are geographical location and publisher identifiers, respectively.
The publication element is used to recognize the book’s edition and specific title format, and the last element is
the check digit that functions as a mathematical authenticator of the whole ISBN. The check digit has a modular
formula shown below:

𝑑%& = 10 − (𝑑% + 3𝑑' + 𝑑& + 3𝑑( + 𝑑) + 3𝑑* + 𝑑+ + 3𝑑, + 𝑑- + 3𝑑%. + 𝑑%% + 3𝑑%' ) 𝑚𝑜𝑑 10

To use the equation above, the ISBN digits must be numbered from left to right; thus, d13 corresponds to the
check digit.

B. Universal Product Code (UPC)

Like ISBN, UPC is also used as an identifier but for consumer goods. It is a 12-digit barcode exclusively
assigned to a specific product and manufacturer by an international non-profit group called GS1 (Technopedia,
n.d.). The 12-digit barcode is broken down into four elements as seen in Figure __.
124

Figure __. Anatomy of a universal product code.


Source: http://www.computalabel.com/aboutupc.htm

The first digit called as the number system character is an indicator, based on GS1 guidelines, of what
classification will the item fall into (e.g. food, non-food). The manufacturer and item numbers are unique IDs
exclusive for use by the company who owns it. The check digit verifies if the whole UPC is valid and is calculated
using modular arithmetic. The UPC check digit formula is as follows:

𝑑%' = 10 − (3𝑑% + 𝑑' + 3𝑑& + 𝑑( + 3𝑑) + 𝑑* + 3𝑑+ + 𝑑, + 3𝑑- + 𝑑%. + 3𝑑%% ) 𝑚𝑜𝑑 10

C. Credit Card Numbers

The validity of a credit card number is also anchored with the concept of modular arithmetic. Issuers of
such numbers utilize the Luhn algorithm as the primary coding method that is based on mod 10 arithmetic
(Mathematics in the Modern World, 2018, p. 303 – 304).

References

Berggren, J. L. (n.d.). Modular arithmetic. Retrieved July 21, 2020 from https://www.britannica.com/science/modular-
arithmetic

Computalabel International. (n.d.). UPC. Retrieved July 20, 2020 from http://www.computalabel.com/aboutupc.htm

International ISBN Agency. (n.d.). What is an ISBN?. Retrieved July 22, 2020 from https://www.isbn-
international.org/content/what-isbn

Mathematics in the Modern World. (2018). Rex Book Store: Philippines.

Parsons, M. (n.d.). Introduction to modular arithmetic. Retrieved July 21, 2020 from
http://jwilson.coe.uga.edu/EMAT6680/Parsons/MVP6690/Essay1
/modular.html

Pearce, S. (January 16, 2019). ISBN Numbers: Everything you need to know. Retrieved July 20, 2020 from https://swatt-
books.co.uk/isbn-numbers-everything-you-need-to-know
125
Assessing Learning (Unit 12)

Name: _______________________________________________________Score: ______________________________

Course/Year/Section: ___________________________________________ Date: _______________________________

Directions: Show your solutions, solve as neatly as possible, and box your final answers. If it requires you to use another
sheet of paper for the problem-solving part, please do so. Non-compliance to these shall guarantee a deduction in your
scores. Please use additional sheets if necessary.

For items 1-3: Determine if the congruence holds true or not. Support your answer mathematically.
1. 100 ≡ 20 mod 8
2. 89 ≡ 5 mod 9
3. 7 ≡ 21 mod 3

For items 4 – 5: Perform the indicated arithmetic operations on modulo.


4. (24 – 41) mod 8
5. (26*11) mod 15

6. In 2016, Rodrigo Duterte’s inauguration as the President of the Philippines coincided on a Thursday. On what day
will his term finally end?
7. Determine if the following ISBN is valid or not: 978-1-55690-182-9
8. Identify the correct check digit of the ISBN of the book, Relativity: The Special and General Theory by Albert
Einstein: 978-0-517-88441-?
9. Many printed airline tickets contain a 10-digit document number followed by a check digit. The check digit is the
sum of the first 10 digits mod 7. Determine if the following airline ticket is valid or not: 2373453867 6
10. Will a credit card bearing the numbers 4896-4198-8760-1970 be accepted in an online transaction?

Answers and solutions for A.L. Unit 12:

You might also like