You are on page 1of 12

MODULE 4

module 4 Mathematical Systems

in INTRODUCTION

ge 4 It’s dark, rainy night as you pull up to the drive at your home. You press a remote in your car
that opens your garage door and you drive in. You press the remote again and the garage
door closes.
(mathematics in the modern world)
Unbeknownst to you, there is a crook lurking on the street with a radio scanner who picks up
the signal from your remote. The next time you’re not home, the crook plans on using the
saved signal to open your garage door and burglarize your home. However, when the crook
arrives and sends the signal, the door doesn’t open.

Although a garage door opener and a secure website mat seem to be quite different, the
mathematics behind each of these is similar. Both are based on modular arithmetic, one of
the topics of this chapter.

Modular arithmetic, in turn, is part of a branch of mathematics called a graph theory.


Prepared by:
Mr. joNathan m. jabel As your facilitator of learning. I will enrich our discussion by presenting information with
citations. If you have query please do not hesitate to call, text, or chat with me.

COURSE LEARNING OUTCOMES

at the end of this module, the students are expected to discuss extensively and articulate
information in the core areas of science and mathematics (5.1.1). and perform appropriate
suitable mathematical and statistical computations in data analysis (5.4.1)

CONTAINS OF THE MODULE

This module contains the following lessons:


1.) Modular Arithmetic.
2.) Applications of Modular Arithmetic.
DIRECTIONS ON HOW TO USE THE MODULE PROPERLY
If we want to determine a time in the future or in the past, it is necessary to consider whether
In order to benefit profoundly from this module, please be guided by all the key presented below. we have passed 12 o’ clock. To determine the 8 hours after 3 o’ clock, we add 3 and 8. Because
we did not pass 12 o’clock, the time is 11 o’ clock. However, to determine the time 8 hours
after 9 o’ clock, we must take into consideration that once we have passed 12 o’ clock, we begin
1.) This module contains (2) lessons. Each lesson is explaining authentically. Read and
again with 1. Therefore, 8 hours after 9 o’ clock is 5 o’ clock.
understand carefully so that you would know the lesson entirely.
2.) On the first page of this lesson, you will notice the specific learning outcomes (SLO’s) We will use the symbol ⊕ to denote addition on a 12- hour clock. Using this notation,
of each lesson. LSOs are knowledge and skills you are expected to obtain at the end 3 ⊕ 8 = 11 and 9 ⊕ 8 = 5 on a 12- hour clock.
of the lesson.
3.) You are obliged to answer the learning Activities/ Exercises (LAEs). The LAEs are We can also perform subtraction on a 12- hour clock. If the time now is 10 o’ clock, then 7
outlined to help you in how to obtain the SLOs. hours ago the time was 3 o’ clock, which is the difference between 10 and 7 ( 10 – 7 = 3).
4.) Feel free to chat, call, text or send me an email if you have questions, reactions, or However, if the time now is 3 o’ clock. We see 7 hours ago it was 8 o’ clock. If we use the
reflections about the module’s contents or activities. symbol ϴ to denote subtraction on a 12- hour clock, we can write
5.) The Practice Task/ Assessment and the Assignment shall be checked by me. 10 ϴ 7 = 3 and 3 ϴ 7 = 8

Example 1. Perform Clock Arithmetic


LESSON 1 – Modular Arithmetic.
Evaluate each of the following, where ⊕ 𝑎𝑛𝑑 ϴ indicate addition and subtraction, respectively,
on a 12- hour clock.
SPECIFIC LEARNING OUTCOMES a. 8 ⊕ 8
b. 7 ⊕ 13
These are the learning for the specific lesson: c. 8 ϴ 11
1. Evaluate the Arithmetic Operations Modulo n. d. 2 ϴ 8
2. Calculate a Congruence Equation.
Solution
MOTIVATION Calculate using 12- hour clock.
a. 8 ⊕ 8 = 4
b. 7 ⊕ 13 = 8
c. 8 ϴ 11 = 9
d. 2 ϴ 8 = 6

Modulo n

𝑎−𝑏
Discussion 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 ≡ 𝑏 mod n. The number n is called the modulus. The
Many clocks have the familiar 12- hour design. We designate whether the time is before noon statement a ≡ 𝑏 mod n. is called a congruence.
or after noon by using the abbreviations A.M. and P.M. A reference to 7: 00 A.M means 7 hours
after 12: 00 midnight; a reference to 7:00 P.M. means 7 hours after 12:00 noon. In both cases, Example 2. Determine Whether a Congruence is True
once 12 is reached on the clock, we begin again with 1.
Determine whether the congruence is true. Solution

