100% found this document useful (1 vote)
361 views

5.1 Modular Arithmetic Part 2

The document discusses modular arithmetic operations including addition, subtraction and multiplication modulo n. It provides examples of performing arithmetic operations modulo n and solving congruence equations. It also discusses additive and multiplicative inverses in modular arithmetic with examples.

Uploaded by

meia quider
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
100% found this document useful (1 vote)
361 views

5.1 Modular Arithmetic Part 2

The document discusses modular arithmetic operations including addition, subtraction and multiplication modulo n. It provides examples of performing arithmetic operations modulo n and solving congruence equations. It also discusses additive and multiplicative inverses in modular arithmetic with examples.

Uploaded by

meia quider
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 29

Arithmetic

Operations
Modulo n
Arithmetic modulo n (where n is a natural number)
requires us to evaluate a modular expression after
using the standard rules of arithmetic.
Thus, we perform the arithmetic operation and then
divide by the modulus. The answer is the remainder.
The result of an arithmetic operation mod n is
always a whole number less than n.
Example 5.1.5 Evaluate: (23 + 38) mod 12

Solution.
Add 23 + 38 to produce 61. To evaluate 61
mod 12, divide 61 by the modulus, 12. The
answer is the remainder.
Solution. (cont.)

The answer is 1.
Example 5.1.6 Evaluate each of the following.
a. (33 – 16) mod 6
b. b. (14 – 27) mod 5
Solution.
a. Subtract 33 – 16 = 17. The result is positive.
Divide the difference by the modulus, 6. The
answer is the remainder.

(33 – 16) mod 6 = 5


b. Subtract 14 – 27 = –13. Because the answer is
negative, we must find x so that –13 x mod 5. That
is, we must find x so that the value of is an integer.
Trying the whole number values of x less than 5
(the modulus), we find that x = 2 because
Thus, (14 – 27) mod 5 = 2.
The methods of adding and subtracting
in modular arithmetic can be used for
clock arithmetic and days-of-the-week
arithmetic.
Example 5.1.7 Disregarding a.m. or p.m., if it is 5 o’clock
now, what time was it 57 hours ago?

Solution.
The time can be determined by calculating (5 – 57) mod
12. Because 5 – 57 = –52 is a negative number, find a whole
number x less than the modulus 12, so that –52 ≡ x mod
12.
This means to find x so that is an integer.
Solution. (cont.)
Evaluating the expression for whole number values of
x less than 12, we have, when is an integer. Thus, (5
– 57) mod 12 = 8.
Therefore, if it is 5 o’clock now, 57 hours ago it was 8
o’clock.
Problems involving
multiplication can also be
performed modulo n.
Example 5.1.8 Evaluate: (15 · 23) mod 11
Solution.
Find the product 15 · 23 and then divide by the
modulus, 11. The answer is the remainder.

= Thus, the answer is 4.


Solving Congruence
Equations
Solving a congruence equation means
finding all whole number values of the
variable for which the congruence is true.
Example 5.1.9 Solve 3x + 5 ≡ 3 mod 4.
Solution. Beginning with 0, substitute each whole
number less than 4 into the congruence equation.
We search for whole number values of x for which
the congruence 3x + 5 ≡ 3 mod 4 is true.
FALSE
FALSE
TRUE
Thus, 2 is a solution.
Solution. (cont.)
Continuing this process, we obtain
𝑥 = 3: 3(3) + 5 ≡ 3 𝑚𝑜𝑑 4 FALSE
𝑥 = 4: 3(4) + 5 ≡ 3 𝑚𝑜𝑑 4 FALSE
𝑥 = 5: 3(5) + 5 ≡ 3 𝑚𝑜𝑑 4 FALSE
𝑥 = 6: 3(6) + 5 ≡ 3 𝑚𝑜𝑑 4 TRUE

Hence, 6 is also a solution.


Therefore, the solutions are 2, 6, 10, 14, … .
NOTE:
A congruence equation can have more
than one solution among the whole
numbers less than the modulus. The
next example illustrates that you must
check all whole numbers less than the
modulus.
Example 5.1.10 Solve 2x + 1  3 mod 10.

Solution. Beginning with 0, substitute each whole


number less than 10 into the congruence equation.

𝑥 = 0: 2(0) + 1 ≡ 3 𝑚𝑜𝑑 10 FALSE


𝑥 = 1: 2(1) + 1 ≡ 3 𝑚𝑜𝑑 10 TRUE
𝑥 = 2: 2(2) + 1 ≡ 3 𝑚𝑜𝑑 10 FALSE
𝑥 = 3: 2(3) + 1 ≡ 3 𝑚𝑜𝑑 10 FALSE
𝑥 = 4: 2(4) + 1 ≡ 3 𝑚𝑜𝑑 10 FALSE
Solution. (cont.)

