Building a befer mousetrap. Transi-on Graphs. L = { abba } Building a befer mousetrap. L = { abba } L = { abba } 2/16/15

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

Languages. A language is a set of strings. String: A sequence of letters. Examples: cat, dog, house, Defined over an alphabet:

Plan for Today and Beginning Next week (Lexical Analysis)

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

Griffith University 3130CIT Theory of Computation (Based on slides by Harald Søndergaard of The University of Melbourne) Turing Machines 9-0

CSCI 2200 Foundations of Computer Science Spring 2018 Quiz 3 (May 2, 2018) SOLUTIONS

CSE Theory of Computing: Homework 3 Regexes and DFA/NFAs

CS 4120 Lecture 3 Automating lexical analysis 29 August 2011 Lecturer: Andrew Myers. 1 DFAs

Constructions on Finite Automata

Lecture 12: Mapping Reductions

Decidability. Human-aware Robotics. 2017/10/31 Chapter 4.1 in Sipser Ø Announcement:

Intro to Theory of Computation

Turing Machine properties. Turing Machines. Alternate TM definitions. Alternate TM definitions. Alternate TM definitions. Alternate TM definitions

Finite Automata and Regular Languages (part II)

Computability Theory

CS5371 Theory of Computation. Lecture 12: Computability III (Decidable Languages relating to DFA, NFA, and CFG)

Non-regular languages

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

Turing s thesis: (1930) Any computation carried out by mechanical means can be performed by a Turing Machine

Formal Languages, Automata and Models of Computation

CMSC 330: Organization of Programming Languages. Regular Expressions and Finite Automata

2017/08/31 Chapter 1.2 & 1.3 in Sipser Ø Announcement:

A Universal Turing Machine

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

CMSC 330: Organization of Programming Languages

CSCI 340: Computational Models. Transition Graphs. Department of Computer Science

Mapping Reducibility. Human-aware Robotics. 2017/11/16 Chapter 5.3 in Sipser Ø Announcement:

CS 373: Theory of Computation. Fall 2010

Notes for Comp 497 (Comp 454) Week 5 2/22/05. Today we will look at some of the rest of the material in Part 1 of the book.

COSE212: Programming Languages. Lecture 1 Inductive Definitions (1)

2017/08/29 Chapter 1.2 in Sipser Ø Announcement:

SUFFIX TREE. SYNONYMS Compact suffix trie

Program Analysis. Lecture 5. Rayna Dimitrova WS 2016/2017

cse303 ELEMENTS OF THE THEORY OF COMPUTATION Professor Anita Wasilewska

Constructions on Finite Automata

Deterministic finite Automata

Clarifications from last time. This Lecture. Last Lecture. CMSC 330: Organization of Programming Languages. Finite Automata.

Homework. Turing Machines. Announcements. Plan for today. Now our picture looks like. Languages

Click to edit. Master title. style

Deterministic Finite Automata. Non deterministic finite automata. Non-Deterministic Finite Automata (NFA) Non-Deterministic Finite Automata (NFA)

How do regular expressions work? CMSC 330: Organization of Programming Languages

6.045J/18.400J: Automata, Computability and Complexity. Quiz 2. March 30, Please write your name in the upper corner of each page.

CSE 311: Foundations of Computing. Lecture 26: More on Limits of FSMs, Cardinality

AC68 FINITE AUTOMATA & FORMULA LANGUAGES DEC 2013

FORMAL LANGUAGES, AUTOMATA AND COMPUTATION

6-4 Solving Special Systems

Chapter 3: The Church-Turing Thesis

ECS120 Fall Discussion Notes. October 25, The midterm is on Thursday, November 2nd during class. (That is next week!)

1. Draw a parse tree for the following derivation: S C A C C A b b b b A b b b b B b b b b a A a a b b b b a b a a b b 2. Show on your parse tree u,

Non-emptiness Testing for TMs

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

Theory of Computation

CSE 105 Theory of Computation

Two Way Deterministic Finite Automata

Solving and Graphing Inequalities

CSCC63 Worksheet Turing Machines

Math Analysis CP WS 4.X- Section Review A

Undecidability. We are not so much concerned if you are slow as when you come to a halt. (Chinese Proverb)

Deterministic PDA s. Deepak D Souza. 08 Nov Department of Computer Science and Automation Indian Institute of Science, Bangalore.

Finite Automata. Finite Automata

Turing Machines Extensions

CS4026 Formal Models of Computation

Regular expressions, Finite Automata, transition graphs are all the same!!

Computation Histories

Theory of Computation Lecture 1. Dr. Nahla Belal

Pushdown Automata. Pushdown Automata. Pushdown Automata. Pushdown Automata. Pushdown Automata. Pushdown Automata. The stack

Theory of Computation (Classroom Practice Booklet Solutions)

CS5371 Theory of Computation. Lecture 18: Complexity III (Two Classes: P and NP)

CSE 105 THEORY OF COMPUTATION

Complexity. Complexity Theory Lecture 3. Decidability and Complexity. Complexity Classes

CSCE 551 Final Exam, Spring 2004 Answer Key

CSCE 551 Final Exam, April 28, 2016 Answer Key

CS375: Logic and Theory of Computing

