Definition. Let a, b ?Z. A positive integer d is called - PowerPoint PPT Presentation

About This Presentation
Title:

Definition. Let a, b ?Z. A positive integer d is called

Description:

For any two integers a and b the greatest common divisor ... an equation that gcd(a, b) is a divisor of c. Why? ... Let d is any common divisor of a and b: What ... – PowerPoint PPT presentation

Number of Views:109
Avg rating:3.0/5.0
Slides: 21
Provided by: ValuedGate992
Learn more at: http://www.cs.ucf.edu
Category:

less

Transcript and Presenter's Notes

Title: Definition. Let a, b ?Z. A positive integer d is called


1
From the last lecture
Definition. Let a, b ?Z. A positive integer d is
called a common divisor of a and b if d a and
d b .
For any two integers a and b the greatest common
divisor is always defined (except the case a b
0) and is denoted by gcd (a, b). Note, that
gcd (a, b) ?1.
  • if gcd (a, b) 1, integers a and b are called
    relatively prime.
  • gcd (a, b) gcd (b, a) gcd (?a, b) gcd (a,
    ?b) gcd (?a, ?b)

Theorem 1. The gcd(a, b) is the least positive
value of axby, where x and y range over all
integers.
2
Some consequences of the Theorem 1
  • If an integer c is expressible in the form c
    axby , it is not
  • necessary that c is the gcd(a, b). But it does
    follow from such
  • an equation that gcd(a, b) is a divisor of c.
    Why?
  • From the fact that axby1 for some integers x
    and y
  • we can imply that a and b are relatively prime.
    Why?

Because axby1 is divisible by gcd(a, b), that
means that gcd(a, b)1.
  • If d is any common divisor of two integers, i.
    e. d a and d b ,
  • then d gcd(a, b). Why?
  • gcd(na, nb)n gcd(a, b) for any integers a, b, n
    .

3
How to find gcd of two integers?
a 10, divisors 1, 2, 5, 10 b 24, divisors
1, 2, 3, 4, 6, 8, 12, 24
By the last Theorem 1, there are some integers x
and y , such that 10x 24y 2.
10 ? 524 ?(?2) 2 (found by inspection).
So, we found an integer solution of equation 10x
24y 2.
Is it unique?
10?(512k)24?(?25k) 2
What if we consider equation 10x 24y 4?
5x 12y 1?
10x 24y 1?
4
Theorem 2. An integer solution (x , y) of
equation ax by c exists if and only if c is
divisible by gcd(a, b).
Proof. Let d gcd(a, b). We need to prove 1).
d c ? ?x, y ?Z such that ax by c 2) ?x, y
?Z such that ax by c ? d c
? c n?d, n ?Z
1) Assume d c
? c n?(ax0by0 ) a (n?x0)b (n?y0)
2) Assume ax by c
d a and d b ? d ax by ? d c
5
Given two integers a and b how can we find gcd
(a, b)?
Euclidian Algorithm. Consider an example a963,
b 637. We have 963 1?657306 657
2?30645 306 6?4536 45 369
36 4?9
ab ?q1r1 br1?q2r2 r1r2?q3r3 r2r3?q4r4 r3
r4?q5
0lt r1ltb 0lt r2lt r1 0lt r3 lt r2 0lt r4 lt r3
We are going to show that the last nonzero
remainder (r49) is the gcd(963, 657). Let d is
any common divisor of a and b
d 963 and d 657 ? d 306
d 657 and d 306 ? d 45
d 306 and d 45 ? d 36
d 45 and d 36 ? d 9
gcd(963, 657) 9
What can be implied from here?
6
On the other hand 9 is a divisor of both 963 and
657. Lets go backward
9306 and 945 ? 9657
963 1?657306 657 2?30645 306 6?4536 45
369 36 4?9
9306 and 945 ? 9657
945 and 936 ? 9306
936 and 99 ? 9 45
By the Theorem 1 gcd (963, 657) 963 x0 657y0
, so 9 657 and 9 963 ? 9 gcd (963, 657)
gcd(963, 657) 9 and 9 gcd(963, 657) ? 9
gcd(963, 657) by the property ab and ba (a,
bgt0) ? ab
7
Euclidian Algorithms can be used to find the
integers x0 and y0 that give gcd (a, b) ax0by0.
9 45 ? 36 45 ?(306 ? 6?45) ?306
7?45 ?306 7?(657 ? 2?306) 7?657 ?
15?306 7?657 ? 15?(963 ?657) 22?657 ?
15?963
963 1?657306 657 2?30645 306 6?4536 45
369 36 4?9
So we can express the last nonzero remainder 9 as
the linear combination of 657 and 963
9 gcd (657, 963) 657 x0963 y0
x022, y0 ? 15
8
Theorem (Euclidian Algorithm). Given integers a
and bgt0, we make a repeated application of the
division algorithm to obtain a series of
equations
ab ?q1r1 br1?q2r2 r1r2?q3r3 rj?2
rj?1?qjrj rj?1 rj?qj1
0lt r1ltb 0lt r2lt r1 0lt r3 lt r2 0lt rj ltrj?1
Proof. First show d gcd(a, b) is a divisor of
rj. d a and d b imply d r1 because r1a ?
b ?q1.. At the next step d b and d r1 imply
d r2, and so on. Finally, d rj . From the
other hand rj a and rj b imply gcd(a, b)
ax0by0 is divisible by rj , i. e. rj d . d
rj and rj d imply rj. d gcd(a, b).
9
  • To find integer solution of an equation
    axbyc,
  • we need to check first, that gcd(a, b) divides c.

