1Computer Sciences Department. Book: INTRODUCTION TO THE THEORY OF COMPUTATION, SECOND EDITION, by: MICHAEL SIPSER Reference 3Computer Sciences Department.

Slides:



Advertisements
Similar presentations
By John E. Hopcroft, Rajeev Motwani and Jeffrey D. Ullman
Advertisements

Applied Computer Science II Chapter 4: Decidability Prof. Dr. Luc De Raedt Institut für Informatik Albert-Ludwigs Universität Freiburg Germany.
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.
THE CHURCH-TURING T H E S I S “ TURING MACHINES” Pages COMPUTABILITY THEORY.
CSCI 4325 / 6339 Theory of Computation Zhixiang Chen Department of Computer Science University of Texas-Pan American.
1 Introduction to Computability Theory Lecture14: Recap Prof. Amos Israeli.
1 Introduction to Computability Theory Lecture12: Decidable Languages Prof. Amos Israeli.
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 ).
Mapping Reducibility Sipser 5.3 (pages ). CS 311 Fall Computable functions Definition 5.17: A function f:Σ*→Σ* is a computable function.
Decidable languages Sipser 4.1 (pages ). CS 311 Mount Holyoke College 2 Hierarchy of languages All languages Turing-recognizable Turing-decidable.
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.
Fall 2003Costas Busch - RPI1 Decidability. Fall 2003Costas Busch - RPI2 Recall: A language is decidable (recursive), if there is a Turing machine (decider)
Decidability. Why study un-solvability? When a problem is algorithmically unsolvable, we realize that the problem must be simplified or altered before.
CHAPTER 4 Decidability Contents Decidable Languages
CS 310 – Fall 2006 Pacific University CS310 Decidability Section 4.1/4.2 November 10, 2006.
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.
1 Decidability continued. 2 Undecidable Problems Halting Problem: Does machine halt on input ? State-entry Problem: Does machine enter state halt on input.
Automata & Formal Languages, Feodor F. Dragan, Kent State University 1 CHAPTER 5 Reducibility Contents Undecidable Problems from Language Theory.
Fall 2005Costas Busch - RPI1 Recursively Enumerable and Recursive Languages.
January 28, 2015CS21 Lecture 101 CS21 Decidability and Tractability Lecture 10 January 28, 2015.
CS21 Decidability and Tractability
Fall 2006Costas Busch - RPI1 Undecidable Problems (unsolvable problems)
Prof. Busch - LSU1 Undecidable Problems (unsolvable problems)
1 Introduction to Computability Theory Lecture11: The Halting Problem Prof. Amos Israeli.
CS5371 Theory of Computation Lecture 12: Computability III (Decidable Languages relating to DFA, NFA, and CFG)
Remaining Topics Decidability Concept 4.1 The Halting Problem 4.2
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.
Computer Language Theory
Decidable languages Section 4.1 CSC 4170 Theory of Computation.
1Computer Sciences Department. Book: INTRODUCTION TO THE THEORY OF COMPUTATION, SECOND EDITION, by: MICHAEL SIPSER Reference 3Computer Sciences Department.
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)
CSCI 2670 Introduction to Theory of Computing October 12, 2005.
 2005 SDU Lecture13 Reducibility — A methodology for proving un- decidability.
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.
CS Master – Introduction to the Theory of Computation Jan Maluszynski - HT Lecture 7 Undecidability cont. Jan Maluszynski, IDA, 2007
CS 461 – Nov. 7 Decidability concepts –Countable = can number the elements  –Uncountable = numbering scheme impossible  –A TM undecidable –Language classes.
CSCI 2670 Introduction to Theory of Computing October 13, 2005.
Donghyun (David) Kim Department of Mathematics and Computer Science North Carolina Central University 1 Chapter 4 Decidability Some slides are in courtesy.
Automata & Formal Languages, Feodor F. Dragan, Kent State University 1 CHAPTER 3 The Church-Turing Thesis Contents Turing Machines definitions, examples,
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.
The Church-Turing Thesis Chapter Are We Done? FSM  PDA  Turing machine Is this the end of the line? There are still problems we cannot solve:
CSC 3130: Automata theory and formal languages Andrej Bogdanov The Chinese University of Hong Kong Undecidable.
Decidability.
 2005 SDU Lecture14 Mapping Reducibility, Complexity.
The Acceptance Problem for TMs
CIS Automata and Formal Languages – Pei Wang
This statement is false.
CSCI 2670 Introduction to Theory of Computing
Busch Complexity Lectures: Reductions
Reductions.
CSCI 2670 Introduction to Theory of Computing
Reductions Costas Busch - LSU.
BCS 2143 Theory of Computer Science
Chapter 2 FINITE AUTOMATA.
Busch Complexity Lectures: Undecidable Problems (unsolvable problems)
Undecidable Problems (unsolvable problems)
Summary.
Jaya Krishna, M.Tech, Assistant Professor
Decidable Languages Costas Busch - LSU.
CS21 Decidability and Tractability
Automata, Grammars and Languages
Sub: Theoretical Foundations of Computer Sciences
CIS Automata and Formal Languages – Pei Wang
Presentation transcript:

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 4Computer Sciences Department

