Modular Arithmetic Concepts and Applications PDF
Modular Arithmetic Concepts and Applications PDF
Modular Arithmetic Concepts and Applications PDF
By
Adetunmbi Emmanuel Olukunle
wiknund@gmail.com, +2348074880378
72016(mod 2017).
On what day of the week falls March 31, 2024.
Examples
Exercise One
Which of these statements are true?
Example 1
Find 111*222 (mod 246).
Well, first multiply 111 by 222 as integers:
we get 111*222 = 24642.
Now we have to divide by 246.
Well by long division 24642 = 246*100 + 42,
so the remainder is 42 when we divide 24642 by
246.Therefore 111*222 (mod 246) 42.
Modular Arithmetic: C&A @Adetunmbi 2016
Example 2
Find -11(mod 17).
-11=-1(17)+6. Remainder is 6 so -11(mod 17)6
mod 17.
Alternatively, Since we work in Mod 17,
you can add 17 to the -11 till you obtain a
Positive number, -11+17 = 6 so -11(mod 17) 6
(Mod 17)
Modular Arithmetic: C&A @Adetunmbi 2016
Example 3
Confirm that -33(mod 10) 7(mod 10).
-33= -4(10) + 7 ,
OR
-33 +10(mod 10) -23(mod 10) -23+10(mod 10)
-13 + 10(mod 10)
-13 + 10(mod 10) -3(mod 10) -3+10(mod 10)
7(mod 10)
Modular Arithmetic: C&A @Adetunmbi 2016
Example 4
Is 5728 1 (mod 29)?
Using Fermat little theorem.
57(mod 29) 28 (mod 29) -1(mod 29)
5728 (-1)28 (mod 29) 1 (mod 29).
MODULAR ADDITION
Addition in Modulo 7
0
Subtraction In Modulo 5
1
Examples
(1)
(2)
Exercise 2
Evaluate the following
234+666(mod 10)
56-65(mod 7)
100 +78(mod 3)
Modular Multiplication
1
10
11
10
11
10
10
10
11
11
10
10
10
10
11
11
10
Other Examples
(1)
(2)
23*32 2*4(mod 7)
1(mod 7)
23*32(mod 35).
Since 23 and 32 are both less than 35, we first
multiply them.
23*32 736 (mod 35), 736 = 21(35) +1,
hence 23*35 1(mod 35)
Exercise 4
Evaluate the following
a) 56*89(mod5)
b) 1011*32(mod7)
c) 79*88(mod 8)
MODULAR DIVISION
MODULAR EXPONENTIATION
If a (mod n) b(mod n)
(iv) 3141(mod 5)
(v) (-5)99(mod 8)?
Modular Arithmetic: C&A @Adetunmbi 2016
(1)281(mod 7).
The root is 23(mod 7) 1(mod 7).
281= (23)27 mod 7 127(mod 7)
281 1 (mod 7)
(2)1281(mod 17). Since 17 is prime, we can apply
Fermats little theorem, 17-1 = 16, we can express
81 as a product of 16.
81= 16*5 + 1
1281 = 1216(5) + 1 = (1216)5 * 121 15*12 (mod 17)
12(mod 17)
(3) 1313(mod 14), we cannot use Fermats little theorem since 14 is not
prime.
13 (mod14) -1 (mod14). 1313 (-1)13 -1 13 (mod14)
(4) 3141 (mod5) 1(mod5). How?
31 (mod5) 1 (mod5). So 3141 141 (mod5).
(5) (-5)99 (mod8) 3(mod8). -5 (mod8) 3 (mod8),
(-5)99 399(mod8).
But the root 32 1(mod 8) and 399 = 32(49)+1 = 3 2(49)*3.
So
(32)49 * 3 1*3 3 (mod8).
What about 34090 (mod11)? We know that 310 1(mod 11) from Fermats
little theorem. 34090=(310)409 1(mod 11)
Modular Inverses
What is the inverse of 8 (or 8-1 )in modulo 11?
x 0
8x 0
1
8
2
5
3 4 5
2 10 7
6
4
7
1
8
9
9 10
6 3
10
x-1
10
Not all numbers have inverses in a given modulo. For example 8 has no
inverse in Modulo 10.
Using table of values we can also get the three solutions for 6x + 1 4 (mod 15)
x
6x+1
0
1
1
7
2
13
3
4
4
10
5
1
6
7
7
13
8
4
9
10
10
1
11
7
12
13
13
4
The values of x for which 6x + 1 4(mod 15) are 3, 8 and 13. The inverses of 6x
+1 in mod 15 are 0, 5 and 10.
14
10
Further Examples
1) Copy and complete the following table for multiplication in modulo 11.
Use the table to:
(i) Evaluate (9
5)
(10 10)
(ii) Find the truth set of
I. 10
m =2
II. n
n =4.
1
5
1
1
5
10
10
5
5
9
9
10
10
Solution
1
10
10
10
10
Solution
1
10
10
a=3
b=1
c=6
d=1
e= 4 f=2
10
10
g=6
h=2
(a) (9
5)
(10 10)
1
1 1
(b) (i) 10 m =2,
The solution set is m={9}
(ii)n n =4.
The solution set is n={9}
m=1
Solution
9 * 12-1 27(mod 35) ,
the inverse of 12 in
mod 35 is 3 so 9*3= 27
Modular Arithmetic: C&A @Adetunmbi 2016
Other Theorems
Eulers theorem: If a is relatively prime to n,
10 11 12 13 14 15 16 17 18 19 20
(n)
10 4
12 6
16 6
18 7
CHECK DIGIT
A check digit is a form of redundancy used to detect error on
identification numbers. With a check digit one can detect
simple errors in the input of a series of characters(usually
digits) such as a single mistyped digit or some permutations of
two successive digits.
A very simple check digit method would be to take the digital
sum mod 10 (but not error of switching digit).
A slightly more complex method is to take a weighted sum of
the digits mod 10. Widely used weights are 1,3,7 or 9 because
they are coprime to 10. Example, the 371 371 371 weight used in
United States Bank Routing Transit Number.
ISBN-10
The ISBN-10 code instead uses mod 11
which is prime. Check the validity of the
ISBN 0-201-53082-1
0*10 + 2*9 + 0*8 + 1*7 + 5*6 + 3*5 + 0*4 +
8*3 + 2*2 + 1*1 (mod 11) 0(mod 11). It is
valid
ISBN-13
In Use January, 2007 is equal to the EAN-13
(European Article Number) code found
underneath a books barcode.
Its check digit is generated the same way as
the UPC except that the even digits are
multiplied by 3 instead of the odd digits.
Is this ISBN code 978-0-620-68500-9 valid ?
Exercise
What are the check digits for the following substances?
Actinium(III) oxide 12002-61-x
Silver Bromide 7785-23-y
Sucrose 57-50-z
x=8
y=1
z=1
Check for the results obtained for the next 11 years which is good for planning.
YEAR
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
DATE
APRIL 16
APRIL 1
APRIL 21
APRIL 12
APRIL 4
APRIL 17
APRIL 9
MARCH 31
APRIL 20
APRIL 5
MARCH
28
Modular Arithmetic:
C&A
@Adetunmbi 2016
Reference
[1] I. M. Isaacs and M. R. Pournaki, Generalizations of
Fermat's Little Theorem Using Group Theory," Amer.
Math. Monthly 112 (2005), 734-740.
[2] L. Levine, Fermat's Little Theorem: A Proof by
Function Iteration," Math. Mag. 72 (1999), 308-309.
[3] P. A. MacMahon, Applications of the Theory of
Permutations in Circular Procession to the Theory of
Numbers," Proc. London Math. Soc. 23 (1891(2)), 305313.
[4] C. Smyth, A Coloring Proof of a Generalisation of
Fermat's Little Theorem," Amer. Math. Monthly 93
(1986), 469-471.
Modular Arithmetic: C&A @Adetunmbi 2016
wiknund@gmail.com
https://ng.linkedin.com/in/emmanuel-adetunmbi-22b8702b
https://www.facebook.com/emmanuel.adetunmbi