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

Size: px
Start display at page:

Download "Course Material. CS Lecture 1 Deterministic Finite Automata. Grading and Policies. Workload. Website:http://www.cs.colostate."

Transcription

1 Course Mteril CS Lecture 1 Determiistic Fiite Automt Fll 2008 Wesite: Syllus, Outlie, Grdig Policies Homework d Slides Istructor: D Mssey Office hours: 2-3pm Tues d Wed Emil: mssey@cs.colostte.edu Techig Assistt: Willim Spriger Emil: wmsprig@cs.colostte.edu Grdig d Policies Grdig 10% Homework 30% Quizes 30% Midterm 30% Fil Grdig Policy No credit for lte homework. No exceptios. No credit for missed exms. No mke-up exms. Worklod Weekly Redig Assigmets Course will cover most of oth ooks Weekly Homework Assigmets Aville from course wesite y Fridy morig Due i lecture the followig Thursdy Exms Midterm + fil (comprehesive) I clss, closed ook, oe doule-sided chet sheet llowed 1

2 Admiistrtive You re resposile for kowig course, deprtmet, d uiversity policies READ THE SYLLABUS PROVIDES LINKS TO DEPT POLICIES Plgirism see defiitio plgirism/ Coflict Resolutio we site Aout These Slides Slides Origilly Developed y Prof. Costs Busch (2004) My thks to Prof. Busch for developig the origil slide set. Adpted with permissio y Prof. D Mssey (Sprig 2007) Susequet modifictios Lguges A lguge is set of strigs Strig: A sequece of letters Exmples: ct, dog, house, Defied over lphet: Σ {,, c,, z} Alphets d Strigs We will use smll lphets: Strigs Σ { } u v w 2

3 Strig Coctetio w 1 2 v wv 1 2 m m Strig Reverse w w R Coctetio > Reverse > Strig Legth w 1 2 w Legth Legth d Coctetio uv u + v u, u 3 v, v 5 uv 8 uv u + v Does this prove the formul is true? C you prove the formul is true? 3

4 Empty Strig A strig with o letters: λ 0 Oservtios: λ λw wλ w λ λ Sustrig Susequece of cosecutive chrcters Strig Sustrig prefix λ Prefix d Suffix w uv suffix λ More Coctetio w ww w 0 w λ ( ) 2 0 ( ) λ 4

5 Σ Σ* Σ* The * Opertio Give lphet {, } { λ,,,,,,,,, } Σ Is the set of ll strigs over the lphet + Σ Σ Σ* Σ + The + Opertio Give lphet Is the set of ll strigs over the lphet mius Σ Σ + Σ* λ {, } { λ,,,,,,,,, } {,,,,,,,, } λ Give lphet: Σ Σ* Lguges A Lguge is y suset of Σ* {, } { λ,,,,,,,, } Some Lguges over this lphet iclude: { λ} {,, } { λ,,,,, } Lguges, Sets, d Nottios Sets Set size Set size Strig legth {} { λ} {} 0 { λ} 1 λ 0 5

6 λ A Ifiite Lguge L { : 0} L L Wht is the lphet ssocited with this lguge? Lguges d Opertios A lguge is set d set opertios pply {,, } {, } {,,, {,, } {, } { } {,, } {, } {, } } The Complemet of Lguge Ituitively, ll strigs ot i the lguge. More precisely: L Σ* L {, } { λ,,,,,, } Is ccc i the complemet of this lguge? L R Reverse R { w : w L} R {,, } {,, } L { : 0} L R { : 0} 6

7 L Coctetio { xy : x L y L } 1 L 2 1, 2 More Coctetio L LL L 0 L { λ} {,, }{, } {,,,,, } 0 {,, } { λ} 3 {, } {, }{, }{, } {,,,,,,, } {, } Str-Closure (Kleee *) 0 1 L * L L L 2 λ,,, *,,,,,,,, Is Our Nottio Sufficiet? Descrie lguge y listig ll the strigs i the lguge L 2 But this oly works for fiite lguges Descrie lguge y listig some ptter such s: L { : 0} m m { :, m 0} 2 L But this hs limits s well. Cosider the lguge of ll vlid Eglish seteces 7

8 Automt Fiite Automto Iput Strig Fiite Automto Output Strig Fiite Accepter Iput Strig Fiite Automto Output Accept or Reject iitil stte Trsitio Grph A -Fiite Accepter stte trsitio fil stte ccept 8

9 Iitil Cofigurtio Iput Strig Redig the Iput q 0 9

10 Iput fiished Output: ccept Strig Rejectio 10

11 Iput fiished The Empty Strig λ Output: reject q 0 11

12 Aother Exmple λ q 0, Output: reject Would it e possile to ccept the empty strig?,, 12

13 Iput fiished Output: ccept,, Rejectio,, 13

14 ,, Iput fiished Which strigs re ccepted?, Output: reject Formlities M ( Q Σ, δ, q, F), 0 Determiistic Fiite Accepter (DFA) Q Σ δ q 0 F : set of sttes : iput lphet : trsitio fuctio : iitil stte : set of fil sttes 14

15 Iput Alphet Σ Σ { } Q Set of Sttes Q { q, q, q, q, q q } , 5 Iitil Stte Set of Fil Sttes F F { } q 4 q 0 q 4 15

16 Trsitio Fuctio δ δ : Q Σ Q δ ( q 0, ) q 1 q 1 δ ( q ) 5 0, q δ ( q ) 3 2, q 16

