Theory of Computing Lecture 20 MAS 714 Hartmut Klauck.

Slides:



Advertisements
Similar presentations
David Evans cs302: Theory of Computation University of Virginia Computer Science Lecture 17: ProvingUndecidability.
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,
Lecture 24 MAS 714 Hartmut Klauck
Turing -Recognizable vs. -Decidable
CSCI 4325 / 6339 Theory of Computation Zhixiang Chen Department of Computer Science University of Texas-Pan American.
1 COMP 382: Reasoning about algorithms Unit 9: Undecidability [Slides adapted from Amos Israeli’s]
Nathan Brunelle Department of Computer Science University of Virginia Theory of Computation CS3102 – Spring 2014 A tale.
Computability and Complexity 5-1 Classifying Problems Computability and Complexity Andrei Bulatov.
1 Undecidability Andreas Klappenecker [based on slides by Prof. Welch]
1 Introduction to Computability Theory Lecture14: Recap Prof. Amos Israeli.
1 Introduction to Computability Theory Lecture12: Decidable Languages Prof. Amos Israeli.
1 Introduction to Computability Theory Lecture12: Reductions Prof. Amos Israeli.
More Turing Machines Sipser 3.2 (pages ). CS 311 Fall Multitape Turing Machines Formally, we need only change the transition function to.
Reducibility Sipser 5.1 (pages ). CS 311 Fall Reducibility.
Reducibility Sipser 5.1 (pages ).
Mapping Reducibility Sipser 5.3 (pages ).
More Turing Machines Sipser 3.2 (pages ).
1 Introduction to Computability Theory Lecture13: Mapping Reductions Prof. Amos Israeli.
Mapping Reducibility Sipser 5.3 (pages ). CS 311 Fall Computable functions Definition 5.17: A function f:Σ*→Σ* is a computable function.
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.
CPSC 411, Fall 2008: Set 12 1 CPSC 411 Design and Analysis of Algorithms Set 12: Undecidability Prof. Jennifer Welch Fall 2008.
1 Undecidability Andreas Klappenecker [based on slides by Prof. Welch]
CHAPTER 4 Decidability Contents Decidable Languages
CS Master – Introduction to the Theory of Computation Jan Maluszynski - HT Lecture 6 Decidability Jan Maluszynski, IDA, 2007
1 Decidability continued. 2 Undecidable Problems Halting Problem: Does machine halt on input ? State-entry Problem: Does machine enter state halt on input.
Automata & Formal Languages, Feodor F. Dragan, Kent State University 1 CHAPTER 5 Reducibility Contents Undecidable Problems from Language Theory.
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.
Theory of Computing Lecture 19 MAS 714 Hartmut Klauck.
Theory of Computing Lecture 17 MAS 714 Hartmut Klauck.
CSE 105 Theory of Computation Alexander Tsiatas Spring 2012 Theory of Computation Lecture Slides by Alexander Tsiatas is licensed under a Creative Commons.
MA/CSSE 474 Theory of Computation More Reduction Examples Non-SD Reductions.
MA/CSSE 474 Theory of Computation Enumerability Reduction.
Theory of Computing Lecture 21 MAS 714 Hartmut Klauck.
CSE 105 Theory of Computation Alexander Tsiatas Spring 2012 Theory of Computation Lecture Slides by Alexander Tsiatas is licensed under a Creative Commons.
 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.
CS Master – Introduction to the Theory of Computation Jan Maluszynski - HT Lecture 7 Undecidability cont. Jan Maluszynski, IDA, 2007
Turing -Recognizable vs. -Decidable
Lecture 21 Reducibility. Many-one reducibility For two sets A c Σ* and B c Γ*, A ≤ m B if there exists a Turing-computable function f: Σ* → Γ* such that.
Donghyun (David) Kim Department of Mathematics and Computer Science North Carolina Central University 1 Chapter 4 Decidability Some slides are in courtesy.
1 Undecidability Andreas Klappenecker [based on slides by Prof. Welch]
Decidability Decidable/Undecidable problems. Jaruloj Chongstitvatana Decidability2 Accepting: Definition Let T = (Q, , , , s) be a TM. T accepts.
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:
MA/CSSE 474 Theory of Computation Decision Problems, Continued DFSMs.
Recursively Enumerable and Recursive Languages. Definition: A language is recursively enumerable if some Turing machine accepts it.
 2005 SDU Lecture14 Mapping Reducibility, Complexity.
Chapters 11 and 12 Decision Problems and Undecidability.
The Acceptance Problem for TMs
Busch Complexity Lectures: Reductions
Reductions.
Reductions Costas Busch - LSU.
Automata, Grammars and Languages
CSE 105 theory of computation
CSE 105 theory of computation
Turing Machines Acceptors; Enumerators
CSCE 411 Design and Analysis of Algorithms
Decidable Languages Costas Busch - LSU.
Undecidable problems:
Theory of Computability
CSE 105 theory of computation
Theory of Computability
Instructor: Aaron Roth
Turing -Recognizable vs. -Decidable
Theory of Computability
Instructor: Aaron Roth
More Undecidable Problems
Turing -Recognizable vs. -Decidable
CSE 105 theory of computation
Presentation transcript:

Theory of Computing Lecture 20 MAS 714 Hartmut Klauck

Decidability Definition: A language is decidable if there is a TM that accepts all words in the language and rejects all words not in the language In particular it always halts in finite time For a Turing machine M the language accepted by M is the set of x on which M accepts (denoted by L M )

Example U={,x: M accepts x} – Universal Language (inputs acc. by the universal TM) U is not decidable: HALT · U – Note: decider must be correct and halt on all inputs Reduction: Map,x to,x – where N is the machine that simulates M, and if M halts, then N accepts (N never rejects),x 2 HALT,,x 2 U