a. 29 ≡ 8 mod 3 Add 23 + 38 to produce 61. To evaluate 61 mod 12, divide 61 by the modulus, 12. The answer
b. 15 ≡ 4 mod 6 is the remainder.

Solution 5
12√61
29−8 21
a. Find = = 7. Because 7 is an integer, 29 ≡ 8 mod 3 is a true congruence. 60
3 3
15−4 11 11 1
b. Find = . Because is not an integer, 15 ≡ 4 mod 6 is not a true congruence.
6 6 6

Example 3. A day of the week ( 23 + 38 ) mod 12 = 1


The answer is 1.
July 4, 2017, was a Tuesday. What day of the week is July 4, 2022?
Example 5. Subtraction Modulo n
Solution
Evaluate each of the following.
There are 5 years between the two dates. Each year has 365 days except 2020, which has one
extra day because it is a leap year. So the total number of days between the two dates is a. (33 – 16) mod 6
5 ∙ 365 + 1 = 1826. Because 1826 ÷ 7 = 260 remainder 6, 1826 ≡ 6 mod 7. Any multiple of 7 b. (14-27) mod 5
days past a given day will the same day of the week. So the day of the week 1826 days July 4,
2017, will be the same as the day 6 days after July 4, 2017. Thus, July 4, 2022, will be a Monday. Solution

Arithmetic Operation Modulo n a. Subtract 33 – 16 = 17 . the result is positive. Divide the difference by the modulus, 6.
In Example 2a we verified that 29 ≡ 8 mod 3. ( both 29 and 8 have remainder 2 when divided The answer is the remainder.
by 3, the modulus.) there are many other numbers congruent to 8 modulo 3, but of all these,
only one is a whole number less than the modulus. This number is the result when evaluating a
modulo expression, and in this case we use an equal sign. Because 2 ≡ 8 mod 3 and 2 is less b. Subtract 14 - 27 = -13. Because the answer is negative, we must find x so that -13 ≡
than the modulus, we can write 8 mod 3 = 2. In general, m mod n becomes the remainder when x mod 5. Thus we must find x so that the value of 5
−13−𝑥
=
−( 13+𝑥)
is an integer.
m is divided by n. 5
Trying the whole number values of x less than 5, the modulus, we find that when x =2,
−( 13+12) 15
Arithmetic modulo n ( where n is a natural numbers) requires us to evaluate a modular = − = −3.
5 5
expression after using the standard rules of arithmetic. Thus we perform the arithmetic ( 14 – 27 ) mod 5 = 2
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 6. Calculating Times

Example 4. Arithmetic Modulo n Disregarding A.M. or P.M., if it is 5 o’ clock now, what time it 57 hours ago?

Evaluate: ( 23 + 38 ) mod 12 Solution


The time can be determined by calculating (5- 57) mod 12. Because 5 – 57 = -52 is a negative Solve: 2𝑥 + 1 ≡ 3 𝑚𝑜𝑑 10
number, find the whole number x less than modulus 12, so that -52 ≡ x mod 12. This means to
−52−𝑥 −(52+𝑥)
find x so that 12 = 12 is an integer. Evaluating the expression for whole number values Solution:
−(52+8) 60
of x less than 12, we have, when x = 8, 12 = − 12 = -5, an integer. Thus ( 5 – 57) mod 12
Beginning with 0, substitute each whole number less than 10 into the congruence equation.
= 8. Therefore, if it is 5 o’ clock now, 57 hours ago it was 8 o’ clock.

Example 7. Multiplication Modulo n 𝑥 =0 2 (0) + 1 ≡ 3 mod 10 not a solution


