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

SP MATH 120

Number Theory

CHAPTER 4 MODULAR ARITHMETIC

LESSON 2 APPLICATIONS OF CONGRUENCES


_____________________________________________________________________
Introduction
In this lesson we describe a few of the many uses of congruences to finding the
days of the week, round-robin tournament, identify the validity of the check digits of
the ISBN, and cryptography.
Learning Outcomes

• Solve real world applications of congruence.


Learning Activities
Find the remainder of the of the following. Write your answer on a separate sheet of
paper.
1. What is the remainder when 7198 is divided by 13?
2. What is the remainder when 2342 is divided by 23?
3. What is the remainder when 4236 is divided by 27?
4. What is the remainder when 81325 is divided by 45?
5. What is the remainder when 39316 is divided by 21?
Abstraction
According to Ortega
Since the days of the week form a cycle of length seven, we use the congruence
modulo 7. We denote each day of the week by a number is the set {0, 1, 2, 3, 4, 5, 6}
setting
Sunday → 0 Thursday → 4
Monday → 1 Friday → 5
Tuesday → 2 Saturday → 6
Wednesday → 3
Julius Caesar changed the Egyptian calendar, which was based on a year of
exactly 365 days, to a new calendar called Julian Calendar, with a year of average
1
length 365 4 days, with leap years every fourth year, to better reflect the true length of
the year.
However, more recent calculations have shown that the true length of the year
is approximately 365.2422 days.
As centuries passed, the discrepancies of 0.0078 days per year added up, so that
by the year 1582 approximately 10 extra days had been added unnecessarily in leap
years. To remedy this, in 1852 Pope Gregory set up a new calendar (Gregorian
Calendar).

88
SP MATH 120
Number Theory

Gregorian calendar was not adopted everywhere in the whole word in 1582. In
Britain and what is now the United States, it was adopted only in 1752, Japan changed
over in 1873, Russia and nearby countries in 1917, while in Greece held out until 1923.
Definition. Leap years that are divisible by 4, except that those exactly divisible by
100, that is, the years that mark centuries would be leap years only divisible by 400.
Since leap years come at the end of February, we take care of this by
remembering the months as follows and considering the months of January and
February as part of the preceding year. That is,
January → 11 July → 5
February → 12 August → 6
March → 1 September → 7
April → 2 October → 8
May → 3 November → 9
June → 4 December → 10
Example
February 1984 → considered as the 12th month of 1983.
May 1985 → considered as the 3rd month of 1985.
January 2006 → Considered as the 11th month of 2005.
To find the day of the week, we have
𝑌 𝐶
W ≡ k + [2.6𝑚 − 0.2] − 2𝐶 + 𝑌 + [4 ] + [4 ] (mod 7)

where
𝑘 → day of the month 𝑌 → particular year of the country
𝑚 → month of the year 𝐶 → century
Example
To find the day of the week of January 1, 1899, we have 𝐶 = 18, 𝑌 = 98, 𝑚 =
11 and 𝑘 = 1 (since we consider January as the 11th month of the preceding year). We
have,
𝑌 𝐶
W ≡ k + [2.6𝑚 − 0.2] − 2𝐶 + 𝑌 + [4 ] + [4 ] (mod 7)
98 18
W ≡ 1 + [2.6(11) − 0.2] − 2(18) + 98 + [ 4 ] + [ 4 ] (mod 7)

≡ 1 + 28 − 36 + 98 + 24 + 4 (mod 7)
≡ 119 (mod 7)
≡ 0 (mod 7)

89
SP MATH 120
Number Theory

Hence, January 1, 1899 was a Sunday.


Note: Discard the decimal number.
Example
What day of the week is December 29, 2020?
Solution
To find the day of the week of December 29, 2020, we have 𝐶 = 20, 𝑌 = 20,
𝑚 = 10 and 𝑘 = 29 (since we consider December as the 10th month of the preceding
year). We have,
𝑌 𝐶
W ≡ k + [2.6𝑚 − 0.2] − 2𝐶 + 𝑌 + [4 ] + [4 ] (mod 7)
20 20
W ≡ 29 + [2.6(10) − 0.2] − 2(20) + 20 + [ 4 ] + [ 4 ] (mod 7)
20 20
≡ 29 + [26 − 0.2] − 2(20) + 20 + [ 4 ] + [ 4 ] (mod 7)

