Discrete Mathematics and Logic II. Automata

Similar documents
Chapter 7. Kleene s Theorem. 7.1 Kleene s Theorem. The following theorem is the most important and fundamental result in the theory of FA s:

Let's start with an example:

Languages & Automata

Chapter Five: Nondeterministic Finite Automata. Formal Language, chapter 5, slide 1

Formal Language and Automata Theory (CS21004)

Regular Expressions (RE) Regular Expressions (RE) Regular Expressions (RE) Regular Expressions (RE) Kleene-*

2-Way Finite Automata Radboud University, Nijmegen. Writer: Serena Rietbergen, s Supervisor: Herman Geuvers

Chapter 1, Part 1. Regular Languages. CSC527, Chapter 1, Part 1 c 2012 Mitsunori Ogihara 1

Finite-State Automata: Recap

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

Kleene s Theorem. Kleene s Theorem. Kleene s Theorem. Kleene s Theorem. Kleene s Theorem. Kleene s Theorem 2/16/15

Nondeterminism and Nodeterministic Automata

Language Processors F29LP2, Lecture 5

Deterministic Finite Automata

Worked out examples Finite Automata

AUTOMATA AND LANGUAGES. Definition 1.5: Finite Automaton

Converting Regular Expressions to Discrete Finite Automata: A Tutorial

In-depth introduction to main models, concepts of theory of computation:

Non Deterministic Automata. Formal Languages and Automata - Yonsei CS 1

CMPSCI 250: Introduction to Computation. Lecture #31: What DFA s Can and Can t Do David Mix Barrington 9 April 2014

Deterministic Finite-State Automata

ɛ-closure, Kleene s Theorem,

Lecture 09: Myhill-Nerode Theorem

Minimal DFA. minimal DFA for L starting from any other

Assignment 1 Automata, Languages, and Computability. 1 Finite State Automata and Regular Languages

a,b a 1 a 2 a 3 a,b 1 a,b a,b 2 3 a,b a,b a 2 a,b CS Determinisitic Finite Automata 1

CHAPTER 1 Regular Languages. Contents. definitions, examples, designing, regular operations. Non-deterministic Finite Automata (NFA)

Theory of Computation Regular Languages. (NTU EE) Regular Languages Fall / 38

Chapter 2 Finite Automata

