A Turing Machine. The Tape. Languages accepted by Turing Machines. Tape... Read-Write head. Context-Free n Languages. Control Unit.

Similar documents
Positive Properties of Context-Free languages

Busch Complexity Lectures: Turing Machines. Prof. Busch - LSU 1

PRACTICE FINAL SOLUTIONS

Turing Machines. The Language Hierarchy. Context-Free Languages. Regular Languages. Courtesy Costas Busch - RPI 1

Course 8 Properties of Regular Languages

Computability and computational complexity

Computability and computational complexity

Introduction to Automata Theory. Reading: Chapter 1

2017 PRACTICE MIDTERM SOLUTIONS

Finite Automata. Reading: Chapter 2

CS151 Complexity Theory

Context-free grammars and. Basics of string generation methods

Lecture 2: Uncomputability and the Haling Problem

Properties of Regular Languages. Reading: Chapter 4

Course Material. CS Lecture 1 Deterministic Finite Automata. Grading and Policies. Workload. Website:

Computability and computational complexity

CS Lecture 28 P, NP, and NP-Completeness. Fall 2008

CS Lecture 29 P, NP, and NP-Completeness. k ) for all k. Fall The class P. The class NP

Hardness Results for Intersection Non-Emptiness

CSE303 Q4 SOLUTIONS. YES/NO questions 1. The set of terminals is always non- empty

and Models of Computation

Lecture 11: Pseudorandom functions

CS 336. of n 1 objects with order unimportant but repetition allowed.

HIS LEGACY. 100 Years Turing celebration. Gordana Dodig Crnkovic, IDT Open Seminar. Computer Science and Network Department Mälardalen University

Content. Languages, Alphabets and Strings. Operations on Strings. a ab abba baba. aaabbbaaba b 5. Languages. A language is a set of strings

Quiz No. 1. ln n n. 1. Define: an infinite sequence A function whose domain is N 2. Define: a convergent sequence A sequence that has a limit

Unit 6: Sequences and Series

MATH 262A LECTURE 1: AN INTRODUCTION TO BOOLEAN CIRCUITS AND FORMULAE

A Simple Optimum-Time FSSP Algorithm for Multi-Dimensional Cellular Automata

FIR Filters. Lecture #7 Chapter 5. BME 310 Biomedical Computing - J.Schesser

Lecture 9: Hierarchy Theorems

Ma 530 Introduction to Power Series

Harvard CS 121 and CSCI E-207 Lecture 10: Ambiguity, Pushdown Automata

EE / EEE SAMPLE STUDY MATERIAL. GATE, IES & PSUs Signal System. Electrical Engineering. Postal Correspondence Course

6.003 Homework #3 Solutions

CS 420, Spring 2018 Homework 4 Solutions. 1. Use the Pumping Lemma to show that the following languages are not regular: (a) {0 2n 10 n n 0};

CS5371 Theory of Computation. Lecture 7: Automata Theory V (CFG, CFL, CNF)

LING/C SC/PSYC 438/538. Lecture 17 Sandiway Fong

Finite Automata. Mahesh Viswanathan

10-701/ Machine Learning Mid-term Exam Solution

MIXED REVIEW of Problem Solving

If a subset E of R contains no open interval, is it of zero measure? For instance, is the set of irrationals in [0, 1] is of measure zero?

Homework Assignment 6 Answers

CS375: Logic and Theory of Computing

Mathematical Description of Discrete-Time Signals. 9/10/16 M. J. Roberts - All Rights Reserved 1

Lecture 9: Expanders Part 2, Extractors

Lecture Notes for CS 313H, Fall 2011

Please give details of your answer. A direct answer without explanation is not counted.

Markov Decision Processes

1. Universal v.s. non-universal: know the source distribution or not.

Revision Topic 1: Number and algebra

Solutions to Final Exam Review Problems

CS375: Logic and Theory of Computing

Chapter 2: Finite Automata

M = (Q,Σ,δ,q 0,F) Σ is the alphabet over which the transitions are defined.

Announcements, Nov. 19 th

(4 pts.) (4 pts.) (4 pts.) b) y(x,t) = 1/(ax 2 +b) This function has no time dependence, so cannot be a wave.

Final exam study sheet for CS3719 Turing machines and decidability.

Computation Histories

