Context-Free Languages Regular Languages Violates Pumping Lemma For RLs Violates Pumping Lemma For CFLs Described by CFG, PDA 0n1n0n1n 0n1n2n0n1n2n Described.

Slides:



Advertisements
Similar presentations
Lecture Ref. handout page
Advertisements

Turing Machines Memory = an infinitely long tape Persistent storage A read/write tape head that can move around the tape Initially, the tape contains only.
David Evans cs302: Theory of Computation University of Virginia Computer Science Lecture 13: Turing Machines.
CS 345: Chapter 9 Algorithmic Universality and Its Robustness
CS 208: Computing Theory Assoc. Prof. Dr. Brahim Hnich Faculty of Computer Sciences Izmir University of Economics.
Turing Machines (At last!). Designing Universal Computational Devices Was Not The Only Contribution from Alan Turing… Enter the year 1940: The world is.
1 Introduction to Computability Theory Lecture12: Decidable Languages Prof. Amos Israeli.
Homework 8 Solutions #1 True or False a) Regular languages are recursive b) Context free languages are recursively enumerable (r.e.) c) Recursive languages.
CS5371 Theory of Computation Lecture 11: Computability Theory II (TM Variants, Church-Turing Thesis)
Based on Slides by Zeph Grunschlag from Columbia University www1.cs.columbia.edu/~zeph/3261/L14/L14.ppt Basic Computability Reading Material: J. Savage,
CS 310 – Fall 2006 Pacific University CS310 Turing Machines Section 3.1 November 6, 2006.
Lecture 5 Turing Machines
Computation Theory Introduction to Turing Machine.
CS 490: Automata and Language Theory Daniel Firpo Spring 2003.
CS5371 Theory of Computation Lecture 10: Computability Theory I (Turing Machine)
1 Foundations of Software Design Fall 2002 Marti Hearst Lecture 29: Computability, Turing Machines, Can Computers Think?
Turing Machines CS 105: Introduction to Computer Science.
David Evans cs302: Theory of Computation University of Virginia Computer Science Lecture 2: Modeling Computers.
AUTOMATA THEORY VIII.
Lecture 14: Church-Turing Thesis Alonzo Church ( ) Alan Turing ( )
Turing Machines A more powerful computation model than a PDA ?
Complexity and Computability Theory I Lecture #13 Instructor: Rina Zviel-Girshin Lea Epstein Yael Moses.
Turing Machines Chapter Plan Turing Machines(TMs) – Alan Turing Church-Turing Thesis – Definitions Computation Configuration Recognizable vs. Decidable.
Theory of Computation CS3102 – Spring 2014 A tale of computers, math, problem solving, life, love and tragic death Nathan Brunelle Department of Computer.
The Turing machine Olena Lastivka. Definition Turing machine is a theoretical device that manipulates symbols on a strip of tape according to a table.
CS490 Presentation: Automata & Language Theory Thong Lam Ran Shi.
CSE202: Introduction to Formal Languages and Automata Theory Chapter 9 The Turing Machine These class notes are based on material from our textbook, An.
CSCI 2670 Introduction to Theory of Computing September 28, 2005.
Introduction to CS Theory Lecture 15 –Turing Machines Piotr Faliszewski
Cs3102: Theory of Computation Class 14: Turing Machines Spring 2010 University of Virginia David Evans.
Turing Machines Chapter 17. Languages and Machines SD D Context-Free Languages Regular Languages reg exps FSMs cfgs PDAs unrestricted grammars Turing.
CSE 311 Foundations of Computing I Lecture 26 Computability: Turing machines, Undecidability of the Halting Problem Spring
CSE 311 Foundations of Computing I Lecture 29 Computability: Turing machines, Undecidability of the Halting Problem Autumn 2012 CSE 3111.
Class 21: Introducing Complexity David Evans cs302: Theory of Computation University of Virginia Computer Science.
1 Turing Machines (TM) Generalize the class of CFLs: Regular Languages Context-Free Languages Recursive Languages Recursively Enumerable Languages Non-Recursively.
Computer Science 101 Theory of Computing. Computer Science is... The study of algorithms, with respect to –their formal properties –their linguistic realizations.
1Computer Sciences Department. Book: INTRODUCTION TO THE THEORY OF COMPUTATION, SECOND EDITION, by: MICHAEL SIPSER Reference 3Computer Sciences Department.
1Computer Sciences Department. Book: INTRODUCTION TO THE THEORY OF COMPUTATION, SECOND EDITION, by: MICHAEL SIPSER Reference 3Computer Sciences Department.
CSC 3130: Automata theory and formal languages Andrej Bogdanov The Chinese University of Hong Kong Turing Machines.
TM Design Macro Language D and SD MA/CSSE 474 Theory of Computation.
September1999 CMSC 203 / 0201 Fall 2002 Week #15 – 2/4/6 December 2002 Prof. Marie desJardins.
CS 208: Computing Theory Assoc. Prof. Dr. Brahim Hnich
Turing Machines Lecture 26 Naveen Z Quazilbash. Overview Introduction Turing Machine Notation Turing Machine Formal Notation Transition Function Instantaneous.
CSCI 2670 Introduction to Theory of Computing October 13, 2005.
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 IDT Open Seminar ALAN TURING AND HIS LEGACY 100 Years Turing celebration Gordana Dodig Crnkovic, Computer Science and Network Department Mälardalen University.
1 Turing Machines and Equivalent Models Section 13.1 Turing Machines.
Overview of the theory of computation Episode 3 0 Turing machines The traditional concepts of computability, decidability and recursive enumerability.
1 Turing Machines - Chap 8 Turing Machines Recursive and Recursively Enumerable Languages.
Automata & Formal Languages, Feodor F. Dragan, Kent State University 1 CHAPTER 3 The Church-Turing Thesis Contents Turing Machines definitions, examples,
1 CD5560 FABER Formal Languages, Automata and Models of Computation Lecture 12 Mälardalen University 2007.
1 Unit – 5 : STATE MACHINES Syllabus: Languages and Grammars – Finite State Machines State machines and languages – Turing Machines – Computational Complexity.
CS 3240 – Chapter 9.  Turing Machines  From Alan Turing, 1936  Turns out to be the LAST machine  The only machine you'll ever need  The Church-Turing.
Turing Machines CS 130 Theory of Computation HMU Textbook: Chap 8.
FORMAL LANGUAGES, AUTOMATA, AND COMPUTABILITY * Read chapter 4 of the book for next time * Lecture9x.ppt.
CS 154 Formal Languages and Computability April 5 Class Meeting Department of Computer Science San Jose State University Spring 2016 Instructor: Ron Mak.
CS 154 Formal Languages and Computability April 7 Class Meeting Department of Computer Science San Jose State University Spring 2016 Instructor: Ron Mak.
8. Introduction to Turing Machines
Turing Machines.
Pumping Lemma Revisited
Turing Machines (At last!).
Summary.
Chapter 3: The CHURCH-Turing thesis
Jaya Krishna, M.Tech, Assistant Professor
Turing Machines (TM) Deterministic Turing Machine (DTM)
Non-Deterministic Finite Automata
8. Introduction to Turing Machines
CS21 Decidability and Tractability
Decidability and Tractability
The Church-Turing Thesis and Turing-completeness
Presentation transcript:

Context-Free Languages Regular Languages Violates Pumping Lemma For RLs Violates Pumping Lemma For CFLs Described by CFG, PDA 0n1n0n1n 0n1n2n0n1n2n Described by DFA, NFA, RegExp, RegGram 0n0n w Deterministic CFLs

 Is it possible to design a formal model of a computational device that capture the capabilities of any algorithm? Alan Turing, 1940’s: Yes!

Turing Machine is COOOOOL, why? Understanding it makes us more like CS guys But, probably there are few graduate students who really understand it. Because, most of us forgot the details very soon after we learnt it.  Anyway, it is cool, instinctively.

Why it is cool, seriously Anything a real computer can compute, a TM can also compute. Despite its simplicity, TM can be adapted to simulate the logic of any computer that could possibly be constructed. Therefore, TM is the foundation of computational complexity theory. A basis to analyze algorithms

Alan Turing Great mathematician The father of the modern computer

Alan Turing’s Statue at Bletchley Park

His masterpiece is On Computable Numbers, with an Application to the Entscheidungsproblem He achieved world-class Marathon standards. His best time is 2 hours, 46 minutes, 3 seconds, only 11 minutes slower than the winner in the 1948 Olympic Games. Alan Turing is the father of computer science. The ACM Turing Award is widely considered to be the CS world’s “Nobel Prize”

