Sma3043 Elementary Number Theory SEMESTER 2 2020/2021: The Theory of Congruence

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 22

SMA3043 ELEMENTARY NUMBER THEORY

SEMESTER 2 2020/2021

THE THEORY OF CONGRUENCE


(PART 2)

PROF. MADYA DR ROHAIDAH MASRI


Some Applications of Congruence
Converse of Theorem 2 (e) - Part Two (Multiplication)

Note that from Theorem 2 (e):

If a  b (mod n) , then ac  bc (mod n)

Theorem 3

Example.

Let , (4) (2)  (1) (2) (mod 6).


Then,
4  1 mod ( 6/ 2 ) where d = 2 = gcd(2, 6)

2
Some Applications of Congruence
Converse of Theorem 2 (e) - Part Two (Multiplication)
Proof.

3
Some Applications of Congruence
Converse of Theorem 2 (e) - Part Two (Multiplication)

Corollary 1

Example.

Let 14  84 (mod 7)
Where,
2(7)  2(42) mod 7 gcd (2,7) = 1

Then, 7  42 mod 7

4
Some Applications of Congruence
Converse of Theorem 2 - Part Two

Corollary 2

Example.

Let 14  84 (mod 7)
Where,
2(7)  2(42) mod 7 7 | 2, 7 is a prime

Then, 7  42 mod 7

5
Some Applications of Congruence
Congruence and Least Common Multiple (LCM)

Theorem 4

Example.

Let 24  16 mod 2
24  16 mod 4
24  16 mod 8

Note that lcm(2, 4, 8) = 23 = 8


Then,
24  16 mod 8

6
Some Applications of Congruence
Congruence and Least Common Multiple (LCM)

Corollary 3

Example

Let 60  30 mod 2
60  30 mod 3
60  30 mod 5

Where gcd(2,3,5) = 1
Then, 60  30 mod (2 . 3. 5)
 30 mod 30.

7
Some Applications of Congruence
Arithmetic Inverse

Definition 2 (Arithmetic Inverse)

gcd  a, n   1  aa*  1 mod  n  .


a* is called the arithmetic inverse (or just inverse) of a modulo n.

Example.

i.

ii.

8
Representation of Positive Integers

Definition 3

9
Representation of Positive Integers
Decimal and Binary Representations of Positive Integers

• Up to now in your life, you’ve represented numbers using a decimal representation (the ten digits from 0,1, ... 9).
The reason 10 is special is that we have ten fingers. There is no other reason for using decimal. There is nothing
special otherwise about the number ten.

• Computers don’t represent numbers using decimal. Instead, they represent numbers using binary.

• In decimal, we write numbers using digits {0,1, . . . ,9}, in particular, as sums of powers of 10 (Example i).

• In binary, we represent numbers using bits {0,1}, in particular, as a sum of powers of two (Example ii.).

Example.

i.

ii.

10
Representation of Positive Integers

Note that : (100110)2 ≠ (100110)10

• To convert from a binary number to a decimal number we need to write the powers of 2 as
decimal numbers and then add up these decimal numbers.

Example. (11010)2 = 1.24 + 1.23 + 0.22 + 1. 21 + 0.20


= 16 + 8 + 2 = 26

• To convert from a decimal number to a binary number:

11
Representation of Positive Integers
Decimal and Binary Representations of Positive Integers

• When m is already represented as binary number (i.e. “base 2”), the quotient and remainder
are trivial to obtain.
• The remainder is the right most bit – called the least significant bit (LSB).
• The quotient is the number with the LSB chopped off.
• Note that writing a positive integer as an n bit binary number means that we write it as a sum
of powers of 2,

Example

Convert 241 to binary.

12
Representation of Positive Integers
Decimal and Binary Representations of Positive Integers

Solution.

Thus,

13
Representation of Positive Integers
Decimal and Binary Representations of Positive Integers

Example.

Compute 311 .

Solution.
Given the computations above,
only 3 more modular multiplications
produce 311 (mod m)

14
Representation of Positive Integers
Polynomial Functions

Theorem 5

Proof.

15
Representation of Positive Integers
Polynomial Functions

Note:

Corollary 4

16
Representation of Positive Integers
Integers Divisible by 9

Theorem 6

A positive integer is divisible by 9 if and only if the sum of its digits


is divisible by 9.

Proof. Example.

Note that,
117 =9 + 27 + 81

Since 9 + 27 + 81  0 mod 9,
Then
9 | 117.

17
Representation of Positive Integers
Integers Divisible by 3

Corollary 5

A positive integer is divisible by 3 if and only if the sum of its digits


is divisible by 3.

18
Representation of Positive Integers
Integers Divisible by 11

Theorem 7

A positive integer is divisible by 11 if and only if the alternating


sum of its digit. is divisible by 11.

19
Representation of Positive Integers
Integers Divisible by 9,3, and 11

Example.

20
Representation of Positive Integers
Integers Divisible by 9,3, and 11

Example.

Example.

21
Representation of Positive Integers
Decimal Digits

Example.

Solution.

22

You might also like