Decidable Languages Costas Busch - LSU.

Slides:



Advertisements
Similar presentations
Fall 2006Costas Busch - RPI1 Decidable Languages.
Advertisements

Lecture 3 Universal TM. Code of a DTM Consider a one-tape DTM M = (Q, Σ, Γ, δ, s). It can be encoded as follows: First, encode each state, each direction,
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.
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.
Costas Busch - RPI1 Undecidable problems for Recursively enumerable languages continued…
Fall 2003Costas Busch - RPI1 Decidability. Fall 2003Costas Busch - RPI2 Recall: A language is decidable (recursive), if there is a Turing machine (decider)
Recursively Enumerable and Recursive Languages
1 The Chomsky Hierarchy. 2 Unrestricted Grammars: Rules have form String of variables and terminals String of variables and terminals.
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 Reducibility. Fall 2004COMP 3352 Problem is reduced to problem If we can solve problem then we can solve problem.
Linear Bounded Automata LBAs
1 Decidability continued. 2 Undecidable Problems Halting Problem: Does machine halt on input ? State-entry Problem: Does machine enter state halt on input.
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.
Fall 2006Costas Busch - RPI1 Undecidable Problems (unsolvable problems)
Prof. Busch - LSU1 Undecidable Problems (unsolvable problems)
Prof. Busch - LSU1 Turing Machines. Prof. Busch - LSU2 The Language Hierarchy Regular Languages Context-Free Languages ? ?
Prof. Busch - LSU1 Reductions. Prof. Busch - LSU2 Problem is reduced to problem If we can solve problem then we can solve problem.
1 Reducibility. 2 Problem is reduced to problem If we can solve problem then we can solve problem.
The Halting Problem – Undecidable Languages Lecture 31 Section 4.2 Wed, Oct 31, 2007.
1 1 CDT314 FABER Formal Languages, Automata and Models of Computation Lecture 15-1 Mälardalen University 2012.
A Universal Turing Machine
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)
 2005 SDU Lecture13 Reducibility — A methodology for proving un- decidability.
1Computer Sciences Department. Book: INTRODUCTION TO THE THEORY OF COMPUTATION, SECOND EDITION, by: MICHAEL SIPSER Reference 3Computer Sciences Department.
Recursively Enumerable and Recursive Languages
Donghyun (David) Kim Department of Mathematics and Computer Science North Carolina Central University 1 Chapter 4 Decidability Some slides are in courtesy.
1 The Chomsky Hierarchy. 2 Unrestricted Grammars: Productions String of variables and terminals String of variables and terminals.
Costas Busch - RPI1 Decidability. Costas Busch - RPI2 Consider problems with answer YES or NO Examples: Does Machine have three states ? Is string a binary.
Costas Busch - RPI1 Decidability. Costas Busch - RPI2 Another famous undecidable problem: The halting problem.
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.
Fall 2006Costas Busch - RPI1 RE languages and Enumerators.
Chapters 11 and 12 Decision Problems and Undecidability.
Turing’s Thesis Costas Busch - LSU.
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
Busch Complexity Lectures: Turing Machines
Busch Complexity Lectures: Reductions
Linear Bounded Automata LBAs
Reductions.
Undecidable Problems Costas Busch - LSU.
Reductions Costas Busch - LSU.
LIMITS OF ALGORITHMIC COMPUTATION
Busch Complexity Lectures: Undecidable Problems (unsolvable problems)
Undecidable Problems (unsolvable problems)
Turing acceptable languages and Enumerators
Non-Deterministic Finite Automata
Non-Deterministic Finite Automata
Decidability and Undecidability
Elementary Questions about Regular Languages
Turing acceptable languages and Enumerators
Undecidable problems:
Proposed in Turing’s 1936 paper
Formal Languages, Automata and Models of Computation
CSCI 2670 Introduction to Theory of Computing
Decidability continued….
Instructor: Aaron Roth
Automata, Grammars and Languages
More Undecidable Problems
Presentation transcript:

Decidable Languages Costas Busch - LSU

A language is Turing-Acceptable if there is a Turing machine Recall that: A language is Turing-Acceptable if there is a Turing machine that accepts Also known as: Turing-Recognizable or Recursively-enumerable languages Costas Busch - LSU

or loops forever Turing-Acceptable For any input string : halts in an accept state halts in a non-accept state or loops forever Costas Busch - LSU

Definition: A language is decidable if there is a Turing machine (decider) which accepts and halts on every input string Also known as recursive languages Costas Busch - LSU

halts in an accept state Turing-Decidable For any input string : halts in an accept state halts in a non-accept state Observation: Every decidable language is Turing-Acceptable Costas Busch - LSU

Sometimes, it is convenient to have Turing machines with single accept and reject states These are the only halting states That result to possible halting configurations Costas Busch - LSU

We can convert any Turing machine to have single accept and reject states New machine Old machine For each tape symbol Multiple accept states One accept state Costas Busch - LSU

Do the following for each possible halting state: New machine Old machine For each For all tape symbols not used for read in the other transitions of Multiple reject states One reject state Costas Busch - LSU

For a decidable language : Decision On Halt: Decider for Accept Input string Reject For each input string, the computation halts in the accept or reject state Costas Busch - LSU