𝑥 = 5: 2(5) + 1 ≡ 3 𝑚𝑜𝑑 10 FALSE


𝑥 = 6: 2(6) + 1 ≡ 3 𝑚𝑜𝑑 10 TRUE
𝑥 = 7: 2(7) + 1 ≡ 3 𝑚𝑜𝑑 10 FALSE
𝑥 = 8: 2(8) + 1 ≡ 3 𝑚𝑜𝑑 10 FALSE
𝑥 = 9: 2(9) + 1 ≡ 3 𝑚𝑜𝑑 10 FALSE

The solutions between 0 and 9 are 1 and 6; the remaining


solutions are determined by repeatedly adding the modulus,
10, to these solutions. The solutions are 1, 6, 11, 16, 21, 26, … .
Additive and
Multiplicative Inverses
in Modular Arithmetic
We have known that if the sum of two numbers is
0, then the numbers are additive inverses of each
other. For instance, 8 + (–8) = 0, so 8 is the additive
inverse of –8, and –8 is the additive inverse of 8.
The same concept applies in modular arithmetic.
For example, (3 + 5)  0 mod 8. Thus, in mod 8
arithmetic, 3 is the additive inverse of 5, and 5 is
the additive inverse of 3. Here we consider only
those whole numbers smaller than the modulus.
Example 5.1.11 Find the additive inverse of 7 in
mod 16 arithmetic.

Solution.
Because (7 + 9) ≡ 0 mod 16, the additive inverse
of 7 is 9.
Example 5.1.12 Find the additive inverse of 5 in
mod 27 arithmetic.

Solution.
Because (5 + 22) ≡ 0 mod 27, the additive inverse
of 5 is 22.
TRY THIS!

1) Find the additive inverse of 11 in mod 21


arithmetic.
2) Find the additive inverse of 32 in mod 41
arithmetic.
If the product of two numbers is 1, then the numbers
are multiplicative inverses of each other.
For example, , so is the multiplicative inverse of , and
is the multiplicative inverse of . The same concept
applies to modular arithmetic (although the
multiplicative inverses will always be natural
numbers).
Example 5.1.13 In mod 7 arithmetic, find the
multiplicative inverse of 2.

Solution.
To find the multiplicative inverse of 2, solve the
equation 2x  1 mod 7 by trying different natural
number values of x less than the modulus.
Solution. (cont.)
𝑥 = 0: 2(0) 1 𝑚𝑜𝑑 7
𝑥 = 1: 2(1) 1 𝑚𝑜𝑑 7
𝑥 = 2: 2(2) 1 𝑚𝑜𝑑 7
𝑥 = 3: 2(3) 1 𝑚𝑜𝑑 7
𝑥 = 4: 2(4) ≡ 1 𝑚𝑜𝑑 7

Thus, in mod 7 arithmetic, the multiplicative


inverse of 2 is 4.
TRY THIS!

1) In mod 11 arithmetic, find the


multiplicative inverse of 7.
2) Find the multiplicative inverse of 4
modulo 13.
Exercise Set 5.1
1. Perform the following modular arithmetic.
a. (25 + 43) mod 8
b. (78 − 145) mod 13
c. (56 · 4) mod 21
2. If it is 7 o'clock now, what time was it 102 hours ago?
3. What time does a 24-hr clock read 100 hours before it reads 19:00?
​4. In 2022, Paolo’s birthday fell on Saturday. Without checking the
calendar, on what day of the week does Paolo’s birthday fall in 2032?
5. Find the additive and multiplicative inverse of 14 in mod 19
arithmetic.
References
1) Augustine, K. (2018). Algebra, Arithmetic, Statistics, and Probability. A Mathematical Book
for High Schools and Colleges.
2) Burton, D. (2011). Elementary Number Theory, Seventh Edition. The McGraw Hill Companies.
3) Daligdig, R.M. (2019). Mathematics in the Modern World. Lorimar Publishing, Inc.
4) Carpio, J.N. and Peralta, B.D. (2018). Mathematics in the Modern World. Books Atbp.
Publishing Corp.
5) Finston, D. (et al) (2014). Abstract Algebra Structure and Application. Springer International
Publishing Switzerland.
6) Olejan, R.O., Veloria, E.V., Bonghanoy, G.B., Ondaro, J.E.,and Sumalinog, J.D. (2018).
Mathematics in the Modern World. MUTYA Publishing House, Inc.
7) Manlulu, E.A. and Hipolito, L.M. (2019). A Course Module for Mathematics in the Modern
World. Rex Book Store, Inc.
8) Zhou, X. (2015). Number Theory Modular Arithmetic. Math for Gifted Students.
http://www.mathallstar.org.

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy