You are on page 1of 89

2

Part I: ,

2.1

Chapter 2
Objectives
(divisibility), (Euclidean)


(Diophantine Equations),


.

(residue matrices)

2.2

21 (INTEGERARITHMETIC)
(set)
. ,
.
Topics discussed in this section:
2.1.1
2.1.2
2.1.3
2.1.4
2.1.5
2.3

2.1.1
, ,
( )

Figure 2.1

2.4

2.1.2

. 2
.
Figure 2.2

2.5

2.1.2 Continued
Example 2.1
.
, 4
.

2.6

2.1.3
, a n , q r .
.

a=qn+r

2.7

2.1.3 Continued
Example 2.2

a = 255 n = 11 , 2.3
q = 23 r = 2
.
Figure 2.3 2.2

2.8

2.1.3 Continued
Figure 2.4

2.9

2.1.3 Continued
Example 2.3
, a , q r
.
r ?
. q 1 , r n
.

2.10

2.1.3 Continued
Figure 2.5

2.11

2.1.4
a 0 , r = 0
, .

a=qn
0
, 0

2.12

2.1.4 Continued
Example 2.4
a. 32 = 8 4 4 32 ,

b. 42 = 5 8 + 2 8 42 .
2 .

2.13

2.1.4 Continued

Property 1: a|1 a = 1.
Property 2: a|b b|a a = b.
Property 3: a|b b|c a|c.
Property 4: a|b a|c
a|(m b + n c) . m n

2.14

2.1.4 Continued
Example 2.5
a.

b.

2.15

(properties)
.
Q .

2.16

1: a | 1
2: a | b
3: a | b
4: a | b
n
m

a 1
b | a
a b
a|c
b | c
a | c , a | (m b n
c)

2.1.4 Continued
Example 2.6

a. 3|15 , 15|45 , 3
, 3|45 .
b. 3|15 3|9 , 4
, 3|(15 x 2 +9 x 4) , 3|66
.

2.17

2.1.4 Continued

Note

Fact 1: 1 , 1
.
Fact 2: 2
(1 ) (2
)

2.18

(Greatest Common Divisor)

2.19

2.1.4 Continued
Figure 2.6

2.20

2.1.4 Continued
Note

Note

Fact 1: gcd (a, 0) = a


Fact 2: gcd (a, b) = gcd (b, r), r
a b .
2.21

2.1.4 Continued
Figure 2.7

2.22

2.1.4 Continued

Note

gcd (a, b) = 1 , a b
( relatively prime) .
Note

When gcd (a, b) = 1, we say that a and b are


relatively prime.
2.23

2.1.4 Continued
Example 2.7

2740 1760 .
Solution
gcd (2740, 1760) = 20 .

2.24

2.1.4 Continued
Example 2.8

25 60 .
Solution
gcd (25, 65) = 5 .

2.25

2.1.4 Continued

(Extended Euclidean Algorithm)
a b ,
.

gcd (a, b)
, s t
.

2.26

2.1.4 Continued
Figure 2.8.a part a

2.27

2.1.4 Continued
Figure 2.8.b

2.28

part b

2.1.4 Continued
Example 2.9

a = 161 b = 28 , gcd (a, b) s, t


.
Solution

gcd (161, 28) = 7 , s = 1 t = 6 .

2.29

2.1.4 Continued
Example 2.10

a = 17 b = 0 , gcd (a, b) s, t
.
Solution

gcd (17, 0) = 17 , s = 1, t = 0 .

2.30

2.1.4 Continued
Example 2.11

a = 0 b = 45 , gcd (a, b) s, t
.
Solution

gcd (0, 45) = 45 , s = 0 , t = 1 .

2.31

2.1.4 Continued
(Linear Diophantine Equation)

Note

2
ax + by = c .

2.32

2.1.4 Continued
Linear Diophantine Equation

Note

(Particular solution):
x0 = (c/d)s
y0 = (c/d)t
Note

(General solutions):
x = x0 + k (b/d) y = y0 k(a/d)
. k .
2.33

2.1.4 Continued
Example 2.12

21x + 14y = 35
.
Solution

2.34

2.1.4 Continued
Example 2.13

,
.
, 100 20 5
. ,
20x + 5y = 100
.

2.35

2.1.4 Continued
Example 2.13

d = gcd (20, 5) = 5 5 | 100 ,


. (x ,
y ) .
5 4x + y = 20 . 4s
+ t = 1 s = 0, t =
1 .
x0 0 20 0, y0 1 20 20
, x, y .
(0, 20), (1, 16), (2, 12), (3, 8), (4, 4), (5, 0).
2.36

22 (MODULARARITHMETIC)
(a = q n + r)
(a, n) (q, r)
. , r
q .
Topics discussed in this section:
2.2.1
2.2.2
2.2.3
2.2.4
2.2.5
2.2.6
2.37

(Modular Operator)
(Set of Residues)
(Congruence)
Zn ( Operations in Zn )
(Addition and Multiplication Tables)
(Different Sets)

2.2.1 (Modulo Operator)


,
mod .
(n) (modulus) ,
r (residue) .
Figure 2.9

2.38

2.1.4 Continued
Example 2.14
? :
a. 27 mod 5
c. 18 mod 14

b. 36 mod 12
d. 7 mod 10

Solution
a. Dividing 27 by 5 results in r = 2
b. Dividing 36 by 12 results in r = 0.
c. Dividing 18 by 14 results in r = 4. After adding the
modulus r = 10
d. Dividing 7 by 10 results in r = 7. After adding the
modulus to 7, r = 3.
2.39

2.2.2 (Set of Residues)


0 n-1
. , a mod n n
.
,
Zn .
Figure 2.10 Zn

2.40

2.2.3 (Congruence)
()
.
( ) . ,
.

2.41

2.2.3 Continued
Figure 2.11

2.42

2.2.3 Continued
(Residue Classes)
[a] [a]n n
.

2.43

2.2.3 Continued
Figure 2.12 Z Zn

2.44

2.2.3 Continued
Example 2.15


. 12 0 12
. 0( 12)
11 .

2.45

2.2.4 Zn (Operation in Zn )
Z ( ,
, ) Zn . 2.13
mod Zn
.
Figure 2.13 Zn

2.46

2.2.4 Continued
Example 2.16

. ( Zn
):
a. Z15 7 14 .
b. Z13 7 11 .
c. Z20 7 11 .
Solution

2.47

2.2.4 Continued
Example 2.17

. ( Z Zn
):
a. Z14 17 27 .
b. Z13 12 43 .
c. Z19 123 -10 .

Solution

2.48

2.2.4 Continued


Z Zn
.
(+,-,)
, ( Z ) Zn
.
Q .

2.49

2.2.4 Continued

(a b) mod n [(a mod n) (b mod n)] mod n


(a b) mod n [(a mod n) (b mod n)] mod n

(a b) mod n [(a mod n) (b mod n)] mod n

2.50

2.2.4 Continued
Figure 2.14

2.51

2.2.4 Continued
Example 2.18

.
1. (1,723,345 + 2,124,945) mod 11 = (8 + 9) mod 11 = 6
2. (1,723,345 2,124,945) mod 16 = (8 9) mod 11 = 10
3. (1,723,345 2,124,945) mod 16 = (8 9) mod 11 = 6

2.52

2.2.4 Continued
Example 2.19

, 10 ,
.

2.53

2.2.4 Continued
Example 2.20

,
.
10
.

2.54

2.2.5 (Inverses)
,
.
.

2.55

2.2.5 Continue
(Additive Inverse)

Zn a b
.

Note

,
.
n 0
.
2.56

2.2.5 Continued
Example 2.21

Z10 .

Solution

6
(0, 0), (1, 9), (2, 8), (3, 7), (4, 6), (5, 5)
.

2.57

2.2.5 Continue
(Multiplicative Inverse)

Zn a b
.
Note

,
.
,
n 1
.
2.58

2.2.5 Continued
Example 2.22

Z10 8 .
Solution
gcd (10, 8) = 2 1
. , 8 1
0 9 .

2.59

2.2.5 Continued
Example 2.23

Z10 .
Solution
, (1, 1), (3, 7) (9, 9)
. 0, 2, 4, 5, 6, 8
.

2.60

2.2.5 Continued
Example 2.24

Z11 .
Solution
7
: (1, 1), (2, 6), (3, 4), (5, 9), (7, 8), (9, 9), (10, 10)
.

2.61

2.2.5 Continued
Note

, n b
, gcd (n, b) = 1 ,
Zn b
.
b t Zn
.

2.62

2.2.5 Continued
Figure 2.15

2.63

2.2.5 Continued
Example 2.25

Z26 11 .
Solution

gcd (26, 11) 1 . 11 7 19


.
2.64

2.2.5 Continued
Example 2.26

Z100 23 .
Solution

gcd (100, 23)=1 . 23 13 87


.
2.65

2.2.5 Continued
Example 2.27

Z26 12 .
Solution

gcd (26, 12) 2 . .

2.66

2.2.6 Addition and Multiplication Tables


Figure 2.16 Z10

2.67

2.2.7 Different Sets


Figure 2.17 Zn Zn*

2.68

2.2.7 Different Sets

Note

Zn
,
Zn*
.

2.69

2.2.8 (Two More Sets)


, , Zp Zp*
.
.
,
,
.

2.70

23MATRICES
.
,

.
.
Topics discussed in this section:
2.3.1
2.3.2
2.3.3
2.3.4
2.71

Definitions
Operations and Relations
Determinants
Residue Matrices

2.3.1 (Definition )

Figure 2.18 l m

2.72

2.3.1 Continued

Figure 2.19

2.73

2.3.2 Operations and Relations


Example 2.28

2.20 .

Figure 2.20

2.74

2.3.2 Continued
Example 2. 29

2.21 (1 3) (3 1)
. 1 1
.
Figure 2.21

2.75

2.3.2 Continued
Example 2. 30

2.22 2 3 3 4
. 2 4 .
Figure 2.22 2 3 3 4

2.76

2.3.2 Continued
Example 2. 31

2.23 .

Figure 2.23

2.77

2.3.3 Determinant
m m A det (A)
,
.

Note

.
2.78

2.3.3 Continued
Example 2. 32

2.24 , 1
1 2 2
. m 1 2
,
.
Figure 2.24 2 2

2.79

2.3.3 Continued
Example 2. 33

2.25 3 3 .
Figure 3 3

2.80

2.3.4 Inverses

Note

2.81

2.3.5 (Residue Matrices )


, Zn
.
gcd (det(A), n) = 1
.
Example 2. 34
Figure 2.26

2.82

(Residue Matrices )
(Congruence)

n , n
, A B mod n
. , i j aij bij mod n , A B
mod n .

2.83

24LINEARCONGRUENCE
Zn

. 1
( ) .

Topics discussed in this section:


2.4.1
2.4.2

2.84

- (Single-Variable Linear Equations)


(Set of Linear Equations)

2.4.1 -
(Single-Variable Linear Equations)
, ax b (mod n )
.
.

2.85

2.4.1 Continued
Example 2.35
10 x 2(mod 15) .
Solution
gcd (10 and 15) = 5 . 5 2
.
Example 2.36
14 x 12 (mod 18) .
Solution

2.86

2.4.1 Continued
Example 2.37

3x + 4 6 (mod 13) .
Solution

ax b (mod n) .
-4 (4 ) , 3x 2 (mod
13). . gcd (3, 13) = 1 ,
. x0 = (2 31) mod 13 = 18
mod 13 = 5 .
. 3 5 + 4 6 (mod 13).

2.87

2.4.2 Single-Variable Linear Equations


,
(invertible)
.
Figure 2.27

2.88

2.4.2 Continued
Example 2.38
. :

Solution
, x, y, z x1, x2, x3 .
.
3, 4, 5 .
x 15 (mod 16), y 4 (mod 16), and z 14 (mod 16) .
.
2.89

You might also like