CSCI 2670 Introduction to Theory of Computing

Slides:



Advertisements
Similar presentations
Variants of Turing machines
Advertisements

1 Introduction to Computability Theory Lecture12: Decidable Languages Prof. Amos Israeli.
More Turing Machines Sipser 3.2 (pages ). CS 311 Fall Multitape Turing Machines Formally, we need only change the transition function to.
More Turing Machines Sipser 3.2 (pages ).
Decidable languages Sipser 4.1 (pages ). CS 311 Mount Holyoke College 2 Hierarchy of languages All languages Turing-recognizable Turing-decidable.
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
Courtesy Costas Busch - RPI1 Reducibility. Courtesy Costas Busch - RPI2 Problem is reduced to problem If we can solve problem then we can solve problem.
1 Reducibility. 2 Problem is reduced to problem If we can solve problem then we can solve problem.
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.
Computability Construct TMs. Decidability. Preview: next class: diagonalization and Halting theorem.
Decidable languages Section 4.1 CSC 4170 Theory of Computation.
CSCI 2670 Introduction to Theory of Computing October 12, 2005.
1Computer Sciences Department. Book: INTRODUCTION TO THE THEORY OF COMPUTATION, SECOND EDITION, by: MICHAEL SIPSER Reference 3Computer Sciences Department.
CSCI 2670 Introduction to Theory of Computing October 13, 2005.
Recursively Enumerable and Recursive Languages
1 Recursively Enumerable and Recursive Languages.
Recursively Enumerable and Recursive Languages. Definition: A language is recursively enumerable if some Turing machine accepts it.
Decidability.
CSCI 2670 Introduction to Theory of Computing November 15, 2005.
Fall 2006Costas Busch - RPI1 RE languages and Enumerators.
CSCI 2670 Introduction to Theory of Computing
CSCI 2670 Introduction to Theory of Computing
CSCI 2670 Introduction to Theory of Computing
CSCI 2670 Introduction to Theory of Computing
CSCI 2670 Introduction to Theory of Computing
Busch Complexity Lectures: Reductions
Linear Bounded Automata LBAs
CSCI 2670 Introduction to Theory of Computing
Reductions Costas Busch - LSU.
CSE 105 theory of computation
BCS 2143 Theory of Computer Science
CSE 105 theory of computation
CSE 2001: Introduction to Theory of Computation Fall 2013
CSCI 2670 Introduction to Theory of Computing
CSCI 2670 Introduction to Theory of Computing
Turing Machines Acceptors; Enumerators
CSCI 2670 Introduction to Theory of Computing
CSE 105 theory of computation
Busch Complexity Lectures: Undecidable Problems (unsolvable problems)
Turing acceptable languages and Enumerators
Intro to Theory of Computation
Jaya Krishna, M.Tech, Assistant Professor
CSCI 2670 Introduction to Theory of Computing
Decidable Languages Costas Busch - LSU.
Non Deterministic Automata
Decidability and Undecidability
CSC 4170 Theory of Computation Decidable languages Section 4.1.
CSCI 2670 Introduction to Theory of Computing
CSCI 2670 Introduction to Theory of Computing
Decidable and undecidable languages
Turing acceptable languages and Enumerators
CS21 Decidability and Tractability
CSCI 2670 Introduction to Theory of Computing
CSCI 2670 Introduction to Theory of Computing
CSCI 2670 Introduction to Theory of Computing
CSCI 2670 Introduction to Theory of Computing
CSE 105 theory of computation
Theory of Computability
Theory of Computability
CSCI 2670 Introduction to Theory of Computing
Variants of Turing machines
CSE 105 theory of computation
Automata, Grammars and Languages
Intro to Theory of Computation
CSE 105 theory of computation
CSE 105 theory of computation
Presentation transcript:

CSCI 2670 Introduction to Theory of Computing October 14, 2004

Agenda Yesterday Today Prove equivalence of deterministic and nondeterministic Turing machines Today Enumerators Definition of algorithm October 14, 2004

