Professional Documents
Culture Documents
CHAPTER 4
INTRODUCTION TO CODING THEORY
4.1
Divisibility
Examples:
a)
b)
c)
4 7, since there does not exist such that 7 = 4. Hence, 4 is not a divisor of 5.
4.2
Prime Numbers
Definition 4.2 A number > 1 that is divisible only by 1 and itself is called a prime number.
An integer > 2 that is not a prime is called a composite number.
2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47 are prime numbers between 2 and 50.
b)
Theorem 4.1 Every positive integer can be expressed as a product of primes, symbolically
written as = 1 1 2 2 , where for = 1, 2, , are distinct primes. This factorization
is unique, up to reordering the factors.
Examples:
a)
1025 can be expressed as 1025 = 52 41, where 5 and 41 are prime numbers.
b)
Exercises:
Express each number below to its prime factorization.
a)
72.
b)
332.
c)
1238.
d)
3465.
e)
7044.
f)
15750.
Congruences
Definition 4.3 Let , , and be integers, with 0. We say that is congruent to modulo
, denoted by mod , if is a multiple of .
Another formulation is that mod if and differ by a multiple of . This can be
written as = + for some integer (positive or negative).
ii.
mod .
iii.
iv.
Examples:
a)
b)
c)
For each congruences below, show that either each of them is true or false.
i.
7 5 mod 2.
ii.
8 12 mod 3.
iii.
6 2 mod 4.
iv.
0 5 mod 5.
v.
59 31 mod 6.
vi.
23 19 mod 7.
For the following congruences, solve for the the smallest positive integer .
b)
4.4
i.
4 mod 9.
ii.
17 mod 4.
iii.
2 3 mod 11.
iv.
3 4 5 mod 6.
Definition 4.4 Let and be given integers, with at least one of them different from zero. The
greatest common divisor of and , denoted by gcd , , is the positive integer satisfying the
following conditions:
i.
| and |.
ii.
If | and |, then .
Prime factorization.
2)
Division algorithm.
Prime factorization.
Express 84 and 616 to their prime factorization.
84 = 22 3 7
616 = 23 7 11
Taking the common prime with the smallest exponent for both integer, therefore
gcd 84,616 = 22 7 = 28
2)
Division algorithm.
First divide 616 with 84 . Write 616 as the product of 84 and its quotient, plus the
remainder.
616 = 84 7 + 28
Since the remainder is 28 > 0, repeat the first step by dividing 84 with 28.
84 = 28 3 + 0
Since the remainder is 0, then the gcd 84,616 is the last non-zero remainder, which is
28.
Exercises:
Find the greatest common divisor for the following pairs of integers.
a)
111,129 .
b)
120,165 .
c)
2025,729 .
d)
10740,525 .
Definition 4.5
Example:
Find lcm 84,616 .
Express 84 and 616 to their prime factorization.
84 = 22 3 7
616 = 23 7 11
Taking all the primes (choose the maximum exponent), therefore lcm 84,616 = 23 3 7
11 = 1848.
Exercises:
Find the least common multiple for the following pairs of integers.
e)
111,129 .
f)
120,165 .
g)
2025,729 .
h)
10740,525 .