Computability Theory

Similar documents
Decidability (intro.)

Computability Theory

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

CSE 105 THEORY OF COMPUTATION

CSE 105 THEORY OF COMPUTATION

CSE 105 THEORY OF COMPUTATION

Computability and Complexity

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

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

ACS2: Decidability Decidability

MTAT Introduction to Theoretical Computer Science

FORMAL LANGUAGES, AUTOMATA AND COMPUTATION

Theory of Computation (IX) Yijia Chen Fudan University

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

Intro to Theory of Computation

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

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

Context-Free Languages

CSE 105 THEORY OF COMPUTATION

CSE 105 THEORY OF COMPUTATION

CSE 105 THEORY OF COMPUTATION

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

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

UNIT-VIII COMPUTABILITY THEORY

CS:4330 Theory of Computation Spring Regular Languages. Finite Automata and Regular Expressions. Haniel Barbosa

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

Equivalence of TMs and Multitape TMs. Theorem 3.13 and Corollary 3.15 By: Joseph Lauman

CSE 105 THEORY OF COMPUTATION

CS 154, Lecture 2: Finite Automata, Closure Properties Nondeterminism,

COM364 Automata Theory Lecture Note 2 - Nondeterminism

Homework Assignment 6 Answers

1 Showing Recognizability

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

Lecture 12: Mapping Reductions

CSE 105 THEORY OF COMPUTATION

2017/08/29 Chapter 1.2 in Sipser Ø Announcement:

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

Reducability. Sipser, pages

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

Computability Theory

CS154, Lecture 10: Rice s Theorem, Oracle Machines

CSCE 551 Final Exam, Spring 2004 Answer Key

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

CSE 105 THEORY OF COMPUTATION

CSE 105 THEORY OF COMPUTATION

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

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

Decidable and undecidable languages

CSE 105 THEORY OF COMPUTATION

CSE 311: Foundations of Computing. Lecture 23: Finite State Machine Minimization & NFAs

Foundations of

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

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

CSCC63 Worksheet Turing Machines

V Honors Theory of Computation

CS 154 Formal Languages and Computability Assignment #2 Solutions

Automata Theory. Lecture on Discussion Course of CS120. Runzhe SJTU ACM CLASS

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

Chapter 3: The Church-Turing Thesis

CpSc 421 Final Exam December 15, 2006

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

CS 530: Theory of Computation Based on Sipser (second edition): Notes on regular languages(version 1.1)

Nondeterministic Finite Automata

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

Computability Theory. CS215, Lecture 6,

Chapter 6: NFA Applications

September 7, Formal Definition of a Nondeterministic Finite Automaton

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

Part I: Definitions and Properties

Finite Automata. Finite Automata

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

1 Unrestricted Computation

Computation Histories

Decision, Computation and Language

Decidability (What, stuff is unsolvable?)

Turing Machines Part III

Turing machines COMS Ashley Montanaro 21 March Department of Computer Science, University of Bristol Bristol, UK

Deterministic Finite Automata. Non deterministic finite automata. Non-Deterministic Finite Automata (NFA) Non-Deterministic Finite Automata (NFA)

Equivalence of DFAs and NFAs

FORMAL LANGUAGES, AUTOMATA AND COMPUTABILITY

Chapter 5. Finite Automata

CPSC 421: Tutorial #1

Finite Automata. Mahesh Viswanathan

SE 3310b Theoretical Foundations of Software Engineering. Turing Machines. Aleksander Essex

BBM402-Lecture 11: The Class NP

CpSc 421 Homework 9 Solution

jflap demo Regular expressions Pumping lemma Turing Machines Sections 12.4 and 12.5 in the text

4.2 The Halting Problem

1. Provide two valid strings in the languages described by each of the following regular expressions, with alphabet Σ = {0,1,2}.

FORMAL LANGUAGES, AUTOMATA AND COMPUTABILITY

Lecture 3: Nondeterministic Finite Automata

Please give details of your answer. A direct answer without explanation is not counted.

Chomsky Normal Form and TURING MACHINES. TUESDAY Feb 4

Let us first give some intuitive idea about a state of a system and state transitions before describing finite automata.

Theory of Computation

Griffith University 3130CIT Theory of Computation (Based on slides by Harald Søndergaard of The University of Melbourne) Turing Machines 9-0

CS5371 Theory of Computation. Lecture 5: Automata Theory III (Non-regular Language, Pumping Lemma, Regular Expression)

Theory of Computation

CSE 311 Lecture 25: Relating NFAs, DFAs, and Regular Expressions. Emina Torlak and Kevin Zatloukal

Turing Machines. Fall The Chinese University of Hong Kong. CSCI 3130: Formal languages and automata theory

Transcription:

CS:4330 Theory of Computation Spring 2018 Computability Theory Decidable Languages Haniel Barbosa

Readings for this lecture Chapter 4 of [Sipser 1996], 3rd edition. Section 4.1.