Announcements Quiz tomorrow Reminder: tutorial sessions are back High-level description of TM Trace through a TM’s operation Tape notation & configuration notation High-level description of equivalences Reminder: tutorial sessions are back Office hours return to normal Tuesday 3:00 – 4:00 Wednesday 3:00 – 4:00 October 14, 2004

Enumerators Instead of reading an input and processing it, enumerators start with an empty tape and print out strings in Σ* M Printer 1 1 2 1 3 ~ ~ ~ aaba bbcc aaaaabb October 14, 2004

Machine equivalence Theorem: A language is Turing-recognizable if and only of some enumerator enumerates it. Proof technique: Construction in each direction October 14, 2004

TM accept enumerator language TM = “On input w: Run enumerator E. Every time E prints a string, compare it to w. If w appears in the output, accept.” October 14, 2004

Enumerator accepts TM language Let s1, s2, s3, … be all the strings in Σ* E = “Ignore the input. For i = 1, 2, 3, … Run M for i steps on each input s1, s2, …, si Whenever M accepts a string, print it October 14, 2004

What is an algorithm? Intuitively, an algorithm is anything that can be simulated by a Turing machine Many algoriths can be simulated by Turing machines Inputs can be represend s strings Graphs Polynomials Atomata Etc. October 14, 2004

Example algorithm Depth-first walk-through of binary tree Which nodes do you visit, and in what order, when doing a depth-first search? Visit each leaf node from left to right Recursive algorithm October 14, 2004

Depth-first walk-through Start at root Process left subtree (if one exists) Process right subtree (if one exists) Process how? Print the node name If there is a left subtree then Process the left subtree Print the node name again If there is a right subtree then Process the right subtree October 14, 2004

Example 1 2 3 4 6 5 7 9 8 10 1 2 4 8 4 2 5 9 5 2 1 3 6 10 6 3 7 October 14, 2004

Can a Turing machine do this? Input must be a string (not a tree) Can we represent a tree with a string? Yes. October 14, 2004

String representation of a tree 1 2 3 4 6 5 7 9 8 10 1 2 3 4 5 6 7 8 # # 9 10 # # # ~ October 14, 2004

Can a Turing machine do this? Input must be a string (not a tree) Can we represent a tree with a string? Yes How do we know which node(s) are children of current node If node is kth node at depth d, it’s position in the string is 2d+k-1 and its children are at position 2d+1+2(k-1) and 2d+1+2k-1 October 14, 2004

What about the output? Need to write out nodes in a particular order Can we do this with a TM? Yes. Add output tape A TM can move left and right on the input tape writing to the output tape whenever appropriate October 14, 2004

Decidability A language is decidable if some Turing machine decides it Not all languages are decidable We will see examples of both decidable and undecidable languages October 14, 2004

DFA acceptance problem Consider the language ADFA = {<B,w> | B is a DFA that accepts the string w} Theorem: ADFA is a decidable language Proof: Consider the following TM, M M = “On input string <B,w> Simulate B on input w If simulation ends in accept state, accept. Otherwise, reject.” October 14, 2004

NFA acceptance problem Consider the language ANFA = {<B,w> | B is a NFA that accepts the string w} Theorem: ANFA is a decidable language Proof: Consider the following TM, N N = “On input string <B,w> Convert B to a DFA C Run TM M from previous slide on <C,w> If M accepts, accept. Otherwise, reject.” October 14, 2004

RE acceptance problem Consider the language AREX = {<R,w> | R is an RE that generates the string w} Theorem: AREX is a decidable language Proof: Consider the following TM, P P = “On input string <R,w> Convert R to a DFA C using algorithm discussed in class and in text Run TM M from earlier slide on <C,w> If M accepts, accept. Otherwise, reject.” October 14, 2004

Emptiness testing problem Consider the language EDFA = {<A> | A is a DFA and L(A) = } Theorem: EDFA is a decidable language Proof: Consider the following TM, T T = “On input string <A> Mark the start state Repeat until no new states get marked Mark any state that has a transition coming into it from any state already marked If no accept states are marked, accept. Otherwise, reject.” October 14, 2004