17 δ q 0 q 1 q 2 q 3 q 4 Trsitio Fuctio δ q5 q5 q5 q5 Exteded Trsitio Fuctio δ * δ *: Q Σ* Q ( q ) 2 δ * 0, q ( q ) 4 δ * 0, q q 2 17

18 ( q 0, ) 5 δ * q Oservtio: There is wlk from with lel w δ * (, w) q q q to q q w q q 0 σ σ 2 w σ 1 σ 2 σ k 1 k q q σ Exmple: There is wlk from q 0 to with lel ( q ) 5 δ * 0, q Recursive Defiitio δ *( q, λ) q δ *( q, wσ ) δ ( δ *( q, w), σ ) w q σ q q 1 q 0 δ *( q, wσ ) q δ (, σ ) q δ *( q, wσ ) δ ( q, σ ) δ *( q, w) 1 δ *( q, wσ ) δ ( δ *( q, w), σ ) 18

19 δ δ δ δ δ q * (, ) ( δ * (, ), ) ( δ ( δ * (, λ), ), ) ( δ (, ), ) ( q, ) 2 1 Lguges Accepted y DFAs Tke DFA M Defiitio: The lguge L( M ) cotis ll iput strigs ccepted y M L ( M ) M { strigs tht drive to fil stte} Wht s Next Red Liz Chpter 1, Chpter JFLAP Strtup, Chpter 1, 2.1 Next Lecture Topics from Chpter 2.1 d 2.2 Regulr Lguges NoDetermiistic Fiite Automt Homework 1 Due Thursdy 19

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

Content. Languages, Alphabets and Strings. Operations on Strings. a ab abba baba. aaabbbaaba b 5. Languages. A language is a set of strings CD5560 FABER Forml guges, Automt d Models of Computtio ecture Mälrdle Uiversity 006 Cotet guges, Alphets d Strigs Strigs & Strig Opertios guges & guge Opertios Regulr Expressios Fiite Automt, FA Determiistic

More information

Module 9: String Matching

Module 9: String Matching Module 9: Strig Mtchig CS 240 Dt Structures d Dt Mgemet T. Biedl K. Lctot M. Sepehri S. Wild Bsed o lecture otes y my previous cs240 istructors Dvid R. Cherito School of Computer Sciece, Uiversity of Wterloo

More information

Formal Languages The Pumping Lemma for CFLs

Formal Languages The Pumping Lemma for CFLs Forl Lguges The Pupig Le for CFLs Review: pupig le for regulr lguges Tke ifiite cotext-free lguge Geertes ifiite uer of differet strigs Exple: 3 I derivtio of log strig, vriles re repeted derivtio: 4 Derivtio

More information

Applications of Regular Closure

Applications of Regular Closure Applictios of Regulr Closure 1 The itersectio of cotext-free lguge d regulr lguge is cotext-free lguge L1 L2 cotext free regulr Regulr Closure L1 L 2 cotext-free 2 Liz 6 th, sectio 8.2, exple 8.7, pge

More information

Review of CFGs and Parsing I Context-free Languages and Grammars. Winter 2014 Costas Busch - RPI 1

Review of CFGs and Parsing I Context-free Languages and Grammars. Winter 2014 Costas Busch - RPI 1 Review of CFGs d Prsig I Cotext-free Lguges d Grmmrs Witer 2014 Costs Busch - RPI 1 Cotext-Free Lguges { b : { ww } 0} R Regulr Lguges *b* ( b) * Witer 2014 Costs Busch - RPI 2 Cotext-Free Lguges Cotext-Free

More information

is an ordered list of numbers. Each number in a sequence is a term of a sequence. n-1 term

is an ordered list of numbers. Each number in a sequence is a term of a sequence. n-1 term Mthemticl Ptters. Arithmetic Sequeces. Arithmetic Series. To idetify mthemticl ptters foud sequece. To use formul to fid the th term of sequece. To defie, idetify, d pply rithmetic sequeces. To defie rithmetic

More information

input tape head moves current state

input tape head moves current state CPS 140 - Mthemticl Foundtions of CS Dr. Susn Rodger Section: Finite Automt (Ch. 2) (lecture notes) Things to do in clss tody (Jn. 13, 2004): ffl questions on homework 1 ffl finish chpter 1 ffl Red Chpter

More information

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

Kleene s Theorem. Kleene s Theorem. Kleene s Theorem. Kleene s Theorem. Kleene s Theorem. Kleene s Theorem 2/16/15 Models of Comput:on Lecture #8 Chpter 7 con:nued Any lnguge tht e defined y regulr expression, finite utomton, or trnsi:on grph cn e defined y ll three methods We prove this y showing tht ny lnguge defined

More information

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

A Turing Machine. The Tape. Languages accepted by Turing Machines. Tape... Read-Write head. Context-Free n Languages. Control Unit. 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

More information

Fundamentals of Computer Science

Fundamentals of Computer Science Fundmentls of Computer Science Chpter 3: NFA nd DFA equivlence Regulr expressions Henrik Björklund Umeå University Jnury 23, 2014 NFA nd DFA equivlence As we shll see, it turns out tht NFA nd DFA re equivlent,

More information

Formal Languages and Automata

Formal Languages and Automata Moile Computing nd Softwre Engineering p. 1/5 Forml Lnguges nd Automt Chpter 2 Finite Automt Chun-Ming Liu cmliu@csie.ntut.edu.tw Deprtment of Computer Science nd Informtion Engineering Ntionl Tipei University