≡ 29 + 25 − 40 + 20 + 5 + 5 (mod 7)
≡ 44 (mod 7)
W ≡ 2 (mod 7)
Hence, December 29, 2020 was a Tuesday.
Note: Discard the decimal number.
Example
What day of the week is October 24, 2019?
Solution
To find the day of the week of October 24, 2019, we have 𝐶 = 20, 𝑌 = 19,
𝑚 = 8 and 𝑘 = 24 (since we consider December as the 8th month of the preceding
year). We have,
𝑌 𝐶
W ≡ k + [2.6𝑚 − 0.2] − 2𝐶 + 𝑌 + [ ] + [ ] (mod 7)
4 4

19 20
≡ 24 + [2.6(8) − 0.2] − 2(20) + 19 + [ ] + [ ] (mod 7)
4 4

≡ 24 + [20.8 − 0.2] − 40 + 19 + 4 + 5 (mod 7)


≡ 24 + 20 − 40 + 19 + 4 + 5 (mod 7)
W ≡ 4 (mod 7)
Hence, October 24, 2019 was a Thursday.

90
SP MATH 120
Number Theory

REMARKS:
A new calendar called the “international Fixed Calendar” has been proposed
in which there are 13 months, including all our present months, plus a new month called
Sol, which is placed between June and July.
Each month has 28 days except for the month of June of leap years which has an extra
day called “Year End Day”, which is not in any month, which may consider as
December 29.
Try me!
Find the day of the week of the following important dates.
1. July 20, 1969 → First Man in the Moon
2. June 5, 2013 → First Man on Mars
Congruence can be used to schedule round-robin tournaments, that is,
scheduling a tournament for N different teams so that each team plays every other team
exactly once.
Note that if N is odd, not all teams can be scheduled in each round, since when
team are paired, the total number of teams playing is even.
So, if 𝑛 is odd, we add a “dummy team” and if a team is paired with the dummy
team during a particular round, it draws a “bye” in that round, and does not play.
Teams are labeled as 1, 2, 3, … , 𝑁 − 1, 𝑁. To contrast the schedule, team 𝑖 plays
team 𝑗 in the 𝑘 𝑡ℎ round if
𝑖 + 𝑗 ≡ 𝑘 (mod 𝑁 − 1) where 𝑖 ≠ 𝑗, 𝑖 ≠ 𝑁 and 𝑗 ≠ 𝑁
This schedule games for all teams in round 𝑘, except for team 𝑁 and team 𝑖 for
which 2𝑖 ≡ (mod 𝑁 − 1).
Example
Set-up a round robin tournament for 5 teams.
Solutions: To schedule a round-robin tournament for 5 teams, label the teams with
1, 2, 3, 4, 5 and a dummy labeled as 6.
Round 1. 𝑖 + 𝑗 ≡ 1 (mod 5)
Team 1 vs. Team 5
Team 2 vs. Team 4
Team 3 → bye

Round 2: 𝑖 + 𝑗 ≡ 2 (mod 5)
Team 2 vs. Team 5

91
SP MATH 120
Number Theory

Team 3 vs. Team 4


Team 1 vs. bye

Round 3: 𝑖 + 𝑗 ≡ 3 (mod 5)
Team 1 vs. Team 2
Team 3 vs. Team 5
Team 4 vs. bye

Round 4: 𝑖 + 𝑗 ≡ 2 (mod 5)
Team 1 vs. Team 3
Team 4 vs. Team 5
Team 2 vs. bye

Round 5: 𝑖 + 𝑗 ≡ 2 (mod 5)
Team 1 vs. Team 4
Team 2 vs. Team 3
Team 5 vs. bye

Summary of pairings is shown in the table below


1 2 3 4 5
1 5 4 bye 2 1
2 bye 5 4 3 2
3 2 1 5 bye 3
4 3 bye 1 5 4
5 4 3 2 1 Bye

Example
Set-up a round-robin tournament for 8 teams, label the teams, say
𝑇1, 𝑇2, 𝑇3, 𝑇4, 𝑇5, 𝑇6, 𝑇7 and 𝑇8.
Round 1: 𝑖 + 𝑗 ≡ 1 (mod 7)
2𝑖 ≡ 1 (mod 7) → 𝑖 = 4
Team 1 vs. Team 7
Team 2 vs. Team 6

92
SP MATH 120
Number Theory

Team 3 vs. Team 5


Team 4 vs. Team 8

Round 2: 𝑖 + 𝑗 ≡ 2 (mod 7)
2𝑖 ≡ 2 (mod 7) → 𝑖 = 1
Team 2 vs. Team 7
Team 3 vs. Team 6
Team 4 vs. Team 5
Team 1 vs. Team 8
Round 3: 𝑖 + 𝑗 ≡ 3 (mod 7)
2𝑖 ≡ 3 (mod 7) → 𝑖 = 5
Team 1 vs. Team 2
Team 3 vs. Team 7
Team 4 vs. Team 6
Team 5 vs. Team 8

Round 4: 𝑖 + 𝑗 ≡ 1 (mod 7)
2𝑖 ≡ 1 (mod 7) → 𝑖 = 2
Team 1 vs. Team 3
Team 5 vs. Team 6
Team 4 vs. Team 7
Team 2 vs. Team 8

Round 5: 𝑖 + 𝑗 ≡ 5 (mod 7)
2𝑖 ≡ 5 (mod 7) → 𝑖 = 6
Team 1 vs. Team 4
Team 2 vs. Team 3
Team 5 vs. Team 7
Team 6 vs. Team 8

93
SP MATH 120
Number Theory

Round 6: 𝑖 + 𝑗 ≡ 6 (mod 7)
2𝑖 ≡ 6 (mod 7) → 𝑖 = 3
Team 1 vs. Team 5
Team 2 vs. Team 4
Team 6 vs. Team 7
Team 3 vs. Team 8

Round 7: 𝑖 + 𝑗 ≡ 7 (mod 7)
2𝑖 ≡ 7 (mod 7) → 𝑖 = 7
Team 1 vs. Team 6
Team 2 vs. Team 5
Team 3 vs. Team 4
Team 7 vs. Team 8

Round T1 T2 T3 T4 T5 T6 T7 T8
1 7 6 5 8 3 2 1 4
2 8 7 6 5 4 3 2 1
3 2 1 7 6 8 4 3 5
4 3 8 1 7 6 5 4 2
5 4 3 2 1 7 8 6 5
6 5 4 8 2 1 7 6 3
7 6 5 4 3 2 1 8 7

In a round-robin tournament scheduling, we wish to assign a home team and an


away team four each game so that each of the 𝑁 teams, where 𝑁 is odd, plays an equal
number of home games.
1. If 𝑖 + 𝑗 is odd, assign the smaller of 𝑖 and 𝑗 as the home team.
2. If 𝑖 + 𝑗 is even, assign the larger of 𝑖 and 𝑗 as the home team.
Try me!
1. Set-up a round-robin tournament schedule for
a. 9 teams b. 10 teams
Almost all of the books are identified by their “International Standard Book
Number” (ISBN) which is a ten-digit code assign by the publisher. Check digit is used
to detect the errors most commonly made when ISBN are copied.

94
SP MATH 120
Number Theory

Example
1. 0 − 201 − 06561 − 4
2. 0 − 404 − 50874 − 𝑋
Since there are ten digits in an ISBN, thus we use the congruence modulo 11.
Further, an ISBN was grouped into four blocks of digits, we have
1. 1st block → the language of the book
2. 2nd block → publishing company
3. 3rd block → number assigns to the book by the publishing company
4. 4th block → check digit
The size of the blocks differs for different languages and publishers. Further,
some ISBN’s were only grouped to 3 blocks.
The first nine digits are called decimal digits, each of the digit could be either
0, 1, 2, 3, 4, 5, 6, 7, 8, 9.
The last digit is called the check digit, it could be 0, 1, … , 9, 𝑋.
Check digit is selected so that the congruence
10

∑ 𝑖𝑥1 ≡ 0 (mod 11)


𝑖=1

Holds. It implies that


9

𝑥10 ≡ ∑ 𝑖𝑥1 (mod 11)


𝑖=1

Example
Determine whether the 𝐼𝑆𝐵𝑁 0 − 394 − 38049 − 5 is valid.
Solutions:
We need to check whether the congruence
∑10
𝑖=1 𝑖𝑥1 ≡ 0 (mod 11)

≡ 1(0) + 2(3) + 3(9) + 4(4) + 5(3) + 6(8) + 7(0) + 8(4) + 9(9) +


10(5) (mod 11)

≡ 0 + 6 + 27 + 16 + 15 + 48 + 0 + 32 + 81 + 50 (mod 11)
≡ 275 (mod 11)
≡ 0 (mod 11)
Thus, the ISBN is valid.

95
SP MATH 120
Number Theory

Example
Determine whether the 𝐼𝑆𝐵𝑁 0 − 201 − 06561 − 4 is valid.
Solutions:
We need to check whether the congruence
∑10
𝑖=1 𝑖𝑥1 ≡ 0 (mod 11)

≡ 1(0) + 2(2) + 3(0) + 4(1) + 5(0) + 6(6) + 7(5) + 8(6) + 9(1) + 10(4) (mod 11)

≡ 0 + 4 + 0 + 4 + 0 + 36 + 35 + 48 + 9 + 40 (mod 11)
≡ 176 (mod 11)
≡ 0 (mod 11)
Thus, the ISBN is valid.
Try me!
Determine whether the following International Standard Book Number are valid. Write
your answer on a separate sheet of paper.
1. 0 − 13 − 190190 − 7
2. 0 − 618 − 12214 − 1
3. 0 − 63 − 124474 − 3
The identification number for a bank printed on a check consists of eight digits
𝑥1 , 𝑥2 , … , 𝑥8 followed by a ninth check digit 𝑥9 , with
𝑥9 ≡ 7𝑥1 + 3𝑥2 + 9𝑥3 + 7𝑥4 + 3𝑥5 + 9𝑥6 + 7𝑥7 + 3𝑥8 (mod 10)
Example
What is the check digit following the eight-digit identification number
00185403 for a bank?

Solution
𝑥9 ≡ 7𝑥1 + 3𝑥2 + 9𝑥3 + 7𝑥4 + 3𝑥5 + 9𝑥6 + 7𝑥7 + 3𝑥8 (mod 10)
≡ 7(0) + 3(0) + 9(1) + 7(8) + 3(5) + 9(4) + 7(0) + 3(3) (mod 10)
≡ 0 + 0 + 9 + 56 + 15 + 36 + 0 + 9 (mod 10)
≡ 125 (mod 10)
≡ 5 (mod 10)
Thus, the check digit is 5.
Check digits are also used to detect errors in passport numbers. For some
European countries, the identification number of a passport consist of a 6-digit number
𝑥1 , 𝑥2 , 𝑥3 , 𝑥4, 𝑥5 , 𝑥6 and the check digit 𝑥7 is chosen so that

96
SP MATH 120
Number Theory

𝑥7 ≡ 7𝑥1 + 3𝑥2 + 𝑥3 + 7𝑥4 + 3𝑥5 + 𝑥6 (mod 10)


