Decidability.

Slides:



Advertisements
Similar presentations
Linear Bounded Automata LBAs
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 Section 14.1 Computability Some problems cannot be solved by any machine/algorithm. To prove such statements we need to effectively describe all possible.
Fall 2004COMP 3351 Undecidable problems for Recursively enumerable languages continued…
Prof. Busch - LSU1 Decidable Languages. Prof. Busch - LSU2 Recall that: A language is Turing-Acceptable if there is a Turing machine that accepts Also.
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)
Computability and Complexity 7-1 Computability and Complexity Andrei Bulatov Recursion Theorem.
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
Automata & Formal Languages, Feodor F. Dragan, Kent State University 1 CHAPTER 5 Reducibility Contents Undecidable Problems from Language Theory.
Fall 2005Costas Busch - RPI1 Recursively Enumerable and Recursive Languages.
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 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.
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.
D E C I D A B I L I T Y 1. 2 Objectives To investigate the power of algorithms to solve problems. To explore the limits of algorithmic solvability. To.
Recursively Enumerable and Recursive Languages
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 The Chomsky Hierarchy. 2 Unrestricted Grammars: Productions String of variables and terminals String of variables and terminals.
Undecidability and The Halting Problem
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.
CSC 3130: Automata theory and formal languages Andrej Bogdanov The Chinese University of Hong Kong Undecidable.
Recursively Enumerable and Recursive Languages. Definition: A language is recursively enumerable if some Turing machine accepts it.
Fall 2006Costas Busch - RPI1 RE languages and Enumerators.
Chapters 11 and 12 Decision Problems and Undecidability.
The Acceptance Problem for TMs
CS 461 – Nov. 2 Sets Prepare for ATM finite vs. infinite Infinite sets
Recursively Enumerable Languages
Recursively Enumerable and Recursive Languages
Standard Representations of Regular Languages
Busch Complexity Lectures: Reductions
Linear Bounded Automata LBAs
Reductions.
Undecidable Problems Costas Busch - LSU.
Reductions Costas Busch - LSU.
Automata, Grammars and Languages
LIMITS OF ALGORITHMIC COMPUTATION
Decidability and Enumerability
Busch Complexity Lectures: Undecidable Problems (unsolvable problems)
Undecidable Problems (unsolvable problems)
Turing acceptable languages and Enumerators
CS154, Lecture 8: Undecidability, Mapping Reductions
CS154, Lecture 8: Undecidability, Mapping Reductions
Decidable Languages Costas Busch - LSU.
Decidability and Undecidability
Turing acceptable languages and Enumerators
Undecidable problems:
Formal Languages, Automata and Models of Computation
Theory of Computability
Theory of Computability
Instructor: Aaron Roth
CSCI 2670 Introduction to Theory of Computing
Decidability continued….
Instructor: Aaron Roth
Automata, Grammars and Languages
More Undecidable Problems
Presentation transcript:

Decidability

Decidable Languages Recall: A language is decidable (recursive), if there is a Turing machine (decider) that accepts the language and halts on every input string Decision On Halt: Turing Machine Accept Input string Decider for Reject

Problem: Is number prime? Corresponding language:

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

Thus, PRIMES is decidable We also say that the corresponding prime number problem is solvable: we can give an answer (positive or negative) for every input instance of the problem

the decider for the language solves the corresponding problem Decider for PRIMES Accept YES (Accept) Input number is number prime? (Input string) NO Reject (Reject)

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

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

Problem: Does DFA accept a finite language? Corresponding Language: Decidable language

Decider for : On input : Check if there is a walk with cycle from the initial state to an accepting state DFA DFA infinite finite Decision: Accept Reject

Problem: Does DFA accept string ? Corresponding Language: Decidable language

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

Problem: Do DFAs and accept the same language? Corresponding Language: Decidable language

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

and

or

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

Undecidable Languages language is not decidable There is no decider for the language: there is no Turing Machine that reaches a decision (halts) for all input strings of the language (decision may be reached for some strings)

For an undecidable language, the corresponding problem is unsolvable: there is no Turing Machine (Algorithm) that gives an answer (solves the problem) for all input instances of the problem (answer may be given for some input instances)

We have shown before that there are undecidable languages: Turing recognizable Decidable is Turing recognizable but not decidable

We will prove that two particular problems are unsolvable: Membership problem Halting problem

Membership Problem Input: Turing Machine String Question: Does accept ? Corresponding language:

We will assume that is decidable; We will then prove that Theorem: is undecidable (The membership problem is unsolvable) Proof: Basic idea: We will assume that is decidable; We will then prove that every decidable language is also Turing recognizable A contradiction!

Suppose that is decidable Input string Decider for accepts YES NO rejects

Let be a Turing recognizable language Let be the Turing Machine that accepts We will prove that is also decidable: we will build a decider for

Decider for YES accept accepts ? NO reject Input string Decider for (and halt) accepts ? NO reject Input string (and halt)

Since is chosen arbitrarily, every Turing recognizable language Therefore, is decidable Since is chosen arbitrarily, every Turing recognizable language is also decidable But there are Turing recognizable languages which are not decidable Contradiction!!!! END OF PROOF

We have shown: Undecidable Decidable

We can actually show: Turing recognizable Decidable

is Turing recognizable Turing machine that accepts : Run on input If accepts then accept

Halting Problem Input: Turing Machine String Question: Does halt while processing input string ? Corresponding language:

Suppose that is decidable; we will prove that every decidable language Theorem: is undecidable (The halting problem is unsolvable) Proof: Basic idea: Suppose that is decidable; we will prove that every decidable language is also Turing recognizable A contradiction!

Suppose that is decidable Input string halts on input YES Decider for NO doesn’t halt on input

Let be a Turing recognizable language Let be the Turing Machine that accepts We will prove that is also decidable: we will build a decider for

Decider for NO reject halts on ? YES accept Run with input reject and halt halts on ? YES Input string halts and accepts accept and halt Run with input halts and rejects reject and halt

Since is chosen arbitrarily, every Turing recognizable language Therefore is decidable Since is chosen arbitrarily, every Turing recognizable language is also decidable But there are Turing recognizable languages which are not decidable Contradiction!!!! END OF PROOF

An alternative proof Theorem: is undecidable Proof: Basic idea: (The halting problem is unsolvable) Proof: Basic idea: Assume for contradiction that the halting problem is decidable; we will obtain a contradiction using a diagonilization technique

Suppose that is decidable Input string Decider for YES halts on NO doesn’t halt on

Looking inside Decider for YES Input string: halts on ? NO

Construct machine : Loop forever YES halts on ? NO If halts on input Then Loop Forever Else Halt

Construct machine : Copy on tape If halts on input Then loop forever Else halt

Then loops forever on input Run with input itself Copy on tape If halts on input Then loops forever on input Else halts on input CONTRADICTION!!! END OF PROOF

We have shown: Undecidable Decidable

We can actually show: Turing recognizable Decidable

is Turing recognizable Turing machine that accepts : Run on input If halts on then accept