FORMAL LANGUAGES, AUTOMATA AND COMPUTATION

Automata Theory CS S-18 Complexity Theory II: Class NP

Computability Theory

Section 14.1 Computability then else

Theory of Computation

Computation Theory Finite Automata

Most General computer?

Decision Problems with TM s. Lecture 31: Halting Problem. Universe of discourse. Semi-decidable. Look at following sets: CSCI 81 Spring, 2012

CMSC 330: Organization of Programming Languages. Theory of Regular Expressions Finite Automata

Announcements. Problem Set Four due Thursday at 7:00PM (right before the midterm).

COL 352 Introduction to Automata and Theory of Computation Major Exam, Sem II , Max 80, Time 2 hr. Name Entry No. Group

Computability and Complexity

SFWR ENG 2FA3. Solution to the Assignment #4

CpSc 421 Homework 9 Solution

Pseudo-automata for generalized regular expressions

Undecibability. Hilbert's 10th Problem: Give an algorithm that given a polynomial decides if the polynomial has integer roots or not.

COSE212: Programming Languages. Lecture 1 Inductive Definitions (1)

Busch Complexity Lectures: Turing s Thesis. Costas Busch - LSU 1

Optimizing Finite Automata

FABER Formal Languages, Automata. Lecture 2. Mälardalen University

1.3 Regular Expressions

CS375: Logic and Theory of Computing

Today s Lecture 2/25/10. Truth Tables Continued Introduction to Proofs (the implicational rules of inference)

CS 301. Lecture 18 Decidable languages. Stephen Checkoway. April 2, 2018

Finite Automata Part One

CS5371 Theory of Computation. Lecture 23: Complexity VIII (Space Complexity)

Announcements. Problem Set 6 due next Monday, February 25, at 12:50PM. Midterm graded, will be returned at end of lecture.

Transcription:

Building a efer mousetrap Let s uild an FA that only accepts the string aa from Σ = { a } Models of Computa-on Lecture #5 (a?er quiz) Chapter 6 Building a efer mousetrap Let s uild an FA that only accepts the string aa from Σ = { a } L = { aa } Include all the other edges that go to a reject L = { aa } Include all the other edges that go to a reject L = { aa } PreFy messy in reality, most of the edges here are for cases that reject. Let s uild a preser machine. a a a a a, a, a, a, 1

Defini-on of a TG. 1. A set of states, at least one is designated start, and any numer of which may e final 2. A finite alphaet Σ of input lefers 3. A finite set of transi-ons etween states, ased on reading strings of input lefers, maye even Defini-on of a TG. 1. A set of states, at least one is designated start, and any numer of which may e final 2. A finite alphaet Σ of input lefers 3. A finite set of transi-ons etween states, ased on reading strings of input lefers, maye even Look familiar? (first slide) Transi-on graphs can crash Defini-on: if an input contains lefers for which there is no edge transi-on, the machine will crash ; a new way to reject the input. As long as it is more fragile we might do well to also give it extra features! : The language of all words that contain a doule lefer. aa But, with powerful tools come new worries Allow input of a string rather than a character. 2

Non- determinism How to scan aaaa? First loop three -mes? it appears to reject. Non- determinism How to scan aaaa? First loop two -mes it appears to accept. Non- determinism For a TG accept means that at least one path to a final state exists for the string. Non- determinism s impact There could e more than one successful path a a a a Non- determinism s impact Allowing edges gives a new meaning to alternate paths! ex: Find all paths for aa through this TG: Non- determinism s impact Allowing edges can provide infinite paths to accept, for a finite machine with finite states! Ex: Find all paths for aa through this TG??? a a a a a a a a a a 3

Generalized Instead of laeling edges with strings, what aout laeling with languages? L 1 L 2 L 3 GTG Defini-on of a GTG. 1. A set of states, at least one is designated start, and any numer of which may e final 2. A finite alphaet Σ of input lefers 3. A finite set of transi-ons etween states, each laeled with a regular expression The language of all words that contain a doule lefer. The language of all words that contain a doule lefer. aa a a How can we eliminate the loops? How can we eliminate the loops? aa (a) * (aa)(a) * a a 4

6.3 Show that any language that can e accepted y a TG can e accepted y a TG with an even numer of states. 6.3 Show that any language that can e accepted y a TG can e accepted y a TG with an even numer of states. Machine with odd numer of states 6.3 Show that any language that can e accepted y a TG can e accepted y a TG with an even numer of states. 6.5 Prove that for every TG there is another TG that accepts the same language ut has only one state Machine with odd numer of states 6.5 Prove that for every TG there is another TG that accepts the same language ut has only one state Machine with multiple states 6.5 Prove that for every TG there is another TG that accepts the same language ut has only one state Machine with multiple states 5

6.8i Suppose that L is a finite language who words are w 1, w 2, w 3,, w 83. Prove that there is a TG that accepts exactly the language L. 6.8i Suppose that L is a finite language who words are w 1, w 2, w 3,, w 83. Prove that there is a TG that accepts exactly the language L. w 1 w 2 w 3... w 83... 6.8ii Of all TGs that accept exactly the language L, what is the one with the fewest numer of states? 6.8ii Of all TGs that accept exactly the language L, what is the one with the fewest numer of states? L 6