Example
Compute for the check digit of a European passport with an identification
number 211894.
Solution
𝑥7 ≡ 7𝑥1 + 3𝑥2 + 𝑥3 + 7𝑥4 + 3𝑥5 + 𝑥6 (mod 10)
≡ 7(2) + 3(1) + 1 + 7(8) + 3(9) + 4 (mod 10)
≡ 14 + 3 + 1 + 56 + 27 + 4 (mod 10)
≡ 105 (mod 10)
≡ 5 (mod 10)
Thus, the check digit is 5.
Try me!
Determine the check digit of the following. Write your answer on a separate sheet.
1. What is the check digit following the eight-digit identification number
6391747 for a bank?
2. Compute for the check digit of a European passport with an identification
number 214973.
From ancient times to the present, secret messages have been sent. Classically,
the need for secret communication has occurred in diplomacy and in military affairs.
Now, with electronic communication coming into widespread use, secrecy has become
an important issue.
The discipline devoted to secrecy system is called cryptology. Cryptology is a
part of cryptology that deals with the design and implementation of secrecy system,
while cryptanalysis is aimed at breaking these systems.
A message that is to be altered into a secret form is called plaintext. A cipher is
a method for altering a plaintext message into a ciphertext by changing letters of the
plaintext using a transformation.
The key determines a particular transformation from a set of possible
transformation. The process of changing plaintext into a ciphertext is called enciphering
/ encryption, while the reverse process of changing the ciphertext back to plaintext is
called deciphering / decryption.
The secrecy system that we are going to discuss will be based on transforming
each letter of the plaintext message into a different letter to produce the ciphertext. Such
ciphers are called character / monographic ciphers.
The first of these had its origin with Julius Ceasar (Ceasar Cipher). This cipher
was based on the substitution in which each letter in the alphabet is replaced by letter
three further down the alphabet.

97
SP MATH 120
Number Theory

We start by translating letters into numbers. We take as our standard alphabet


the letters of English and translate them into integers from 0 to 25.
To describe the cipher using modular arithmetic, let 𝑃 be the numerical
equivalent of a letter in the plaintext and 𝐶 the numerical equivalent of the
corresponding ciphertext letter.
Then 𝐶 ≡ 𝑃 + 3 (mod 26), 0 ≤ 𝐶 ≤ 25.
To encipher the message using this transformation, we first change it to its
numerical equivalent, grouping letters in blocks of five. Then we transform each
number. The grouping of letters into blocks helps prevent successful cryptanalysis
based on recognizing particular words. After using Ceasar transformation 𝐶 ≡ 𝑃 +
3 (mod 26), translate back to letters.
Example
Encipher the message “THIS MESSAGE IS TOP ECRET”.
Solutions:
Group the letters into a block of five letters, then change it to its numerical
equivalent. Thus,
THI S M E S S A G EI S T O P S ECR ET
19 7 8 18 12 4 18 18 0 6 4 8 18 19 14 15 18 4 2 17 4 19
Now, applying Ceasar’s transformation (𝐶 ≡ 𝑃 + 3 (mod 26)), we obtain
19 7 8 18 12 4 18 18 0 6 4 8 18 19 14 15 18 4 2 17 4 19

22 10 11 21 15 7 21 21 3 9 7 11 21 22 17 18 21 7 5 20 7 22
Translating back to letters, we have
WKLKL HVVDJ HLVWR SVHFU HW
Hence, instead of sending the original message, the above ciphertext will be sent.
To decipher the message using Ceasar cipher, we first change these letters into
their numerical equivalents. Next, perform the transformation 𝑃 ≡ 𝐶 − 3 (mod 26) to
change these equivalents to numerical equivalents in plaintext.
Translate it back to letters and recover the plaintext message.
Example
Encipher the message “I LOVE MATHEMATICS” using Ceasar’s
transformation.
Solutions:

98
SP MATH 120
Number Theory

Group the letters into a block of five letters, then change it to its numerical
equivalent. Thus,
I L O V E MAT HE T I C S
8 11 14 21 4 12 0 19 7 4 19 8 2 18
Now, applying Ceasar’s transformation (𝐶 ≡ 𝑃 + 3 (mod 26)), we obtain
8 11 14 21 4 12 0 19 7 4 19 8 2 18

