Congruence. Let, , and . We Say "A Is Congruent To B Modulo M", and
Congruence. Let, , and . We Say "A Is Congruent To B Modulo M", and
Mathematical System
• Modular Arithmetic
Congruence. Let 𝑎, 𝑏 ∈ 𝒁, and 𝑚 ∈ 𝑵. We say ”a is congruent to b modulo m”, and
write “𝑎 ≡ 𝑏(mod 𝑚),” if 𝑚|(𝑎 − 𝑏). The integer m is called the modulus of the congruence.
If a is not congruent to b modulo m, we write “𝑎 ≢ 𝑏(mod 𝑚).
In addition, if 𝑚 > 0 and r is the remainder when the division algorithmis used to
divide b by m, then r is called the least residue of b (mod m).
Solution:
a. 11(mod 8)
11 ÷ 8 = 1 𝑟 3 (r stands for remaider)
3 ≡ 11(mod 8)
The least residue of 11(mod 8) is 3.
b. 4(mod 9)
3 is less than 9, therefore the least residue of 4(mod 9) is 4.
c. 25(mod 5)
25 ÷ 5 = 5
0 ≡ 5(mod 8)
3 × 5 is exactly equal to 5 (no remainder), therefore the least residue of 25(mod 5)
is 0.
d. −11(mod 6)
For this problem keep on adding 6 to -11 until you reach a positive number less
than 6.
−11 + 6 = −5
−5 + 6 = 1
1 ≡ −11(mod 6)
The least residue of −11(mod 6) is 1.
e. −3(mod 7)
For this problem keep on adding 7 to -3 until you reach a positive number less
than 7.
−3 + 7 = 4
4 ≡ −3(mod 7)
The least residue of −3(mod 7) is 4.
Solution:
b. 24 + 39(mod 11)
63(mod 11)
63 ÷ 11 = 5 𝑟 8
8 ≡ 24 + 39(mod 11)
c. 72 + 56(mod 3)
128(mod 3)
128 ÷ 3 = 42 𝑟 2
2 ≡ 72 + 56(mod 3)
d. 34 − 16(mod 5)
18(mod 5)
18 ÷ 5 = 3 𝑟 3
3 ≡ 34 − 16(mod 5)
e. 17 − 28(mod 6)
−11(mod 6)
1 ≡ −11(mod 6) (see Example 1d.)
A B C D E F G H I J K L M N O P Q R S T U V W X Y Z
g h i j k l m n o p q r s t u v w x y z a b c d e f
Cipher text Letter
S E N D T H E S E C U R I T Y
y k t j z n k Y k i a x o z e
Example 2. Decrypt the message amm gwc vmfb emms if it was encrypted using
a shift cipher with shift of 8.
Solution:
We start by writing out the character mapping by shifting the alphabet, with A
mapping I, eight characters later in the alphabet.
Plain text Letter (Original)
A B C D E F G H I J K L M N O P Q R S T U V W X Y Z
i j k l m n o p q r s t u v w x y z a b c d e f g h
Cipher text Letter
a m m g w c v m f b e m m s
S E E Y O U N E X T W E E K
Example 3. Use the Caesar cipher with shift 7 to encrypt the message: GIVE ME
APPLE.
Solution:
Use the mapping below to encrypt the message GIVE ME APPLE.
Plain text Letter (Original)
A B C D E F G H I J K L M N O P Q R S T U V W X Y Z
h i j k l m n o p q r s t u v w x y z a b c d e f g
Cipher text Letter
G I V E M E A P P L E
n p c l t l h w w s L
A B C D E F G H I J K L M N O P Q R S T U V W X Y Z
d e f g h i j k l m n o p q r s t u v w x y z a b c
Cipher text Letter
x q l y h u v l w b
U N I V E R S I T Y
A B C D E F G H I J K L M N O P Q R S T U V W X Y Z
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 0
If the encrypting code is to be shifted each letter of the plain text message
(original message) m positions, then the equivalent letters in the cipher text
message is given by 𝑐 ≡ (𝑝 + 𝑚)(mod 26); where p is the numerical equivalent (see
figure above) of the plain text message and c is the numerical equivalent of the
cipher text message. Note that a and 26 should be relatively prime.
Example 1. Use the cyclical alphabetic encrypting code that shifts each letter 5
position to code WINSTON THE GREAT.
Solution:
The encrypting congruence is 𝑐 ≡ (𝑝 + 5)(mod 26)
We first replace p by the numerical equivalent of each letter of plain text using
the table below.
A B C D E F G H I J K L M N O P Q R S T U V W X Y Z
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 0
Then we solve c and after establishing the values of c we code it using the table
above.
W I N S T O N T H E G R E A T
B N S X Y T S Y M J L W J F Y
Example 2. Apply the cyclical alphabetic decrypting code that shifts each letter 6
position to code ATYZUVVGHRK.
Solution:
We first replace c by the numerical equivalent of each letter of cipher text and
find p. Because the position of 𝑚 = 6, 𝑛 = 26 − 𝑚 = 26 − 6 = 20. The cipher text is
decoded by using the congruence 𝑝 ≡ (𝑐 + 20)(mod 26). The result of ATYZUVVGHRK
as reflected below.
A B C D E F G H I J K L M N O P Q R S T U V W X Y Z
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 0
A T Y Z U V V G H R K
U N S T O P P A B L E
Example 3. Use the congruence 𝑐 ≡ (3𝑝 + 2)(mod 26) to encode the message QUIZ
TODAY.
Solution:
The encrypting congruence is 𝑐 ≡ (3𝑝 + 2)(mod 26)
We first replace p by the numerical equivalent of each letter of plain text using
the table below.
A B C D E F G H I J K L M N O P Q R S T U V W X Y Z
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 0
Then we solve c and after establishing the values of c we code it using the table
above.
Q U I Z T O D A Y
A M C B J U N E Y
Cipher text: AMCB JUNEY
REFERENCES:
1. Nocon, R. C., & Nocon, E. G. (2018). Essential Mathematics for the Modern World.
Quezon City: C & E Publishing, Inc.