𝑥 =1 2 (1) + 1 ≡ 3 mod 10 a solution
Evaluate: (15 ∙ 23 ) 𝑚𝑜𝑑 11 𝑥 =2 2 (2) + 1 ≡ 3 mod 10 not a solution
𝑥 =3 2 (3) + 1 ≡ 3 mod 10 not a solution
Solution 𝑥 =4 2 (4) + 1 ≡ 3 mod 10 not a solution
𝑥 =5 2 (5) + 1 ≡ 3 mod 10 not a solution
Find product 15 ∙ 23 and then divide by the modulus, 11. The answer is the remainder. 𝑥 =6 2 (6) + 1 ≡ 3 mod 10 a solution
𝑥 =7 2 (7) + 1 ≡ 3 mod 10 not a solution
(15 ∙ 23 ) 𝑚𝑜𝑑 11 = 4
The answer is 4.
𝑥 =8 2 (8) + 1 ≡ 3 mod 10 not a solution
𝑥 =9 2 (9) + 1 ≡ 3 mod 10 not a solution
Solving Congruence Equations

Solving a congruence equation means finding all whole number values of the variable for which The solutions between 0 and 9 are 1 and 6; the remaining solutions are determined by
the congruence is true. repeatedly adding the modulus, 10, to these solutions. The solutions are 1, 6,11 16, 21, 26,..

For example, to solve 15 3𝑥 + 5 = 3 mod 4, we search for whole number values of Computing the Day of the Week
𝑥 for which the congruence is true.
A function that is related to the modulo function is called the floor function. In the modulo
3 (0) + 5 ≡ 3 mod 4 function, we determine the remainder when one number is divided by another. In the floor
3 (1) + 5 ≡ 3 mod 4 function, we determine the quotient ( and ignore the remainder) when one number is divided
3 (2) + 5 ≡ 3 mod 4 2 is a solution by another. The symbol for the floor function is ˪ ˩. Here are some examples.
3 (3) + 5 ≡ 3 mod 4
2 10 17 2
3 (4) + 5 ≡ 3 mod 4 ⌊ ⌋ = 0, ⌊ ⌋ = 5, ⌊ ⌋ = 8, 𝑎𝑛𝑑 ⌊ ⌋ = 1
3 2 2 √2
3 (5) + 5 ≡ 3 mod 4
3 (6) + 5 ≡ 3 mod 4 6 is solution Using the floor function, we can write a formula that gives the day of the week for any date on
the Gregorian Calendar. The formula, known as Zeller’s congruence, is given by
If we continued trying values, we would find that 10 and 14 are also solutions. Note that the
solutions 6, 10, and 14 are all congruent to modulo 4. In general, once a solution is determined. 𝑥 = (⌊
13𝑚−1
⌋+
𝑦 𝑐
⌊ ⌋ + ⌊ ⌋ + 𝑑 + 𝑦 − 2𝑐) mod 7
5 4 4
Example 8. Solve a Congruence Equation Where
𝑑 is the day of the month 7. In 2015, Halloween (October 31) fell on a Saturday, on what day of the week will Halloween
fall in the year 2015?
𝑚 is the month using 1 for March, 2 for April,.. , 10 for December; January and February are assigned 8. Valentine’s day ( February 14) fell on a Tuesday in 2017. On what day of the week will
the values 11 and 12, respectively Valentine’s Day fall in 2032?
𝑦 is the last two digits of the year if the month is March through December, if the month is January or 9. Cinco de Mayo ( MAY 5) fell on a Wednesday in 2010. On what day of the week will Cinco de
February, y is the last two digits of the year 𝑚𝑖𝑛𝑢𝑠 1 Mayo fall in 2028?
10. There is only one whole number solution between 0 and 11 of the congruence equation
𝑐 is the first two digits of the year
(𝑥 2 + 3𝑥 + 7) ≡ 2 mod 11
𝑥 is the day of the week ( using 0 for Sunday, 1 for Monday, … , 6 for Saturday)

For example, to determine the day of the week on July 4, 1776, we have 𝑐 = 17, 𝑦 = 76, 𝑑 =
4, 𝑎𝑛𝑑 𝑚 = 5. Using these values, we can calculate 𝑥. Lesson 2: Application of Modular Arithmetic

𝑥 = (⌊
13(5)−1
⌋+
76 17
⌊ ⌋ + ⌊ ⌋ + 4 + 76 − 2(17)) mod 7 ISBN and UPC
5 4 4

= (12 + 19 + 4 + 4 + 76 − 34) mod 7


Every book that is cataloged in the Library of Congress must have an ISBN (International Standard
= 81 mod 7 = 4 Book Numbers). This 13- digit number was created to help ensure that orders for books are filled
accurately and that books are cataloged correctly.
Therefore, July 4, 1776, was a Thursday.

