Donghyun (David) Kim Department of Mathematics and Computer Science North Carolina Central University 1 Chapter 4 Decidability Some slides are in courtesy.

Slides:



Advertisements
Similar presentations
INHERENT LIMITATIONS OF COMPUTER PROGRAMS CSci 4011.
Advertisements

Variants of Turing machines
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 COMP 382: Reasoning about algorithms Unit 9: Undecidability [Slides adapted from Amos Israeli’s]
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.
Introduction to Computability Theory
The Halting Problem Sipser 4.2 (pages ). CS 311 Mount Holyoke College 2 Taking stock All languages Turing-recognizable Turing-decidable Context-free.
The Halting Problem Sipser 4.2 (pages ).
1 Introduction to Computability Theory Lecture13: Mapping Reductions Prof. Amos Israeli.
CSCI 2670 Introduction to Theory of Computing October 19, 2005.
Prof. Busch - LSU1 Decidable Languages. Prof. Busch - LSU2 Recall that: A language is Turing-Acceptable if there is a Turing machine that accepts Also.
Courtesy Costas Busch - RPI1 A Universal Turing Machine.
1 Linear Bounded Automata LBAs. 2 Linear Bounded Automata are like Turing Machines with a restriction: The working space of the tape is the space of the.
1 Undecidability Andreas Klappenecker [based on slides by Prof. Welch]
Decidability. Why study un-solvability? When a problem is algorithmically unsolvable, we realize that the problem must be simplified or altered before.
Decidable and undecidable problems deciding regular languages and CFL’s Undecidable problems.
1 Uncountable Sets continued Theorem: Let be an infinite countable set. The powerset of is uncountable.
CHAPTER 4 Decidability Contents Decidable Languages
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.
Fall 2005Costas Busch - RPI1 Recursively Enumerable and Recursive Languages.
Fall 2004COMP 3351 A Universal Turing Machine. Fall 2004COMP 3352 Turing Machines are “hardwired” they execute only one program A limitation of Turing.
CS 310 – Fall 2006 Pacific University CS310 The Halting Problem Section 4.2 November 15, 2006.
1 Introduction to Computability Theory Lecture11: The Halting Problem Prof. Amos Israeli.
Fall 2015 COMP 2300 Discrete Structures for Computation Donghyun (David) Kim Department of Mathematics and Physics North Carolina Central University 1.
The Halting Problem – Undecidable Languages Lecture 31 Section 4.2 Wed, Oct 31, 2007.
1 Undecidability Reading: Chapter 8 & 9. 2 Decidability vs. Undecidability There are two types of TMs (based on halting): (Recursive) TMs that always.
1 1 CDT314 FABER Formal Languages, Automata and Models of Computation Lecture 15-1 Mälardalen University 2012.
Computer Language Theory
Computability Construct TMs. Decidability. Preview: next class: diagonalization and Halting theorem.
Decidable languages Section 4.1 CSC 4170 Theory of Computation.
Fall 2015 COMP 2300 Discrete Structures for Computation Donghyun (David) Kim Department of Mathematics and Physics North Carolina Central University 1.
CS 208: Computing Theory Assoc. Prof. Dr. Brahim Hnich Faculty of Computer Sciences Izmir University of Economics.
1 Turing’s Thesis. 2 Turing’s thesis: Any computation carried out by mechanical means can be performed by a Turing Machine (1930)
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.
Computability Universal Turing Machine. Countability. Halting Problem. Homework: Show that the integers have the same cardinality (size) as the natural.
CS 461 – Nov. 7 Decidability concepts –Countable = can number the elements  –Uncountable = numbering scheme impossible  –A TM undecidable –Language classes.
Donghyun (David) Kim Department of Mathematics and Computer Science North Carolina Central University 1 Chapter 7 Time Complexity Some slides are in courtesy.
Donghyun (David) Kim Department of Mathematics and Physics North Carolina Central University 1 Chapter 1 Regular Languages Some slides are in courtesy.
CSCI 2670 Introduction to Theory of Computing October 13, 2005.
Recursively Enumerable and Recursive Languages
Donghyun (David) Kim Department of Mathematics and Physics North Carolina Central University 1 Chapter 2 Context-Free Languages Some slides are in courtesy.
Donghyun (David) Kim Department of Mathematics and Computer Science North Carolina Central University 1 Chapter 5 Reducibility 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.
CSC 3130: Automata theory and formal languages Andrej Bogdanov The Chinese University of Hong Kong Undecidable.
1 A Universal Turing Machine. 2 Turing Machines are “hardwired” they execute only one program A limitation of Turing Machines: Real Computers are re-programmable.
The Acceptance Problem for TMs
A Universal Turing Machine
Recursively Enumerable Languages
Recursively Enumerable and Recursive Languages
CSCI 2670 Introduction to Theory of Computing
Busch Complexity Lectures: Reductions
Lecture12 The Halting Problem
CSCI 2670 Introduction to Theory of Computing
Reductions Costas Busch - LSU.
BCS 2143 Theory of Computer Science
Busch Complexity Lectures: Undecidable Problems (unsolvable problems)
Decidable Languages Costas Busch - LSU.
Formal Languages, Automata and Models of Computation
Theory of Computability
CSE 105 theory of computation
Theory of Computability
CSCI 2670 Introduction to Theory of Computing
Cpt S 317: Spring 2009 Reading: Chapter 8 & 9
Instructor: Aaron Roth
Presentation transcript:

Donghyun (David) Kim Department of Mathematics and Computer Science North Carolina Central University 1 Chapter 4 Decidability Some slides are in courtesy of Prof. Verma at Univ. of Houston, Max Alekseyev at Univ. of South Carolina Spring 2016 CISG 5115 Theory of Computation

Spring 2016 CISG 5115 Department of Mathematics and Physics Donghyun (David) Kim North Carolina Central University Turing Machine: Languages Recall that a collection of strings that a TM M “accepts” is called the language of M or language “recognized” by M, denoted L ( M ). Definition A language is Turing-recognizable (or recursively enumerable) if it is recognized by some Turing machine. 2

Spring 2016 CISG 5115 Department of Mathematics and Physics Donghyun (David) Kim North Carolina Central University Turing Machine: Languages – cont’ A TM M on an input that is not in L ( M ) can either reject or loop. We distinguish TMs that never loop and call them “deciders”. A decider M decides the language that it recognizes. Definition A language is decidable (or recursive) if it is decided by some Turing machine. It is easy to see that the complement of a decidable language is also decidable. 3

Spring 2016 CISG 5115 Department of Mathematics and Physics Donghyun (David) Kim North Carolina Central University Decidable Problems concerning Regular Language (RL) Acceptance problem for DFAs of testing whether a particular deterministic finite automation accepts a given string can be expressed as a language, A DFA = { | B is a DFA that accepts input string w }. The problem of testing whether a DFA B accepts an input w is the same as the problem of testing whether is a member of the language A DFA. 4

Spring 2016 CISG 5115 Department of Mathematics and Physics Donghyun (David) Kim North Carolina Central University Decidable Problems concerning Regular Language (RL) – cont’ A DFA = { | B is a DFA that accepts string w } Theorem: A DFA is decidable. Proof: we need to present a TM that decides A DFA. Idea is to “execute” given B on the given input w within our TM. Check that the input represents a valid DFA B (a list of five components ) and a valid string w over the alphabet of B (i.e., ). Perform a simulation (after constructing ) When M finishes processing the last symbol of w, M accepts the input if B is in an accepting state; M rejects the input if B is a non-accepting state. 5

Spring 2016 CISG 5115 Department of Mathematics and Physics Donghyun (David) Kim North Carolina Central University Decidable Problems concerning Regular Language (RL) – cont’ A NFA = { | B is a NFA that accepts string w } A REX = { | B is a regular expression that accepts string w } Theorem: A NFA and A REX are decidable Proof: Idea is to construct a TM that first converts a given NFA (or regular expression) into an equivalent DFA (or NFA to DFA), and then executes this DFA as done in the previous slide 6

Spring 2016 CISG 5115 Department of Mathematics and Physics Donghyun (David) Kim North Carolina Central University Decidable Problems concerning Regular Language (RL) – cont’ 7

Spring 2016 CISG 5115 Department of Mathematics and Physics Donghyun (David) Kim North Carolina Central University Decidable Problems concerning Regular Language (RL) – cont’ 8