11 14 17 24 7 15 3 22 10 7 22 11 5 21
Translating back to letters, we have
LORYH PDWKH WLFV
Hence, instead of sending the original message, the above ciphertext will be sent.
Try Me!
Decipher the ciphertext message using Ceasar’s transformation.
1. “NUMBER THEORY IS AN EASY SUBJECT”
2. “WKLVL VKRZZ HGHFL SKHU”
In general, we fix an alphabet {𝐴, 𝐵, … , 𝑌, 𝑍} so that 𝑚 = 26. Then choose a
secret key such that 0 < 𝑘 < 𝑚. Then the encryption and decryption functions are
𝐶 = 𝑃 + 𝑘 (mod 𝑚) and 𝑃 = 𝐶 + 𝑘 (mod 𝑚)
respectively.
Clearly, Ceasar cipher (Shift Transfortations) is insecure since the key space is
only as large as the alphabet. Thus, an alternative cipher (though still not secure) was
introduced, which is known as the affine transformations.
The encryption and decryption functions are
𝐶 ≡ 𝑎𝑃 + 𝑏 (mod 26) and 𝑃 = 𝑎−1 (𝐶 − 𝑏) (mod 26)
respectively
We require that (𝑎, 26) = 1, so that 𝑃 runs through a complete system of
residues modulo 26, 𝐶 also does.
Since there are 𝜙 (26) = 12 choices of 𝑎 and 26 choices for 𝑏 giving a total of
12 ∙ 26 = 312 transformations (key space).
As an example of such cipher, let 𝑎 = 7 and 𝑏 = 10, so that 𝐶 ≡ 7𝑃 +
10 (mod 26).
Now to find the value of 𝑎−1 , we will use the congruence 𝑎−1 ≡ 1 (mod 26).
To decode the inverse of 7 modulo 26 is 15. Thus 7 ∙ 15 ≡ 105 (mod 26) ≡
1 (mod 26).

99
SP MATH 120
Number Theory

Example
Encipher the message “PLEASE SEND MONEY”.
Solution
Group the letters into a block of five letters, then change it to its numerical
equivalent. Thus,
P LEAS E SEND M O N EY
15 11 4 0 18 4 18 4 13 3 12 14 13 4 24
Now, applying affine transformations encryption (𝐶 ≡ 𝑎𝑃 + 𝑏 (mod 26)) we
obtain
𝐶 ≡ 7(15) + 10 (mod 26) ≡ 115 (mod 26) ≡ 11 (mod 26) ⟹L
𝐶 ≡ 7(11) + 10 (mod 26) ≡ 87 (mod 26) ≡ 9 (mod 26) ⟹J
𝐶 ≡ 7(4) + 10 (mod 26) ≡ 38 (mod 26) ≡ 12 (mod 26) ⟹M
𝐶 ≡ 7(0) + 10 (mod 26) ≡ 10 (mod 26) ≡ 10 (mod 26) ⟹K
𝐶 ≡ 7(18) + 10 (mod 26) ≡ 136 (mod 26) ≡ 6 (mod 26) ⟹G

𝐶 ≡ 7(4) + 10 (mod 26) ≡ 38 (mod 26) ≡ 12 (mod 26) ⟹M


𝐶 ≡ 7(18) + 10 (mod 26) ≡ 136 (mod 26) ≡ 6 (mod 26) ⟹G
𝐶 ≡ 7(4) + 10 (mod 26) ≡ 38 (mod 26) ≡ 12 (mod 26) ⟹M
𝐶 ≡ 7(13) + 10 (mod 26) ≡ 91 (mod 26) ≡ 13 (mod 26) ⟹N
𝐶 ≡ 7(3) + 10 (mod 26) ≡ 31 (mod 26) ≡ 5 (mod 26) ⟹F

𝐶 ≡ 7(12) + 10 (mod 26) ≡ 94 (mod 26) ≡ 16 (mod 26) ⟹Q


𝐶 ≡ 7(14) + 10 (mod 26) ≡ 108 (mod 26) ≡ 4 (mod 26) ⟹M
𝐶 ≡ 7(13) + 10 (mod 26) ≡ 91 (mod 26) ≡ 13 (mod 26) ⟹N
𝐶 ≡ 7(4) + 10 (mod 26) ≡ 38 (mod 26) ≡ 12 (mod 26) ⟹M
𝐶 ≡ 7(24) + 10 (mod 26) ≡ 178 (mod 26) ≡ 22 (mod 26) ⟹W
Hence, instead of sending the original message, “LJMKG MGMNF QMNMW”
will be sent.
Example
Decipher the message “FEXEN ZMBMK JNHMG MYZMN” using the affine
transformation 𝑎 = 7 and 𝑏 = 10.
Solution