CS5371 Theory of Computation. Lecture 10: Computability Theory I (Turing Machine)

A recurrence equation is just a recursive function definition. It defines a function at one input in terms of its value on smaller inputs.

Announcements. Queueing Systems: Lecture 1. Lecture Outline. Topics in Queueing Theory

Automata and Computability. Solutions to Exercises

Statistical Machine Translation

Finite Automata and Regular Languages (part II)

2.4 - Sequences and Series

Math 220A Fall 2007 Homework #2. Will Garner A

Automata and Computability. Solutions to Exercises

Sheet 1-8 Dr. Mostafa Aref Format By : Mostafa Sayed

St.MARTIN S ENGINEERING COLLEGE Dhulapally, Secunderabad

CS5371 Theory of Computation. Lecture 10: Computability Theory I (Turing Machine)

CSCE 551: Chin-Tser Huang. University of South Carolina

Introduction and Motivation. Introduction and Motivation. Introduction to Computability. Introduction and Motivation. Theory. Lecture5: Context Free

Web Appendix O - Derivations of the Properties of the z Transform

Definition 4.2. (a) A sequence {x n } in a Banach space X is a basis for X if. unique scalars a n (x) such that x = n. a n (x) x n. (4.

COMP/MATH 300 Topics for Spring 2017 June 5, Review and Regular Languages

Randomized Algorithms I, Spring 2018, Department of Computer Science, University of Helsinki Homework 1: Solutions (Discussed January 25, 2018)

Chapter 7: The z-transform. Chih-Wei Liu

Polynomial Functions and Their Graphs

The Z-Transform. Content and Figures are from Discrete-Time Signal Processing, 2e by Oppenheim, Shafer, and Buck, Prentice Hall Inc.

7.) Consider the region bounded by y = x 2, y = x - 1, x = -1 and x = 1. Find the volume of the solid produced by revolving the region around x = 3.

Generalized Semi- Markov Processes (GSMP)

FIR Filter Design: Part II

1 Counting and Stirling Numbers

jflap demo Regular expressions Pumping lemma Turing Machines Sections 12.4 and 12.5 in the text

Applications in Linear Algebra and Uses of Technology

G r a d e 1 1 P r e - C a l c u l u s M a t h e m a t i c s ( 3 0 S )

Calculus 2 - D. Yuen Final Exam Review (Version 11/22/2017. Please report any possible typos.)

Random Models. Tusheng Zhang. February 14, 2013

Discrete-Time Systems, LTI Systems, and Discrete-Time Convolution

Worksheet on Generating Functions

Design and Analysis of ALGORITHM (Topic 2)

62. Power series Definition 16. (Power series) Given a sequence {c n }, the series. c n x n = c 0 + c 1 x + c 2 x 2 + c 3 x 3 +

Apply change-of-basis formula to rewrite x as a linear combination of eigenvectors v j.

More Properties of Regular Languages

