Theory of Computability

Slides:



Advertisements
Similar presentations
Variants of Turing machines
Advertisements

1 Introduction to Computability Theory Lecture12: Decidable Languages Prof. Amos Israeli.
Reducibility Sipser 5.1 (pages ). CS 311 Fall Reducibility.
Reducibility Sipser 5.1 (pages ).
Decidable languages Sipser 4.1 (pages ). CS 311 Mount Holyoke College 2 Hierarchy of languages All languages Turing-recognizable Turing-decidable.
FORMAL LANGUAGES, AUTOMATA AND COMPUTABILITY
Decidability. Why study un-solvability? When a problem is algorithmically unsolvable, we realize that the problem must be simplified or altered before.
CS 310 – Fall 2006 Pacific University CS310 Decidability Section 4.1/4.2 November 10, 2006.
CS Master – Introduction to the Theory of Computation Jan Maluszynski - HT Lecture 6 Decidability Jan Maluszynski, IDA, 2007
Foundations of (Theoretical) Computer Science Chapter 4 Lecture Notes (Section 4.1: Decidable Languages) David Martin With modifications.
CS5371 Theory of Computation Lecture 12: Computability III (Decidable Languages relating to DFA, NFA, and CFG)
Decidable languages Section 4.1 CSC 4170 Theory of Computation.
CSCI 2670 Introduction to Theory of Computing October 12, 2005.
 2005 SDU Lecture13 Reducibility — A methodology for proving un- decidability.
CSCI 2670 Introduction to Theory of Computing October 13, 2005.
Donghyun (David) Kim Department of Mathematics and Computer Science North Carolina Central University 1 Chapter 4 Decidability Some slides are in courtesy.
 2005 SDU Lecture11 Decidability.  2005 SDU 2 Topics Discuss the power of algorithms to solve problems. Demonstrate that some problems can be solved.
CSCI 3130: Formal languages and automata theory Andrej Bogdanov The Chinese University of Hong Kong Decidable.
Turing Machines- Cont. Theory of Computation Lecture 11 Tasneem Ghnaimat.
CSC 3130: Automata theory and formal languages Andrej Bogdanov The Chinese University of Hong Kong Undecidable.
CSCI 2670 Introduction to Theory of Computing
Theory of Computability
CSCI 2670 Introduction to Theory of Computing
CSCI 2670 Introduction to Theory of Computing
Theory of Computability
Busch Complexity Lectures: Reductions
Reductions.
CSCI 2670 Introduction to Theory of Computing
Reductions Costas Busch - LSU.
Theory of Computability
CSE 105 theory of computation
BCS 2143 Theory of Computer Science
CSC 4170 Theory of Computation Turing reducibility Section 6.3.
CSE 2001: Introduction to Theory of Computation Fall 2013
CSCI 2670 Introduction to Theory of Computing
Intro to Theory of Computation
CSE 105 theory of computation
Intro to Theory of Computation
Jaya Krishna, M.Tech, Assistant Professor
CS154, Lecture 8: Undecidability, Mapping Reductions
CS154, Lecture 8: Undecidability, Mapping Reductions
Decidability of logical theories
CSE 105 theory of computation
CSC 4170 Theory of Computation Decidable languages Section 4.1.
Decidable and undecidable languages
CSCI 2670 Introduction to Theory of Computing
CSCI 2670 Introduction to Theory of Computing
CSC 4170 Theory of Computation Mapping Reducibility Section 5.3.
CSCI 2670 Introduction to Theory of Computing
Theory of Computability
CSCI 2670 Introduction to Theory of Computing
Decidability of logical theories
CSCI 2670 Introduction to Theory of Computing
Theory of Computability
CSE 105 theory of computation
Theory of Computability
Instructor: Aaron Roth
CSC 4170 Theory of Computation Mapping Reducibility Section 5.3.
More undecidable languages
CSCI 2670 Introduction to Theory of Computing
Theory of Computability
Instructor: Aaron Roth
CSE 105 theory of computation
Automata, Grammars and Languages
Intro to Theory of Computation
Intro to Theory of Computation
Intro to Theory of Computation
CSE 105 theory of computation
CSE 105 theory of computation
Presentation transcript:

Theory of Computability Giorgi Japaridze Theory of Computability Decidability Chapter 4

Examples of decidable languages Giorgi Japaridze Theory of Computability Decidable: {1,3,5}  {x | x is even} {x | x is a perfect square} {x | x2-10x = 0} {x | x=y*z for some integers y,z>1 (i.e. x is not prime)} {x | x is a prime (i.e. x is not divisible by anything except 1 and itself)} {<G> | G is a connected graph} {<P> | P is a one-variable polynomial expression with an integral root} Undecidable: {<P> | P is a two-variable polynomial expression with an integral root}