Spring 2016 CISG 5115 Department of Mathematics and Physics Donghyun (David) Kim North Carolina Central University Decidable Problems concerning Context-free Languages (CFL) 9

Spring 2016 CISG 5115 Department of Mathematics and Physics Donghyun (David) Kim North Carolina Central University Decidable Problems concerning Context-free Languages (CFL) – cont’ 10

Spring 2016 CISG 5115 Department of Mathematics and Physics Donghyun (David) Kim North Carolina Central University Relationship among languages 11

Spring 2016 CISG 5115 Department of Mathematics and Physics Donghyun (David) Kim North Carolina Central University Decidable vs. Undecidable Languages 12

Spring 2016 CISG 5115 Department of Mathematics and Physics Donghyun (David) Kim North Carolina Central University Decidable vs. Undecidable Languages 13

Spring 2016 CISG 5115 Department of Mathematics and Physics Donghyun (David) Kim North Carolina Central University Halting Problem A TM is recognizable For a given pair, we need simply to simulate M on the input w, and accept or reject depending on whether M accepts or rejects. Note that M may loop in which case our simulation will loop as well, making it just a recognizer not a decider. 14

Spring 2016 CISG 5115 Department of Mathematics and Physics Donghyun (David) Kim North Carolina Central University Halting Problem – cont’ If we were able to determine whether M would ever stop on a given input w, a TM for A TM could reject given as soon as it determined that M would loop on w. In this case it would be a decider for A TM (which accepts if M accepts; and rejects if M rejects or loops). Therefore, the crucial point is determination of whether M would ever stop on a given input w, giving the name “Halting Problem” to A TM. In these new terms, our goal is to prove that the halting problem is undecidable. 15

Spring 2016 CISG 5115 Department of Mathematics and Physics Donghyun (David) Kim North Carolina Central University Sets and Their Cardinalities It is easy to tell whether two given finite sets (such as {5, 7, 23} and { a, b, c } have the same size - just count up their elements and compare the counts. But is there a way to compare sizes of two infinite sets? Obviously, counting elements won't help as it would never end. But can we determine that two sets have equal sizes without counting their elements? 16

Spring 2016 CISG 5115 Department of Mathematics and Physics Donghyun (David) Kim North Carolina Central University Sets and Their Cardinalities – cont’ 17

Spring 2016 CISG 5115 Department of Mathematics and Physics Donghyun (David) Kim North Carolina Central University One-to-one, onto, correspondence 18

Spring 2016 CISG 5115 Department of Mathematics and Physics Donghyun (David) Kim North Carolina Central University One-to-one, onto, correspondence – cont’ 19

Spring 2016 CISG 5115 Department of Mathematics and Physics Donghyun (David) Kim North Carolina Central University Some Properties 1.the union of a finite number of finite sets is finite, 2.the union of a finite or infinite number of countable sets is countable, 3.the power set of a finite set is finite, 4.the power set of an infinite set is uncountable. The last property is proved by an important technique called diagonalization. For the proof of countability of the (positive) rationals Q and uncountability of the reals R, see pp of the textbook. 20

Spring 2016 CISG 5115 Department of Mathematics and Physics Donghyun (David) Kim North Carolina Central University Coutability of Languages and TMs 21

Spring 2016 CISG 5115 Department of Mathematics and Physics Donghyun (David) Kim North Carolina Central University Halting Problem is Undecidable Show A TM = { | M is a TM and M accepts w } is NOT decidable. Assume that A TM is decidable and let H be a decider for it (i.e., H ( ) accepts if M accepts w ; and rejects otherwise). Define a new TM D which on input runs H on input > and outputs opposite to what H outputs. D( ): if D accepts then (by the definition of D ) H rejects > implying (by the definition of H ) that M does not accept D( ): if D accepts then H rejects > implying that D does not accept if D rejects then H accepts > implying that D accepts Contradiction! 22

Spring 2016 CISG 5115 Department of Mathematics and Physics Donghyun (David) Kim North Carolina Central University Turing-Unrecognizable languages The complement of a language is the language consisting of all strings that are not in the language. Theorem A language is decidable iff it is Turing-recognizable and co-Turing-recognizable (i.e., its complement is Turing- recognizable). Corollary is not Turing-recognizable. Otherwise, A TM is Turing- decidable, which is not true. 23