What languages are Turing-decidable? What languages are not Turing-decidable? Is there a language that isn t even Turingrecognizable?

Similar documents
CS 301. Lecture 18 Decidable languages. Stephen Checkoway. April 2, 2018

Decidability (intro.)

Theory of Computation (IX) Yijia Chen Fudan University

} Some languages are Turing-decidable A Turing Machine will halt on all inputs (either accepting or rejecting). No infinite loops.

CSE 105 THEORY OF COMPUTATION

ACS2: Decidability Decidability

CS5371 Theory of Computation. Lecture 12: Computability III (Decidable Languages relating to DFA, NFA, and CFG)

CSE 105 THEORY OF COMPUTATION

Computability Theory

Chap. 4,5 Review. Algorithms created in proofs from prior chapters

FORMAL LANGUAGES, AUTOMATA AND COMPUTATION

Decidability. Overview. Preliminaries to Halting Problem. Decidable Problems of Regular Languages. Decidable Problems of Context-Free Languages

Decidability. Human-aware Robotics. 2017/10/31 Chapter 4.1 in Sipser Ø Announcement:

CSE 105 THEORY OF COMPUTATION

acs-07: Decidability Decidability Andreas Karwath und Malte Helmert Informatik Theorie II (A) WS2009/10

Computability Theory

Mapping Reducibility. Human-aware Robotics. 2017/11/16 Chapter 5.3 in Sipser Ø Announcement:

CSE 105 THEORY OF COMPUTATION

Theory of Computation

CSCE 551: Chin-Tser Huang. University of South Carolina

Intro to Theory of Computation

CSE 105 THEORY OF COMPUTATION

Theory of Computation p.1/?? Theory of Computation p.2/?? We develop examples of languages that are decidable

CSE 105 THEORY OF COMPUTATION

CSE 105 THEORY OF COMPUTATION

Decidability (What, stuff is unsolvable?)

CSCE 551: Chin-Tser Huang. University of South Carolina

FORMAL LANGUAGES, AUTOMATA AND COMPUTABILITY

Decidable and undecidable languages

V Honors Theory of Computation

Intro to Theory of Computation

FORMAL LANGUAGES, AUTOMATA AND COMPUTABILITY

Reducability. Sipser, pages

CS5371 Theory of Computation. Lecture 10: Computability Theory I (Turing Machine)

UNIT-VIII COMPUTABILITY THEORY

AC68 FINITE AUTOMATA & FORMULA LANGUAGES DEC 2013

CS5371 Theory of Computation. Lecture 10: Computability Theory I (Turing Machine)

Midterm Exam 2 CS 341: Foundations of Computer Science II Fall 2018, face-to-face day section Prof. Marvin K. Nakayama

Chomsky Normal Form and TURING MACHINES. TUESDAY Feb 4

Computability and Complexity

Computational Models Lecture 8 1

Computational Models Lecture 8 1

MA/CSSE 474 Theory of Computation

1 Reducability. CSCC63 Worksheet Reducability. For your reference, A T M is defined to be the language { M, w M accepts w}. Theorem 5.

Undecidable Problems and Reducibility

Homework Assignment 6 Answers

THEORY OF COMPUTATION (AUBER) EXAM CRIB SHEET

NPDA, CFG equivalence

Midterm Exam 2 CS 341: Foundations of Computer Science II Fall 2016, face-to-face day section Prof. Marvin K. Nakayama

Turing Machines. Reading Assignment: Sipser Chapter 3.1, 4.2

Reading Assignment: Sipser Chapter 3.1, 4.2

1 Showing Recognizability

CSE 105 Theory of Computation

CSE 105 THEORY OF COMPUTATION. Spring 2018 review class

CS5371 Theory of Computation. Lecture 14: Computability V (Prove by Reduction)

TURING MAHINES

Computability and Complexity

Computational Models Lecture 8 1

Lecture Notes: The Halting Problem; Reductions

COMP/MATH 300 Topics for Spring 2017 June 5, Review and Regular Languages

DM17. Beregnelighed. Jacob Aae Mikkelsen

Foundations of

Final exam study sheet for CS3719 Turing machines and decidability.

CS20a: Turing Machines (Oct 29, 2002)

COM364 Automata Theory Lecture Note 2 - Nondeterminism

CS 301. Lecture 17 Church Turing thesis. Stephen Checkoway. March 19, 2018

SCHEME FOR INTERNAL ASSESSMENT TEST 3

Undecidability COMS Ashley Montanaro 4 April Department of Computer Science, University of Bristol Bristol, UK

CS154, Lecture 10: Rice s Theorem, Oracle Machines

CS481F01 Solutions 8

INF Introduction and Regular Languages. Daniel Lupp. 18th January University of Oslo. Department of Informatics. Universitetet i Oslo

Lecture 12: Mapping Reductions

Chapter 3: The Church-Turing Thesis

Properties of Context-Free Languages. Closure Properties Decision Properties

CP405 Theory of Computation

MTAT Introduction to Theoretical Computer Science

The Unsolvability of the Halting Problem. Chapter 19

Decidability. Linz 6 th, Chapter 12: Limits of Algorithmic Computation, page 309ff

CSE 105 THEORY OF COMPUTATION

FORMAL LANGUAGES, AUTOMATA AND COMPUTABILITY

Computational Models Lecture 5

An example of a decidable language that is not a CFL Implementation-level description of a TM State diagram of TM

Lecture 23: Rice Theorem and Turing machine behavior properties 21 April 2009

Pushdown Automata. Reading: Chapter 6

CS20a: Turing Machines (Oct 29, 2002)

