Decidability. Why study un-solvability? When a problem is algorithmically unsolvable, we realize that the problem must be simplified or altered before.

Slides:



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

Rice ’ s Theorem. Def: A property of the Turing-recognizable languages is simply a subset of all Turing- recognizable languages.
1 COMP 382: Reasoning about algorithms Unit 9: Undecidability [Slides adapted from Amos Israeli’s]
1 CSC3130 Formal Languages and Automata Theory Tutorial 9 Undecidable Problem KN Hung SHB 1026.
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 ).
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.
Reducibility A reduction is a way of converting one problem into another problem in such a way that a solution to the second problem can be used to solve.
CS 302: Discrete Math II A Review. An alphabet Σ is a finite set (e.g., Σ = {0,1}) A string over Σ is a finite-length sequence of elements of Σ For x.
1 The Chomsky Hierarchy. 2 Unrestricted Grammars: Rules have form String of variables and terminals String of variables and terminals.
Decidable and undecidable problems deciding regular languages and CFL’s Undecidable problems.
CHAPTER 4 Decidability Contents Decidable Languages
CS 310 – Fall 2006 Pacific University CS310 Decidability Section 4.1/4.2 November 10, 2006.
Fall 2004COMP 3351 Reducibility. Fall 2004COMP 3352 Problem is reduced to problem If we can solve problem then we can solve problem.
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.
Courtesy Costas Busch - RPI1 Reducibility. Courtesy Costas Busch - RPI2 Problem is reduced to problem If we can solve problem then we can solve problem.
CS21 Decidability and Tractability
CS5371 Theory of Computation Lecture 12: Computability III (Decidable Languages relating to DFA, NFA, and CFG)
CSCI 2670 Introduction to Theory of Computing November 4, 2004.
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
Computability Construct TMs. Decidability. Preview: next class: diagonalization and Halting theorem.
A Universal Turing Machine
Decidable languages Section 4.1 CSC 4170 Theory of Computation.
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.
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.
Computability Review homework. Video. Variations. Definitions. Enumerators. Hilbert's Problem. Algorithms. Summary Homework: Give formal definition of.
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.
 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.
FORMAL LANGUAGES, AUTOMATA, AND COMPUTABILITY * Read chapter 4 of the book for next time * Lecture9x.ppt.
Recursively Enumerable and Recursive Languages. Definition: A language is recursively enumerable if some Turing machine accepts it.
 2005 SDU Lecture14 Mapping Reducibility, Complexity.
The Acceptance Problem for TMs
This statement is false.
CSCI 2670 Introduction to Theory of Computing
Busch Complexity Lectures: Reductions
Lecture12 The Halting Problem
Reductions Costas Busch - LSU.
CSE 105 theory of computation
BCS 2143 Theory of Computer Science
CSE 2001: Introduction to Theory of Computation Fall 2013
CSCI 2670 Introduction to Theory of Computing
CSE 105 theory of computation
Intro to Theory of Computation
Jaya Krishna, M.Tech, Assistant Professor
Decidable Languages Costas Busch - LSU.
CSC 4170 Theory of Computation Decidable languages Section 4.1.
Decidable and undecidable languages
CS21 Decidability and Tractability
Theory of Computability
Theory of Computability
Cpt S 317: Spring 2009 Reading: Chapter 8 & 9
CSE 105 theory of computation
Automata, Grammars and Languages
CSE 105 theory of computation
Presentation transcript:

Decidability

Why study un-solvability? When a problem is algorithmically unsolvable, we realize that the problem must be simplified or altered before we can find an algorithm solution A glimpse of the unsolvable can stimulate your imagination and help you gain an important perspective on computation

Decidable problems concerning Regular languages A DFA ={ | B is a DFA that accepts w } Thm: A DFA is a decidable language

Proof: M=“On input, where B is DFA and w is a string: 1. Simulate B on input w 2. If the simulation ends in an accept state, accept. If it ends in a non-accepting state, reject.”

A NFA ={ | B is an NFA that accepts w} Thm: A NFA is a decidable language.

Proof: N = “ On input where B is an NFA, and w is a string: 1. Convert NFA B to an equivalent DFA C using the procedure in Thm Run TM M from the previous Thm on input 3. If M accepts, accept; otherwise reject. ”

A REX ={ | R is a regular expression that generates string w } Thm: A REX is a decidable language.

Proof: P= “ On input where R is a regular expression and w is a string. 1. Convert R to an equivalent DFA A by the procedure given in Thm Run TM M on input 3. If M accepts, accept ; if M rejects, reject. “

E DFA = { | A is a DFA and L(A)= ∅ } Thm: E DFA is a decidable language