Every computer algorithm can be implemented as a Turing machine Therefore, C, C++, Prolog, Lisp, Small talk, and Java programs can be simulated in Turing machines Definition: a programming language is Turing-complete if it is equivalent to a Turing machine.

whether there was a way to define which problems were/were not decidable (computable)? can we create a machine to simulate the human brain so that those computable problems can be solved automatically? , Turing was working on a paper, “computable numbers”. The Turing machine in this paper turned out to be the simplest prototype of all computers!

a+b*x/y thinks State of mind changes reads makes notes

Move left/right one square Change state Write a new symbol onto the current tape square depending on current state and current tape symbol

In the year 1941: The world is at war Nazi Germany has succeeded in conquering most of west Europe Britain is under siege British supply lines are threaten by German Germany used the Enigma Code, considered unbreakable Alan Turing led a group of scientist that broke the enigma code

Finite Control This tape is for input, storage and output TM is a 7-Tuple (Q, , , , q 0, B, F) Q is a set of states  is a set of tape symbols B   is a blank symbol    \{B} is a set of input symbols q 0 is the start state F  Q is a set of final states Tape head

 : the transition function  (q,X): a state q and a tape symbol X  (q,X) = (p,Y,D) where: p is next state in Q Y is the symbol written in the cell being scanned D is a direction, either L or R A transition can be described as follows Change from state q to p, update the current symbol X with Y, and move the tape head to D (left or right) qp X/Y, D

Initially, the input string (finite-length string of symbols) is placed on the tape All other tape cells, extending infinitely to left and right, hold blanks Blank is a tape symbol, but not an input symbol Initially, tape head points to the beginning of the input string

Tape head: always positioned at one of tape cells A move (or say ‘a step’) may: Read an input symbol Change machine state Write a tape symbol in the cell scanned Move the tape head left or right

So simple, right? But… The computational capabilities of all other known computational models (e.g. any automata) are less than or equivalent to TM Their speeds may not be as same as that of the TM’s Their computational capabilities are less than or equivalent to TM, i.e., no ‘more’ mathematical functions can be calculated “Every function that can be physically computed can be computed by a Turing Machine." This is the famous Church-Turing Thesis

L = {0 n 1 n | n  1} Idea: Repeatedly change the first ‘0’ to X, then find a ‘1’ and change it to Y, until all ‘0’s and ‘1’s have been matched X Y 1

Start

Consider the input “0011” 1. Tape# #0011 ### 2. Tape# #X011 ### 3. Tape# #X0Y1 ###

Consider the input “0011” 5. Tape# #XXYY ### 6. Tape# #XXYY ### 4. Tape# #XXY1 ###

Consider the input “0111” 1. Tape# #0111 ### 2. Tape# #X111 ### 3. Tape# #XY11 ### 4. Tape# #XY11 ###

Example #1: {0 n 1 n | n >= 1} 01XYB q 0 (q 1, X, R) --(q 3, Y, R) - q 1 (q 1, 0, R)(q 2, Y, L)-(q 1, Y, R) - q 2 (q 2, 0, L)-(q 0, X, R)(q 2, Y, L) - q 3 ---(q 3, Y, R) (q 4, B, R) q Sample Computation: (on 0011) q |— Xq |— X0q 1 11 |— Xq 2 0Y1 |— q 2 X0Y1 |— Xq 0 0Y1 |— XXq 1 Y1 |— XXYq 1 1 |— XXq 2 YY |— Xq 2 XYY |— XXq 0 YY |— XXYq 3 Y |— XXYYq 3 |— XXYYBq 4

Example #2: {w | w is in {0,1}* and w ends with a 0} Q = {q 0, q 1, q 2 } Γ = {0, 1, B} Σ = {0, 1} F = {q 2 } δ: 0 1 B q 0 (q 0, 0, R)(q 0, 1, R)(q 1, B, L) q 1 (q 2, 0, R) - - q

Construct a TM for each of the following. To recognize the language {0 n 1 n 2 n }