For a Turing-Acceptable language : Turing Machine for Input string It is possible that for some input string the machine enters an infinite loop Costas Busch - LSU

A computational problem is decidable if the corresponding language is decidable We also say that the problem is solvable Costas Busch - LSU

Corresponding language: Problem: Is number prime? Corresponding language: We will show it is decidable Costas Busch - LSU

Divide with all possible numbers between and If any of them divides Decider for : On input number : Divide with all possible numbers between and If any of them divides Then reject Else accept Costas Busch - LSU

is prime? the decider Turing machine can be designed based on the algorithm Decider for PRIMES YES (Accept) Input number is prime? (Input string) NO (Reject) Costas Busch - LSU

Corresponding Language: (Decidable) Problem: Does DFA accept the empty language ? Corresponding Language: (Decidable) Description of DFA as a string (For example, we can represent as a binary string, as we did for Turing machines) Costas Busch - LSU

Determine whether there is a path from Decider for : On input : Determine whether there is a path from the initial state to any accepting state DFA DFA Decision: Accept Reject Costas Busch - LSU

Corresponding Language: (Decidable) Problem: Does DFA accept a finite language? Corresponding Language: (Decidable) Costas Busch - LSU

Check if there is a walk with a cycle Decider for : On input : Check if there is a walk with a cycle from the initial state to an accepting state DFA DFA infinite finite Decision: Accept Reject (NO) (YES) Costas Busch - LSU

Corresponding Language: (Decidable) Problem: Does DFA accept string ? Corresponding Language: (Decidable) Costas Busch - LSU

Decider for : On input string : Run DFA on input string If accepts Then accept (and halt) Else reject (and halt) Costas Busch - LSU

accept the same language? Problem: Do DFAs and accept the same language? Corresponding Language: (Decidable) Costas Busch - LSU

Let be the language of DFA Decider for : On input : Let be the language of DFA Construct DFA such that: (combination of DFAs) Costas Busch - LSU

and Costas Busch - LSU

or Costas Busch - LSU

which is a solvable problem for DFAs: Therefore, we only need to determine whether which is a solvable problem for DFAs: Costas Busch - LSU

If a language is decidable, then its complement is decidable too Theorem: If a language is decidable, then its complement is decidable too Proof: Build a Turing machine that accepts and halts on every input string ( is decider for ) Costas Busch - LSU

Transform accept state to reject and vice-versa Costas Busch - LSU

1. Let be the decider for Turing Machine On each input string do: 2. Run with input string If accepts then reject If rejects then accept Accepts and halts on every input string END OF PROOF Costas Busch - LSU

Undecidable Languages Costas Busch - LSU

Undecidable Languages An undecidable language has no decider: Any Turing machine that accepts does not halt on some input string We will show that: There is a language which is Turing-Acceptable and undecidable Costas Busch - LSU

We will prove that there is a language : is Turing-acceptable is not Turing-acceptable (not accepted by any Turing Machine) the complement of a decidable language is decidable Therefore, is undecidable Costas Busch - LSU

Non Turing-Acceptable Decidable Costas Busch - LSU

Consider alphabet Strings of : Costas Busch - LSU

Consider Turing Machines that accept languages over alphabet They are countable: (There is an enumerator that generates them) Costas Busch - LSU

Each machine accepts some language over Note that it is possible to have for Since, a language could be accepted by more than one Turing machine Costas Busch - LSU

Example language accepted by Binary representation Costas Busch - LSU

Example of binary representations Costas Busch - LSU

consists of the 1’s in the diagonal Consider the language consists of the 1’s in the diagonal Costas Busch - LSU

Costas Busch - LSU

consists of the 0’s in the diagonal Consider the language consists of the 0’s in the diagonal Costas Busch - LSU

Costas Busch - LSU

Language is not Turing-Acceptable Theorem: Language is not Turing-Acceptable Proof: Assume for contradiction that is Turing-Acceptable Let be the Turing machine that accepts : Costas Busch - LSU

Question: Costas Busch - LSU

Answer: Costas Busch - LSU

Question: Costas Busch - LSU

Answer: Costas Busch - LSU

Question: Costas Busch - LSU

Answer: Costas Busch - LSU

the machine cannot exist Similarly: for any Because either: or the machine cannot exist is not Turing-Acceptable End of Proof Costas Busch - LSU

Non Turing-Acceptable Decidable Costas Busch - LSU

We will prove that the language Is Turing- Acceptable Undecidable There is a Turing machine that accepts Each machine that accepts doesn’t halt on some input string Costas Busch - LSU

We will give a Turing Machine that accepts Theorem: The language Is Turing-Acceptable Proof: We will give a Turing Machine that accepts Costas Busch - LSU

Turing Machine that accepts For any input string Suppose Find Turing machine (using the enumerator for Turing Machines) Simulate on input string If accepts, then accept End of Proof Costas Busch - LSU

Not Turing-acceptable Therefore: Turing-Acceptable Not Turing-acceptable Costas Busch - LSU

Non Turing-Acceptable Decidable ? Costas Busch - LSU

However, is not Turing-Acceptable! Theorem: is undecidable Proof: If is decidable the complement of a decidable language is decidable Then is decidable However, is not Turing-Acceptable! Contradiction!!!! Costas Busch - LSU

Not Turing-Acceptable Decidable Costas Busch - LSU