math 412: number theory lecture 2: gcd and linear...

Post on 22-Aug-2020

3 Views

Category:

Documents

0 Downloads

Preview:

Click to see full reader

TRANSCRIPT

Math 412: Number TheoryLecture 2: GCD and linear diophantine equations

Gexin Yugyu@wm.edu

College of William and Mary

Gexin Yu gyu@wm.edu Math 412: Number Theory Lecture 2: GCD and linear diophantine equations

GCD and Euclidean Algorithm

Let (a, b) be the greatest common divisor (gcd) of a and b.

Lemma: if a = bq + r , then (a, b) = (b, r).

Euclidean Algorithm to find (a, b)

Gexin Yu gyu@wm.edu Math 412: Number Theory Lecture 2: GCD and linear diophantine equations

GCD and Euclidean Algorithm

Let (a, b) be the greatest common divisor (gcd) of a and b.

Lemma: if a = bq + r , then (a, b) = (b, r).

Euclidean Algorithm to find (a, b)

Gexin Yu gyu@wm.edu Math 412: Number Theory Lecture 2: GCD and linear diophantine equations

GCD and Euclidean Algorithm

Let (a, b) be the greatest common divisor (gcd) of a and b.

Lemma: if a = bq + r , then (a, b) = (b, r).

Euclidean Algorithm to find (a, b)

Gexin Yu gyu@wm.edu Math 412: Number Theory Lecture 2: GCD and linear diophantine equations

Ex: Find (2134, 3246).

Gexin Yu gyu@wm.edu Math 412: Number Theory Lecture 2: GCD and linear diophantine equations

Theorem: there exist integers m, n so that

(a, b) = ma + bn.

Thm: (a, b), when ab 6= 0, is the least positive integer of the formma + nb. In fact, {ma + nb : m, n ∈ Z} = {kb : k ∈ Z}.

Gexin Yu gyu@wm.edu Math 412: Number Theory Lecture 2: GCD and linear diophantine equations

Theorem: there exist integers m, n so that

(a, b) = ma + bn.

Thm: (a, b), when ab 6= 0, is the least positive integer of the formma + nb. In fact, {ma + nb : m, n ∈ Z} = {kb : k ∈ Z}.

Gexin Yu gyu@wm.edu Math 412: Number Theory Lecture 2: GCD and linear diophantine equations

Coprime Integers

The integers a and b are coprime (relatively prime) if (a, b) = 1.

Then a and b are coprime if and only if there exist m, n ∈ Z so that

ma + nb = 1.

Ex: If (a, b) = 1, and a|n and b|n, then ab|n.

Thm: if (a, b) = d , then (a/d , b/d) = 1. From this, we can reduceevery fraction into its lowest term.

Gexin Yu gyu@wm.edu Math 412: Number Theory Lecture 2: GCD and linear diophantine equations

Coprime Integers

The integers a and b are coprime (relatively prime) if (a, b) = 1.

Then a and b are coprime if and only if there exist m, n ∈ Z so that

ma + nb = 1.

Ex: If (a, b) = 1, and a|n and b|n, then ab|n.

Thm: if (a, b) = d , then (a/d , b/d) = 1. From this, we can reduceevery fraction into its lowest term.

Gexin Yu gyu@wm.edu Math 412: Number Theory Lecture 2: GCD and linear diophantine equations

Coprime Integers

The integers a and b are coprime (relatively prime) if (a, b) = 1.

Then a and b are coprime if and only if there exist m, n ∈ Z so that

ma + nb = 1.

Ex: If (a, b) = 1, and a|n and b|n, then ab|n.

Thm: if (a, b) = d , then (a/d , b/d) = 1. From this, we can reduceevery fraction into its lowest term.

Gexin Yu gyu@wm.edu Math 412: Number Theory Lecture 2: GCD and linear diophantine equations

Coprime Integers

The integers a and b are coprime (relatively prime) if (a, b) = 1.

Then a and b are coprime if and only if there exist m, n ∈ Z so that

ma + nb = 1.

Ex: If (a, b) = 1, and a|n and b|n, then ab|n.

Thm: if (a, b) = d , then (a/d , b/d) = 1. From this, we can reduceevery fraction into its lowest term.

Gexin Yu gyu@wm.edu Math 412: Number Theory Lecture 2: GCD and linear diophantine equations

Euclid Lemma: If a|bc and (a, b) = 1, then a|c .

