Download presentation
Presentation is loading. Please wait.
1
CS Master – Introduction to the Theory of Computation Jan Maluszynski - HT 20076.1 Lecture 6 Decidability Jan Maluszynski, IDA, 2007 http://www.ida.liu.se/~janma janma @ ida.liu.se
2
CS Master – Introduction to the Theory of Computation Jan Maluszynski - HT 20076.2 Outline Lecture 6 : Decidability (Sipser 4.1 – 4.2) 1.Motivation 2.What is a problem? Problem vs. Language 3.Decidable and semi-decidable problems. 4.Examples of decidable problems 5.Undecidability: the diagonalization method 6.The halting problem is undecidable 7.More examples of undecidable problems 8.Existence of unrecognizable languages. 9.Reducibility and examples of its application
3
CS Master – Introduction to the Theory of Computation Jan Maluszynski - HT 20076.3 Computational problems vs. Languages Computational problem: a function from input data to output data more generally a relation R on data Data encoded as strings Relations encoded as set of strings For a given encoding R is represented as a language Computing R => generating strings of
4
CS Master – Introduction to the Theory of Computation Jan Maluszynski - HT 20076.4 Example Problems and their languages Acceptance Problem for DFA: check if a given DFA accepts a given string. Language: A DFA = { | B is aDFA that accepts w} Emptiness Problem for DFA E DFA = { | A is a DFA and L(A) is empty} Equivalence Problem for DFA EQ DFA = { | A,B are DFAs and L(A)=L(B)}
5
CS Master – Introduction to the Theory of Computation Jan Maluszynski - HT 20076.5 Decidable Problems An algorithm for a Computational Problem R is a Turing Machine that recognizes/generates the language A problem R is decidable iff there exists a TM that decides. Encoding is a one-one onto function. Thus there is a correspondence between different encodings.
6
CS Master – Introduction to the Theory of Computation Jan Maluszynski - HT 20076.6 Examples of Decidable Problems All problems in slide 4, e.g.: DFA Acceptance Problem: Construct a TM that on input simulates B on w If the simulation ends in accept state accept, otherwise reject Parsing problem for CFG argue why Emptiness problem for CFG argue why
7
CS Master – Introduction to the Theory of Computation Jan Maluszynski - HT 20076.7 An Undecidable Problem Given a TM M and a string w check if M accepts w A TM = { | M is a TM that accepts w} Simulation of M on w may loop! But A TM is Turing-recognizable
8
CS Master – Introduction to the Theory of Computation Jan Maluszynski - HT 20076.8 A TM is undecidable Assume the contrary: there exists a TM H that accepts if M accepts w rejects otherwise Construct TM D that runs on descriptions of TM’s: on input D runs H on input > and: accepts if M does not accept rejects if M accepts D( ) accepts if D does not accept rejects if D accepts : contradiction
9
CS Master – Introduction to the Theory of Computation Jan Maluszynski - HT 20076.9 Turing-unrecognizable languages The set of all Turing machines is countable The set of all languages over a given alphabet is not countable! There are languages not recognizable by a TM! Turing-unrecognizable languages
10
CS Master – Introduction to the Theory of Computation Jan Maluszynski - HT 20076.10 A Turing-unrecognizable language L is decidable iff both L and its complement are Turing-recognizable. Explain why! A TM = { | M is a TM that accepts w} We proved A TM is undecidable and Turing- recognizable Hence the complement of A TM is Turing- unrecognizable
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.