Decidable Languages We use languages to represent various computational problems because we have a terminology for dealing with languages We develop examples of languages that are decidable by algorithms Definition (Decidability) A language is decidable if there is an algorithm (i.e. a Turing Machine decider) to recognize it. 1 / 10

Acceptance in DFAs as a Membership Problem Consider the acceptance problem for DFAs: test whether a particular finite automaton accepts a given string This can be expressed as a language: A DFA A DFA contains the encodings of all DFAs together with strings the DFAs accept, i.e. A DFA = { B,w B is a DFA that accepts the string w} Therefore testing whether DFA B accepts w is the same as testing whether B,w A DFA Other computational problems are formulated in terms of testing membership in a language To show that a computational problem is decidable is to show that the encoding of the problem is decidable 2 / 10

Decidability of acceptance problems for DFAs Theorem A DFA is a decidable language. Proof idea: construct a TM M that decides A DFA M = On input string B,w, where B is a DFA and w is a string: 1. Simulate B on w 2. If the simulation ends in an accept state then accept; otherwise reject. 3 / 10

Performing the simulation B,w is a representation of a DFA B together with a string w. One can represent B by a list of its five components: (Q, Σ, δ, q 0, F) When M receives an input it checks first whether this input represents a DFA B and a string w, otherwise reject If the input is right, M keeps track of B s current state and B s current position in w by writing this information on its tape Initially the state of B is q 0 and B s current position is the leftmost symbol of w; the states and position are updated according to δ When M finishes processing the last symbol of w, M accepts if B is in a final state and rejects otherwise 4 / 10

Acceptance problem for NFAs Theorem A NFA = { B,w B is an NFA that accepts the string w} is a decidable language Proof idea: construct a TM N that decides A NFA. By using the TM M that decides A DFA, N first converts its input NFA to a DFA by the usual technique. N = On input string B,w, where B is an NFA and w is a string: 1. Convert B to a DFA C 2. Run M on C,w 3. If M accepts, accept; otherwise reject. Note Running M in stage 2 means incorporating M into the design of N as a subprocedure. 5 / 10

Acceptance problem for regular expressions We can similarly determine whether a regular expression generates a given string. Theorem A REX = { R,w R is a regular expresion that generates the string w} is a decidable language What would be the proof idea? 6 / 10

Emptiness Problem Another kind of problems concerning FAs in the emptiness testing Is the language of a DFA empty? Consider the language E DFA = { A A is a DFA and L (A) = } 7 / 10

Decidability of the emptiness problem for DFAs Theorem E DFA is a decidable language. Proof idea A DFA accepts some string if and only if it is possible to reach a final state from the start state by applying its state transition function To test this condition we can construct a TM T that marks states of a DFA in a similar manner as testing whether a graph is connected 8 / 10

Decidability of the emptiness problem for DFAs Theorem E DFA is a decidable language. Proof idea A DFA accepts some string if and only if it is possible to reach a final state from the start state by applying its state transition function To test this condition we can construct a TM T that marks states of a DFA in a similar manner as testing whether a graph is connected T = On input string 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 final state is marked, accept, otherwise reject. 8 / 10

Language Equality For two DFAs A and B, is L (A) = L (B)? This class of problems amounts to testing membership in the language EQ DFA = { A,B A,B are DFAs, and L (A) = L (B)} 9 / 10

Language Equality For two DFAs A and B, is L (A) = L (B)? This class of problems amounts to testing membership in the language EQ DFA = { A,B A,B are DFAs, and L (A) = L (B)} Definition (Symmetric Difference) Two languages L 1 and L 2 are equal if their symmetric difference is empty, i.e. ( L1 L 2 ) ( L1 L 2 ) = 9 / 10

Language Equality For two DFAs A and B, is L (A) = L (B)? This class of problems amounts to testing membership in the language EQ DFA = { A,B A,B are DFAs, and L (A) = L (B)} Definition (Symmetric Difference) Two languages L 1 and L 2 are equal if their symmetric difference is empty, i.e. ( L1 L 2 ) ( L1 L 2 ) = Then deciding membership in EQ DFA can be done in terms of the symmetric difference of the languages of the two DFAs and the emptiness problem. 9 / 10

Decidability of the equality problem for DFAs Theorem EQ DFA is a decidable language. Proof idea Construct a DFA C from A and B such that C accepts only strings accepted either by A or by B but not by both. If L (A) = L (B), then L (C) = To test this condition we can construct a TM F in terms of the TM T for deciding the emptiness problem. 10 / 10

Decidability of the equality problem for DFAs Theorem EQ DFA is a decidable language. Proof idea Construct a DFA C from A and B such that C accepts only strings accepted either by A or by B but not by both. If L (A) = L (B), then L (C) = To test this condition we can construct a TM F in terms of the TM T for deciding the emptiness problem. F = On input string A,B, where A and B are DFAs: 1. Construct DFA C as described 2. Run TM T on C 3. If T accepts, accept, otherwise reject. 10 / 10