Proof: T= “ On input where A is a DFA: 1. Mark the start state of A. 2. Repeat until no new state get marked: 3. Mark any state that has a transition coming into it from any state that is already marked. 4. If no accept state is marked, accept; otherwise reject. “

EQ DFA ={ : A and B are DFAs and L(A)=L(B) } Thm: EQ DFA is a decidable language.

Proof: L(C) = ∅ iff L(A)=L(B) L(C) is regular, since regular languages are closed under complementation, union, and intersection. F= “ On input, where A and B are DFAs: 1. Construct DFA C as described 2. Run the TM in the previous Thm on input. 3. If accepts, accept; otherwise reject. “

Decidable problems concerning Context-free languages A CFG ={ : G is a CFG that generates string w} Thm: A CFG is a decidable language

Proof: S=“ On input, where G is a CFG and w is a string: 1. Convert G to Chomsky normal form. 2. List all derivations with 2n-1 steps, where n is the length of w. 3. If any of these derivations generate w, accept; otherwise reject. “

E CFG ={ | G is a CFG and L(G)= ∅ } Thm: E CFG is a decidable language.

Proof: R = “On input, where G is a CFG 1. Mark all terminal symbols in G 2. Repeat until no new variables get marked: 3. Mark all variables A with A  U 1 …U k marked 4. If the start symbol is not marked, ACCEPT; else reject. ”

EQ CFG ={ | G and H are CFL’s and L(G)=L(H) } Not decidable Note that CFL is NOT closed under complementation or intersection. So the same technique for EQ DFA DOES NOT work Thm: Every CFL is decidable.

Proof: Let G be a CFG for A and design a TM M G that decides A M G =“On input w: 1. Run TM S on input 2. If this machine accepts, ACCEPTS; otherwise REJECTS. “ Defined before

Halting Problem A TM ={ | M is a TM and M accepts w } Thm: A TM is un-decidable.

(conti.) U=“On input, where M is a TM and w is a string: 1. Simulate M on input w. 2. If M ever enters its accept state, accept; if M ever enters reject state, reject. “ U recognizes A TM but NOT decides it!

Diagonalization Method: (Georg Cantor in 1873) A and B are the same size if there is a 1-1, onto function f : A  B f AB f is 1-1 : f(a) ≠ f(b), if a ≠ b

Eg: N={1,2,3,…} E={2,4,6,…} f(n)=2n n12345… f(n)246810…

Def: A is countable if either it is finite or it has the same size as N.

Eg:

Thm: R is uncountable

Proof: By contradiction. Suppose there is a 1-1 onto f between N and R. Thus x ≠ f(n) for any n ⇒ nf(n) 1234⋮ 1234⋮ ⋯ ⋯ ⋯ ⋯ ⋮ x= ⋯ The i-th digit of x is not equal to the i-th of f(i)

A TM ={ | M is a TM and M accepts w } Thm: A TM is un-decidable.

Proof: Assume A TM is decidable. Suppose H decides A TM and H( )= accept if M accepts w reject if M does not accept w Define D= “ On input, where M is a TM: 1. Run H on input >. 2. Output the opposite of what H outputs i.e. if H accepts, REJECT, and if H rejects, ACCEPT. “

(Proof conti.) D( )= accept if M does not accept reject if M accepts D( )= accept if D does not accept reject if D accepts ⇒ Thus, A TM is un-decidable.

1. (i, j) is accept if M i accepts <M1><M1><M2><M2><M3><M3><M4><M4> ⋯ M1M1 Accept M2M2 M3M3 M4M4 ⋮

2. (i, j) is the value of H on input >. <M1><M1><M2><M2><M3><M3><M4><M4> ⋯ M1M1 AcceptRejectAcceptReject M2M2 Accept M3M3 Reject M4M4 Accept Reject ⋮

3. <M1><M1><M2><M2><M3><M3><M4><M4> ⋯ ⋯ M1M1 AcceptRejectAcceptRejectAccept M2M2 M3M3 Reject ⋯ ⋯ M4M4 Accept Reject Accept ⋮⋮⋱ DReject Accept ?? ⋮⋮⋱ Contradiction!

Turing-unrecognizable language: A language is co-Turing-recognizable if it is the Complement of a Turing-recognizable language. Thm: A language is decidable iff it is both Turing- recognizable and co-Turing-recognizable.

Proof: “ ⇒ ” If A is decidable, then both A and are Turing-recognizable. No Yes MAMA xMAMA x No Yes No

(Proof conti.): “ ⇐ ” If both A and are Turing-recognizable, let M 1 recognize A and M 2 recognize. M decides A. M: M1M1 Yes No Yes M2M2 x

Cor: is not Turing-recognizable.