0% found this document useful (0 votes)
14 views25 pages

Lecture 12 Number Theory

Uploaded by

jesnamq
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
14 views25 pages

Lecture 12 Number Theory

Uploaded by

jesnamq
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 25

 CLO6. Practice elementary number theory concepts.

1
Divisibility and Modular Arithmetic

 Division
 When one integer is divided by a second nonzero integer, the
quotient may or may not be an integer.
 For example, 12/3 = 4 is an integer, whereas 11/4 = 2.75 is not. This
leads to Definition 1.

2
3
4
The Division Algorithm

 When an integer is divided by a positive integer, there is a quotient


and a remainder, as the division algorithm shows.

5
Example

 What are the quotient and remainder when 101 is divided by 11?

 Solution: We have
 101 = 11 ・ 9 + 2.
 Hence, the quotient when 101 is divided by 11 is 9 = 101 div 11,
and the remainder is
 2 = 101 mod 11.

6
Example

 What are the quotient and remainder when −11 is divided by 3?

7
Example

 What are the quotient and remainder when −11 is divided by 3?

 Solution: We have
 −11 = 3(−4) + 1.
 Hence, the quotient when −11 is divided by 3 is −4 = −11 div 3,
and the remainder is
 1 = −11 mod 3.
 Note that the remainder cannot be negative. Consequently, the
remainder is not −2, even though −11 = 3(−3) − 2, because r = −2
does not satisfy 0 ≤ r < 3.
 Note that the integer a is divisible by the integer d if and only if the
remainder is zero
 when a is divided by d.

8
Modular Arithmetic

9
Congruence

 Determine whether 17 is congruent to 5 modulo 6 and whether 24


and 14 are congruent modulo 6.

10
Congruence

11
Congruence

12
Arithmetic Modulo m

13
Example

14
Example

15
Modular Exponentiation

16
Example

 Find 3644 mod 645.

17
Primes and Greatest Common Divisors

18
Primes

19
Trial Division

 It is often important to show that a given integer is prime. For


instance, in cryptology, large primes are used in some methods for
making messages secret. One procedure for showing that an integer
is prime is based on the following observation

20
Example

21
22
Greatest Common Divisors

 The largest integer that divides both of two integers is called the
greatest common divisor of these integers

23
GCD

24
Reference

 Richard Johnsonbaugh. Discrete Mathematics, Pearson; 8th edition (March 16, 2017).
ISBN-10: 0321964683.

25

You might also like