Docsity

Number Theory - Discrete Structures - Lecture Slides, Slides of Discrete Structures and Graph Theory

Partial preview of the text

Download Number Theory - Discrete Structures - Lecture Slides and more Slides Discrete Structures and Graph Theory in PDF only on Docsity!

Let us get into…

• Number Theory

Introduction to Number Theory

  • Number theory is about integers and their properties.
  • We will start with the basic principles of
  • divisibility,
  • greatest common divisors,
  • least common multiples, and
  • modular arithmetic
  • and look at some relevant algorithms.

Divisibility Theorems

  • For integers a, b, and c it is true that
  • if a | b and a | c, then a | (b + c)
  • Example: 3 | 6 and 3 | 9, so 3 | 15.
  • if a | b, then a | bc for all integers c
  • Example: 5 | 10, so 5 | 20, 5 | 30, 5 | 40, …
  • if a | b and b | c, then a | c
  • Example: 4 | 8 and 8 | 24, so 4 | 24.

Primes

  • A positive integer p greater than 1 is called prime if the only positive factors of p are 1 and p.
  • A positive integer that is greater than 1 and is not prime is called composite.
  • The fundamental theorem of arithmetic:
  • Every positive integer can be written uniquely as the product of primes , where the prime factors are written in order of increasing size.

Primes

  • If n is a composite integer, then n has a prime divisor less than or equal.
  • This is easy to see: if n is a composite integer, it must have two prime divisors p 1 and p 2 such that p 1 ⋅p 2 = n.
  • p 1 and p 2 cannot both be greater than
  • , because then p 1 ⋅p 2 > n.

n

n

The Division Algorithm

  • Let a be an integer and d a positive integer.
  • Then there are unique integers q and r , with 0 ≤ r < d , such that a = dq + r.
  • In the above equation,
  • d is called the divisor,
  • a is called the dividend,
  • q is called the quotient, and
  • r is called the remainder.

The Division Algorithm

  • Another example:
  • What happens when we divide -11 by 3?
  • Note that the remainder cannot be negative.
  • -11 = 3⋅(-4) + 1.
  • -11 is the dividend,
  • 3 is the divisor,
  • -4 is called the quotient, and
  • 1 is called the remainder.

Greatest Common Divisors

  • Let a and b be integers, not both zero.
  • The largest integer d such that d | a and d | b is called the greatest common divisor of a and b.
  • The greatest common divisor of a and b is denoted by gcd(a, b).
  • Example 1: What is gcd(48, 72)?
  • The positive common divisors of 48 and 72 are 1, 2, 3, 4, 6, 8, 12, 16, and 24, so gcd(48, 72) = 24.
  • Example 2: What is gcd(19, 72)?
  • The only positive common divisor of 19 and 72 is 1, so gcd(19, 72) = 1.

Relatively Prime Integers

  • Definition:
  • Two integers a and b are relatively prime if

gcd(a, b) = 1.

  • Examples:
  • Are 15 and 28 relatively prime?
  • Yes, gcd(15, 28) = 1.
  • Are 55 and 28 relatively prime?
  • Yes, gcd(55, 28) = 1.
  • Are 35 and 28 relatively prime?
  • No, gcd(35, 28) = 7.

Relatively Prime Integers

  • Definition:
  • The integers a 1 , a 2 , …, a (^) n are pairwise relatively prime if

gcd(a (^) i , a (^) j) = 1 whenever 1 ≤ i < j ≤ n.

  • Examples:
  • Are 15, 17, and 27 pairwise relatively prime?
  • No, because gcd(15, 27) = 3.
  • Are 15, 17, and 28 pairwise relatively prime?
  • Yes, because gcd(15, 17) = 1, gcd(15, 28) = 1 and gcd(17,
  1. = 1.

Least Common Multiples

  • Using prime factorizations:
  • a = p 1 a^1 p 2 a^2 … pna^ n , b = p 1 b^1 p 2 b^2 … pnb^ n ,
  • where p 1 < p 2 < … < pn and a (^) i , bi ∈ N for 1 ≤ i ≤ n
  • lcm(a, b) = p 1 max(a^1 , b^1 )^ p 2 max(a^2 , b^2 )^ … pnmax(a^ n , b^ n )
  • Example:

a = 60 = 22 31 51 b = 54 = 21 33 50 lcm(a, b) = 22 33 51 = 4⋅ 27 ⋅5 = 540

GCD and LCM

a = 60 = 22 31 51

b = 54 = 21 33 50

lcm(a, b) = 22 33 51 = 540

gcd(a, b) = 21 31 50 = 6

Theorem: a ⋅ b = gcd(a,b) ⋅ lcm(a,b)

Congruences

  • Let a and b be integers and m be a positive integer. We say that a is congruent to b modulo m if m divides a – b.
  • We use the notation a ≡ b (mod m) to indicate that a is congruent to b modulo m.
  • In other words: a ≡ b (mod m) if and only if a mod m = b mod m.

Congruences

  • Examples:
  • Is it true that 46 ≡ 68 (mod 11)?
  • Yes, because 11 | (46 – 68).
  • Is it true that 46 ≡ 68 (mod 22)?
  • Yes, because 22 | (46 – 68).
  • For which integers z is it true that z ≡ 12 (mod 10)?
  • It is true for any z∈{…,-28, -18, -8, 2, 12, 22, 32, …}
  • Theorem: Let m be a positive integer. The integers a and b are congruent modulo m if and only if there is an integer k such that a = b + km.