From the last time: - PowerPoint PPT Presentation

1 / 14
About This Presentation
Title:

From the last time:

Description:

Theorem (Euclid) There are infinitely many primes. Proof. ... The same value can be found from Euclid Algorithm as follows: 500 = 120 4 20. 120 =20 ... – PowerPoint PPT presentation

Number of Views:23
Avg rating:3.0/5.0
Slides: 15
Provided by: ValuedGate992
Learn more at: http://www.cs.ucf.edu
Category:
Tags: euclid | last | time

less

Transcript and Presenter's Notes

Title: From the last time:


1
  • From the last time
  • gcd(a, b) can be characterized in two different
    ways
  • It is the least positive value of ax by where
    x and y range over
  • integers.
  • It is the positive common divisor of a and b
    which is divisible by
  • every common divisor.

2
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 integer n gt1, that is not a prime, is
    composite.
  • Theorem. 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.
3
  • 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!
  • Theorem (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.
4
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)?
5
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.
6
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.
gcd(p, a)1
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(px0 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 ?
7
Proof of the uniqueness of the prime
factorization
Prove it by contradiction. For this assume that
there exists 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.
8
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.
9
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.

10
Lemma. For any two integers x and y we have x
y max(x, y)min(x, y)
Theorem. For any two integers a and b a?b? gcd
(a, b) ?lcm(a, b)
11
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.
What is the lcm(120, 500)?
120?500 60,000 gcd(120, 500) ?lcm(120, 500)
20 ?lcm(120, 500)
lcm(120,500) 3000
12
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.
13
Sieve of Eratosthenes
1 2 3 4 5 6 7
8 9 10 11 12 13 14 15 16
17 18 19 20 21 22 23 24 25
26 27 28 29 30 31 32 33 34
35 36 37 38 39 40 41 42 43
44 45 46 47 48 49 50 51 52
53 54 55 56 57 58 59 60 61
62 63 64 65 66 67 68
69 70 71 72 73 74 75 76 77
78 79 80 81 82 83 84 85 86
87 88 89 90 91 92 93 94 95
96 97 98 99 100
We need to consider only primes less or equal 10
2, 3, 5, 7
14
Example. Show that 101 is a prime.
Write a Comment
User Comments (0)
About PowerShow.com