Problem: Give as many proofs as you can for the Pythagorean Theorem. i.e., a 2 + b 2 = c 2 holds for any right triangle with sides a & b and hypotenuse.

Slides:



Advertisements
Similar presentations
Lecture 19. Reduction: More Undecidable problems
Advertisements

CS 461 – Nov. 9 Chomsky hierarchy of language classes –Review –Let’s find a language outside the TM world! –Hints: languages and TM are countable, but.
1 COMP 382: Reasoning about algorithms Unit 9: Undecidability [Slides adapted from Amos Israeli’s]
CSE115/ENGR160 Discrete Mathematics 02/28/12
Computability and Complexity 4-1 Existence of Undecidable Problems Computability and Complexity Andrei Bulatov.
1 Undecidability Andreas Klappenecker [based on slides by Prof. Welch]
1 Introduction to Computability Theory Lecture12: Reductions Prof. Amos Israeli.
Introduction to Computability Theory
Prof. Busch - LSU1 Decidable Languages. Prof. Busch - LSU2 Recall that: A language is Turing-Acceptable if there is a Turing machine that accepts Also.
Courtesy Costas Busch - RPI1 A Universal Turing Machine.
CPSC 411, Fall 2008: Set 12 1 CPSC 411 Design and Analysis of Algorithms Set 12: Undecidability Prof. Jennifer Welch Fall 2008.
1 Linear Bounded Automata LBAs. 2 Linear Bounded Automata are like Turing Machines with a restriction: The working space of the tape is the space of the.
Fall 2004COMP 3351 Recursively Enumerable and Recursive Languages.
Fall 2003Costas Busch - RPI1 Decidability. Fall 2003Costas Busch - RPI2 Recall: A language is decidable (recursive), if there is a Turing machine (decider)
1 Undecidability Andreas Klappenecker [based on slides by Prof. Welch]
Recursively Enumerable and Recursive Languages
CSE115/ENGR160 Discrete Mathematics 03/03/11 Ming-Hsuan Yang UC Merced 1.
1 Uncountable Sets continued Theorem: Let be an infinite countable set. The powerset of is uncountable.
CHAPTER 4 Decidability Contents Decidable Languages
Fall 2004COMP 3351 Reducibility. Fall 2004COMP 3352 Problem is reduced to problem If we can solve problem then we can solve problem.
Fall 2005Costas Busch - RPI1 Recursively Enumerable and Recursive Languages.
Fall 2004COMP 3351 A Universal Turing Machine. Fall 2004COMP 3352 Turing Machines are “hardwired” they execute only one program A limitation of Turing.
Courtesy Costas Busch - RPI1 Reducibility. Courtesy Costas Busch - RPI2 Problem is reduced to problem If we can solve problem then we can solve problem.
1 CSE 417: Algorithms and Computational Complexity Winter 2001 Lecture 18 Instructor: Paul Beame.
Fall 2006Costas Busch - RPI1 Undecidable Problems (unsolvable problems)
Prof. Busch - LSU1 Undecidable Problems (unsolvable problems)
1 Introduction to Computability Theory Lecture11: The Halting Problem Prof. Amos Israeli.
Halting Problem. Background - Halting Problem Common error: Program goes into an infinite loop. Wouldn’t it be nice to have a tool that would warn us.
Cs3102: Theory of Computation Class 18: Proving Undecidability Spring 2010 University of Virginia David Evans.
MATH 224 – Discrete Mathematics
The Halting Problem – Undecidable Languages Lecture 31 Section 4.2 Wed, Oct 31, 2007.
1 Undecidability Reading: Chapter 8 & 9. 2 Decidability vs. Undecidability There are two types of TMs (based on halting): (Recursive) TMs that always.
Undecidable Languages (Chapter 4.2) Héctor Muñoz-Avila.
1 1 CDT314 FABER Formal Languages, Automata and Models of Computation Lecture 15-1 Mälardalen University 2012.
1 The Halting Problem and Decidability How powerful is a TM? Any program in a high level language can be simulated by a TM. Any algorithmic procedure carried.
A Universal Turing Machine
CS 3813: Introduction to Formal Languages and Automata Chapter 12 Limits of Algorithmic Computation These class notes are based on material from our textbook,
1 Linear Bounded Automata LBAs. 2 Linear Bounded Automata (LBAs) are the same as Turing Machines with one difference: The input string tape space is the.
1 Turing’s Thesis. 2 Turing’s thesis: Any computation carried out by mechanical means can be performed by a Turing Machine (1930)
Computability Universal Turing Machine. Countability. Halting Problem. Homework: Show that the integers have the same cardinality (size) as the natural.
Complexity & Computability. Limitations of computer science  Major reasons useful calculations cannot be done:  execution time of program is too long.
CSE 311 Foundations of Computing I Lecture 28 Computability: Other Undecidable Problems Autumn 2011 CSE 3111.
CSE 311: Foundations of Computing Fall 2014 Lecture 27: Cardinality.
Recursively Enumerable and Recursive Languages
CS 461 – Oct. 28 TM applications –Recognize a language √ –Arithmetic √ –Enumerate a set –Encode a data structure or problem to solve Two kinds of TMs –Decider:
1 Undecidability Andreas Klappenecker [based on slides by Prof. Welch]
Section 1.8. Proof by Cases Example: Let b = max{a, b} = a if a ≥ b, otherwise b = max{a, b} = b. Show that for all real numbers a, b, c
The Church-Turing Thesis Chapter Are We Done? FSM  PDA  Turing machine Is this the end of the line? There are still problems we cannot solve:
1 Recursively Enumerable and Recursive Languages.
Recursively Enumerable and Recursive Languages. Definition: A language is recursively enumerable if some Turing machine accepts it.
Decidability.
1 A Universal Turing Machine. 2 Turing Machines are “hardwired” they execute only one program A limitation of Turing Machines: Real Computers are re-programmable.
The Acceptance Problem for TMs
A Universal Turing Machine
CS 461 – Nov. 2 Sets Prepare for ATM finite vs. infinite Infinite sets
Recursively Enumerable and Recursive Languages
This statement is false.
CSE 311 Foundations of Computing I
Undecidable Problems Costas Busch - LSU.
Busch Complexity Lectures: Undecidable Problems (unsolvable problems)
Andreas Klappenecker [based on slides by Prof. Welch]
CSCE 411 Design and Analysis of Algorithms
Decidable Languages Costas Busch - LSU.
Decidability and Undecidability
Halting Problem.
Formal Languages, Automata and Models of Computation
Instructor: Aaron Roth
Computability and Undecidability
Algorithms CSCI 235, Spring 2019 Lecture 37 The Halting Problem
MA/CSSE 474 Theory of Computation
Presentation transcript:

