Uploaded by deonnjoroge23450

Modular Arithmetic: Congruences, Properties, and Examples

advertisement
Modular Arithmetic
Abel and Samuella
22nd March 2025
1
Introduction
When we divide two integers we will have an equation that looks like the following:
A
= QremainderR
B
Then we say A is congruent to R modulo B, i.e, A ≡ R(modB)
The set of integers Z can be partitioned into n disjoint sets or modules namely
S0, S1.. .,Sn-1, where Sr is a set of integers with r as remainder when divided
by n, for r = 0, 1, 2, ..., n - 1. Any two numbers belonging to the same set or
module Sr are said to be congruent modulo n. Formally, if P and Q both leave
the same remainder or equivalently, n | (a − b) or a = kn + b, for some k ∈ Z
we define,
a ≡ b(modn)
For example, 31 ≡ 16 ≡ 10 ≡ 1(mod3)
An intuitive usage of modular arithmetic is with a 12 hour clock. If it is 10:00
now, then in 5 hours the clock will show 3:00 instead of 15:00. 3 is the remainder
of 15 with a modulus of 12.
2
Properties
• a ≡ a(modn) (Reflexive relation for all integers)
• If a ≡ b(modn) ⇒ b ≡ a(modn) (Symmetric relation over all integers a,b)
• If a ≡ b(modn), and b ≡ c(modn) ⇒ a ≡ c(modn) (Transitive relation for
all Integers a, b, c )
• If a ≡ b(modn)
1
1. a + c ≡ b + c(modn)
2. a − c ≡ b − c(modn)
3. ac ≡ bc(modn)
4. am ≡ bm (modn)
• If a ≡ b(modn) and c ≡ d(modn)
1. a + c ≡ b + d(modn)
2. a − c ≡ b − d(modn)
3. ac ≡ bd(modn)
4. ax + cy ≡ bx + dy(modn)
3
Examples
1. Find the largest positive integer n such that n3 +100 is divisible by (n+10).
Solution: Using modulo (n + 10) numbers, we see that
n + 10 ≡ 0[mod(n + 10)]
i.e., n ≡ −10[mod(n + 10)]
n3 ≡ (−10)3 [mod(n + 10)]
n3 ≡ −1000[mod(n + 10)]
n3 + 100 ≡ −900[mod(n + 10)]
n3 + 100 + 900 ≡ 0[mod(n + 10)]
We are given that (n+10) divides n3 + 100, i.e, n3 + 100 ≡ 0[mod(n + 10)]
This gives, 900 ≡ 0[mod(n + 10)], which means that (n+10) divides 900.
We are asked to find the largest integer n that works, and the largest
integer that divides 900 can’t be greater than 900 itself.
So the largest positive integer n, such that n3 + 100 is divisible by (n +
10) is n = 890.
2. What is the remainder when 20162016 is divided by 2017?
Solution: As 2016 ≡ −1(mod2017)
⇒ 20162 ≡ 1(mod2017)
⇒ 20162016 ≡ 1(mod2017)
2
3. Determine all positive integers n for which 2n +1 is divisible by 3. Solution:
2 ≡ −1(mod3)
⇒ 22 ≡ 1(mod3)
⇒ 22m ≡ 1m (mod3)
⇒ 22m ≡ 1(mod3) ⇒ 22m − 1 ≡ 0(mod3)
⇒ 22m+1 ≡ −1(mod3) ⇒ 22m+1 + 1 ≡ 0(mod3)
Therefore, 2n + 1 is divisible by 3 if and only if n is an odd integer (where
n=2m+1)
452
4. Find the remainder when 45272 is divided by 3
452
Solution: 452 ≡ −1(mod3) ⇒ 45272 ≡ 1(mod3)
The last congruence holds because 72452 is surely even.
4
Exercise
1. Suppose 55555 is divided by 24, find the remainder.
2. Show that 255 + 1 is divisible by 11.
3. Find the last two digits of (56789)41 .
4. With the use of modular arithmetic, prove the divisibility rule of 3.
5. Prove that a number is divisible by 11 if and only if the difference of the
sum of the odd ranked digits and the sum of the even ranked digits is
divisible by 11.
3
Download