Modular Arithmetic Class1
Modular Arithmetic Class1
Modular Arithmetic Class1
Idea :
12 12 1
11 1 11
10 2 10 2
9 3 9 3
8 4 8 4
7 6 5 7 6 5
8+7=3 3 - 5 = 10
Congruent Modulo
Note that some numbers have the same remainder when they are divided by a particular integer.
For example, 47 5 has remainder 2 and 12 5 also has remainder 2.
This similarity helps us to define a new number relationship called congruence.
If two integers a and b have the property that a – b is divisible by another m ( m 1) then a
and b are called congruent modulo m and write a b (mod m ) .
Example
47 ≡ 2(mod 5) and 12 ≡ 2(mod 5)
Now 47 ≡ 12(mod 5) as (47 – 12) is divisible by 5.
47 and 12 are called congruent modulo 5.
Now we look at general modular arithmetic modulo n, where n is an integer greater than 1.
1. if a ≡ b(mod n) then a – b is divisible by n.
2. if a number a leaves a remainder of r after division by n, then a ≡ r(mod n).
Example 1:
Solution:
(a) By definition of congruence, 13 – 3 = 10 must be divisible by m. So the possible values
of m are the positive divisors of 10 : hence m ∈ { 2, 5, 10 }as by definition m 1 .
(b) Here 15 – 4 = 11 must be divisible by m. So m can only be 11.
Example 2:
If today is Wednesday, what day of the week will it be in 100 days’ time?
Solution:
Today is Wednesday (i.e. day 3) hence to find 100 days later, we can write
3 + 100 = 103 ≡ 5(mod 7).