For example, to find integer solution for 85x
34y 51, find the gcd(85, 34) using Euclid
Algorithm 8534?217 34 17?2 So, gcd(85,
34)17.
Since 1751 a solution exists.
  • Find the integers u, v in gcd(a, b)aubv.
  • 17 85 ? 34?2, ? u 1, v ?2.
  • By multiplying by 3 we find
  • 5185?334 ?(?6), i. e. x 3 , y ?6
    is a solution.

10
  • Other integer solutions

51 85?x34?y
51 85(x ?6?k) 34(y15?k)
17 85(u?2?k)34(v5?k)
17 85?u 34?v
1 5u 2v
11
Consider now positive integers Z 1, 2, 3, .
  • Any positive integer n gt1 has at least two
    dividers, 1 and n .
  • An integer p gt1, that does not have any other
    dividers except
  • 1 and itself, is called a prime.
  • An integers n gt1, that is not a prime, is
    composite.
  • Any composite integer n ?Z has a prime factor.

Proof by contradiction. Assume there exists some
positive integer, that has no prime factors.
Then the set of such integers S ?? and we can
find the smallest element n ?S ? Z. Since n is
composite, n k ? m, with 1lt k, m lt n, so k, m
?S , so they are either primes or have prime
factors. In either case n has a prime factor.
12
  • The first primes 2, 3, 5, 7, 11, 13, 17, 19,
    23, 29,
  • Does this sequence has an end?

This question is not as trivial as it seems!
  • (Euclid) There are infinitely many primes.

Proof. Suppose there were only a finite number of
primes p1, p2, pk. Then form a number n p1? p2
? ? pk 12?3?5?7? ? pk 1. n is not divisible
by 2, for then both n and 2?3?5?7? ? pk would
be divisible by 2, and therefore their difference
would be divisible by 2. This difference is 1,
and is not divisible by 2. In the same way, n is
not divisible by 3 or by 5 or or pk. But n is
either a prime or has a prime factor. In any case
it is divisible by some prime p that is not among
the list 2, 3, 5,pk. It implies that there is a
prime distinct from 2, 3, 5pk, and so greater
then pk. Consequently, the list of primes can
never end.
13
Fundamental Theorem of Arithmetic. Any integer
n gt 1 can be written as a product of prime
numbers. Further, this product is unique except
for rearrangement of factors.
For example, take number 666. It is not a prime,
because it has a factor 2, so we get 6662?333.
Now 333 has an obvious factor 3, so 3332?111.
Again 111 has a factor 3, and 1113?37,
hence 6662?3?3?37 is a representation of the
composite number 666 as a product of primes.
Other examples 122?2?322?3 120 2?2?2?3?523
?3 ?5
But is there any another representation of 666 as
a product of primes (we dont distinguish
different orders of factors)?
14
Proof that a prime factorization exists for any
integer n gt1.
Prove by strong induction on n gt1.
Basis. n 2 is prime itself, so the proposition
is true.
Inductive Hypothesis. Assume that for some k gt1
there exists prime factorization for all integers
1ltn?k.
Inductive Step Consider nk1. We can have two
cases either n is a prime, or n is composite. In
the first case we have nothing to prove. In the
second case n m1 m2 and 1lt m1 , m2 ltn. By IH
both m1 , m2 have prime factorization, so n has a
prime factorization as well.
15
Lemma 1. If a prime p divides the product of two
numbers, p ab, it must divide at least one of
them.
Proof. Assume p ab to prove that p a or p b.
What can be implied about gcd(p, a)?
Then the only common factor of p and a is 1.
It implies that there exist integers x0 and y0
such that p x0 ay01
Then b b(p x0 ay0) p (b x0)(ba) y0 is
divisible by p because both p(b x0) and (ba)
y0 are divisible by p.
Suppose now that some number c divides the
product ab, c ab . Can we imply that c divides
either a or b ?
16
Proof of the uniqueness of the prime
factorization
Prove it by contradiction. For this assume that
there exist some integer that has non-unique
prime factorization. By Well-Ordering Principle
we can find the smallest such integer, let it be
n. So we have n p1 p2pk q1 q2 qs , where
all pi, qj are primes. Note that p1 divides
q1?(q2 qs), so it either divides q1 or (q2
qs). If p1 q1 then p1 q1 , both are primes. If
p1 (q2 qs), we repeat the Argument, and
ultimately reach the conclusion, that p1 equals
one of the primes q1, q2, qs . Then we can
cancel the common prime from the two
representations and find another integer n/p1 ltn
that has non-unique prime factorization in
contradiction with assumption, that n is the
smallest one.
17
Now we can find another form for gcd(a, b).
  • This integer does divide both a and b.
  • No larger integer can divide both a and b.

18
Example. Find gcd(120, 500) using prime
factorization.
We have 12023 ?3 ?5 and 50022 ?53 , then
gcd(120, 500) 2min(3, 2) ?3min(1, 0) ?5min(1,
3) 22 ?30 ?5120.
19
Given an integer n how can we decide is it a
prime or not?
How many factors we need to check?
Obviously we dont need to check factors above
n.
But there exists better restriction.
20
Example. Show that 101 is a prime.
Write a Comment
User Comments (0)
About PowerShow.com