Ex: (Euclid Lemma, special case) if p|ab then p|a or p|b.

Gexin Yu gyu@wm.edu Math 412: Number Theory Lecture 2: GCD and linear diophantine equations

Euclid Lemma: If a|bc and (a, b) = 1, then a|c .

Ex: (Euclid Lemma, special case) if p|ab then p|a or p|b.

Gexin Yu gyu@wm.edu Math 412: Number Theory Lecture 2: GCD and linear diophantine equations

Linear Diophantine Equation

Consider equation ax + by = c , where a, b, c are integers and d = (a, b).

The equation has no integral solutions if d 6 |c .

If d |c, then there are infinitely many integral solutions.

Moreover, if x = x0, y = y0 is a particular solution, then all solutionsare given by

x = x0 + (b/d)n, y = y0 − (a/d)n,

where n is an integer.

Gexin Yu gyu@wm.edu Math 412: Number Theory Lecture 2: GCD and linear diophantine equations

Gexin Yu gyu@wm.edu Math 412: Number Theory Lecture 2: GCD and linear diophantine equations

Lemma:a1x1 + a2x2 + . . .+ anxn + an+1xn+1 = c

if and only if

a1x1 + a2x2 + . . .+ an−1xn−1 + (an, an+1)y = c

Gexin Yu gyu@wm.edu Math 412: Number Theory Lecture 2: GCD and linear diophantine equations

Prime numbers

Definition: a (positive) integer p is prime if p has no divisor otherthan 1 and p. Otherwise it is a composite number.

Ex: Every composite number has a prime divisor.

Ex: every composite integer n has a prime divisor at most√n.

Gexin Yu gyu@wm.edu Math 412: Number Theory Lecture 2: GCD and linear diophantine equations

Prime numbers

Definition: a (positive) integer p is prime if p has no divisor otherthan 1 and p. Otherwise it is a composite number.

Ex: Every composite number has a prime divisor.

Ex: every composite integer n has a prime divisor at most√n.

Gexin Yu gyu@wm.edu Math 412: Number Theory Lecture 2: GCD and linear diophantine equations

Prime numbers

Definition: a (positive) integer p is prime if p has no divisor otherthan 1 and p. Otherwise it is a composite number.

Ex: Every composite number has a prime divisor.

Ex: every composite integer n has a prime divisor at most√n.

Gexin Yu gyu@wm.edu Math 412: Number Theory Lecture 2: GCD and linear diophantine equations

Thm: there are infinite many prime numbers.

Sieve of Eratosthenes: a method to find all prime less than an integer.

Prime Number Theorem: Let π(x) be the number of primes at mostx , then π(x)→ x

ln x as x →∞.

Primitive Test: a polynomial time algorithm was found in 2002 byAgrawal, Kayal, and Saxena (an India CS professors with two understudents).

Gexin Yu gyu@wm.edu Math 412: Number Theory Lecture 2: GCD and linear diophantine equations

Thm: there are infinite many prime numbers.

Sieve of Eratosthenes: a method to find all prime less than an integer.

Prime Number Theorem: Let π(x) be the number of primes at mostx , then π(x)→ x

ln x as x →∞.

Primitive Test: a polynomial time algorithm was found in 2002 byAgrawal, Kayal, and Saxena (an India CS professors with two understudents).

Gexin Yu gyu@wm.edu Math 412: Number Theory Lecture 2: GCD and linear diophantine equations

Thm: there are infinite many prime numbers.

Sieve of Eratosthenes: a method to find all prime less than an integer.

Prime Number Theorem: Let π(x) be the number of primes at mostx , then π(x)→ x

ln x as x →∞.

Primitive Test: a polynomial time algorithm was found in 2002 byAgrawal, Kayal, and Saxena (an India CS professors with two understudents).

Gexin Yu gyu@wm.edu Math 412: Number Theory Lecture 2: GCD and linear diophantine equations

Thm: there are infinite many prime numbers.

Sieve of Eratosthenes: a method to find all prime less than an integer.

Prime Number Theorem: Let π(x) be the number of primes at mostx , then π(x)→ x

ln x as x →∞.

Primitive Test: a polynomial time algorithm was found in 2002 byAgrawal, Kayal, and Saxena (an India CS professors with two understudents).

Gexin Yu gyu@wm.edu Math 412: Number Theory Lecture 2: GCD and linear diophantine equations

top related