CSCE 551 Final Exam, Spring 2004 Answer Key

FORMAL LANGUAGES, AUTOMATA AND COMPUTABILITY

CSCE 551 Final Exam, April 28, 2016 Answer Key

Recap DFA,NFA, DTM. Slides by Prof. Debasis Mitra, FIT.

CpSc 421 Final Exam December 15, 2006

TAKE-HOME: OUT 02/21 NOON, DUE 02/25 NOON

6.045: Automata, Computability, and Complexity Or, Great Ideas in Theoretical Computer Science Spring, Class 8 Nancy Lynch

1 Unrestricted Computation

Context Free Languages: Decidability of a CFL

6.045: Automata, Computability, and Complexity Or, Great Ideas in Theoretical Computer Science Spring, Class 10 Nancy Lynch

Further discussion of Turing machines

Exam Computability and Complexity

CSE 105 THEORY OF COMPUTATION

Automata & languages. A primer on the Theory of Computation. Laurent Vanbever. ETH Zürich (D-ITET) October,

CSE 105 Theory of Computation

Transcription:

} We ll now take a look at Turing Machines at a high level and consider what types of problems can be solved algorithmically and what types can t: What languages are Turing-decidable? What languages are not Turing-decidable? Is there a language that isn t even Turingrecognizable?

} We are going to follow Sipser s convention for describing Turing Machines at a high level } If we want to describe a Turing Machine, M, that takes inputs A and B and solves a certain problem, we ll write this as: M = On input <A,B>, where A is a and B is a : Enumerate the steps of the Turing Machine If appropriate result occurs, accept. Otherwise, reject. Using book s notation of putting the TM algorithm in quotes

} Acceptance problem for DFAs A DFA = {<B,w> B is a DFA that accepts input string w} This language is decidable. A high level description of a TM, M, that decides A DFA M = On input <B,w>, where B is a DFA and w is a string: Simulate B on input w If simulation ends in an accepting state, accept. If it ends in a nonaccepting state, reject. Using book s notation of putting the TM algorithm in quotes

} Acceptance problem for NFAs A NFA = {<B,w> B is an NFA that accepts input string w} This language is decidable. N = On input <B,w>, where B is an NFA and w is a string: Use subset construction to convert B to a DFA C Use decider, M, for A DFA on input <C, w> If M accepts, accept If M rejects, reject

} Acceptance problem for Regular Expression A REX = {<R,w> R is a regular expression that describes input string w} This language is decidable. P = On input <R,w>, where R is a regular expression and w is a string: Convert R to an NFA, A Use decider, N, for A NFA on input <A, w> If N accepts, accept If N rejects, reject

} Emptiness test for DFAs E DFA = {<A> A is a DFA and L(A) = Ø} This language is decidable. T = On input <A>, where A is a DFA: Mark start state of A Repeat until no more states get marked Mark any state that has a transition from a marked state If no accept state is marked, accept else reject.

} Equivalence test for DFAs EQ DFA = {<A,B> A and B are DFAs and L(A) = L(B)} Important fact Symmetric difference L(C) = ( L(A) L(B) ) ( L(A) L(B) ) L(C) = Ø iff L(A) = L(B)

} Equivalence test for DFAs EQ DFA = {<A,B> A and B are DFAs and L(A) = L(B)} This language is decidable. F = On input <A,B>, where A and B are DFAs: Construct symmetric difference DFA, C, using Cartesian Product method Run decider, T, for E DFA on input <C> If T accepts, accept. If T rejects, reject.

} Acceptance test for CFGs A CFG = {<G,w> G is a CFG that generates string w} Basic idea: Try all derivations to see if G will generate w. Requires infinite derivations, won t halt on non-accepted input string However, if G is in Chomsky Normal Form, any derivation of w will take 2n-1 steps (for string of length n). Only finite number of these.

} Acceptance test for CFGs A CFG = {<G,w> G is a CFG that generates string w} This language is decidable. S = On input <G,w>, where G is a CFG and w is a string: Convert G to Chomsky Normal Form List all derivations with 2n-1 steps, where w = n (except when n = 0, in which case list all derivations with 1 step). If any of these derivations generate w, accept, else reject.

} Emptiness test for CFGs E CFG = {<G> G is a CFG and L(G) = Ø} Basic idea: Cannot just test strings for membership in G using decider for A CFG Infinite number of w. Instead Like E DFA but from the opposite direction Find variables that will generate a string of terminals. If start variable is in this set, L(G) not empty.

} Emptiness test for CFGs E CFG = {<G> G is a CFG and L(G) = Ø} This language is decidable. R = On input <G>, where G is a CFG: Mark all terminals of G Mark empty string symbol Repeat until no more variables get marked Mark any variable A where AèU 1 U 2 U n and all U i have been marked. If start variable is not marked, accept else reject.

} Avoid infinite loops } Constructions allowed Build DFAs Minimize DFAs Subset construction Cartesian product construction } Appeal to known results Use already established decider TM as part of solution Derive an if and only if relation

} Every context-free language is decidable Basic idea: We could create a TM to simulate a PDA, but problem with infinite loop in using stack. Some strings that are not accepted might infinitely modify the stack, leading to non-halting behavior. Instead, use the membership test for CFGs just developed.

} Every context-free language is decidable Let G be the CFG that generates L. Must create a TM, M G, that will accept strings in L, and reject strings not in L. M G = On input string w: Run decider, S, for A CFG with input <G,w> If S accepts, accept else reject.

Turing-Recognizable Decidable Context Free Deterministic Context Free Finite Regular