More information

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

Languages. A language is a set of strings. String: A sequence of letters. Examples: cat, dog, house, Defined over an alphabet: Languages 1 Languages A language is a set of strings String: A sequence of letters Examples: cat, dog, house, Defined over an alphaet: a,, c,, z 2 Alphaets and Strings We will use small alphaets: Strings

More information

Homework 3 Solutions

Homework 3 Solutions CS 341: Foundtions of Computer Science II Prof. Mrvin Nkym Homework 3 Solutions 1. Give NFAs with the specified numer of sttes recognizing ech of the following lnguges. In ll cses, the lphet is Σ = {,1}.

More information

Lecture 08: Feb. 08, 2019

Lecture 08: Feb. 08, 2019 4CS4-6:Theory of Computtion(Closure on Reg. Lngs., regex to NDFA, DFA to regex) Prof. K.R. Chowdhry Lecture 08: Fe. 08, 2019 : Professor of CS Disclimer: These notes hve not een sujected to the usul scrutiny

More information

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

CSCI 340: Computational Models. Transition Graphs. Department of Computer Science CSCI 340: Computtionl Models Trnsition Grphs Chpter 6 Deprtment of Computer Science Relxing Restrints on Inputs We cn uild n FA tht ccepts only the word! 5 sttes ecuse n FA cn only process one letter t

More information

Let's start with an example:

Let's start with an example: Finite Automt Let's strt with n exmple: Here you see leled circles tht re sttes, nd leled rrows tht re trnsitions. One of the sttes is mrked "strt". One of the sttes hs doule circle; this is terminl stte

More information

CISC 4090 Theory of Computation

CISC 4090 Theory of Computation 9/6/28 Stereotypicl computer CISC 49 Theory of Computtion Finite stte mchines & Regulr lnguges Professor Dniel Leeds dleeds@fordhm.edu JMH 332 Centrl processing unit (CPU) performs ll the instructions

More information

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

Chapter Five: Nondeterministic Finite Automata. Formal Language, chapter 5, slide 1 Chpter Five: Nondeterministic Finite Automt Forml Lnguge, chpter 5, slide 1 1 A DFA hs exctly one trnsition from every stte on every symol in the lphet. By relxing this requirement we get relted ut more

More information

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

Regular Expressions (RE) Regular Expressions (RE) Regular Expressions (RE) Regular Expressions (RE) Kleene-* Regulr Expressions (RE) Regulr Expressions (RE) Empty set F A RE denotes the empty set Opertion Nottion Lnguge UNIX Empty string A RE denotes the set {} Alterntion R +r L(r ) L(r ) r r Symol Alterntion

More information

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

Homework 4. 0 ε 0. (00) ε 0 ε 0 (00) (11) CS 341: Foundations of Computer Science II Prof. Marvin Nakayama CS 341: Foundtions of Computer Science II Prof. Mrvin Nkym Homework 4 1. UsetheproceduredescriedinLemm1.55toconverttheregulrexpression(((00) (11)) 01) into n NFA. Answer: 0 0 1 1 00 0 0 11 1 1 01 0 1 (00)

More information

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

Regular expressions, Finite Automata, transition graphs are all the same!! CSI 3104 /Winter 2011: Introduction to Forml Lnguges Chpter 7: Kleene s Theorem Chpter 7: Kleene s Theorem Regulr expressions, Finite Automt, trnsition grphs re ll the sme!! Dr. Neji Zgui CSI3104-W11 1

More information

Deterministic Finite Automata

Deterministic Finite Automata Finite Automt Deterministic Finite Automt H. Geuvers nd J. Rot Institute for Computing nd Informtion Sciences Version: fll 2016 J. Rot Version: fll 2016 Tlen en Automten 1 / 21 Outline Finite Automt Finite

More information

CSC 311 Theory of Computation

CSC 311 Theory of Computation CSC 11 Theory of Computtion Tutoril on DFAs, NFAs, regulr expressions, regulr grmmr, closure of regulr lnguges, context-free grmmrs, non-deterministic push-down utomt, Turing mchines,etc. Tutoril 2 Second

More information

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

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 CS4 45- Determinisitic Finite Automt -: Genertors vs. Checkers Regulr expressions re one wy to specify forml lnguge String Genertor Genertes strings in the lnguge Deterministic Finite Automt (DFA) re nother

More information

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.

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. York University CSE 2 Unit 3. DFA Clsses Converting etween DFA, NFA, Regulr Expressions, nd Extended Regulr Expressions Instructor: Jeff Edmonds Don t chet y looking t these nswers premturely.. For ech

More information

RULES FOR MANIPULATING SURDS b. This is the addition law of surds with the same radicals. (ii)

RULES FOR MANIPULATING SURDS b. This is the addition law of surds with the same radicals. (ii) SURDS Defiitio : Ay umer which c e expressed s quotiet m of two itegers ( 0 ), is clled rtiol umer. Ay rel umer which is ot rtiol is clled irrtiol. Irrtiol umers which re i the form of roots re clled surds.

More information

Midterm 1 Practice. CS 350 Fall 2018 gilray.org/classes/fall2018/cs350/

Midterm 1 Practice. CS 350 Fall 2018 gilray.org/classes/fall2018/cs350/ Midterm 1 Prctice CS 350 Fll 2018 gilry.org/clsses/fll2018/cs350/ 1 Midterm #1: Thursdy, Septemer 27! Bring less stuff, if possile. Keep ny gs under the tle. You my hve out: pencil, pen, nd/or erser. My

