Slideshare uses cookies to improve functionality and performance, and to provide you with relevant advertising. If you continue browsing the site, you agree to the use of cookies on this website. See our User Agreement and Privacy Policy.

Slideshare uses cookies to improve functionality and performance, and to provide you with relevant advertising. If you continue browsing the site, you agree to the use of cookies on this website. See our Privacy Policy and User Agreement for details.

Like this presentation? Why not share!

- Theory of Computation: More Number ... by Vladimir Kulyukin 545 views
- Sss theorem by Lucii Artigas Vir... 1666 views
- Euclide 2020 - presentazione by Stefano Palumbo 259 views
- Il 5º postulato di euclide by jolenex 446 views
- Esplorazione del primo teorema di e... by scuola 12238 views
- Introduction to euclid’s geometry by Gunadnya Lad 789 views

973 views

911 views

911 views

Published on

2) Bezout's Identity

3) Euclid's 1st Theorem

4) Fundamental Theorem of Arithmetic (Unique Factorization Theorem)

5) Pairing Functions

No Downloads

Total views

973

On SlideShare

0

From Embeds

0

Number of Embeds

207

Shares

0

Downloads

0

Comments

0

Likes

1

No embeds

No notes for slide

- 1. CS 5000: Theory of Computation Lecture 15 Vladimir Kulyukin Department of Computer Science Utah State Universitywww.youtube.com/vkedco www.vkedco.blogspot.com
- 2. Outline ● Review ● Unbounded Minimalization ● More Number Theory – Bezouts Identity – Euclids 1st Theorem – Fundamental Theorem of Arithmetic (Unique Factorization Theorem) ● Pairing Functionswww.youtube.com/vkedco www.vkedco.blogspot.com
- 3. Reviewwww.youtube.com/vkedco www.vkedco.blogspot.com
- 4. Review: Well-Ordering Principle ● The well-ordering principle states that every non-empty set of natural numbers has a smallest element ● In axiomatic set theory, the set of natural numbers is defined as the set that contains 0 and is closed under the successor operation ● The set of natural numbers {n | {0, …, n} is well- ordered} contains all natural numberswww.youtube.com/vkedco www.vkedco.blogspot.com
- 5. Review: Euclid’s 2nd Theorem There are infinitely many primeswww.youtube.com/vkedco www.vkedco.blogspot.com
- 6. Review: Euclid’s 2nd Theorem (Formulation 1) Given a finite sequence of primes 2,3,5,..., pi , Ei = 2 ⋅ 3 ⋅ 5 ⋅ ... ⋅ pi + 1 is either a new prime or has a prime divisor greater than pi .www.youtube.com/vkedco www.vkedco.blogspot.com
- 7. Review: Euclid’s 2nd Theorem (Formulation 2) We set p 0 = 0 for the base case. Then we define pi to be the i - th prime. In other words, p1 = 2, p 2 = 3, p3 = 5, p 4 = 7,... Consider E = p n !+1. Then E is either a prime or is divisible by a prime greater than p n .www.youtube.com/vkedco www.vkedco.blogspot.com
- 8. Review: Lower and Upper Bounds for Next Prime pi +1 ∈ [ pi + 1, pi !+1], because the next prime after pi is greater than pi . Hence, pi + 1 for the lower bound. But it must divide pi !+1. Hence, pi !+1 for the upper bound.www.youtube.com/vkedco www.vkedco.blogspot.com
- 9. Review: Computing N-th Prime is P.R. 1. p 0 = 0 2. p n +1 = min [ Prime( t ) & t > p n ] t ≤ p n !+1www.youtube.com/vkedco www.vkedco.blogspot.com
- 10. Unbounded Minimalizationwww.youtube.com/vkedco www.vkedco.blogspot.com
- 11. Unbounded Minimalization Let P( x1 ,..., xn , t ) be a predicate. The unbounded minimalization of P( x1 ,..., xn , t ) is defined as g ( x1 ,..., xn ) = min P( x1 ,..., xn , y ) ywww.youtube.com/vkedco www.vkedco.blogspot.com
- 12. Theorem 7.2 (Ch. 3) If P( t , x1 ,..., xn ) is a computable predicate, then g ( x1 ,..., xn ) = min P( y, x1 ,..., xn ) is partially computable ywww.youtube.com/vkedco www.vkedco.blogspot.com
- 13. Proof [A1] IF P(X1, …, Xn, Y) GOTO E Y←Y+1 GOTO A1www.youtube.com/vkedco www.vkedco.blogspot.com
- 14. More Number Theorywww.youtube.com/vkedco www.vkedco.blogspot.com
- 15. Why Number Theory? ● Why do we study number theory in a computer science class? ● Because we are about to study Gödel numbers ● A Gödel numbering is a function that assigns to each statement of some formal language a unique natural number, called its Gödel number ● The concept was developed by Kurt Gödel, an Austrian logician, mathematician and philosopher in the 1930swww.youtube.com/vkedco www.vkedco.blogspot.com
- 16. Kurt Gödel (1906 - 1978)www.youtube.com/vkedco www.vkedco.blogspot.com
- 17. Why Number Theory? ● A computer scientist can view Gödel numbers as a formal theory of program compilation ● Modern compilers, viewed abstractly, do nothing but translate symbolic statements of high-level programming languages (formalisms) into binary numbers ● To understand Gödel numbers, we need some tools and concepts from number theory ● Our end objective is to compile L programs into natural numberswww.youtube.com/vkedco www.vkedco.blogspot.com
- 18. Bezout’s Identity If a and b are integers whose greatest common divisor is d , i.e., gcd( a,b ) = d , then there are integers x and y such that ax + by = d .www.youtube.com/vkedco www.vkedco.blogspot.com
- 19. Bezout’s Identity: Example gcd(12,42) = 6 12 x + 42 y = 6 x = 4, y = −1 12 ⋅ 4 + 42 ⋅ (−1) = 6 x = −3, y = 1 (−3) ⋅12 + 1 ⋅ 42 = 6www.youtube.com/vkedco www.vkedco.blogspot.com
- 20. Euclid’s 1st Theorem (Book VII of Euclid’s Elements) If a prime divides the product of two integers, then the prime divides at least one of the two integers. Formally, if p|ab, then p|a or p|b, where p is a prime and a and b are integers.www.youtube.com/vkedco www.vkedco.blogspot.com
- 21. Proof Technique Note 1 ● Suppose we want to prove a statement: if A then B or C ● We assume A and not B and prove C ● In other words, if A and not B are true, then C must be true, because otherwise, B or C cannot be true ● We can also assume A and not C and prove Bwww.youtube.com/vkedco www.vkedco.blogspot.com
- 22. Euclid’s 1st Theorem: Proof Show that if p | ab, p is prime, then p | a or p | b. Assume that p | ab, p is prime, ¬( p | a ). Since p | ab, rp = ab, for some number r. Then gcd (p,a) = 1. By Bezout s Identity, there are integers x and y such that px + ay = 1. Now, b = b( px + ay ) = bpx + bay = bpx + rpy = p (bx + ry ). So p is a factor of b. We could have also assumed that ¬( p | b) and shown that p is a factor of a.www.youtube.com/vkedco www.vkedco.blogspot.com
- 23. Fundamental Theorem of Arithmetic Every positive integer greater than 1 is either a prime or can be written as a product of primes. The factorization is unique except for the order of factor primes. This theorem is also known as Unique Factorization Theoremwww.youtube.com/vkedco www.vkedco.blogspot.com
- 24. FTA: Examples 6 = 2⋅3 8 = 2⋅2⋅2 = 2 3 10 = 2 ⋅ 5 = 5 ⋅ 2 1 1 1 1 12 = 2 ⋅ 3 2 1200 = 2 ⋅ 3 ⋅ 5 4 2www.youtube.com/vkedco www.vkedco.blogspot.com
- 25. FTA: Key Insight 1200 = 2 ⋅ 3 ⋅ 54 2 Any divisor of 1200 is of the form 2 ⋅ 3 ⋅ 5 , where x y z x ∈ [0,4], y ∈ [0,1], z ∈ [0,2]www.youtube.com/vkedco www.vkedco.blogspot.com
- 26. FTA: Proof 1. We need to prove 2 statements: 1. Every natural number greater than 1 has a prime factorization, i.e., can be written as a product of primes 2. The prime factorization is uniquewww.youtube.com/vkedco www.vkedco.blogspot.com
- 27. FTA: Proof (Part 1) 1. Suppose not every natural number greater than 1 has a prime factorization. 2. By the well - ordering principle, there must be the smallest such number. Call this number n. 3. n is not a prime, because, if it were, it would have itself as its factorization. 4. So n is a composite. 5. Since n is a composite, n = ab, where 1 < a < n and 1 < b < n. 6. Since a and b are positive numbers less than n and n is the smallest number that does not have a prime factorization, a and b both have prime factorizations. 7. But then n has a prime factorization that consists of the prime factorizations of a and b.www.youtube.com/vkedco www.vkedco.blogspot.com
- 28. Proof Technique Note 2 ● Suppose that we want to prove that some mathematical object A is unique ● A common way of doing this is to postulate the existence of another mathematical object B with A’s properties and then show that A and B are the same ● In other words, A is unique, because any other object that has the same properties is A itselfwww.youtube.com/vkedco www.vkedco.blogspot.com
- 29. FTA: Proof (Part 2) 1. Recall Euclid s 1st Theorem : if p is a prime and p|ab, then p|a or p|b. 2. Let n be a natural number greater than 1 that has two prime factorizations F1 and F2 . 3. n = F1 = p1...pn = F2 = q1...qm = n. 4. Take p1. p1|n. Thus, p1|q1...qm . 5. By Euclid s 1st Theorem, p1|q1 or p1|q2 ...qm . Since p1 is a prime, it must be the case that p1 = q1 or p1 = qi , 2 ≤ i ≤ m. Thus, p1 can be taken out of F1 and F2 by dividing them both by p1. 6. The same trick can be repeated for p2 , p3 , ..., pn . 7. But, since F1 = F2 , it must be the case that n = m and for 1 ≤ i, j ≤ n, pi = q j .www.youtube.com/vkedco www.vkedco.blogspot.com
- 30. Pairing Functionswww.youtube.com/vkedco www.vkedco.blogspot.com
- 31. Pairing Functions ● Pairing functions are coding devices for mapping pairs of natural numbers into single natural numbers and vice versa ● Once we have pairing functions we will be in the position to map lists of numbers into single numbers and vice versa ● Remember that our end objective is to compile L programs into natural numberswww.youtube.com/vkedco www.vkedco.blogspot.com
- 32. Pairing Functions • x, y = 2 ( 2 y + 1) − 1 x • 2 ( 2 y + 1) − 1 ≥ 0 x x, y + 1 = 2 ( 2 y + 1) xwww.youtube.com/vkedco www.vkedco.blogspot.com
- 33. Equation 8.1 (Ch. 3) If z is a a natural number, there is a unique solution for x, y to the following equation : x, y = zwww.youtube.com/vkedco www.vkedco.blogspot.com
- 34. Equation 8.1 (Ch. 3) 1. x , y = z 2. x, y + 1 = 2 x (2 y + 1). 3. z + 1 = 2 x (2 y + 1). { } 4. x = max 2 | ( z + 1) . In other words, d d x is the largest number such that 2 x | ( z + 1). z +1 −1 z +1 x 5. 2 y + 1 = x ⇒ y = 2 2 2www.youtube.com/vkedco www.vkedco.blogspot.com
- 35. Equation 8.1 (Ch. 3) • Since x, y = z = 2 ( 2 y + 1) − 1, x x, y + 1 = z + 1 = 2 ( 2 y + 1). x Therefore, x < z + 1, y < z + 1. Hence, x ≤ z , y ≤ z.www.youtube.com/vkedco www.vkedco.blogspot.com
- 36. Reading Suggestions ● Ch. 03, Computability, Complexity, and Languages, 2nd Edition, by Davis, Sigal, Weyuker, Academic Press ● http://en.wikipedia.org/wiki/Kurt_Gödel ● http://en.wikipedia.org/wiki/Goldbachs_conjecturewww.youtube.com/vkedco www.vkedco.blogspot.com
- 37. Feedback Errors, comments to vladimir dot kulyukin at gmail dot comwww.youtube.com/vkedco www.vkedco.blogspot.com

No public clipboards found for this slide

Be the first to comment