0% found this document useful (0 votes)
66 views

Chapter 1. 1.2 - Modular Arithmetic

This document discusses modular arithmetic and its properties and applications. Modular arithmetic involves taking the remainder when dividing integers. Several examples are provided to illustrate concepts like congruence, addition and multiplication modulo integers. Properties of these operations are defined. Applications to problems like checking digits in identification numbers are also described.

Uploaded by

david.oballas
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
66 views

Chapter 1. 1.2 - Modular Arithmetic

This document discusses modular arithmetic and its properties and applications. Modular arithmetic involves taking the remainder when dividing integers. Several examples are provided to illustrate concepts like congruence, addition and multiplication modulo integers. Properties of these operations are defined. Applications to problems like checking digits in identification numbers are also described.

Uploaded by

david.oballas
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 13

Chapter 1 Preliminary

Concepts
1.2 Modular Arithmetic
Modular Arithmetic Abstraction of a method of counting

Example 1.2.1 It is now month of February, what month it will be 25 months


after now?

 Answer ______?
 Fact: 25 = 2(12) + 1
 Observe: You don’t have to count off 25 months starting Feb. There are 12
months in a year, and so 24 months in two years. Hence, simply add one
month to February to get the answer which is March
Modular Arithmetic

Example 1.2.2 It is now Wednesday, you will know that in 23 days it will be
_________________ (what day?)

 Answer ______?
 Fact: 23 = 3(7) + 2
 Observe: You don’t have to count off 23 days starting Wednesday. Instead,
note that there are 7 days a week. Hence, simply add two days to
Wednesday to get the answer which is Friday
Definition 1.2.3 Let x and n integers. The number x mod n is the remainder r
of x when divided by n, that is
x mod n = r

Example 1.2.4
3 mod 2 = 1 since 3 = 1 ( 2) + 1,
6 mod 2 = 0 since 6 = 3 (2) + 0,
11 mod 3 = 2 since 11 = 3 (3) + 2,
62 mod 85 = 62 since 62 = 0 (85) + 62,
-2 mod 15 = 13 since -2 = (-1)15 + 13.

Definition 1.2.5 Lat a and b be integers and n a positive integer. We say a mod
n = b mod n if and only if n divides a - b
Definition 1.2 6. Congruence
For a positive integer n, the integers a and b are congruent mod n, written a
≡ b (mod n), and read as “a congruent to b modulo n” if their remainders
when divided by n are the same.

Example 1.2.7 52 ≡ 24 (mod7)


As we can see above, 52 and 24 are congruent (mod 7)
because 52(mod7)=3 and 24(mod7)=3.

Note that = is different from ≡


Another way of defining this is that integers a and b are congruent mod n if
n│(a−b)

Example 1.2.8. 36 ≡ 10 (mod13)


36 and 10 are said to be congruent (mod 13) because their 13│36−10

Theorem 1.2.9 Properties of addition in modular arithmetic:


1.If a + b = c, then a (mod N) + b (mod N) ≡ c (mod N).
2.If a ≡ b (mod N), the a + k ≡ b + k (mod N) for any integer k.
3.If a ≡ b (mod N) and c ≡ d (mod N), then a + c ≡ b + d (modN).
4.If a ≡ b (mod N), then −a ≡ −b (mod N).
Example 1.2.10. Find the sum of 31 and 148 in
modulo 24.

Note that 31+148 = 179. Applyin Property 1,

179 (mod 24) = 31 (mod 24) + 148 (mod 24)


=7+4
= 11

Recall:
31 (mod 24) is 7 since 1(24) + 7, and
148 (mod 24) is 4 since [ 6(24) + 4]
Example 1.2.11. Find the remainder when
123+234+32+56+22+12+78 is divided by 3.

Solution. Note that applying Property 3, we can take the modulo of each addend.
Thus, we have :
123≡0(mod3) 22≡1(mod3),
234≡0(mod3) 12≡0(mod3),
32≡2(mod3) 78≡0(mod3).
56≡2(mod3)

This results to : (123+234+32+56+22+12+78)mod 3 ≡0 (mod 3) +0 (mod 3) +2


(mod 3) +2 (mod 3) +1 (mod 3) +0 (mod 3) +0 (mod 3) ≡5(mod3).

Since 5 has a remainder of 2 when divided by 3, so


does 123+234+32+56+22+12+78,123+234+32+56+22+12+78, and thus the
answer is 2. □□
Theorem 1.2.12 Properties of multiplication in modular arithmetic:

1.If a⋅b = c, then a (mod N)⋅ b (mod N)≡c (mod N).


2.If a ≡ b (mod N), then ka ≡ kb (mod N) for any integer k.
3.If a ≡ b (mod N) and c ≡ d (mod N), then ac ≡ bd (mod N).

Example 1.2.13 What is (8×16)(mod7)?

Since 8≡1(mod7) and 16≡2(mod7), we have


(8×16)≡(1×2)≡2(mod7).

What property is being applied?


Modular Arithmetic
Example 1.2.14 The United States Postal Service money order shown
in Figure 0.1 has an identification number consisting of 10 digits together
with an extra digit called a check. The check digit is the 10-digit number
modulo 9. Thus, the number 3953988164 has the check digit 2, since 3953988164
mod 9= 2.† If the number 39539881642 were incorrectly entered into a computer
(programmed to calculate the check digit) as, say, 39559881642 (an error in the
fourth position), the machine would calculate the check digit as 4, whereas the
entered check digit would be 2. Thus, the error would be detected.
Modular Arithmetic
Example 1.2.15 One method that does this is the one used to assign the so-called
Universal Product Code (UPC) to most retail items (see Figure 0.4). A UPC
identification number has 12 digits. The first six digits identify the manufacturer, the
next five identify the product, and the last is a check. (For many items, the 12th digit
is not printed, but it is always bar-coded.) In Figure 0.4, the check digit is 8.
Exercises

1. Find the least positive value of x such that


(i) 71 ≡ x (mod 8)
(ii) 78 + x ≡ 3 (mod 5)
(iii) 89 ≡ (x + 3) (mod 4)
(iv) 96 ≡ x/7(mod 5)
(v) 5x ≡ 4(mod 6)
2. If x is congruent to 13 modulo 17 then 7x - 3 is congruent to which number modulo 17?

3. Solve 5x ≡ 4 (mod 6)

4. Solve 3x − 2 ≡ 0 (mod 11)

5. What is the time 100 hours after 7 a.m.?

6. What is the time 15 hours before 11 p.m.?

You might also like