More information

CD5080 AUBER RECAPITULATION. Context-Free Languages. Models of Computation, Languages and Automata. S asb. S bsb

CD5080 AUBER RECAPITULATION. Context-Free Languages. Models of Computation, Languages and Automata. S asb. S bsb CD5080 AUBR RCAPIULAION Models of Coputtio, Lguges d Autot Leture 1 Cotext-ree Lguges, CL Pushdow Autot, PDA Pupig Le for CL eleted CL Proles Cotext-ree Lguges Mälrdle Uiversity 00 1 3 Cotext-ree Lguges

More information

Chapter 2 Finite Automata

Chapter 2 Finite Automata Chpter 2 Finite Automt 28 2.1 Introduction Finite utomt: first model of the notion of effective procedure. (They lso hve mny other pplictions). The concept of finite utomton cn e derived y exmining wht

More information

Lecture 2.5: Sequences

Lecture 2.5: Sequences Lecture.5: Sequeces CS 50, Discrete Structures, Fall 015 Nitesh Saxea Adopted from previous lectures by Zeph Gruschlag Course Admi HW posted Covers Chapter Due Oct 0 (Tue) Mid Term 1: Oct 15 (Thursday)

More information

MTH 146 Class 16 Notes

MTH 146 Class 16 Notes MTH 46 Clss 6 Notes 0.4- Cotiued Motivtio: We ow cosider the rc legth of polr curve. Suppose we wish to fid the legth of polr curve curve i terms of prmetric equtios s: r f where b. We c view the cos si

More information

Finite-State Automata: Recap

Finite-State Automata: Recap Finite-Stte Automt: Recp Deepk D Souz Deprtment of Computer Science nd Automtion Indin Institute of Science, Bnglore. 09 August 2016 Outline 1 Introduction 2 Forml Definitions nd Nottion 3 Closure under

More information

Name Ima Sample ASU ID

Name Ima Sample ASU ID Nme Im Smple ASU ID 2468024680 CSE 355 Test 1, Fll 2016 30 Septemer 2016, 8:35-9:25.m., LSA 191 Regrding of Midterms If you elieve tht your grde hs not een dded up correctly, return the entire pper to

More information

ICS141: Discrete Mathematics for Computer Science I

ICS141: Discrete Mathematics for Computer Science I ICS4: Discrete Mthemtics for Computer Sciece I Dept. Iformtio & Computer Sci., J Stelovsky sed o slides y Dr. Bek d Dr. Still Origils y Dr. M. P. Frk d Dr. J.L. Gross Provided y McGrw-Hill 3- Quiz. gcd(84,96).

More information

Formal languages, automata, and theory of computation

Formal languages, automata, and theory of computation Mälrdlen University TEN1 DVA337 2015 School of Innovtion, Design nd Engineering Forml lnguges, utomt, nd theory of computtion Thursdy, Novemer 5, 14:10-18:30 Techer: Dniel Hedin, phone 021-107052 The exm

More information

AUTOMATA AND LANGUAGES. Definition 1.5: Finite Automaton

AUTOMATA AND LANGUAGES. Definition 1.5: Finite Automaton 25. Finite Automt AUTOMATA AND LANGUAGES A system of computtion tht only hs finite numer of possile sttes cn e modeled using finite utomton A finite utomton is often illustrted s stte digrm d d d. d q

More information

Advanced Calculus Test File Spring Test 1

Advanced Calculus Test File Spring Test 1 Advced Clculus Test File Sprig 009 Test Defiitios - Defie the followig terms.) Crtesi product of A d B.) The set, A, is coutble.) The set, A, is ucoutble 4.) The set, A, is ifiite 5.) The sets A d B re

More information

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

Theory of Computation Regular Languages. (NTU EE) Regular Languages Fall / 38 Theory of Computtion Regulr Lnguges (NTU EE) Regulr Lnguges Fll 2017 1 / 38 Schemtic of Finite Automt control 0 0 1 0 1 1 1 0 Figure: Schemtic of Finite Automt A finite utomton hs finite set of control

More information

Harvard University Computer Science 121 Midterm October 23, 2012

Harvard University Computer Science 121 Midterm October 23, 2012 Hrvrd University Computer Science 121 Midterm Octoer 23, 2012 This is closed-ook exmintion. You my use ny result from lecture, Sipser, prolem sets, or section, s long s you quote it clerly. The lphet is

More information

Some Properties of Brzozowski Derivatives of Regular Expressions

Some Properties of Brzozowski Derivatives of Regular Expressions Itertiol Jourl of Computer Treds d Techology (IJCTT) volume 13 umber 1 Jul 014 Some Properties of Brzozoski erivtives of Regulr Expressios NMuruges #1, OVShmug Sudrm * #1 Assistt Professor, ept of Mthemtics,

More information

,... are the terms of the sequence. If the domain consists of the first n positive integers only, the sequence is a finite sequence.

,... are the terms of the sequence. If the domain consists of the first n positive integers only, the sequence is a finite sequence. Chpter 9 & 0 FITZGERALD MAT 50/5 SECTION 9. Sequece Defiitio A ifiite sequece is fuctio whose domi is the set of positive itegers. The fuctio vlues,,, 4,...,,... re the terms of the sequece. If the domi

More information

CS375: Logic and Theory of Computing