NFA DFA Example 3 CMSC 330: Organization of Programming Languages. Equivalence of DFAs and NFAs. Equivalence of DFAs and NFAs (cont.

Theory of Computation Regular Languages

Non-deterministic Finite Automata

Non-deterministic Finite Automata

input tape head moves current state

Non Deterministic Automata. Linz: Nondeterministic Finite Accepters, page 51

Harvard University Computer Science 121 Midterm October 23, 2012

Automata Theory 101. Introduction. Outline. Introduction Finite Automata Regular Expressions ω-automata. Ralf Huuck.

Non-Deterministic Finite Automata

NFAs continued, Closure Properties of Regular Languages

CISC 4090 Theory of Computation

CS 330 Formal Methods and Models

CMSC 330: Organization of Programming Languages

1. For each of the following theorems, give a two or three sentence sketch of how the proof goes or why it is not true.

Some Theory of Computation Exercises Week 1

CSCI 340: Computational Models. Kleene s Theorem. Department of Computer Science

Convert the NFA into DFA

CHAPTER 1 Regular Languages. Contents

CS 301. Lecture 04 Regular Expressions. Stephen Checkoway. January 29, 2018

Myhill-Nerode Theorem

Discrete Mathematics and Logic II. Regular Sets

Non-Deterministic Finite Automata. Fall 2018 Costas Busch - RPI 1

FORMAL LANGUAGES, AUTOMATA AND COMPUTABILITY. FLAC (15-453) - Spring L. Blum

CS375: Logic and Theory of Computing

Fundamentals of Computer Science

Designing finite automata II

Java II Finite Automata I

Finite Automata. Informatics 2A: Lecture 3. John Longley. 22 September School of Informatics University of Edinburgh

80 CHAPTER 2. DFA S, NFA S, REGULAR LANGUAGES. 2.6 Finite State Automata With Output: Transducers

CS 330 Formal Methods and Models Dana Richards, George Mason University, Spring 2016 Quiz Solutions

Finite Automata. Informatics 2A: Lecture 3. Mary Cryan. 21 September School of Informatics University of Edinburgh

First Midterm Examination

Lexical Analysis Finite Automate

Types of Finite Automata. CMSC 330: Organization of Programming Languages. Comparing DFAs and NFAs. NFA for (a b)*abb.

Today s Topics Automata and Languages

Automata and Languages

Talen en Automaten Test 1, Mon 7 th Dec, h45 17h30

Formal Languages and Automata

Grammar. Languages. Content 5/10/16. Automata and Languages. Regular Languages. Regular Languages

Homework 3 Solutions

Lecture 08: Feb. 08, 2019

Revision Sheet. (a) Give a regular expression for each of the following languages:

Lecture 6 Regular Grammars

Deterministic simulation of a NFA with k symbol lookahead

CS103B Handout 18 Winter 2007 February 28, 2007 Finite Automata

Exercises Chapter 1. Exercise 1.1. Let Σ be an alphabet. Prove wv = w + v for all strings w and v.

Types of Finite Automata. CMSC 330: Organization of Programming Languages. Comparing DFAs and NFAs. Comparing DFAs and NFAs (cont.) Finite Automata 2

CS 311 Homework 3 due 16:30, Thursday, 14 th October 2010

3 Regular expressions

Closure Properties of Regular Languages

5. (±±) Λ = fw j w is string of even lengthg [ 00 = f11,00g 7. (11 [ 00)± Λ = fw j w egins with either 11 or 00g 8. (0 [ ffl)1 Λ = 01 Λ [ 1 Λ 9.

NFAs continued, Closure Properties of Regular Languages

Lecture 9: LTL and Büchi Automata

12.1 Nondeterminism Nondeterministic Finite Automata. a a b ε. CS125 Lecture 12 Fall 2016

5.1 Definitions and Examples 5.2 Deterministic Pushdown Automata

Anatomy of a Deterministic Finite Automaton. Deterministic Finite Automata. A machine so simple that you can understand it in less than one minute

First Midterm Examination

Lexical Analysis Part III

Intermediate Math Circles Wednesday, November 14, 2018 Finite Automata II. Nickolas Rollick a b b. a b 4

1 Nondeterministic Finite Automata

CS 310 (sec 20) - Winter Final Exam (solutions) SOLUTIONS

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

CS 275 Automata and Formal Language Theory

Physics 111. Uniform circular motion. Ch 6. v = constant. v constant. Wednesday, 8-9 pm in NSC 128/119 Sunday, 6:30-8 pm in CCLIR 468

4 Deterministic Büchi Automata

11.1 Finite Automata. CS125 Lecture 11 Fall Motivation: TMs without a tape: maybe we can at least fully understand such a simple model?

12.1 Nondeterminism Nondeterministic Finite Automata. a a b ε. CS125 Lecture 12 Fall 2014

Nondeterminism. Nondeterministic Finite Automata. Example: Moves on a Chessboard. Nondeterminism (2) Example: Chessboard (2) Formal NFA

A negative answer to a question of Wilke on varieties of!-languages

State Minimization for DFAs

CS 373, Spring Solutions to Mock midterm 1 (Based on first midterm in CS 273, Fall 2008.)

Transcription:

Discete Mthemtics nd Logic II. Automt SFWR ENG 2FA3 Ryszd Jnicki Winte 2014 Acknowledgments: Mteil sed on Automt nd Computility y Dexte C. Kozen (Chpte 3). Ryszd Jnicki Discete Mthemtics nd Logic II. Automt 1 / 15

Sttes nd Tnsitions A stte o system cn e seen s is n instntneous desciption o tht system A stte gives ll elevnt inomtion necessy to detemine how the system cn evolve om tht point on Tnsitions e chnges o stte Tnsitions cn hppen spontneously o in esponse to extenl inputs Assumption: stte tnsitions e instntneous A system tht consists o only nitely mny sttes nd tnsitions mong them is clled nite-stte tnsition system Ryszd Jnicki Discete Mthemtics nd Logic II. Automt 2 / 15

Sttes nd Tnsitions q0 Geen 5 min () q1 Yellow 5 min () 1 min () q2 Red Ryszd Jnicki Discete Mthemtics nd Logic II. Automt 3 / 15

Sttes nd Tnsitions q0 q1 q2 Ryszd Jnicki Discete Mthemtics nd Logic II. Automt 4 / 15

Sttes nd Tnsitions Yellow : ek down : epi Geen Fil Red Ryszd Jnicki Discete Mthemtics nd Logic II. Automt 5 / 15

Finite Automt We model these stctly y mthemticl model clled nite utomton Denition (Deteministic nite utomton) Fomlly, deteministic nite utomton (DFA) is stuctue M = (Q, Σ, δ, s, F ), whee Q is nite set o sttes; Σ is nite set clled input lphet; δ : Q Σ Q is the tnsition unction s Q is the stt stte; F is suset o Q ; elements o F e clled ccept o nl sttes. Ryszd Jnicki Discete Mthemtics nd Logic II. Automt 6 / 15

Finite Automt Yellow : ek down : epi Geen Fil Q = {Red, Yellow, Geen, Fil} Red Σ = {,,, } δ = {((Red, ), Geen), ((Red, ), Fil), ((Geen, ), Yellow), ((Geen, ), Fil), ((Yellow, ), Red), ((Yellow, ), Fil), ((Fil, ), Red)} s = Red F = {Fil} Ryszd Jnicki Discete Mthemtics nd Logic II. Automt 7 / 15

Finite Automt Repesenttions o unction Enumetion Tle δ = {((Red, ), Geen), ((Red, ), Fil), ((Geen, ), Yellow), ((Geen, ), Fil), ((Yellow, ), Red), ((Yellow, ), Fil), ((Fil, ), Red)} Red Geen - Fil - Geen Yellow - Fil Yellow - Red Fil Fil - - - Red Ryszd Jnicki Discete Mthemtics nd Logic II. Automt 8 / 15

Finite Automt Yellow : ek down : epi Geen Fil Red Yellow Geen Fil Red Ryszd Jnicki Discete Mthemtics nd Logic II. Automt 9 / 15

Finite Automt An utomton is specied y giving its 5 pts Tnsition digm Yellow Geen Fil Red Tul epesenttion o n utomton Red Geen Red Fil Red Geen Yellow Geen Fil Geen Yellow Yellow Red Fil Yellow Fil (F) Fil Fil Fil Red Ryszd Jnicki Discete Mthemtics nd Logic II. Automt 10 / 15

Finite Automt How nite utomton M = (Q, Σ, δ, s, F ) opetes (Inomlly) An input cn e sting x Σ Mke mk on on the stt stte s Scn the input sting x om let to ight, one symol t time, moving the mk ccoding δ When we come to the end o the input sting, the mk is on some stte p The sting x is sid to e ccepted y the mchine M i p F nd ejected i p F Ryszd Jnicki Discete Mthemtics nd Logic II. Automt 11 / 15

Finite Automt How nite utomton M = (Q, Σ, δ, s, F ) opetes (Fomlly) Fom δ nd y induction on the length o x, we dene unction s ollows: δ : Q Σ Q δ (q, ɛ) de = q Bse cse ) δ (q, x) de = δ ( δ (q, x), Inductive cse A sting x is sid to e ccepted y the utomton M i δ (s, x) F nd ejected y the utomton M i δ (s, x) F Ryszd Jnicki Discete Mthemtics nd Logic II. Automt 12 / 15

Lnguge nd egul set Denition (Lnguge) The set o lnguge ccepted y M = (Q, Σ, δ, s, F ) is the set o ll stings ccepted y M nd is denoted L(M): L(M) de = {x Σ δ (s, x) F } Denition (Regul set) A suset A Σ is sid to e egul i A = L(M) o some nite utomton M. Ryszd Jnicki Discete Mthemtics nd Logic II. Automt 13 / 15

Lnguge nd egul set Exmple λ Even Odd 1 L(M) =? 2 Is {x {, } x contins n odd nume o 's nd even nume o 's} egul set? Ryszd Jnicki Discete Mthemtics nd Logic II. Automt 14 / 15

Lnguge nd egul set Exmple (Solutions) 1 L(M) = {x {, } x contins n even nume o 's nd ity nume o 's} 2 Is {x {, } x contins n odd nume o 's nd even nume o 's} egul set? Yes, see the utomton elow. Ryszd Jnicki Discete Mthemtics nd Logic II. Automt 15 / 15