Download presentation
Presentation is loading. Please wait.
Published byColeen Norman Modified over 8 years ago
1
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
2
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
3
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
4
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
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 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
6
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
7
Spring 2016 CISG 5115 Department of Mathematics and Physics Donghyun (David) Kim North Carolina Central University Decidable Problems concerning Regular Language (RL) – cont’ 7
8
Spring 2016 CISG 5115 Department of Mathematics and Physics Donghyun (David) Kim North Carolina Central University Decidable Problems concerning Regular Language (RL) – cont’ 8
9
Spring 2016 CISG 5115 Department of Mathematics and Physics Donghyun (David) Kim North Carolina Central University Decidable Problems concerning Context-free Languages (CFL) 9
10
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
11
Spring 2016 CISG 5115 Department of Mathematics and Physics Donghyun (David) Kim North Carolina Central University Relationship among languages 11
12
Spring 2016 CISG 5115 Department of Mathematics and Physics Donghyun (David) Kim North Carolina Central University Decidable vs. Undecidable Languages 12
13
Spring 2016 CISG 5115 Department of Mathematics and Physics Donghyun (David) Kim North Carolina Central University Decidable vs. Undecidable Languages 13
14
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
15
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
16
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
17
Spring 2016 CISG 5115 Department of Mathematics and Physics Donghyun (David) Kim North Carolina Central University Sets and Their Cardinalities – cont’ 17
18
Spring 2016 CISG 5115 Department of Mathematics and Physics Donghyun (David) Kim North Carolina Central University One-to-one, onto, correspondence 18
19
Spring 2016 CISG 5115 Department of Mathematics and Physics Donghyun (David) Kim North Carolina Central University One-to-one, onto, correspondence – cont’ 19
20
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.175-178 of the textbook. 20
21
Spring 2016 CISG 5115 Department of Mathematics and Physics Donghyun (David) Kim North Carolina Central University Coutability of Languages and TMs 21
22
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
23
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
Similar presentations
© 2024 SlidePlayer.com. Inc.
All rights reserved.