CS375: Logic and Theory of Computing CS375: Logic nd Theory of Computing Fuhu (Frnk) Cheng Deprtment of Computer Science University of Kentucky 1 Tle of Contents: Week 1: Preliminries (set lger, reltions, functions) (red Chpters 1-4) Weeks

More information

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

CHAPTER 1 Regular Languages. Contents. definitions, examples, designing, regular operations. Non-deterministic Finite Automata (NFA) Finite Automt (FA or DFA) CHAPTER Regulr Lnguges Contents definitions, exmples, designing, regulr opertions Non-deterministic Finite Automt (NFA) definitions, equivlence of NFAs DFAs, closure under regulr

More information

Deterministic Finite-State Automata

Deterministic Finite-State Automata Deterministic Finite-Stte Automt Deepk D Souz Deprtment of Computer Science nd Automtion Indin Institute of Science, Bnglore. 12 August 2013 Outline 1 Introduction 2 Exmple DFA 1 DFA for Odd number of

More information

CS103 Handout 32 Fall 2016 November 11, 2016 Problem Set 7

CS103 Handout 32 Fall 2016 November 11, 2016 Problem Set 7 CS103 Hndout 32 Fll 2016 Novemer 11, 2016 Prolem Set 7 Wht cn you do with regulr expressions? Wht re the limits of regulr lnguges? On this prolem set, you'll find out! As lwys, plese feel free to drop

More information

Minimal DFA. minimal DFA for L starting from any other

Minimal DFA. minimal DFA for L starting from any other Miniml DFA Among the mny DFAs ccepting the sme regulr lnguge L, there is exctly one (up to renming of sttes) which hs the smllest possile numer of sttes. Moreover, it is possile to otin tht miniml DFA

More information

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

Table of contents: Lecture N Summary... 3 What does automata mean?... 3 Introduction to languages... 3 Alphabets... 3 Strings... Tle of contents: Lecture N0.... 3 ummry... 3 Wht does utomt men?... 3 Introduction to lnguges... 3 Alphets... 3 trings... 3 Defining Lnguges... 4 Lecture N0. 2... 7 ummry... 7 Kleene tr Closure... 7 Recursive

More information

Discrete Mathematics I Tutorial 12

Discrete Mathematics I Tutorial 12 Discrete Mthemtics I Tutoril Refer to Chpter 4., 4., 4.4. For ech of these sequeces fid recurrece reltio stisfied by this sequece. (The swers re ot uique becuse there re ifiitely my differet recurrece

More information

Week 13 Notes: 1) Riemann Sum. Aim: Compute Area Under a Graph. Suppose we want to find out the area of a graph, like the one on the right:

Week 13 Notes: 1) Riemann Sum. Aim: Compute Area Under a Graph. Suppose we want to find out the area of a graph, like the one on the right: Week 1 Notes: 1) Riem Sum Aim: Compute Are Uder Grph Suppose we wt to fid out the re of grph, like the oe o the right: We wt to kow the re of the red re. Here re some wys to pproximte the re: We cut the

More information

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

CS 373, Spring Solutions to Mock midterm 1 (Based on first midterm in CS 273, Fall 2008.) CS 373, Spring 29. Solutions to Mock midterm (sed on first midterm in CS 273, Fll 28.) Prolem : Short nswer (8 points) The nswers to these prolems should e short nd not complicted. () If n NF M ccepts

More information

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

In-depth introduction to main models, concepts of theory of computation: 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:

More information

Section 6.3: Geometric Sequences

Section 6.3: Geometric Sequences 40 Chpter 6 Sectio 6.: Geometric Sequeces My jobs offer ul cost-of-livig icrese to keep slries cosistet with ifltio. Suppose, for exmple, recet college grdute fids positio s sles mger erig ul slry of $6,000.

More information

Some Theory of Computation Exercises Week 1

Some Theory of Computation Exercises Week 1 Some Theory of Computtion Exercises Week 1 Section 1 Deterministic Finite Automt Question 1.3 d d d d u q 1 q 2 q 3 q 4 q 5 d u u u u Question 1.4 Prt c - {w w hs even s nd one or two s} First we sk whether

More information

Java II Finite Automata I

Java II Finite Automata I Jv II Finite Automt I Bernd Kiefer Bernd.Kiefer@dfki.de Deutsches Forschungszentrum für künstliche Intelligenz Finite Automt I p.1/13 Processing Regulr Expressions We lredy lerned out Jv s regulr expression

More information

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

80 CHAPTER 2. DFA S, NFA S, REGULAR LANGUAGES. 2.6 Finite State Automata With Output: Transducers 80 CHAPTER 2. DFA S, NFA S, REGULAR LANGUAGES 2.6 Finite Stte Automt With Output: Trnsducers So fr, we hve only considered utomt tht recognize lnguges, i.e., utomt tht do not produce ny output on ny input

More information

Limits and an Introduction to Calculus

Limits and an Introduction to Calculus Nme Chpter Limits d Itroductio to Clculus Sectio. Itroductio to Limits Objective: I this lesso ou lered how to estimte limits d use properties d opertios of limits. I. The Limit Cocept d Defiitio of Limit

More information

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

CSCI 340: Computational Models. Kleene s Theorem. Department of Computer Science CSCI 340: Computtionl Models Kleene s Theorem Chpter 7 Deprtment of Computer Science Unifiction In 1954, Kleene presented (nd proved) theorem which (in our version) sttes tht if lnguge cn e defined y ny