The first three digits of an ISBN are 978 (or 979), followed by 9 digits that are divided into three groups
EXERCISE SET of various lengths. These indicate the country or region, the publisher, and the title of the book. The last
1. Determine the day of the week on which you were born. digit (the 13th one) is called a check digit. If we label the first digit of an ISBN 𝑑1 , the second digit 𝑑2 ,
2. Determine the day of the week on which Abraham Lincoln’s birthday ( February 12) will fall in and so on to the 13th digit 𝑑13 , then the check digit is given by the following modular formula.
2155.
3. Determine the day of the week on which January 1, 2050, will fall.
4. Determine the day of the week on which Valentine’s Day ( February 14) 1950 fell. Formula for the ISBN Check Digit
5. There are only two whole number solutions between 0 and 27 of the congruence equation
𝑑13 = 10 - (𝑑1 + 3𝑑2 + 𝑑3 + 3𝑑4 + 𝑑5 , + 3𝑑6 + 𝑑7 , + 3𝑑8 + 𝑑9 + 3𝑑10 , + 𝑑11 +
(𝑥 2 + 5𝑥 + 4) ≡ 1 mod 27 3𝑑12 ) mod 10
Find the solutions.
6. Use modular arithmetic to determine each of the following. If 𝑑13 = 10, then the check digit is 0.
a. If today is Friday,
1. What day of the week will it be 25 days from now?
2. What day of the week was it 81 days ago?
It is this check that is used to ensure accuracy. For instance, the ISBN for the fourth edition of the the product by a scanner., which reads the number from a bar code and records the price on the cash
American Heritage Dictionary is 978 – 0 – 395 – 82517 – 4. Suppose, however, that a bookstore clerk register. If the price of an item changes for a promotional sale, the price is updated in the computer,
sends an order for the American Heritage Dictionary and inadvertently enters the number 978 – 5 – 395 thereby relieving a clerk of having to reprice each item. In addition to pricing items, the UPS gives the
– 82517 – 4, where the clerk transposed the 8 and 2 in the five numbers that identify the book. store manager accurate information about inventory and the buying habits of the store’s customers.

Correct ISBN : 978 – 0 – 395 – 82517 – 4 The UPC is a 12- digit number that satisfies a modular equation that is similar to the one for ISBNs. The
last digit number is the check digit. If we label the 12 digits of the UPC as 𝑑1 , 𝑑2 , … , 𝑑3 ., we can write a
Incorrect ISBN : 978 – 0 – 395 – 28517 – 4 formula for the UPC check digit 𝑑12 .
The receiving clerk calculates the check digit as follows.

𝑑13 = 10 - [9 + 3(7) + 8 + 3(0) + 3 + 3(9) + 5 + 3(2) + 8 + 3 (5) + 1 + 3(7)] mod 10


Formula for the UPC Check Digit
= 10 – 124 mod 10 𝑑12 = 10 - (3𝑑1 + 𝑑2 + 3𝑑3 + 𝑑4 + 3𝑑5 , + 𝑑6 + 3𝑑7 , + 𝑑8 + 3𝑑9 + 𝑑10 , +3 𝑑11 ) mod 10

= 10 – 4 If 𝑑12 = 10, then the check digit is 0.


