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

Similar documents
Finite-State Automata: Recap

Theory of Computation Regular Languages

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

AUTOMATA AND LANGUAGES. Definition 1.5: Finite Automaton

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

NFAs continued, Closure Properties of Regular Languages

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

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

Fundamentals of Computer Science

Non-deterministic Finite Automata

NFAs and Regular Expressions. NFA-ε, continued. Recall. Last class: Today: Fun:

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

CS375: Logic and Theory of Computing

Deterministic Finite Automata

Speech Recognition Lecture 2: Finite Automata and Finite-State Transducers

Convert the NFA into DFA

CS:4330 Theory of Computation Spring Regular Languages. Equivalences between Finite automata and REs. Haniel Barbosa

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

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

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

CISC 4090 Theory of Computation

CHAPTER 1 Regular Languages. Contents

CSC 311 Theory of Computation

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

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

NFAs continued, Closure Properties of Regular Languages

Minimal DFA. minimal DFA for L starting from any other

DFA Minimization and Applications

Non-deterministic Finite Automata

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

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

CS375: Logic and Theory of Computing

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

Some Theory of Computation Exercises Week 1

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

Nondeterminism and Nodeterministic Automata

Worked out examples Finite Automata

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

Lecture 08: Feb. 08, 2019

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

Formal Language and Automata Theory (CS21004)

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

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

Designing finite automata II

input tape head moves current state

3 Regular expressions

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

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

Let's start with an example:

Languages & Automata

Formal languages, automata, and theory of computation

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

Harvard University Computer Science 121 Midterm October 23, 2012

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.

Lecture 6 Regular Grammars

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

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

Finite Automata-cont d

Non-Deterministic Finite Automata

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

Lexical Analysis Part III

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.

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

Homework 4. 0 ε 0. (00) ε 0 ε 0 (00) (11) CS 341: Foundations of Computer Science II Prof. Marvin Nakayama

CS415 Compilers. Lexical Analysis and. These slides are based on slides copyrighted by Keith Cooper, Ken Kennedy & Linda Torczon at Rice University

Today s Topics Automata and Languages

Automata and Languages

CMSC 330: Organization of Programming Languages

Formal Languages and Automata

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

Deterministic Finite-State Automata

Speech Recognition Lecture 2: Finite Automata and Finite-State Transducers. Mehryar Mohri Courant Institute and Google Research

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

a b b a pop push read unread

Chapter 2 Finite Automata

Thoery of Automata CS402

First Midterm Examination

Java II Finite Automata I

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

Table of contents: Lecture N Summary... 3 What does automata mean?... 3 Introduction to languages... 3 Alphabets... 3 Strings...

More on automata. Michael George. March 24 April 7, 2014

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

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

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

Name Ima Sample ASU ID

Finite Automata Theory and Formal Languages TMV027/DIT321 LP4 2018

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

FABER Formal Languages, Automata and Models of Computation

Closure Properties of Regular Languages

ɛ-closure, Kleene s Theorem,

Regular languages refresher

1 Nondeterministic Finite Automata

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

CS103B Handout 18 Winter 2007 February 28, 2007 Finite Automata

Scanner. Specifying patterns. Specifying patterns. Operations on languages. A scanner must recognize the units of syntax Some parts are easy:

Section: Other Models of Turing Machines. Definition: Two automata are equivalent if they accept the same language.

Finite Automata Part Three

CS 275 Automata and Formal Language Theory

First Midterm Examination

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

Transcription:

CMPSCI601: Introduction Lecture 1 In-depth introduction to min models, concepts of theory of computtion: Computility: wht cn e computed in principle Logic: how cn we express our requirements Complexity: wht cn e computed in prctice Concrete Prolem Mthemticl Model Forml Models of Computtion: Finite-stte Stcks = CFL Turing Mchine Logicl Formul 1

