1 Modular Arithmetic

You might also like

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

Kristine Bobihis Cabalde, LPT, MSME

Learning Outcome
At the end of this module, the student should be
able to:

1. Compare modular arithmetic into group theory.


2. Illustrate accurately the modular arithmetic and
its operation as well as operations on group
theory.
3. Make use of modular arithmetic and group
theory to apply in a real situation.
Modular Arithmetic
Specific Objective

At the end of this lesson, the student should be able to:

1. Define modular arithmetic.


2. Compare a clock arithmetic into modular arithmetic.
3. Explain comprehensively modular arithmetic.
4. Name different properties of modular arithmetic.
5. Tell whether the congruence is a congruence or not.
6. Solve and perform operations on clock and in modular
arithmetic.
7. Construct a clock and a modulo n addition table.
Example
Perform the + or - operator.

a) 8 + 3 = 11
b) 8 - 5 = 3
c) 8 + 16 = 0
d) 8 + 9 = 5
e) 8 - 10 = 10
f) 8 - 12 = 8
Example
If it is 11 o'clock and you have to finish
your math homework in 18 hours, what hour
will it be at that time?

Answer: 11 + 18 = 5.
Hence the time that the homework could
it be finished is 5 o’clock.
Example
If it is 12:00 now, what time is it in 12 hours?
What is the remainder when you divide 12 by 12?

Answer: Using the 12-hour clock based on the


given figure above, if it is now 12:00, the time
after another 12 hour is also 12 o’clock and it has
an equivalent number as zero (0).
If we are going to divide 12 by 12, it is very
obvious that the remainder is 0.
Example
If it is 12:00 now, what time is it in 18 hours?
What is the remainder when you divide 18 by 12?

Answer: Similar on what we do to example 3, if it


is now 12:00, adding 18 hours starting from 12 (0)
would give us 6 o’clock. Dividing 18 by 12, the
remainder would be 6. Hence, the time after 18
hours starting to 12 o’clock is 6 o’clock.
Days of the Week
4 + 6 = 3 (Thursday)
and
0 + 16 = 2 (Wednesday)

Monday = 0
Tuesday = 1
Wednesday = 2
Thursday = 3
Friday = 4
Saturday = 5
Sunday = 6
Example
Let us say today is Wednesday. What
would be the day 11 days after Wednesday?
What would be the remainder if we are going to divide
11 by 7?

Answer: Based on our given days in a week above,


the equivalent number for Wednesday is 2. Adding
11 days after Wednesday, we got Sunday
where this day has an equivalent number as 6.
Adding 2 by 11, the result is 13 and if we are going to
divide 13 by 7, the result is 6. Hence, 2 + 11 = 6.
Activity
Activity
Activity
Modular Arithmetic
Two integers a and b are said to be congruent
modulo n, where n is an element of N, if is an
integer. In this case, we write a ≡ b (mod n). The
number n is called the modulus. The statement a
≡ b (mod n) is called a congruence.

This could be stated in this form.


If a, b ∈ Z and n ∈ Z+ , then a ≡ b (mod n) if
and only if n | a – b.
12 – hour clock addition table
Modulo 12 Addition Table
Example
Based on the given table above, each
expression follows the modular arithmetic
under modulo 12.

a) 12 ≡ 0 (mod 12)
b) 21 ≡ 9 (mod 12)
c) 37 ≡ 1 (mod 12)
d ) 17≡ 5 (mod 12)
Example
Write in the form a ≡ b(mod n) the statement 3 | 6.

Answer:

3 | 6 could be written as 3 | (18 – 12);


where n = 3, a = 18 and b = 12.

So, we could write this as


18 ≡ 12 (mod 3)
12 ≡ 18 (mod 3)
Example
Is 53 ≡ 17 (mod 3)? How about 53 ≡ 14 (mod 3)? What about 53 ≡ 11(mod 3)?

Answer:

The 53 ≡ 17 (mod 3) can be written in a form of . Now, let a = 53, b


= 17 and n = 3.
Example
Another way to be able to write in a congruence
modulo n is by dividing by n and take the remainder.
Let us say n = 3. Then;

14(mod 3) ≡ 2; that is 14 = (3)(4) + 2. The remainder is 2.


9 (mod 3) ≡ 0; that is 9 = (3)(3) + 0. The remainder is 0.
2 (mod 3) ≡ 2; since 2 = (3)(0) + 2.
-1 (mod 3) ≡ 2; since -1 = (3)(-1) + 2
-5 (mod 3) ≡ 1; since -5 = (3)(-2) + 1. The remainder is 1.
Example
Tell whether the congruence is true or not.

29 ≡ 8 mod 3
7 ≡ 12 mod 5
15 ≡ 4 mod 6.
An alternative method to determine a true
congruence in a ≡ b(mod n), where a and b are whole
numbers, then when a and b is divided by n, they
must have the same remainder.

Let us say the given modulo is 53 ≡ 17 (mod 3). Now, if


we divide 53 to 3, then;
53 = (3)(17) + 2. The remainder is 2
and if we divide 17 to 3, we get;
17 = (3)(5) + 2. The remainder is also 2.
Theorem

For arbitrary integers a and b, a ≡ b(mod n)


if and only if a and b have the same remainder
when divided by n.
Properties on Congruence
Let n > 0 be fixed and a, b, c and d are arbitrary integers.
Then,

a) a ≡ a(mod n)
b) if a ≡ b(mod n) then b ≡ a(mod n)
c) if a ≡ b(mod n) and b ≡ c(mod n), then a ≡ c(mod n)
d) if a ≡ b(mod n) and c ≡ d(mod n), then a + c = b + d
(mod n) and ac ≡ bd (mod n)
e) if a ≡ b(mod n), then a + c ≡ b + c (mod n) and ac ≡
bc (mod n)
f) If a ≡ b (mod n), then ak ≡ bk (mod n)
Activity
Determine whether the following is congruence or not
congruence. Write your answer on the right side of each
item.

a) 5 ≡ 8 (mod 3) f) 11 ≡ 15 (mod 4)
b) 5 ≡ 20 (mod 4) g) 7 ≡ 21 (mod 3)
c) 21 ≡ 45 (mod 6) h) 18 ≡ 60 (mod 7)
d) 88 ≡ 5 (mod 9) i) 72 ≡ 30 (mod 5)
e) 100 ≡ 20 (mod 8) j) 25 ≡ 85 (mod 12)
Activity
Direction: Answer the following questions.
Write your answer after each item.

a) What is 13mod1?
b) What is -4mod9?
c) What is -13mod1?
d) What is -14mod2?
e) What is 14mod2?
Activity
Which of the following integers are valid for
solutions for x?

1. Given x ≡ 17 mod 4
a) -43 b) -17 c) 15 d) 25
2. Given x ≡ 11 mod 8
a) -77 b) 77 c) 27 d) 25
Activity
Fill out the table of a modulo 4 addition table and
transform each item in a form of a ≡ b mod n.

+ 0 1 2 3 a) 3+3=
0 b) 2+3=
1 c) 1+2=
2 d) 0+0=
3 e) 2+2=

You might also like