Decidability The complement of L is the set of strings that is not in L (over the same alphabet) Observation: L is decidable if and only if C(L) is decidable – simply switch acceptance with rejecting Corollary: If L is not decidable then C(L) is also not decidable Example: EMPTY={ : L M = ; } is not decidable – Note this is not exactly the complement of NEMPTY, but the complement minus a computable set: {x: x is not a TM encoding}

Equivalence EQ={, : L M =L N } Theorem: EQ is not decidable Reduction from EMPTY Fix some TM N that never accepts Reduction maps to,

Closure If L is decidable and S is decidable then – Complement of L is decidable – L Å S is decidable – L [ S is decidable Corollary: – CH={ : M halts on no input} is not decidable CH=C(H)-{x: not encoding a TM}

Rice’s Theorem A (nontrivial) property P of languages is a subset of all languages – such that there is a language (accepted by a TM) with P and a language (accepted by a TM) without P Theorem: Let L(P)={ : L M has property P}, where P is a nontrivial property – Then: L(P) is not decidable Example: { : f M can be computed in polynomial time} – Note: M might not run in polynomial time Not an example: { : M runs 100 steps on the empty input}

Proof [Rice] We assume that ; does not have property P – Otherwise we use the complement of P Denote by A some TM such that L A has property P – Must exist since P is not trivial We show that U · L P Given, x we construct M x : – Simulate M on x – If M accepts x then simulate A on the input u to M x – If M does not accept x go into infinite loop Now:,x 2 U ) M accepts x ) M x accepts u iff A accepts u ) M x behaves like A and L(M x ) has property P,x not in U ) M x will not halt ) L(M x ) is empty, L(M x ) does not have property P

Nondeterminism Consider the set of languages that can be accepted by nondeterministic TM that always halt As before we can see that these can be simulated by deterministic TM that run in exponentially more time Corollary: Computability by deterministic and nondeterministic TM is the same as long as the TM must halt What if the NTM does not need to halt?

One-sided decisions For NP it does not matter if the NTM halts on inputs not in the language, because we have a time upper bound and can stop the machine after that time If there is no time bound we never know if the machine might still accept Definition: A language L is recognizable if there is a TM that accepts it (which might never stop on inputs outside of L).

Example Halting problem HALT Simply simulate M on x If M halts on x, accept Clearly: all,x that are in HALT are accepted, all other,x are not accepted Theorem: HALT is recognizable Similar: H={ : M accepts some x} is recognizable

Complements Theorem: – If L and C(L) are recognizable, then L is decidable Proof: – There are recognizers M and N for L and C(L) – Idea: simulate both in parallel Simulate M for a few steps, then N, then M again... – One of them stops: can make the decision – x 2 L then M accepts and our machine also accepts – x 2 C(L) then N accepts and our machine rejects

Complements Corollary: the following situations are possible: – L and C(L) both decidable – L recognizable but C(L) not recognizable and both not decidable – both L and C(L) not recognizable Example: HALT is not decidable but recognizable, hence C(HALT) not recognizable

Not recognizable Theorem: Assume L · S. If L is not recognizable then S is not recognizable – Proof: If S is recognizable, we can recognize L by computing the reduction and then using the recognizer for S Theorem: C(U) is not recognizable Proof: Enough to show that U is recognizable, since U is not decidable How? Simulate M on x.

Not recognizable Theorem: EQ is not recognizable – Reduction from C(H)={ : M halts on no x} – Given find N: N simulates M and accepts if M halts – Map to,, where S does not accept anything – Then: 2 C(H), N accepts nothing,, 2 EQ

Not recognizable Theorem: C(EQ) is not recognizable Proof: – C(EQ)={, : L M  L N } – Reduction from C(U) – N: ignore input, simulate M on x, accept if M accepts – S: accept every input – Map, x to, – If M is in C(U) them M rejects x or never halts. Then N rejects or never halts on every input, then N and S do not accept the same language – If M is not in C(U), then M accepts x, then N accepts everything, then N and S accept the same language

Corollary There are languages such the neither L not C(L) are recognizable

Enumerable Definition: L is enumerable, if there is a Turing machine M that writes all strings in L to a special output tape – M has no input and runs forever Theorem: L is enumerable iff L is recognizable – Proof: ) : Enumerate L, test each output against x, once x is found, accept

Back direction of the proof Idea: loop over all inputs, and write the accepted ones to the output tape Problem: TM does not halt Solution: Dove-Tailing: – Loop over all strings x – Loop over all integers i – Simulate M on x for i steps. – If M accepts, write x to the output tape Clearly this machine eventually writes all recognized strings to the tape

Other problems? All problems so far concern Turing machines Any other undecidable problems? Example: Arithmetic – Given a sentence in Peano arithmetic, can it be proved from the Peano axiom [is it a theorem]? – Undecidable – Decidable: remove multiplication, still hard for doubly exponential time [Presburger arithmetic]

Hilbert’s 10 th problem A Diophantine equation is p(x 1,…,x n )=0, where p is a polynomial with integer coefficients Question: Are there integer solutions? Example: a n +b n =c n, are there integer solutions for n>2? – There are none, but this slide is too small for the proof… Theorem [Matiyasevich ’70]: The problem of solving Diophantine Equations is uncomputable

Example: Posts’ correspondence problem Given two sequences of strings – example: A=[a, ab, bba] and B=[baa, aa, bb] Can we find a set of indices such that the corresponding strings are the same(concatenated? Example: 3,2,3,1 – bba ab bba a = bb aa bb baa Problem is undecidable