Undecidable Languages (Chapter 4.2) Héctor Muñoz-Avila.

Slides:



Advertisements
Similar presentations
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.
Advertisements

CSCI 4325 / 6339 Theory of Computation Zhixiang Chen Department of Computer Science University of Texas-Pan American.
Comparing Sets Size without Counting 2 sets A and B have the same size if there is a function f: A  B such that: For every x  A there is one and only.
1 COMP 382: Reasoning about algorithms Unit 9: Undecidability [Slides adapted from Amos Israeli’s]
Week 7 - Wednesday.  What did we talk about last time?  Set proofs and disproofs  Russell’s paradox.
Computability and Complexity 4-1 Existence of Undecidable Problems Computability and Complexity Andrei Bulatov.
1 Undecidability Andreas Klappenecker [based on slides by Prof. Welch]
The Halting Problem Sipser 4.2 (pages ). CS 311 Mount Holyoke College 2 Taking stock All languages Turing-recognizable Turing-decidable Context-free.
The Halting Problem Sipser 4.2 (pages ).
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.
FORMAL LANGUAGES, AUTOMATA AND COMPUTABILITY
1 Undecidability Andreas Klappenecker [based on slides by Prof. Welch]
Decidable and undecidable problems deciding regular languages and CFL’s Undecidable problems.
1 Uncountable Sets continued Theorem: Let be an infinite countable set. The powerset of is uncountable.
Fall 2004COMP 3351 The Chomsky Hierarchy. Fall 2004COMP 3352 Non-recursively enumerable Recursively-enumerable Recursive Context-sensitive Context-free.
CHAPTER 4 Decidability Contents Decidable Languages
Fall 2004COMP 3351 A Universal Turing Machine. Fall 2004COMP 3352 Turing Machines are “hardwired” they execute only one program A limitation of Turing.
1 CSE 417: Algorithms and Computational Complexity Winter 2001 Lecture 18 Instructor: Paul Beame.
CS21 Decidability and Tractability
1 Introduction to Computability Theory Lecture11: The Halting Problem Prof. Amos Israeli.
INHERENT LIMITATIONS OF COMPUTER PROGRAMS CSci 4011.
Cardinality of Sets Section 2.5.
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.
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.
Lecture 18. Unsolvability Before the 1930’s, mathematics was not like today. Then people believed that “everything true must be provable”. (More formally,
Great Theoretical Ideas in Computer Science about AWESOME Some Generating Functions Probability Infinity Computability With Alan! (not Turing) Mind-
A Universal Turing Machine
Remaining Discussions from Previous Class Please be precise in your writing –Specially because some of the proofs are written in plain English Queue automata.
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.
CS 208: Computing Theory Assoc. Prof. Dr. Brahim Hnich Faculty of Computer Sciences Izmir University of Economics.
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.
Computation Motivating questions: What does “computation” mean? What are the similarities and differences between computation in computers and in natural.
CS 285- Discrete Mathematics
Recursively Enumerable and Recursive Languages
1 Undecidability Andreas Klappenecker [based on slides by Prof. Welch]
Week 7 - Wednesday.  What did we talk about last time?  Proving the subset relationship  Proving set equality  Set counterexamples  Laws of set algebra.
Section 2.5. Cardinality Definition: A set that is either finite or has the same cardinality as the set of positive integers (Z + ) is called countable.
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:
Costas Busch - RPI1 Decidability. Costas Busch - RPI2 Another famous undecidable problem: The halting problem.
1 Recursively Enumerable and Recursive Languages.
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.
Fall 2013 Lecture 27: Turing machines and decidability CSE 311: Foundations of Computing.
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
Undecidable Problems Costas Busch - LSU.
Lecture12 The Halting Problem
2.4 Sequences and Summations
MCC 2093 Advanced Theoretical Computer Science
CS154, Lecture 11: Self Reference, Foundation of Mathematics
Homework: Friday Read Section 4.1. In particular, you must understand the proofs of Theorems 4.1, 4.2, 4.3, and 4.4, so you can do this homework. Exercises.
Busch Complexity Lectures: Undecidable Problems (unsolvable problems)
Decidable Languages Costas Busch - LSU.
Discrete Math for CS CMPSC 360 LECTURE 43 Last time: Variance
CS21 Decidability and Tractability
Formal Languages, Automata and Models of Computation
Intro to Theory of Computation
CS21 Decidability and Tractability
CS154, Lecture 11: Self Reference, Foundation of Mathematics
Cardinality Definition: The cardinality of a set A is equal to the cardinality of a set B, denoted |A| = |B|, if and only if there is a one-to-one correspondence.
CSCI 2670 Introduction to Theory of Computing
Cpt S 317: Spring 2009 Reading: Chapter 8 & 9
Computability and Undecidability
Intro to Theory of Computation
Presentation transcript:

Undecidable Languages (Chapter 4.2) Héctor Muñoz-Avila

Undecidable Languages We are going to make 2 proofs:  An existence proof:  We show that a language L must exist that cannot be decided/recognized with Turing machines without actually showing L  A constructive proof  We show that the halting is not decidable

The Existence Proof: History Irrational number exist Greek mathematicians Deadly controversial 6th century BC Turing machines capture any algorithm There are many more Real numbers than there are natural numbers There are as many rational numbers as there are natural numbers controversial Late 1800’s Cantor Gödel incompleteness theorem Gödel numberings 1930’s Some problems cannot be solved by computers Turing machines Formal model of computation Decidable languages and enumerability results

The Existence Proof

Comparing Sets Two sets A and B have the same size if:

Comparing Sets Two sets A and B have the same size if: –There is a function f: A  B that is bijective

Comparing Sets Two sets A and B have the same size if: –There is a function f: A  B that is bijective

Countable Sets The set of all Natural numbers: –N = {1, 2, …} Set A is countable if it has the same size as N Example: The set of all integers have the same size as N. The function f is bijective: –f(n) = -((n-1)/2) (if n is odd) –f(n) = (n/2) (if n is even)

Countable Sets The set of all Natural numbers: –N = {1, 2, …} It is easier to think of countable sets as those that can be enumerated with an enumerated Turing machine Program enumerateAllNaturals() n  1 while (true) { print(n) n  n + 1 } Program enumerateAllIntegers() n  1 while (true) { if odd(n) then print(-((n-1)/2)) else print(n/2) n  n + 1 }

The set of All Rational Numbers is Countable Q = {p/q | p, q  N }  {0} Perhaps easier than finding a function f: N  Q that is bijective is to think of a Turing machine that enumerates Q See blackboard for a description of the procedure –Same as described in Example 4.15

The Real Numbers R = “the set of all real numbers” We can show that R has the same size as (-  /2,  /2) by using: – f(x) = tan(x) In general: R has the same size as (a,b) for any two real numbers with a < b –You studied this in Calc I

The Real Numbers are Not Countable Proof: see blackboard –Same as Theorem 4.17

There Exists a Non-decidable l Language Three steps (Corollary 4.18): (1) M = “set of all binary encodings of Turing machines” is countable (2) L = “set of all binary sequences of languages” is not countable (3) Hence, there exists a language l,  L such that no Turing machine can decide it

Step 1: M is Countable It is easy to construct a procedure that enumerates (choose one): –All Turing machines –All C++ programs –All Java programs See blackboard for procedure Homework for Monday asks you to reconstruct this procedure Actual mathematical proof uses Godel numberings (not in the book)

Step 2: L is not countable Assume  = {0,1} (the proof works with any finite alphabet) Consider  * listed in Lexicographical Order We define the characteristic sequence for a language L We define: –L = { | L is a language in  } See blackboard for preliminaries Homework for Monday asks you to finish the proof

Step 3 Because: –M = “set of all Turing machines” is countable –L = “set of all languages” is not countable We can now proof that there exists a language l in L such that no Turing machine can decide it

Does the following program halts? Source:

Does the following program halts? Source:

A Concrete Undecidable Language The halting problem is not decidable Formally, the following set is not decidable: –HALT = { | M is a Turing machine, w   *, M halts on input w} Kleene Barkley RosserChurch Turing Gödel

Note Modern program editors detect instances of infinite loops Does this contradict the statement that HALT is undecidable? Editor says: “Warning potential infinite loop here”

A Paradox “In Sevilla, Spain lives Pepe a barber who…”

Actual Proof First: example of a situation where a write a program M and pass as parameter the binary encoding of –i.e., call M( ) Proof by contradiction: –Assume that HALT is decidable: HALT = { | M is a Turing machine, w   *, M halts on input w} –Let H be a decider for HALT –Rest of the proof in the blackboard: (Theorem 4.11)