=6
Example 2: determine the Check Digit of a UPC
Because the check digit is 6 and not 4 as it should be, the receiving clerk knows that an incorrect ISBN
has been sent. Transportation errors are among the most frequent errors that occur. The ISBN coding Find the check digit for the UPC of the Blu-ray Disc release of the film Jurassic World. The first 11- digits
system will catch most of them. are 0 – 25192 – 21221 - ?
Example 1: determine a Check Digit for an ISBN Solution
Determine the ISBN check digit for the book The Equation that Couldn’t Be Solved by Mario Livio. The 𝑑12 = 10 - [3(0) + 2 + 3(5) + 1 + 3(9) + 2 + 3(2) + 1 + 3(2) + 2 + 3(1)] 𝑚𝑜𝑑 10
first 12 digits of the ISBN are 978 – 0 – 7432 – 5820 - ?
= 10 – 65 mod 10
Solution
= 10 – 5
𝑑13 = 10 - [9 + 3(7) + 8 + 3(0) + 7 + 3(4) + 3 + 3(2) + 5 + 3 (8) + 2 + 3(0)] mod 10
= 5
= 10 – 97 mod 10
The check digit is 5.
= 10 – 7
Credit Card Numbers
= 3
Companies that issue credit cards also use modular arithmetic to determine whether a credit card
The check digit is 3. number is valid. This is especially important in e- commerce, where credit card information is frequently
sent over the internet. The primary coding method is based on the Luhn algorithm, which uses mod 10
arithmetic.
Another coding scheme that is closely related to the ISBN is the UPC ( Universal Product Code). This
number is placed on many items and is particularly useful in grocery stores. A check – out clerk passes
Credit card numbers are normally 13 to 16 digits long. The first one to six digits are used to identify the difficult to break, the sender can prevent the communication from being read if it is intercepted
card issuer. The table below shows of the identification prefixes used by four popular card issues. by an unauthorized person. Cryptology is the study of making and breaking secret codes.
Before we discuss how messages are coded, we need to define a few terms. Plaintext is a
message before it is coded. The line
Card issuer Prefix Number of digits
Master Card 51 to 55 16 SHE WALKS IN BEAUTY LIKE THE NIGHT
Visa 4 13 or 16 From Lord Byron’s poem “ She Walks in Beauty like the Night” is in plaintext. Cipher text is the
American Express 34 to 37 15 message after it has been written in code. The line
Discover 6011 16
The Luhn algorithm, used to determine whether a credit card number is valid, is calculated as follows: ODA SWHGO EJ XAWQPU HEGA PDA JECDP
beginning with the next –to- last digit( the last digit is the check digit). And reading from right to left,
double every other digit. If a digit becomes a two- digit number after being doubled, treat the number as is the same line of the poem in cipher text.
two individual digits. Now find the sum of the new list of digits; the final sum must be congruent to 0 mod The method of changing from plaintext to ciphertext is called encryption. The line from the poem was
10. The Luhn algorithm is demonstrated in the next example. encrypted by substituting each letter in plaintext with the letter that is 22 letters after that letter in the
Example 3: Determine a Valid Credit Card Number alphabet. (continue from the beginning when the end of the alphabet is reached.) this is called a cyclical
coding scheme because each letter of the alphabet is shifted the same number of positions. The
Determine whether 5234 8213 3410 1298 is a valid credit card number. original alphabet and the substitute alphabet are shown below.

Solution 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
Highlights every other digit, beginning with the next- to- last digit and reading from right to left.
W X Y Z A B C D E F G H I J K L M N O P Q R S T U V
5 2 3 4 8 2 1 3 3 4 1 0 1 2 9 8

Next double each of the highlighted digits.


To decrypt a message means to take the ciphertext message and write it in plaintext. If a cryptologist
10 2 6 4 16 2 2 3 6 4 2 0 2 2 18 8 thinks a message has been encrypted using a cyclical substitution code like the one shown above, the
key to the code can be found by talking a word from the message (usually one of the longer words) and
Finally, add all digits, treating two – digit numbers as two single digits.
continuing the alphabet for each letter of the word. When a recognizable word appears, the key can be
(1 + 0) + 2 + 6 + 4 + ( 1 + 6) + 2 + 2 + 3 + 6 + 4 + 2 + 0 + 2 + 2 + ( 1 + 8) + 8 = 60 determined. This method is shown below using the ciphertext word XAWQPU.

Because 60 ≡ 0 mod 10, this is a valid credit card number. X A W Q P U

Y B X R Q V

Cryptology Z C Y S R W

Related to codes on books and grocery items are secret codes. These codes are used to send A D Z T S X
messages between people, companies, or nations. It is hoped that by devising a code that is B E A U T Y
Once a recognizable word has been found ( BEAUTY). Count the number of positions that the letters  𝑝 = (𝑆 𝑖𝑠 𝑡ℎ𝑒 19𝑡ℎ 𝑙𝑒𝑡𝑡𝑒𝑟. )
have been shifted (four, in this case). To decode the message, substitute the letter of the normal  𝑚 = 22, the number of positions the letter is shifted
alphabet that comes four positions after the letter in the ciphertext.
The 15th letter is O . Thus, 𝑆 is coded as O.