Problem: Give as many proofs as you can for the Pythagorean Theorem. i.e., a 2 + b 2 = c 2 holds for any right triangle with sides a & b and hypotenuse c.

Theorem [Turing]: the set of algorithms is countable. Proof: Sort algorithms  programs by length: “main(){}” “main(){int n; n=13;}” “ ”  set of algorithms is countable! Dovetailing!      Canonical order

Theorem [Turing]: the set of functions is not countable. Theorem: Boolean functions {ƒ|ƒ: ℕ  {0,1}} are uncountable. Proof: Assume Boolean functions were countable; i.e.,  table containing all of ƒ i ’s and their corresponding values: ƒiƒi ƒ i (1) ƒ i (2) ƒ i (3) ƒ i (4) ƒ i (5) ƒ i (6) ƒ i (7) ƒ i (8) ƒ i (9) ƒ1ƒ … ƒ2ƒ … ƒ3ƒ … ƒ4ƒ … ƒ5ƒ … …………………………… ƒ’: ℕ  {0,1} But ƒ’ is missing from our table! ƒ’  ƒ k  k  ℕ  table is not a 1-1 correspondence between ℕ and ƒ i ’s  contradiction  {ƒ | ƒ: ℕ  {0,1} } is not countable!  There are more Boolean functions than natural numbers! Diagonalization Non-existence proof! ƒ’(i) =... Real numbers!

Theorem: the set of algorithms is countable. Theorem: the set of functions is uncountable. Theorem: the Boolean functions are uncountable. Corollary: there are “more” functions than algorithms / programs. Corollary: some functions are not computable by any algorithm! Corollary: most functions are not computable by any algorithm! Corollary: there are “more” Boolean functions than algorithms. Corollary: some Boolean functions on ℕ are not computable. Corollary: most Boolean functions on ℕ are not computable.