100
SP MATH 120
Number Theory

Change the letter to its numerical equivalent. Thus


FEXEN XMBMK JNHMG MY Z M N
5 4 23 4 13 23 12 1 12 10 9 13 7 12 6 12 24 25 12 12
Now, applying affine transformations encryption (𝑃 = 𝑎−1 (𝐶 − 𝑏) (mod 26))
we obtain

𝑃 = 𝑎−1 (𝐶 − 𝑏) (mod 26))


𝑃 ≡ 15 (5 − 10) (mod 26) ≡ 15(−5) (mod 26) ≡ −75 (mod 26) ≡ 3 (mod 26) ⟹D

𝑃 ≡ 15 (4 − 10) (mod 26) ≡ 15(−6) (mod 26) ≡ −90 (mod 26) ≡ 14 (mod 26) ⟹O

𝑃 ≡ 15 (23 − 10) (mod 26) ≡ 15(13) (mod 26) ≡ 195 (mod 26) ≡ 13 (mod 26) ⟹N

𝑃 ≡ 15 (4 − 10) (mod 26) ≡ 15(−6) (mod 26) ≡ −90 (mod 26) ≡ 14 (mod 26) ⟹O

𝑃 ≡ 15 (13 − 10) (mod 26) ≡ 15(3) (mod 26) ≡ 45 (mod 26) ≡ 19 (mod 26) ⟹T

𝑃 ≡ 15 (25 − 10) (mod 26) ≡ 15(15) (mod 26) ≡ 225 (mod 26) ≡ 13 (mod 26) ⟹R

𝑃 ≡ 15 (12 − 10) (mod 26) ≡ 15(2) (mod 26) ≡ 30 (mod 26) ≡ 4 (mod 26) ⟹E

𝑃 ≡ 15 (1 − 10) (mod 26) ≡ 15(−9) (mod 26) ≡ 135 (mod 26) ≡ 21 (mod 26) ⟹V

𝑃 ≡ 15 (12 − 10) (mod 26) ≡ 15(2) (mod 26) ≡ 30 (mod 26) ≡ 4 (mod 26) ⟹E

𝑃 ≡ 15 (10 − 10) (mod 26) ≡ 15(0) (mod 26) ≡ 0 (mod 26) ≡ 0 (mod 26) ⟹A

𝑃 ≡ 15 (9 − 10) (mod 26) ≡ 15(−1) (mod 26) ≡ −15 (mod 26) ≡ 11 (mod 26) ⟹L

𝑃 ≡ 15 (13 − 10) (mod 26) ≡ 15(3) (mod 26) ≡ 45 (mod 26) ≡ 19 (mod 26) ⟹T

𝑃 ≡ 15 (7 − 10) (mod 26) ≡ 15(−3) (mod 26) ≡ 45 (mod 26) ≡ 7 (mod 26) ⟹H

𝑃 ≡ 15 (12 − 10) (mod 26) ≡ 15(2) (mod 26) ≡ 30 (mod 26) ≡ 4 (mod 26) ⟹E

𝑃 ≡ 15 (6 − 10) (mod 26) ≡ 15(−4) (mod 26) ≡ −60 (mod 26) ≡ 18 (mod 26) ⟹S

𝑃 ≡ 15 (12 − 10) (mod 26) ≡ 15(2) (mod 26) ≡ 30 (mod 26) ≡ 4 (mod 26) ⟹E

𝑃 ≡ 15 (24 − 10) (mod 26) ≡ 15(14) (mod 26) ≡ 210 (mod 26) ≡ 2 (mod 26) ⟹C

𝑃 ≡ 15 (25 − 10) (mod 26) ≡ 15(15) (mod 26) ≡ 225 (mod 26) ≡ 17 (mod 26) ⟹R

𝑃 ≡ 15 (12 − 10) (mod 26) ≡ 15(2) (mod 26) ≡ 30 (mod 26) ≡ 4 (mod 26) ⟹E