Once plaintext has been converted to ciphertext, there must be a method by which the person receiving
the message can return the message to plaintext. For the cyclical code, the congruence is
𝑐 ≡ (𝑐 + 𝑛) mod 26, where 𝑝 and 𝑐 are defined as before and 𝑛 = 26 − 𝑚. The letter O in
ciphertext is decoded below using the congruence 𝑝 ≡ ( 𝑐 + 𝑛)𝑚𝑜𝑑 26.
Four positions
𝑝 ≡ ( 𝑐 + 𝑛)𝑚𝑜𝑑 26
O D A S H E
𝑝 ≡ ( 15 + 4)𝑚𝑜𝑑 26
Cyclical encrypting using the alphabet is related to modular arithmetic. We begin with the normal
alphabet and associate each letter with a number as shown in Table 7.1. 𝑝 ≡ 19 𝑚𝑜𝑑 26

Numerical Equivalents for the Letters of the Alphabet 𝑝 = 19

 𝑐 = 15 ( O is the 15th letter.)


 𝑛 = 26 − 𝑚 = 26 − 22 = 4
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
The 19th letter is S. thus O is decoded as S.
1 2 3 4 5 6 7 8 9 1 1 1 1 1 1 1 1 1 1 2 2 2 2 2 2 0
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5

If the encrypting code is to shift each letter of the plaintext message 𝑚 positions, then the
corresponding letter in the ciphertext message is given by 𝑐 ≡ ( 𝑝 + 𝑚) 𝑚𝑜𝑑 26, where 𝑝 is the
numerical equivalent of the plaintext letter and 𝑐 is the numerical equivalent of the ciphertext letter. The
letter 𝑍 is coded as 0 because 26 ≡ 0 𝑚𝑜𝑑 26.

Each letter in Lord Byron’s poem was shifted 22 positions (𝑚 = 22) to the right. To code the plaintext
letter 𝑆 in the word SHE, we use the congruence 𝑐 ≡ ( 𝑝 + 𝑚) 𝑚𝑜𝑑 26.

𝑐 ≡ ( 𝑝 + 𝑚) 𝑚𝑜𝑑 26

𝑐 ≡ ( 19 + 22) 𝑚𝑜𝑑 26

𝑐 ≡ 41 𝑚𝑜𝑑 26

𝑐 ≡ 15
Example 4. Write messages Using Cyclical Coding Continuing, the ciphertext would be decoded as IVAN THE TERRIBLE.

Use the cyclical alphabet encrypting code that shifts letter 11 positions to

a. Code CATHERINE THE GREAT. Example 5. Encode a Message


b. Decode TGLY ESP EPCCTMWP.
Use the congruence 𝑐 ≡ 5𝑝 + 2 𝑚𝑜𝑑 26 to encode the message LASER PRINTER.
Solution
Solution
a. The encrypting congruence is 𝑐 ≡ (𝑝 + 11)𝑚𝑜𝑑 26. Replace 𝑝 by the numerical
equivalent of each letter of plaintext and determine 𝑐. The results for CATHERINE THE The encrypting congruence is 𝑐 ≡ 5𝑝 + 2 𝑚𝑜𝑑 26. Replace 𝑝 by the numerical equivalent of each
GREAT are shown below. letter from Table 7.1 and determine 𝑐. The results for LASER are shown below.

C 𝑐 ≡ (3 + 11)𝑚𝑜𝑑 26 ≡ 14 𝑚𝑜𝑑 26 = 14 Code C as N. L 𝑐 ≡ (5 . 12 + 2)𝑚𝑜𝑑 26 ≡ 62 𝑚𝑜𝑑 26 = 10 Code L as J.


A 𝑐 ≡ (1 + 11)𝑚𝑜𝑑 26 ≡ 12 𝑚𝑜𝑑 26 = 12 Code A as L. A 𝑐 ≡ (5 . 1 + 2)𝑚𝑜𝑑 26 ≡ 7 𝑚𝑜𝑑 26 = 7 Code A as G.
T 𝑐 ≡ (20 + 11)𝑚𝑜𝑑 26 ≡ 31 𝑚𝑜𝑑 26 = 31 Code T as E. S 𝑐 ≡ (5 . 19 + 2)𝑚𝑜𝑑 26 ≡ 97 𝑚𝑜𝑑 26 = 19 Code S as S.
H 𝑐 ≡ (8 + 11)𝑚𝑜𝑑 26 ≡ 19 𝑚𝑜𝑑 26 = 19 Code H as S. E 𝑐 ≡ (5 . 5 + 2)𝑚𝑜𝑑 26 ≡ 27 𝑚𝑜𝑑 26 = 1 Code E as A.
E 𝑐 ≡ (5 + 11)𝑚𝑜𝑑 26 ≡ 16 𝑚𝑜𝑑 26 = 16 Code E as P. R 𝑐 ≡ (5 . 18 + 2)𝑚𝑜𝑑 26 ≡ 92 𝑚𝑜𝑑 26 = 14 Code R as N.
R 𝑐 ≡ (18 + 11)𝑚𝑜𝑑 26 ≡ 29 𝑚𝑜𝑑 26 = 29 Code R as C.