(b) If G=({S}, {a}, {S SS}, S) find the language generated by G. [8+8] 2. Convert the following grammar to Greibach Normal Form G = ({A1, A2, A3},

COS 341 Discrete Mathematics. Exponential Generating Functions and Recurrence Relations

Non-regular languages

STP 226 EXAMPLE EXAM #1

Transcription:

CS 30 - ecture 9 Turig Machies Fall 2008 eview aguages ad Grammars Alphaets, strigs, laguages egular aguages Determiistic Fiite ad Nodetermiistic Automata Equivalece of NFA ad DFA ad Miimizig a DFA egular Expressios egular Grammars Properties of egular aguages aguages that are ot regular ad the pumpig lemma Cotext Free aguages Cotext Free Grammars Derivatios: leftmost, rightmost ad derivatio trees Parsig ad amiguity Simplificatios ad Normal Forms Nodetermiistic Pushdow Automata Pushdow Automata ad Cotext Free Grammars Determiistic Pushdow Automata Pumpig emma for cotext free grammars Properties of Cotext Free Grammars Turig Machies Turig Machies The aguage Hierarchy a c Cotext-Free aguages a? ww? ww egular aguages a * a **

a aguages accepted y Turig Machies c Cotext-Free aguages a ww ww egular aguages a * a ** Tape Cotrol Uit A Turig Machie ead-write head The Tape No oudaries -- ifiite legth ead-write head ead-write head The head moves eft or ight The head at each time step:. eads a symol 2. Writes a symol 3. Moves eft or ight 2

Example: Time 0 a a c a k c a k c Time 2 a f k c. eads 2. Writes a k 3. Moves eft. eads 2. Writes f 3. Moves ight The Iput Strig Iput strig Blak symol Iput strig Blak symol a a c a a c head head Head starts at the leftmost positio of the iput strig emark: the iput strig is ever empty 3

States & Trasitios ead Write Move eft Example: a a c q a, curret state Move ight q a, q a, a a c Example: a a c Time 2 a c Time 2 a c q 2 q 2 q a, q a, 4

Example: a a c Time 2 a c g q 2 q g, Determiism Turig Machies are determiistic Allowed Not Allowed a, q 2 a, q 2 d, q 3 a d, q 3 No lamda trasitios allowed Example: Partial Trasitio Fuctio a a c Haltig The machie halts if there are o possile trasitios to follow a, d, q 2 q 3 Allowed: No trasitio for iput symol c 5

Example: Fial States a a c Allowed Not Allowed a, d, q 2 q 3 No possile trasitio HAT!!! Fial states have o outgoig trasitios I a fial state the machie halts Accept Iput Acceptace If machie halts i a fial state Turig Machie Example A Turig machie that accepts the laguage: aa * eject Iput If machie halts i a o-fial state or If machie eters a ifiite loop 6

Time 0 a a a a a a Time 2 a a a Time 3 a a a 7

Time 4 a a a ejectio Example Time 0 a a Halt & Accept a a Ifiite oop Example No possile Trasitio Halt & eject, 8

Time 0 a a a a,, Time 2 a a Time 2 a a, Time 3 Time 4 Time 5 a a a a a a Ifiite loop 9

Because of the ifiite loop: The fial state caot e reached The machie ever halts The iput is ot accepted Turig Machie Example { a Turig machie for the laguage } q 4 a x, q 3 q y, x x, Time 0 a a x a q 4 q 4 q 3 a x, q y, x x, q 3 a x, q y, x x, 0

x a Time 2 x a y Time 3 a x, y, a x, x x, x a y Time 5 y, x x, x a y Time 4 a x, y, x x, a x, y, x x,

x x y Time 6 x x y Time 7 a x, y, a x, x x, a x, x x y y Time 9 y, x x, x x y y Time 8 y, x x, a x, y, x x, 2

x x y y 0 x x y y a x, y, a x, x x, y, x x, x x y y 2 x x y y 3 Halt & Accept a x, y, x x, a x, y, x x, 3

Oservatio: If we modify the machie for the laguage { a } Formal Defiitios for Turig Machies we ca easily costruct a machie for the laguage { a c } Trasitio Fuctio Trasitio Fuctio q a, q c d, δ (, a) = (,, ) δ (, c) = (, d, ) 4

Turig Machie: States Iput alphaet M = ( Q, Σ, Γ, δ,,, F) Tape alphaet Cofiguratio c a a Trasitio fuctio Iitial state lak Fial states Istataeous descriptio: ca a Time 4 x a y Time 5 x a y Time 4 x a y Time 5 x a y q 2 q 2 A Move: xay x ay Time 6 x x y Time 7 x x y xay x ay xx y xxy 5

xay x ay xx y xxy Iitial cofiguratio: w Equivalet otatio: xay xxy Iput strig w a a The Accepted aguage For ay Turig Machie M ( M ) = { w : w x q f x2} Stadard Turig Machie The machie we descried is the stadard: Determiistic Ifiite tape i oth directios Iitial state Fial state Tape is the iput/output file 6

ead What s Next iz Chapter,2., 2.2, 2.3, (skip 2.4), 3, 4, 5, 6., 6.2, (skip 6.3), 7., 7.2, 7.3, (skip 7.4), 8, 9 JFAP Chapter, 2., (skip 2.2), 3, 4, 5, 6, 7, (skip 8), 9 Next ecture Topics From 9.2 ad 9.3 Complex Tasks ad Turig s Thesis Quiz 3 i ecitatio o Wedesday /2 Covers iz 7., 7.2, 7.3, (skip 7.4), 8, ad JFAP 5,6,7 Closed ook, ut you may rig oe sheet of 8.5 x ich paper with ay otes you like. Quiz will take the full hour Homework Homework Due Thursday 7