More information

State Minimization for DFAs

State Minimization for DFAs Stte Minimiztion for DFAs Red K & S 2.7 Do Homework 10. Consider: Stte Minimiztion 4 5 Is this miniml mchine? Step (1): Get rid of unrechle sttes. Stte Minimiztion 6, Stte is unrechle. Step (2): Get rid

More information

Thoery of Automata CS402

Thoery of Automata CS402 Thoery of Automt C402 Theory of Automt Tle of contents: Lecture N0. 1... 4 ummry... 4 Wht does utomt men?... 4 Introduction to lnguges... 4 Alphets... 4 trings... 4 Defining Lnguges... 5 Lecture N0. 2...

More information

Today s Topics Automata and Languages

Today s Topics Automata and Languages Tody s Topics Automt nd Lnguges Prof. Mohmed Hmd Softwre Engineering L. The University of Aizu Jpn DFA to Regulr Expression GFNA DFAèGNFA GNFA è RE DFA è RE Exmples 2 DFA è RE NFA DFA -NFA REX GNFA 3 Definition

More information

Automata and Languages

Automata and Languages Automt nd Lnguges Prof. Mohmed Hmd Softwre Engineering L. The University of Aizu Jpn Tody s Topics DFA to Regulr Expression GFNA DFAèGNFA GNFA è RE DFA è RE Exmples 2 DFA è RE NFA DFA -NFA REX GNFA 3 Definition

More information

CMSC 330: Organization of Programming Languages

CMSC 330: Organization of Programming Languages CMSC 330: Orgniztion of Progrmming Lnguges Finite Automt 2 CMSC 330 1 Types of Finite Automt Deterministic Finite Automt (DFA) Exctly one sequence of steps for ech string All exmples so fr Nondeterministic

More information

Chapter 10: The Z-Transform Adapted from: Lecture notes from MIT, Binghamton University Hamid R. Rabiee Arman Sepehr Fall 2010

Chapter 10: The Z-Transform Adapted from: Lecture notes from MIT, Binghamton University Hamid R. Rabiee Arman Sepehr Fall 2010 Sigls & Systems Chpter 0: The Z-Trsform Adpted from: Lecture otes from MIT, Bighmto Uiversity Hmid R. Riee Arm Sepehr Fll 00 Lecture 5 Chpter 0 Outlie Itroductio to the -Trsform Properties of the ROC of

More information

First Midterm Examination

First Midterm Examination Çnky University Deprtment of Computer Engineering 203-204 Fll Semester First Midterm Exmintion ) Design DFA for ll strings over the lphet Σ = {,, c} in which there is no, no nd no cc. 2) Wht lnguge does

More information

Non-deterministic Finite Automata

Non-deterministic Finite Automata Non-deterministic Finite Automt Eliminting non-determinism Rdoud University Nijmegen Non-deterministic Finite Automt H. Geuvers nd T. vn Lrhoven Institute for Computing nd Informtion Sciences Intelligent

More information

Algebra II, Chapter 7. Homework 12/5/2016. Harding Charter Prep Dr. Michael T. Lewchuk. Section 7.1 nth roots and Rational Exponents

Algebra II, Chapter 7. Homework 12/5/2016. Harding Charter Prep Dr. Michael T. Lewchuk. Section 7.1 nth roots and Rational Exponents Algebr II, Chpter 7 Hrdig Chrter Prep 06-07 Dr. Michel T. Lewchuk Test scores re vilble olie. I will ot discuss the test. st retke opportuit Sturd Dec. If ou hve ot tke the test, it is our resposibilit

More information

Theory of Computation Regular Languages

Theory of Computation Regular Languages Theory of Computtion Regulr Lnguges Bow-Yw Wng Acdemi Sinic Spring 2012 Bow-Yw Wng (Acdemi Sinic) Regulr Lnguges Spring 2012 1 / 38 Schemtic of Finite Automt control 0 0 1 0 1 1 1 0 Figure: Schemtic of

More information

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

Talen en Automaten Test 1, Mon 7 th Dec, h45 17h30 Tlen en Automten Test 1, Mon 7 th Dec, 2015 15h45 17h30 This test consists of four exercises over 5 pges. Explin your pproch, nd write your nswer to ech exercise on seprte pge. You cn score mximum of 100

More information

Introduction to Computational Molecular Biology. Suffix Trees

Introduction to Computational Molecular Biology. Suffix Trees 18.417 Itroductio to Computtiol Moleculr Biology Lecture 11: October 14, 004 Scribe: Athich Muthitchroe Lecturer: Ross Lippert Editor: Toy Scelfo Suffix Trees This is oe of the most complicted dt structures

More information

Worked out examples Finite Automata

Worked out examples Finite Automata Worked out exmples Finite Automt Exmple Design Finite Stte Automton which reds inry string nd ccepts only those tht end with. Since we re in the topic of Non Deterministic Finite Automt (NFA), we will

More information

Non-deterministic Finite Automata

Non-deterministic Finite Automata Non-deterministic Finite Automt From Regulr Expressions to NFA- Eliminting non-determinism Rdoud University Nijmegen Non-deterministic Finite Automt H. Geuvers nd J. Rot Institute for Computing nd Informtion

More information

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

Non Deterministic Automata. Formal Languages and Automata - Yonsei CS 1 Non Deterministic Automt Forml Lnguges nd Automt - Yonsei CS 1 Nondeterministic Finite Accepter (NFA) We llow set of possible moves insted of A unique move. Alphbet = {} Two choices q 1 q2 Forml Lnguges