𝑃 ≡ 15 (13 − 10) (mod 26) ≡ 15(3) (mod 26) ≡ 45 (mod 26) ≡ 19 (mod 26) ⟹T

Thus, the decipher message is “DO NOT REVEAL THE SECRET”.

101
SP MATH 120
Number Theory

Try Me!
Use affine transformations to encipher and decipher the text. Write your answer on a
separate sheet.
1. Encipher the message “I LOVE NUMBER THEORY”, then decipher back to
original text. When 𝑎 = 6 and 𝑏 = 8.
Overall Analysis
1. How did you solve real world applications of congruences?
_________________________________________________________
_______________________________________________________________
_______________________________________________________________
_______________________________________________________________
2. What are the steps in solving real world applications of congruences?
_________________________________________________________
_______________________________________________________________
_______________________________________________________________
_______________________________________________________________
3. Make a conclusion on your learning about the lesson.
_________________________________________________________
_______________________________________________________________
_______________________________________________________________
_______________________________________________________________
Application
Apply the different definitions and theorems discussed above to solve the following
statement. Write your answer on a separate sheet of paper.
1. Encipher the message “BSED MAJOR IN MATH”, then decipher back to
original text. When 𝑎 = 3 and 𝑏 = 15.
Assessment
Solve the following real-world applications of congruences. Write your answer on a
separate sheet.
1. Using affine transformations encipher the message “BSED MAJOR IN
MATH”, then decipher back to original text. When 𝑎 = 3 and 𝑏 = 15.
2. Using Ceasar’s transformation encipher the message “I WILL PASS THE
EXAM”, then decipher back to original text.
3. Compute the check digit of European pass with an identification number of
913246.
4. Determine whether the ISBN 0 − 635 − 30481 − 3 is valid.
5. In a round-robin tournament scheduling, determine the home team for each
game where there are; a. 3 teams, b. 4 teams.

102
SP MATH 120
Number Theory

6. Determine the day of the week he Philippines Declaration of independence


(June 12, 1898)?
Agreement
Solve the following real-world applications of congruence.
1. How many times will the 13th day of the month fall on a Friday in the year 1999?
2. If today is September 29, 2012 and it is a Sunday, what day of the week will
September 29 be five years from now?
3. Set-up a round-robin tournament for 6 teams.
4. What should the check digit be to complete the ISBN 2 − 113 − 5400?
5. Using affine transformations encipher the message “HAPPY NEW YEAR”,
then decipher back to original text. When 𝑎 = 9 and 𝑏 = 12.
References:
Daileda, R. C. (2018, February 17). Euler’s, Fermat’s and Wilson’s Theorems.
Retrieved July 20, 2020, from Euler.pdf:
http://ramanujan.math.trinity.edu/rdaileda/teach/s18/m3341/Euler.pdf
Ortega, O. M. (n.d.). Math 527 - Number Theory. Tacloban City, Leyte, Philippines.
Retrieved September 30, 2018.
Pakapongpun, A. (2018, April 15). THE RELATION AMONG EULER'S PHI
FUNCTION, TAU FUNCTION, AND SIGMA FUNCTION. International
Journal of Pure and Applied Mathematics, Volume 118(3 2018, 675-684), 675-
685. doi:10.12732/ijpam.v11i3.15. Retrieved July 9, 2020, from
https://ijpam.eu/contents/2018-118-3/15/15.pdf.
WIKIPEDIA. (n.d.). Retrieved July 9, 2020, from Divisor function:
https://en.wikipedia.org/wiki/Divisor_function#:~:text=In%20mathematics%2
C%20and%20specifically%20in,1%20and%20the%20number%20itself).
WIKIPEDIA. (n.d.). Retrieved July 9, 2020, from Euler's totient function:
https://en.wikipedia.org/wiki/Euler%27s_totient_function#:~:text=In%20num
ber%20theory%2C%20Euler's%20totient,be%20called%20Euler's%20phi%20
function.&text=For%20example%2C%20the%20totatives%20of,%2C%205%
2C%207%20and%208.

103

You might also like