THE CONVENTIONS 2 simple rules: Rule # 1: Rule # 2: RR “move to the right until you find  “ Note: first check. Then move (think of a “while”) “Never.

Slides:



Advertisements
Similar presentations
Multi-tape Turing Machines: Informal Description
Advertisements

Chapter 5 Pushdown Automata
Lecture 16 Deterministic Turing Machine (DTM) Finite Control tape head.
Variants of Turing machines
CS 208: Computing Theory Assoc. Prof. Dr. Brahim Hnich Faculty of Computer Sciences Izmir University of Economics.
Pushdown Automata CPSC 388 Ellen Walker Hiram College.
Pushdown Automata Chapter 12. Recognizing Context-Free Languages Two notions of recognition: (1) Say yes or no, just like with FSMs (2) Say yes or no,
Pushdown Automata Chapter 12. Recognizing Context-Free Languages We need a device similar to an FSM except that it needs more power. The insight: Precisely.
YES-NO machines Finite State Automata as language recognizers.
Comparing Sets Size without Counting 2 sets A and B have the same size if there is a function f: A  B such that: For every x  A there is one and only.
RECAP CSE 318. Final Exam Cumulative: –Regular languages, automata: 20% –Context-free languages, pushdown automata: 20% –Turing machines, decidable, recognizable,
Turing Machines (At last!). Designing Universal Computational Devices Was Not The Only Contribution from Alan Turing… Enter the year 1940: The world is.
Pushdown Automata Part II: PDAs and CFG Chapter 12.
1 Introduction to Computability Theory Lecture7: PushDown Automata (Part 1) Prof. Amos Israeli.
CFG => PDA Sipser 2 (pages ). CS 311 Fall Formally… A pushdown automaton is a sextuple M = (Q, Σ, Γ, δ, q 0, F), where – Q is a finite set.
Finite Automata Finite-state machine with no output. FA consists of States, Transitions between states FA is a 5-tuple Example! A string x is recognized.
Fall 2006Costas Busch - RPI1 Deterministic Finite Automata And Regular Languages.
1 Turing Machines. 2 The Language Hierarchy Regular Languages Context-Free Languages ? ?
CS 310 – Fall 2006 Pacific University CS310 Turing Machines Section 3.1 November 6, 2006.
CHAPTER 4 Decidability Contents Decidable Languages
CS 490: Automata and Language Theory Daniel Firpo Spring 2003.
CS5371 Theory of Computation Lecture 4: Automata Theory II (DFA = NFA, Regular Language)
Prof. Busch - LSU1 Turing Machines. Prof. Busch - LSU2 The Language Hierarchy Regular Languages Context-Free Languages ? ?
Grammars, Languages and Finite-state automata Languages are described by grammars We need an algorithm that takes as input grammar sentence And gives a.
CS 3240: Languages and Computation Pushdown Automata & CF Grammars NOTE: THESE ARE ONLY PARTIAL SLIDES RELATED TO WEEKS 9 AND 10. PLEASE REFER TO THE TEXTBOOK.
CSCI 4325 / 6339 Theory of Computation Zhixiang Chen Department of Computer Science University of Texas-Pan American.
CSCI 2670 Introduction to Theory of Computing September 21, 2005.
CS490 Presentation: Automata & Language Theory Thong Lam Ran Shi.
Ding-Zhu Du Office: ECSS 3-611, M 3:15-4:30 Lecture: ECSS 2.311, MW 12:30-1:45.
CSCI 2670 Introduction to Theory of Computing September 28, 2005.
4b 4b Lexical analysis Finite Automata. Finite Automata (FA) FA also called Finite State Machine (FSM) –Abstract model of a computing entity. –Decides.
Pushdown Automata Part I: PDAs Chapter Recognizing Context-Free Languages Two notions of recognition: (1) Say yes or no, just like with FSMs (2)
Push-down Automata Section 3.3 Fri, Oct 21, 2005.
Turing Machines Chapter 17. Languages and Machines SD D Context-Free Languages Regular Languages reg exps FSMs cfgs PDAs unrestricted grammars Turing.
Copyright © Curt Hill Finite State Automata Again This Time No Output.
Complexity and Computability Theory I Lecture #11 Instructor: Rina Zviel-Girshin Lea Epstein.
PushDown Automata. What is a stack? A stack is a Last In First Out data structure where I only have access to the last element inserted in the stack.
TM Design Macro Language D and SD MA/CSSE 474 Theory of Computation.
1 Pushdown Automata There are context-free languages that are not regular. Finite automata cannot recognize all context-free languages.
Modeling Computation: Finite State Machines without Output
1 Turing machines Chapter 4, Smith and Kimber. A Turing machine is an abstraction of a human “computer”. Consists of - control, in the form of states -
1 Section 13.1 Turing Machines A Turing machine (TM) is a simple computer that has an infinite amount of storage in the form of cells on an infinite tape.
1 Turing Machines and Equivalent Models Section 13.1 Turing Machines.
Overview of Previous Lesson(s) Over View  A token is a pair consisting of a token name and an optional attribute value.  A pattern is a description.
Automata & Formal Languages, Feodor F. Dragan, Kent State University 1 CHAPTER 3 The Church-Turing Thesis Contents Turing Machines definitions, examples,
December 3, 2009Theory of Computation Lecture 21: Turing Machines III 1 Simulation of T in L Now the MIDDLE section of Q can be generated by replacing.
1 CD5560 FABER Formal Languages, Automata and Models of Computation Lecture 12 Mälardalen University 2007.
Unrestricted Grammars
Summary of Previous Class There are languages that are not decidable –(we have not proved this yet) Why not extend Turing machines just as we did with.
Pushdown Automata Chapter 12. Recognizing Context-Free Languages Two notions of recognition: (1) Say yes or no, just like with FSMs (2) Say yes or no,
Deterministic Finite Automata Nondeterministic Finite Automata.
Chapter 9 Turing Machines What would happen if we change the stack in Pushdown Automata into some other storage device? Truing Machines, which maintains.
Universal Turing Machine
Lecture #5 Advanced Computation Theory Finite Automata.
Recap: Nondeterministic Finite Automaton (NFA) A deterministic finite automaton (NFA) is a 5-tuple (Q, , ,s,F) where: Q is a finite set of elements called.
6. Pushdown Automata CIS Automata and Formal Languages – Pei Wang.
CSE202: Introduction to Formal Languages and Automata Theory
Deterministic FA/ PDA Sequential Machine Theory Prof. K. J. Hintz
Turing Machines Chapter 17.
Pumping Lemma Revisited
Chapter 7 PUSHDOWN AUTOMATA.
Turing Machines (At last!).
Formal Definition Definition. A Turing machine is a 5-tuple (S, , , s, H), where: S is a set of states  is an alphabet It must contain  and . It cannot.
Constructing Complex Turing Machines
Turing Machines Chapter 17.
FORMAL LANGUAGES, AUTOMATA, AND COMPUTABILITY
Decidable Languages A language L is decidable if there is a Turing machine ML such that given any word w  0*, then: Input of ML: a  b  … w Output of.
Decidability and Tractability
Principles of Computing – UFCFA3-30-1
Variants of Turing machines
Presentation transcript:

THE CONVENTIONS 2 simple rules: Rule # 1: Rule # 2: RR “move to the right until you find  “ Note: first check. Then move (think of a “while”) “Never forget Rule # 1” (Mr Miogi, The Karate Kid) RR “move to the right until you find a symbol other than  “

Input and Output of Turing Machines When constructing Turing machines we have to establish conventions: For example, the Turing machine (  = {, a, b, ,  }): Does the following: when starting with a configuration of the form (s,  w), where w  (  - { , , })* then the final configuration is (h,  ww). …

Acceptance in Previous Machines Finite automata ConfigurationMachineAcceptance if (q,w) q: final state, w = e Pushdown automata (q,w,  ) q: final state, w =e  = e Pushdown automata accepting by empty stack (q,w,  ) w =e,  = e These machines are used to compute if a word belongs to a language

Input and Output of Turing Machines (2) Idea: Input: aa  b … a (  - { , })* state: s Output: ba  a … b (  - { , })* state: h 00

Functions (Again) Definition. A function, f, from A to B is a relation such that for every a  A there is one and only one b  A with f(a) = b This definition says that 2 things should happen: First, that “no one (in A) is left behind” A a d B Second, that each element in A has a unique representative in B A a d B Example: transitions in Turing machines

Functions (Again – Part 2) From the two restrictions, the first can be easily overcome: A Dom(f) = {a  A : there is a b  B with f(a) = b} One can restrict f to be from Dom(f) to B. In this situation one speaks of a partial function Example: f from Real to Real defined as f(x) = 1/x. Dom(f) = Real - {0} (Thus f is a partial function)

Input and Output of Turing Machines (3) Definition. Let: M = (S, , , s, H) be a Turing machine  0 =  - { , } Suppose that M starts with (s,  w) with w   0 * If the machine ends in a configuration (h,  u) with u   0 * and h  H, then: u is referred to as the output of M and write M(w) = u We can view M as a function f (from  0 * into  0 *), with f(w) = u. We say that M computes f. If M does not end for a w’   0 *, then we write M(w’) 

Turing-Computable Functions Definition. A function f:  0 *   0 * is said to be Turing computable if there exists a Turing machine M that computes it (i.e., for each w  dom(f), f(w)=M(w)) and dom(f) =  0 *. If dom(f) is an strict subset of  0 * (i.e., dom(f)   0 * and dom(f)   0 *), we say that f is partial Turing computable

Example of a Turing-Computable Function f(w) = wa where a is a fixed character in  0 and w   0 *

Example of a Turing-Computable Function (2) f(w) = ww where and w   0 * Let M be the machine that terminates in the configuration (h,  ww) when starting with (s,  w) (see Slide # 2) M …

Computing (Deciding) Languages Definition. Let L be a language in  0 * we define the characteristic function,  L, as follows:  L (w) = 1, if w  L  L (w) = 0, otherwise Definition. A language L is Turing-computable or decidable if its characteristic function,  L, is Turing- computable

Regular Languages are Turing- Computable (1) Steps to obtain a Turing machine accepting a regular language: Let L be a regular language on alphabet {a,b} Let A be a deterministic automata accepting L It is easy to simulate A with a Turing machine ML: ((p,a),q) ((p,a),(q,  )) For every favorable state f in A, add the transition: ((f,),(h,1))

Regular Languages are Turing- Computable (2) Use the machine ML as follows: ML 1 M1 1 M0 This Turing machine recognizes the language L Every regular language is Turing-computable (decidable)

Homework 4.9, 4.10, See slide # 10