Theorem: most Boolean functions on ℕ are not computable. Q: Can we find a concrete example of an uncomputable function? A [Turing]: Yes, for example, the Halting Problem. Definition: The Halting problem: given a program P and input I, will P halt if we ran it on I? Define H: ℕ  ℕ  {0,1} H(P,I)=1 if TM P halts on input I H(P,I)=0 otherwise Notes: P and I can be encoded as integers, in some canonical order. H is an everywhere-defined Boolean function on natural pairs. Alternatively, both P and I can be encoded as strings in Σ*. We can modify H to take only a single input: H’(2 P 3 I ) or H’(P$I) Gödel numbering / encoding Why 2 P 3 I ? What else will work?

Theorem [Turing]: the halting problem (H) is not computable. Corollary: we can not algorithmically detect all infinite loops. Q: Why not? E.g., do the following programs halt? main() { int k=3; } main() { while(1) {} } Halts!Runs forever! ? main() { Find a Fermat triple a n +b n =c n with n>2 } Runs forever! Open from ! main() { Find a Goldbach integer that is not a sum of two primes } ? Still open since 1742! Theorem: solving the halting problem is at least as hard as solving arbitrary open mathematical problems!

Number of steps to termination for the first 10,000 numbers Theorem [Turing]: the halting problem (H) is not computable. Ex: the “3X+1” problem (the Ulam conjecture): Start with any integer X>0 If X is even, then replace it with X/2 If X is odd then replace it with 3X+1 Repeat until X=1 (i.e., short cycle 4, 2, 1,...) Ex: 26 terminates after 10 steps 27 terminates after 111 steps Termination verified for X<10 18 Q: Does this terminate for every X>0 ? A: Open since 1937! “Mathematics is not yet ready for such confusing, troubling, and hard problems." - Paul Erdős, who offered a $500 bounty for a solution to this problem Observation: termination is in general difficult to detect!

Theorem [Turing]: the halting problem (H) is not computable. Proof: Assume  algorithm S that solves the halting problem H, that always stops with the correct answer for any P & I.  P I yes no Does P(I) halt? S X T T(T) halts Q  ~Q  Contradiction! P I yes no Does P(I) halt? S P I yes no Does P(I) halt? S  S cannot exist! (at least as an algorithm / program / TM) Using S, construct algorithm / TM T:  T(T) halts  T(T) does not halt T(T) does not halt Diagonalization Non-existence proof!

Q: When do we want to feed a program to itself in practice? A: When we build compilers. Q: Why? A: To make them more efficient! To boot-strap the coding in the compiler’s own language! Program C compiler Executable code

Theorem: virus detection is not computable. Theorem: Infinite loop detection is not computable.

One of My Favorite Turing Machines “Kindle DX” wireless reading device 1/3 of an inch thin, 4GB memory holds 3,500 books / documents 532 MHz ARM-11 processor 9.7" e-ink auto-rotate 824x1200 display Full PDF and text-to-speech 3G wireless, < 1 min / book 18.0 oz, battery life 4 days

Naturals ℕ 6 Integers ℤ -4 Rationals ℚ 2/9 Reals ℝ Quaternions ℍ 1+i+j+k Complex ℂ 7+3i Surreal {L|R} Surcomplex A + B i Primes ℙ 5 Octonions 1+i+j+k+E+I+J+K Hypernumbers Sedenions S 1+i+j+k+…+e 15 +e 16 ? Boolean 1 Computable numbers Finitely describable numbers H Algebraic 2 Trancendental  Irrationals J Theorem: some real numbers are not finitely describable! Theorem: some finitely describable real numbers are not computable! Generalized Numbers

Theorem: Some real numbers are not finitely describable. Proof: The number of finite descriptions is countable. The number of real numbers is not countable.  Most real numbers do not have finite descriptions. Theorem: Some finitely describable reals are not computable. Proof: Let h=0.H 1 H 2 H 3 H 4 … where H i =1 if i=2 P 3 I for some integers P&I, and TM P halts on input I, and H i =0 otherwise. Clearly 0 < h < 1 is a real number and is finitely describable. If h was computable, then we could exploit an algorithm that computes it, into solving the halting problem, a contradiction.  h is not computable. Reduction / transformation! Gödel numbering / encoding

Theorem: all computable numbers are finitely describable. Proof: A computable number can be outputted by a TM. A TM is a (unique) finite description. What the unsolvability of the Halting Problem means: There is no single algorithm / program / TM that correctly solves all instances of the halting problem in finite time each. This result does not necessarily apply if we allow: Incorrectness on some instances Infinitely large algorithm / program Infinite number of finite algorithms / programs Some instances to not be solved Infinite “running time” / steps Powerful enough oracles