I 𝑐 ≡ (9 + 11)𝑚𝑜𝑑 26 ≡ 20 𝑚𝑜𝑑 26 = 20 Code I as T. Continuing, the plaintext is coded in ciphertext as JGSAN DNUTXAN.
N 𝑐 ≡ (14 + 11)𝑚𝑜𝑑 26 ≡ 25 𝑚𝑜𝑑 26 = 25 Code N as Y.

E 𝑐 ≡ (5 + 11)𝑚𝑜𝑑 26 ≡ 16 𝑚𝑜𝑑 26 = 14 Code E as P. Decoding a message that was encrypted using the congruence 𝑐 ≡ (𝑎𝑝 + 𝑚)𝑚𝑜𝑑 𝑛 requires
solving the congruence for 𝑝. The method relies on multiplicative inverses, which we discussed in
section 7.1
Continuing, the plaintext would be coded as NLESPCTYP ESP RCPLE.
Here we solve the congruence used in Example 5 for 𝑝.
b. Because 𝑚 = 11, 𝑛 = 26 − 11 = 15. The ciphertext decoded by using the congruence
𝑝 ≡ (𝑐 + 15) 𝑚𝑜𝑑 26. The results for TGLY are shown below. 𝑐 = 5𝑝 + 2

T 𝑐 ≡ (20 + 15)𝑚𝑜𝑑 26 ≡ 35 𝑚𝑜𝑑 26 = 9 Decode T as I. 𝑐 − 2 = 5𝑝 * Subtract from each side of the equation.

G 𝑐 ≡ (7 + 15)𝑚𝑜𝑑 26 ≡ 22 𝑚𝑜𝑑 26 = 22 Decode G as V. 21 ( 𝑐 − 2) = 21 (5𝑝) *multiply each side of the equation by the multiplicative inverse of 5. Because

L 𝑐 ≡ (12 + 15)𝑚𝑜𝑑 26 ≡ 27 𝑚𝑜𝑑 26 = 1 Decode L as A. 21 . 5 ≡ 1 𝑚𝑜𝑑 26, 𝑚𝑢𝑙𝑡𝑖𝑝𝑙𝑦 𝑒𝑎𝑐ℎ 𝑠𝑖𝑑𝑒 𝑏𝑦 21.
[21( 𝑐 − 2)] mod 26 ≡ 𝑝
Y 𝑐 ≡ (25 + 15)𝑚𝑜𝑑 26 ≡ 40 𝑚𝑜𝑑 26 = 14 Decode Y as N.
Using this congruence equation, we can decode the ciphertext message JGSAN DNUTXAN. The Using this congruence, we will show the details for decoding ACXUT.
method for decoding JGSAN is shown below.
A [9(1 − 5)] 𝑚𝑜𝑑 26 ≡ (−36) 𝑚𝑜𝑑 26 = 16 Decode A as P.

C [9(3 − 5)] 𝑚𝑜𝑑 26 ≡ (−18) 𝑚𝑜𝑑 26 = 8 Decode C as H.


J [21 (10 − 2)] 𝑚𝑜𝑑 26 ≡ 168 𝑚𝑜𝑑 26 = 12 Decode J as L.
X [9(24 − 5)] 𝑚𝑜𝑑 26 ≡ 171 𝑚𝑜𝑑 26 = 15 Decode X as O.
G [21 (7 − 2)] 𝑚𝑜𝑑 26 ≡ 105 𝑚𝑜𝑑 26 = 1 Decode G as A.
U [9(21 − 5)] 𝑚𝑜𝑑 26 ≡ 144 𝑚𝑜𝑑 26 = 14 Decode U as N.
S [21 (19 − 2)] 𝑚𝑜𝑑 26 ≡ 357 𝑚𝑜𝑑 26 = 19 Decode S as S.
T [9(20 − 5)] 𝑚𝑜𝑑 26 ≡ 135 𝑚𝑜𝑑 26 = 5 Decode T as E.
A [21 (1 − 2)] 𝑚𝑜𝑑 26 ≡ (−21) 𝑚𝑜𝑑 26 = 5 Decode A as E.
Continuing, we would decode the message as PHONE HOME.
N [21 (14 − 2)] 𝑚𝑜𝑑 26 ≡ 252 𝑚𝑜𝑑 26 = 18 Decode N as R.