The acceptance problem for DFAs is decidable Giorgi Japaridze Theory of Computability Let ADFA = {<B,w> | B is a DFA that accepts input string w} Theorem 4.1: ADFA is a decidable language. Proof idea: Here is a Turing machine M that decides ADFA: M = “On input <B,w>, where B is a DFA and w is a string: 1. Simulate B on input w. 2. If the simulation ends in an accept state, accept. If the simulation ends in a nonaccept state, reject.”

The acceptance problem for NFAs is decidable Giorgi Japaridze Theory of Computability Let ANFA = {<B,w> | B is an NFA that accepts input string w} Theorem 4.2: ANFA is a decidable language. Proof idea: Here is a Turing machine N that decides ANFA: N = “On input <B,w>, where B is an NFA and w is a string: 1. Convert NFA B to an equivalent DFA C using the procedure for this conversion that we learned. 2. Run TM M from Theorem 4.1 on input <C,w>. 3. If M accepts, accept. If M rejects, reject.”

The emptiness problem for the language of a DFA is decidable Giorgi Japaridze Theory of Computability Let EDFA = {<A> | A is a DFA and L(A)=} Theorem 4.4: EDFA is a decidable language. Proof idea: Here is a Turing machine T that decides EDFA: T = “On input <A>, where A is a DFA: 1. Mark the start state of A. 2. Repeat until no new states get marked: 3. Mark any state that has a transition coming into it from any state that is already marked. 4. If no accept state is marked, accept; otherwise reject.”

Other decidable problems from the language theory Each the following languages are also decidable: EQDFA = {<A,B> | A and B are DFAs and L(A)=L(B)} AREX = {<R,w> | R is a regular expression that generates string w} ACFG = {<G,w> | G is a CFG that generates string w} Theorem 4.9: Every context-free language is decidable. Proof idea: Suppose L is a context-free language. Let G be the CFG that generates L, and S be a TM that decides ACFG. Here is a Turing machine H that decides L: H = “On input w: 1. Run S on input <G,w>. 2. If the machine accepts, accept; if it rejects, reject.”

The universal Turing machine Giorgi Japaridze Theory of Computability Let ATM = {<M,w> | M is a TM and M accepts string w} ATM is misleadingly called the halting problem in the textbook. Instead, we will call it the acceptance problem. Theorem: ATM is Turing-recognizable. Proof idea. The following TM U, called the universal TM, recognizes ATM: U = “On input <M,w>, where M is a TM and w is a string: 1. Simulate M on input w. 2. If M ever enters its accept state, accept; if M ever enters its reject state, reject.” Does U also decide ATM?

Theorem 4.11: ATM is undecidable. Giorgi Japaridze Theory of Computability Theorem 4.11: ATM is undecidable. Proof idea. Suppose, for a contradiction, that ATM is decidable. That is, there is a TM H that decides ATM. Thus, that machine H behaves as follows: accept if M accepts w reject if M does not accept w H(<M,w>) = Using H as a subroutine, we can construct the following TM D: D = “On input <M>, where M is a TM: 1. Run H on input <M,<M>>. 2. Do the opposite of what H does. That is, if H accepts, reject, and if H rejects, accept.” accept if M does not accept <M> reject if M accepts <M> Thus, D(<M>) =

accept if D does not accept <D> reject if D accepts <D> ATM is undecidable 4.2.b.2 Giorgi Japaridze Theory of Computability accept if D does not accept <D> reject if D accepts <D> But then D(<D>) = Contradiction! To summarize: H accepts <M,w> exactly when M accepts w. D rejects <M> exactly when M accepts M. D rejects <D> exactly when D accepts <D>.

A Turing-unrecognizable language Giorgi Japaridze Theory of Computability ATM = {<M,w> | M is a TM and M accepts string w} ATM = {<M,w> | M is a TM and M does not accept string w} Theorem 4.23: A TM is Turing-unrecognizable. Proof idea. Suppose, for a contradiction, that ATM is Turing-recognizable. That is, there is a TM U that recognizes ATM. U recognizes ATM (slide 4.2.a) U recognizes ATM Thus, Let M = “On input w: 1. Run both U and U on input w in parallel; 2. If U accepts, accept; if U accepts, reject.” It can bee seen that M decides ATM, which contradicts Theorem 4.11.

The language hierarchy summary 4.2.d Giorgi Japaridze Theory of Computability All languages Turing-recognizable languages Turing-decidable languages Context-free languages Regular languages {anbn | n0} ATM ATM {anbncn | n0}