5 Objectives

 investigate the power of algorithms to solve problems.  explore the limits of algorithmic solvability.  study this phenomenon “unsolvability”:  the problem must be simplified or altered before you can find an algorithmic solution.  The halting problem 6Computer Sciences Department

DECIDABLE LANGUAGES  Languages that are decidable by algorithms.  For example:  present an algorithm that tests whether a string is a member of a context-free language (CFL). 7Computer Sciences Department

DECIDABLE PROBLEMS CONCERNING REGULAR LANGUAGES  algorithms for testing:  whether a finite automaton accepts a string,  whether the language of a finite automaton is empty, and  whether two finite automata are equivalent. 8Computer Sciences Department

DECIDABLE PROBLEMS CONCERNING REGULAR LANGUAGES (cont.)  For example:  the acceptance problem for DFAs of testing whether a particular deterministic finite automaton accepts a given string can be expressed as a language, A DFA. 9Computer Sciences Department

10Computer Sciences Department

PROOF 4.1  B is simply a list of its five components, Q, A,, qo, and F.  When M receives its input, M first determines whether it properly represents a DFA B and a string w. If not, Al rejects. 11 ƍ Computer Sciences Department

PROOF 4.1 (cont)  It keeps track of B's current state and B's current position in the input w by writing this information down on its tape.  Initially, B's current state is qo and B's current input position is the leftmost symbol of w.  The states and position are updated according to the specified transition function.  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 in a nonaccepting state. 12 ƍ Computer Sciences Department

DECIDABLE PROBLEMS CONCERNING REGULAR LANGUAGES (cont.) 13Computer Sciences Department

NFA PROOF 14 THEOREM 1.39 Every nondeterministic finite automaton has an equivalent deterministic finite automaton. Computer Sciences Department

Regular expressions “REX” 15 PROOF Computer Sciences Department

Emptiness 16 PROOF Computer Sciences Department

THEOREM 4.5 The equivalence problem: EQ DFA is a decidable language. 17Computer Sciences Department

DECIDABLE PROBLEMS CONCERNING CONTEXT-FREE LANGUAGES  Theorem 4.8 E CFG is a decidable language.  Theorem 4.9 Every context-free language is decidable. 18Computer Sciences Department

19 Halt means the process will stop at the accept or the reject state There are two halt states: "accept halt" and "reject halt". Halt = Stop

THE HALTING PROBLEM 20  In computability theory, the halting problem is the problem of determining, from a description of an arbitrary computer program and an input, whether the program will finish running or continue to run forever.  Alan Turing proved in 1936 that a general algorithm to solve the halting problem for all possible program-input pairs cannot exist.  A key part of the proof was a mathematical definition of a computer and program, which became known as a Turing machine; the halting problem is undecidable over Turing machines. Computer Sciences Department

 The halting problem is a decision problem about properties of computer programs on a fixed Turing-complete model of computation, i.e., all programs that can be written in some given programming language that is general enough to be equivalent to a Turing machine. The problem is to determine, given a program and an input to the program, whether the program will eventually halt when run with that input. Computer Sciences Department21 The halting problem is a decision problem

- For example, in pseudocode, the program while (true) continue -does not halt; rather, it goes on forever in an infinite loop. -On the other hand, the program print "Hello, world! print "Hello, world!” does halt. Computer Sciences Department22 Halt - example

Computer Sciences Department23 UNDECIDABILITY

 A language is decidable if some TM decides it  All computations of a decider TM must halt.  Decidable languages are often called also recursive languages.  A language is Turing-recognizable (or recursively enumerable) :  if it is recognized by a TM.  That is, all words in the language are accepted by the TM.  On words not belonging to the language, the computation of the TM either rejects or goes on forever.  Lemma: A language L is decidable if and only if L is decidable. Computer Sciences Department24 Terminology

Computer Sciences Department25 Universal Turing machines

TM recognizer - decider  This theorem shows that recognizers are more powerful than deciders. 26Computer Sciences Department

TM “recognizer – decider” (cont.)  this machine loops on input if M loops on w, which is why this machine does not decide A TM = halting problem. 27Computer Sciences Department

THE DIAGONALIZATION METHOD  The proof of the undecidability of the halting problem uses a technique called diagonalization, discovered by mathematician Georg Cantor in  If we have two infinite sets, how can we tell whether one is larger than the other or whether they are of the same size?  DEFINITION one-to-one. 28Computer Sciences Department

EXAMPLE 1 (countable)  Let N be the set of natural numbers {1, 2, 3,... } and  let Ɛ be the set of even natural numbers {2,4,6,... }.  The correspondence f mapping N to Ɛ is simply f(n) = 2n.  pairing each member of N with its own member of Ɛ is possible, so we declare these two sets to be the same size. 29Computer Sciences Department

 some languages are not decidable or even Turing recognizable, for the reason that there are uncountably many languages yet only countably many Turing machines. 30 EXAMPLE 2 (uncountable) Computer Sciences Department

A TURING-UNRECOGNIZABLE LANGUAGE 31Computer Sciences Department