EXERSICES
Note that to decode A it was necessary to determine (−21) 𝑚𝑜𝑑 26. Recall that this requires adding
the modulus until a whole number less than 26 results. Because (−21) + 26 = 5, we have I. Determine the correct check digit for each ISBN.
(−21) 𝑚𝑜𝑑 26 = 5.
1. The hunger games by Suzanne Collins; 978 – 0 – 4390 – 2352 --?
Example 6. Decode a message 2. The hobbit by J.R.R. Tolkien; 978 – 0 – 345 --27257--?
3. The Girl on the Train by Paula Hawkins; 978 – 0 – 857—52232--?
Decode the message ACXUT CXRT, which was encrypted using the congruence 𝑐 ≡ 4. Inside of a Dog: what Dogs See, Smell, and Know by Alexandra Horowitz; 978 –1--
( 3𝑝 + 5)𝑚𝑜𝑑 26. 4165 – 8343 --?
5. The Girl with the Dragon Tattoo by Stieg Larson; 978 –0 –307-- 47347--?
Solution
II. Determine the correct check digit for the UPC.

Solve the congruence equation for 𝑝. 1. 0 — 79893 — 46500 --? ( Organics Honey)
𝑐 ≡ ( 3𝑝 + 5) 2. 6 –53569 –39973 --? ( Scrabble)
3. 7 – 14043 – 01126--? (monopoly)
𝑐 − 5 = 3𝑝 4. 8 – 88462 – 52148 --? (Apple iPad Pro)
5. 0 – 71818 –02100 --? (Guittard Chocolate Chips)
9(𝑐 − 5) = 9(3𝑝) * 9(3) = 27 ≡ 1 𝑚𝑜𝑑 26
III. Encode the message by using a cyclical alphabet encrypting code that shifts the
message the stated number of positions.
[9 ( 𝑐 − 5)] 𝑚𝑜𝑑 26 ≡ 𝑝
1. 8 positions: THREE MUSKETEERS
The decoding congruence is 𝑝 ≡ [9 ( 𝑐 − 5)] 𝑚𝑜𝑑 26. 2. 6 positions: FLY TONIGHT
3. 12 positions: IT’S A GIRL
4. 9 positions: MEET AT NOON
5. 3 positions: STICKS AND STONES
Note: the compiler never claims ownership of this module. This should not be shared and
IV. Use a cyclical alphabet encrypting code that shifts the letters the stated number of posted to any social media platform.
positions to decode the encrypted message.
If you have questions, you may contact me through my cellular no.:
1. 18 positions: SYW GX WFDAYZLWFEWFL 09531054411
2. 20 positions: CGUACHUNCIH LOFYM NBY QILFX Take a picture of you answer and PM them in my FB account: Nathan Jabel
3. 15 positions: UGXTCS XC CTTS
4. 8 positions: VWJWLG QA XMZNMKB
5. 17 positions: ALPINE SKIING
God bless and keep safe!
V. Use a cyclical alphabet encrypting code to decode the encrypted message.

1. YVIBZM RDGG MJWDINJI


2. UDGIJCT RDDZXT
3. YBZAM HK YEBZAM
4. AOB HVS HCFDSRCSG
5. TIFJJ TFLEKIP JBZZEX

VI. Encryption. Use the encrypting congruence 𝑐 ≡ (3𝑝 + 11)𝑚𝑜𝑑 26 to code the
message NONE SHALL PASS

VII. Encryption. Use the encrypting congruence 𝑐 ≡ (7𝑝 + 8)𝑚𝑜𝑑 26 to code the
message DELIGHT SAVING TIME

References:

Mathematics in the Modern World


Philippine edition

Cengage Learning Mathematical Excursions, 14th Edition, by


Richard N. Aufmann, Joanne S. Lockwood, Richard D. Nation, and Daniel K. Clegg

You might also like