More information

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

Non-Deterministic Finite Automata. Fall 2018 Costas Busch - RPI 1 Non-Deterministic Finite Automt Fll 2018 Costs Busch - RPI 1 Nondeterministic Finite Automton (NFA) Alphbet ={} q q2 1 q 0 q 3 Fll 2018 Costs Busch - RPI 2 Nondeterministic Finite Automton (NFA) Alphbet

More information

Converting Regular Expressions to Discrete Finite Automata: A Tutorial

Converting Regular Expressions to Discrete Finite Automata: A Tutorial Converting Regulr Expressions to Discrete Finite Automt: A Tutoril Dvid Christinsen 2013-01-03 This is tutoril on how to convert regulr expressions to nondeterministic finite utomt (NFA) nd how to convert

More information

{ } { S n } is monotonically decreasing if Sn

{ } { S n } is monotonically decreasing if Sn Sequece A sequece is fuctio whose domi of defiitio is the set of turl umers. Or it c lso e defied s ordered set. Nottio: A ifiite sequece is deoted s { } S or { S : N } or { S, S, S,...} or simply s {

More information

CS375: Logic and Theory of Computing

CS375: Logic and Theory of Computing CS375: Logic nd Theory of Computing Fuhu (Frnk) Cheng Deprtment of Computer Science University of Kentucky 1 Tble of Contents: Week 1: Preliminries (set lgebr, reltions, functions) (red Chpters 1-4) Weeks

More information

The limit comparison test

The limit comparison test Roerto s Notes o Ifiite Series Chpter : Covergece tests Sectio 4 The limit compriso test Wht you eed to kow lredy: Bsics of series d direct compriso test. Wht you c ler here: Aother compriso test tht does

More information

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

Speech Recognition Lecture 2: Finite Automata and Finite-State Transducers Speech Recognition Lecture 2: Finite Automt nd Finite-Stte Trnsducers Eugene Weinstein Google, NYU Cournt Institute eugenew@cs.nyu.edu Slide Credit: Mehryr Mohri Preliminries Finite lphet, empty string.

More information

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

CS 301. Lecture 04 Regular Expressions. Stephen Checkoway. January 29, 2018 CS 301 Lecture 04 Regulr Expressions Stephen Checkowy Jnury 29, 2018 1 / 35 Review from lst time NFA N = (Q, Σ, δ, q 0, F ) where δ Q Σ P (Q) mps stte nd n lphet symol (or ) to set of sttes We run n NFA

More information

Project 3: Using Identities to Rewrite Expressions

Project 3: Using Identities to Rewrite Expressions MAT 5 Projet 3: Usig Idetities to Rewrite Expressios Wldis I lger, equtios tht desrie properties or ptters re ofte lled idetities. Idetities desrie expressio e repled with equl or equivlet expressio tht

More information

Chapter 7 Infinite Series

Chapter 7 Infinite Series MA Ifiite Series Asst.Prof.Dr.Supree Liswdi Chpter 7 Ifiite Series Sectio 7. Sequece A sequece c be thought of s list of umbers writte i defiite order:,,...,,... 2 The umber is clled the first term, 2

More information

Formal Language and Automata Theory (CS21004)

Formal Language and Automata Theory (CS21004) Forml Lnguge nd Automt Forml Lnguge nd Automt Theory (CS21004) Khrgpur Khrgpur Khrgpur Forml Lnguge nd Automt Tle of Contents Forml Lnguge nd Automt Khrgpur 1 2 3 Khrgpur Forml Lnguge nd Automt Forml Lnguge

More information

CS 330 Formal Methods and Models

CS 330 Formal Methods and Models CS 330 Forml Methods nd Models Dn Richrds, George Mson University, Spring 2017 Quiz Solutions Quiz 1, Propositionl Logic Dte: Ferury 2 1. Prove ((( p q) q) p) is tutology () (3pts) y truth tle. p q p q

More information

Chapter 10: The Z-Transform Adapted from: Lecture notes from MIT, Binghamton University Dr. Hamid R. Rabiee Fall 2013

Chapter 10: The Z-Transform Adapted from: Lecture notes from MIT, Binghamton University Dr. Hamid R. Rabiee Fall 2013 Sigls & Systems Chpter 0: The Z-Trsform Adpted from: Lecture otes from MIT, Bighmto Uiversity Dr. Hmid R. Rbiee Fll 03 Lecture 5 Chpter 0 Lecture 6 Chpter 0 Outlie Itroductio to the -Trsform Properties

More information

Lexical Analysis Part III

Lexical Analysis Part III Lexicl Anlysis Prt III Chpter 3: Finite Automt Slides dpted from : Roert vn Engelen, Florid Stte University Alex Aiken, Stnford University Design of Lexicl Anlyzer Genertor Trnslte regulr expressions to

More information

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

Intermediate Math Circles Wednesday, November 14, 2018 Finite Automata II. Nickolas Rollick a b b. a b 4 Intermedite Mth Circles Wednesdy, Novemer 14, 2018 Finite Automt II Nickols Rollick nrollick@uwterloo.c Regulr Lnguges Lst time, we were introduced to the ide of DFA (deterministic finite utomton), one

More information

Mathacle. PSet Stats, Concepts In Statistics Level Number Name: Date:

Mathacle. PSet Stats, Concepts In Statistics Level Number Name: Date: APPENDEX I. THE RAW ALGEBRA IN STATISTICS A I-1. THE INEQUALITY Exmple A I-1.1. Solve ech iequlity. Write the solutio i the itervl ottio..) 2 p - 6 p -8.) 2x- 3 < 5 Solutio:.). - 4 p -8 p³ 2 or pî[2, +

More information

POWER SERIES R. E. SHOWALTER

POWER SERIES R. E. SHOWALTER POWER SERIES R. E. SHOWALTER. sequeces We deote by lim = tht the limit of the sequece { } is the umber. By this we me tht for y ε > 0 there is iteger N such tht < ε for ll itegers N. This mkes precise

More information

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

CMPSCI 250: Introduction to Computation. Lecture #31: What DFA s Can and Can t Do David Mix Barrington 9 April 2014 CMPSCI 250: Introduction to Computtion Lecture #31: Wht DFA s Cn nd Cn t Do Dvid Mix Brrington 9 April 2014 Wht DFA s Cn nd Cn t Do Deterministic Finite Automt Forml Definition of DFA s Exmples of DFA

More information

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

Types of Finite Automata. CMSC 330: Organization of Programming Languages. Comparing DFAs and NFAs. NFA for (a b)*abb. CMSC 330: Orgniztion of Progrmming Lnguges Finite Automt 2 Types of Finite Automt Deterministic Finite Automt () Exctly one sequence of steps for ech string All exmples so fr Nondeterministic Finite Automt

More information

General properties of definite integrals

General properties of definite integrals Roerto s Notes o Itegrl Clculus Chpter 4: Defiite itegrls d the FTC Sectio Geerl properties of defiite itegrls Wht you eed to kow lredy: Wht defiite Riem itegrl is. Wht you c ler here: Some key properties

More information

NFAs continued, Closure Properties of Regular Languages

NFAs continued, Closure Properties of Regular Languages Algorithms & Models of Computtion CS/ECE 374, Fll 2017 NFAs continued, Closure Properties of Regulr Lnguges Lecture 5 Tuesdy, Septemer 12, 2017 Sriel Hr-Peled (UIUC) CS374 1 Fll 2017 1 / 31 Regulr Lnguges,

More information

Math 104: Final exam solutions

Math 104: Final exam solutions Mth 14: Fil exm solutios 1. Suppose tht (s ) is icresig sequece with coverget subsequece. Prove tht (s ) is coverget sequece. Aswer: Let the coverget subsequece be (s k ) tht coverges to limit s. The there

More information

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

Types of Finite Automata. CMSC 330: Organization of Programming Languages. Comparing DFAs and NFAs. Comparing DFAs and NFAs (cont.) Finite Automata 2 CMSC 330: Orgniztion of Progrmming Lnguges Finite Automt 2 Types of Finite Automt Deterministic Finite Automt () Exctly one sequence of steps for ech string All exmples so fr Nondeterministic Finite Automt

More information

Discrete Mathematics and Probability Theory Spring 2016 Rao and Walrand Lecture 17

Discrete Mathematics and Probability Theory Spring 2016 Rao and Walrand Lecture 17 CS 70 Discrete Mthemtics d Proility Theory Sprig 206 Ro d Wlrd Lecture 7 Vrice We hve see i the previous ote tht if we toss coi times with is p, the the expected umer of heds is p. Wht this mes is tht

More information

Course 121, , Test III (JF Hilary Term)

Course 121, , Test III (JF Hilary Term) Course 2, 989 9, Test III (JF Hilry Term) Fridy 2d Februry 99, 3. 4.3pm Aswer y THREE questios. Let f: R R d g: R R be differetible fuctios o R. Stte the Product Rule d the Quotiet Rule for differetitig

More information

Infinite Series Sequences: terms nth term Listing Terms of a Sequence 2 n recursively defined n+1 Pattern Recognition for Sequences Ex:

Infinite Series Sequences: terms nth term Listing Terms of a Sequence 2 n recursively defined n+1 Pattern Recognition for Sequences Ex: Ifiite Series Sequeces: A sequece i defied s fuctio whose domi is the set of positive itegers. Usully it s esier to deote sequece i subscript form rther th fuctio ottio.,, 3, re the terms of the sequece

More information

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

CS415 Compilers. Lexical Analysis and. These slides are based on slides copyrighted by Keith Cooper, Ken Kennedy & Linda Torczon at Rice University CS415 Compilers Lexicl Anlysis nd These slides re sed on slides copyrighted y Keith Cooper, Ken Kennedy & Lind Torczon t Rice University First Progrmming Project Instruction Scheduling Project hs een posted

More information

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

FIR Filters. Lecture #7 Chapter 5. BME 310 Biomedical Computing - J.Schesser FIR Filters Lecture #7 Chapter 5 8 What Is this Course All About? To Gai a Appreciatio of the Various Types of Sigals ad Systems To Aalyze The Various Types of Systems To Lear the Skills ad Tools eeded

More information

Chapter 4 Regular Grammar and Regular Sets. (Solutions / Hints)

Chapter 4 Regular Grammar and Regular Sets. (Solutions / Hints) C K Ngpl Forml Lnguges nd utomt Theory Chpter 4 Regulr Grmmr nd Regulr ets (olutions / Hints) ol. (),,,,,,,,,,,,,,,,,,,,,,,,,, (),, (c) c c, c c, c, c, c c, c, c, c, c, c, c, c c,c, c, c, c, c, c, c, c,

More information