CMSPSCI 601: Requirements Lecture 1 Texts: ville t Jeffery Amherst College Store [P]: Christos Ppdimitriou, Computtionl Complexity [BE:] Jon Brwise nd John Etchemendy, Lnguge, Proof, nd Logic Prerequisites: Mthemticl mturity: reson strctly, understnd nd write proofs. CMPSCI 250 needed; CMPSCI 311, 401 helpful. Tody s mteril is good tste of the sort of stuff we will do. Work: eight prolem sets (35% of grde midterm (30% of grde finl (35% of grde Coopertion: Students should tlk to ech other nd help ech other; ut write up solutions on your own, in your own words. Shring or copying solution could result in filure. If significnt prt of one of your solutions is due to someone else, or something you ve red then you must cknowledge your source 2

CMSPCI 601: On Reserve in Duois Lirry Lecture 1 Mthemticl Sophistiction How to Red nd Do Proofs, Second Edition y Dniel Solow, 1990, John Wiley nd Sons. Review of Regulr nd Context-Free Lnguges Hopcroft, Motwni, nd Jeffrey D. Ullmn, Introduction to Automt Theory, Lnguges, nd Computtion, 2001: Chpters 1 6. Lewis nd Ppdimitriou, Elements of the Theory of Computtion, 1998: Chpters 1 3. Sipser, Introduction to the Theory of Computtion, 1997: Chpters 1 2. NP Completeness Grey nd Johnson, Computers nd Intrctility, 1979. Descriptive Complexity Immermn, Descriptive Complexity, 1999. 3

Syllus will e up soon on the course we site: http://www.cs.umss.edu/ rring/cs601 There is pointer there to the Spring 2002 we site, nd the syllus there will e close to wht we do here. Rough guide: Forml Lnguges nd Computility (9 lectures Propositionl nd First-Order Logic (7 lectures Complexity Theory (11 lectures 4

CMPSCI 601: Review of Regulr Sets Lecture 1 Definition:, An lphet is non-empty finite set, e.g.,, etc. Definition: A string over n lphet is finite sequence of zero or more symols from. The unique string with zero symols is clled. The set of ll strings over is clled. Definition: A lnguge over is ny suset of. The decision prolem for lnguge is to input string nd determine whether. Definition: The set of regulr expressions lphet is the smllest set of strings such tht: 1. if then 2. R 3. R 4. if ( "$# % ( &(' % (c " then so re the following: over 5

# # ' # Exmples: Menings: N Recll the mening of Kleene str, for ny set,, " +$ $ # # %$'& # # $-, # ## # ($ & (. N/ # #*# # $ $-, 6

' # Mening of Regulr Expression: 1. if then 2. R 3. R 4. if ; " ; ; then so re " # %, "(' %, " : % "(# % " " " " & % " Definition 1.1 is regulr iff & In other words, set,, is regulr iff there exists regulr expression tht denotes it. 7

Definition: is tuple, A deterministic finite utomton (DFA is finite set of sttes, is finite lphet, is the trnsition function, is the strt stte, nd is the set of finl or ccept sttes. 8

s q 9

Definition: A nondeterministic finite utomton (NFA is tuple, is finite set of sttes, is finite lphet, # is the strt stte, nd is the trnsition function, is the set of finl or ccept sttes. power set of 10

,,,,,,, 1 0,1 0,1 0,1 0 1 2 3 0,1 n+1 0,1 [You will show in HW 1 tht to ccept, would need sttes.],, DFA 11

Proposition 1.2 Every NFA NFA wo -trnsitions s.t. Proof: Given where cn e trnslted into n, let F 1 2 1 2 ε 0 0 ε 3 4 3 4 12

Nottion: For DFA,, let e the stte tht will e in fter reding string, when strted in, For n NFA without trnsitions, let e the set of sttes tht reding string, when strted in,, cn e in fter 13

, Proposition 1.3 For every NFA,, with. sttes, there is DFA,, with t most sttes s.t.. Proof: Let. By Proposition 1.2 my ssume tht hs no trnsitions. Let N 0 1 c 0, 1 0 0 D 0 1 {} {,} {,c} 1 1 14

Clim: For ll, By induction on : : Inductively, :. % Therefore,. 15

Theorem 1.4 (Kleene s Th Let e ny lnguge. Then the following re equivlent: 1. 2. 3. 4. " 5. is regulr. Proof: Ovious tht y Prop. 1.2., for some DFA., for some NFA wo trnsitions, for some NFA., for some regulr expression. y Prop. 1.3 (suset construction. y def of regulr : We show y induction on the numer of symols in the regulr expression, tht there is n NFA with " :. e = e = ε e = 0/ 16

Union L(N = L(N + L(N 1 2 Conctention L(N = L(N 1 L(N 2 ε N 1 N 1 ε ε N 2 N 2 Kleene Str ε L(N = (L(N 1 * N 1 ε 17

,, # : Let., / no intermedite stte ( # & # # ## # " i L k i j j L k i k+1 k+1 L k k+1 j L k k+1 k+1 18