Content. Languages, Alphabets and Strings. Operations on Strings. a ab abba baba. aaabbbaaba b 5. Languages. A language is a set of strings
|
|
- Crystal Wiggins
- 5 years ago
- Views:
Transcription
1 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 Fiite Automt, DFA guges guges, Alphets d Strigs A lguge is set of strigs A Strig is sequece of letters defied over lphet: {,, c, K, z} A lphet is set of symols 3 4 Alphets d Strigs We will use smll lphets: { } Strigs u = v = w = Opertios o Strigs 5 6
2 w = v = Strig Opertios m wv = x = y = Coctetio (smmfogig) m xy = 7 w = w R Reverse (reverserig) = Exmple: ogest odd legth plidrome i turl lguge: sippukuppis (Fiish: sop silsm) 8 w = egth: Strig egth w = Exmples: = 4 = = Recursive Defiitio of egth For y letter: For y strig : Exmple: = w w = w + = + = + + = = = Exmple: egth of Coctetio u =, uv = u + v =, v u = 3 v = 5 uv = = 8 uv = u + v = = 8 Clim: Proof of Coctetio egth uv = u + Proof: By iductio o the legth Iductio sis: v v = From defiitio of legth: v uv = u + = u + v
3 Iductive hypothesis: for v v = + uv = u + uv = u + Iductive step: we will prove for v v Iductive Step v = w w =, = Write, where From defiitio of legth: From iductive hypothesis: Thus: uv = uw = uw + w = w + uw = u + w uv = u + w + = u + w = u + v 3 END OF PROOF 4 Empty Strig A strig with o letters: (Also deoted s ε) λ Sustrig (delsträg) Sustrig of strig: susequece of cosecutive chrcters Strig Sustrig Oservtios: λ = 0 λw = wλ = w λ = λ = = {} { λ} 5 6 Prefixes λ Prefix d Suffix Suffixes λ prefix w = uv suffix 7 w = Exmple: Defiitio: ww... w } Repetitio ( ) = 0 w = λ (Strig w 0 ( ) = λ repeted times) 8 3
4 Σ* Σ* = The * (Kleee str) Opertio the set of ll possile strigs from lphet {, } { λ,,,,,,,,,k} [Kleee is proouced "cly-kee ] Σ 9 Σ The + Opertio + : the set of ll possile strigs from lphet except Σ { } { λ } Σ* =,,,,,,,,,K Σ + = Σ* λ Σ + = λ {,,,,,,,,K} 0 { oj, fy } {, usch Exmple Σ* = λ, oj, fy, usch, ojoj, fyfy,uschusch, ojfy, ojusch K} Σ + = Σ* λ Σ + = { oj, fy, usch, ojoj, fyfy,uschusch, ojfy, ojusch K} Opertios o guges guge A lguge is y suset of Exmple: guges: Σ* = Σ * {, } { λ } {} λ { },,,,,,,,K,, { λ,,,,, } 3 Exmple A ifiite lguge = { : 0} λ 4 4
5 Opertios o guges The usul set opertios {,, } {, } = {,, {,, } {, } = { } {,, } {, } = {, } Complemet:, } * = { λ,,,,,,,,,k} {, } = { λ,,,,,,k} Σ = Σ* Defiitio: Exmples: R Reverse R = { w : w } R {,, } = {,, } = { R = { : 0} : 0} 5 6 Coctetio Defiitio: = { xy : x y } Exmple, {,, }{, } = {,,,,, } Defiitio: Specil cse: Repet = 3 3 {, } = {, }{, }{, } = {,,,,,,, } 0 = {} λ 0 {,, } = { λ} 7 8 Exmple Str-Closure (Kleee *) = { : 0} Defiitio: 0 * = m m = { :, m 0} 9 Exmple: {, } λ,,, * =,,,,,,,,K 30 5
6 Defiitio {, } + Positive Closure + = U = * {} λ U,, =,,,,,,,,K Regulr Expressios 3 3 r + r r r r * ( r ) Regulr Expressios: Recursive Defiitio, Primitive regulr expressios: Give regulr expressios r d r λ, α re Regulr Expressios 33 A regulr expressio: Exmples Not regulr expressio: ( + c) * ( c + ) ( + + ) 34 Buildig Regulr Expressios {,, c} Zero or more. * mes "zero or more 's." To sy "zero or more 's," tht is, {,,,,...}, you eed to sy ()*. * deotes {,,,,,...}. Buildig Regulr Expressios {,, c} Oe or more. Sice * mes "zero or more 's", you c use * (or equivletly, *) to me "oe or more 's. Similrly, to descrie "oe or more 's," tht is, {,,,...}, you c use ()*
7 Buildig Regulr Expressios {,, c} Ay strig t ll. To descrie y strig t ll (with = {,, c}), you c use (++c)*. Ay oempty strig. This c e writte s y chrcter from followed y y strig t ll: (++c)(++c)*. Buildig Regulr Expressios {,, c} Ay strig ot cotiig... To descrie y strig t ll tht does't coti (with = {,, c}), you c use (+c)*. Ay strig cotiig exctly oe... To descrie y strig tht cotis exctly oe, put "y strig ot cotiig," o either side of the, like this: (+c)*(+c)* guges of Regulr Expressios ( r) lguge of regulr expressio Exmple (( + c)* ) = { λ,, c,, c, c,... } r Defiitio For primitive regulr expressios: ( ) = ( λ) = { λ} ( ) = { } Defiitio (cotiued) For regulr expressios r d r ( r + r ) = ( r ) ( r ) ( r r ) ( r ) ( r ) ( r ) ( ( ))* = = * r (( r )) ( ) = r 4 Exmple Regulr expressio: ( + ) * (( + ) *) = (( + ) ) ( *) = ( + ) ( *) = ( ( ) ( ) ) ( ( ) )* = ({ } { } ) ({ } )* = {, }{ λ,,,,... } = {,,,...,,,,... } 4 7
8 Regulr expressio Exmple ( + ) ( ) r = * + ( r) {,,,,,,... } = Regulr expressio Exmple ( ) *( ) r = * m ( r) = { :, m 0} { 0,} Exmple { 0,} Exmple (r) = { ll strigs with t lest two cosecutive 0 } Regulr expressio r = ( 0 + )*00 (0 + )* (r) = { ll strigs without two cosecutive 0 } Regulr expressio r = ( + 0) * (0 + λ) (cosists of repetig s d 0 s) Exmple = { ll strigs without two cosecutive 0 } Equivlet solutio: r = (*0*)*(0 + λ ) + *(0 + λ) Equivlet Regulr Expressios Defiitio: Regulr expressios r d r (I order ot to get 00 i strig, fter ech 0 there must e, which mes tht strigs of the form re repeted. Tht is the first prethesis. To tke ito ccout strigs tht ed with 0, d those cosistig of s solely, the rest of the expressio is dded.) re equivlet if ( r ) = ( r )
9 Exmple = { ll strigs without two cosecutive 0 } r = ( + 0) * (0 + λ) r = (*0*)*(0 + λ ) + *(0 + λ) ( r d r re equivlet regulr expressios. r ) = ( r ) = 49 Fiite Automt FA 50 There is o forml defiitio for "utomto". Isted, there re vrious kids of utomt, ech with it's ow forml defiitio. Geerlly, utomto hs some form of iput hs some form of output hs iterl sttes, my or my ot hve some form of storge is hrd-wired rther th progrmmle Iput Strig Fiite Automto Fiite Automto Output Strig 5 5 Fiite Accepter FA s Directed Grph Iput Strig Fiite Automto Output Accept or Reject 53 Nodes = Sttes Edges = Trsitios q 0 A edge with severl symols is short-hd for severl edges: q 0 q q 0 q q 54 9
10 DFA Determiistic Fiite Automt DFA Determiistic there is o elemet of choice Fiite oly fiite umer of sttes d rcs Acceptors produce oly yes/o swer iitil stte Trsitio Grph -Fiite Acceptor Alphet = {, } stte trsitio fil stte ccept 57 Iitil Cofigurtio Iput Strig q 0 58 Redig the Iput
11 6 6 Rejectio q 0 Output: ccept
12 Output: reject Aother Exmple,, 69 70,, 7 7
13 Rejectio Output: ccept,, 73 74,, 75 76,, Output: reject
14 Forml defiitios Iput Aplhet Σ Determiistic Fiite Accepter (DFA) ( Q Σ, δ, q F ) M =,, 0 { } Q Σ δ : trsitio fuctio q 0 : iitil stte F : set of sttes : iput lphet : set of fil sttes Set of Sttes Q Iitil Stte Q = { q, q, q, q, q q } 0 3 4, 5 q Set of Fil Sttes F Trsitio Fuctio δ F = { q 4 } δ : Q Σ Q q
15 δ ( q 0, ) = q δ ( q 0, ) = q q δ ( q, ) = q 3 δ q 0 q5 q5 q q q 5 3 q 3 q5 q q 4 q5 5 Trsitio Fuctio δ Exteded Trsitio Fuctio δ * δ *: Q Σ* Q ( q 0, ) = δ * q q
16 ( q 0, ) = 4 δ * q ( q 0, ) = 5 δ * q q Oservtio: There is wlk from with lel ( q 0, ) = 5 δ * q q 0 to δ * δ * Recursive Defiitio ( q, λ) = q ( q, w) = δ ( δ *( q, w), ) q δ *(, ) = δ ( δ *(, ), ) = δ ( δ ( δ *(, λ), ), ) δ ( δ (, ), ) = δ ( ) = q, = guges Accepted y DFAs M Tke DFA Defiitio: The lguge ( M ) cotis ll iput strigs ccepted y M 95 ( M ) M = { strigs tht drive to fil stte} 96 6
17 ( M ) { } Exmple = M Aother Exmple ( M ) { λ, } =, M Alphet = {, } Alphet = {, } ccept ccept ccept ccept For DFA Formlly ( Q Σ, δ, q F ) M =,, 0 M guge ccepted y : lphet ( M ) = { w Σ : δ *( q, w) F} trsitio fuctio * 0 iitil stte fil sttes 99 guge ccepted y Oservtio M ( M ) = { w Σ : δ *( q, w) F} guge rejected y * 0 M ( M ) = { w Σ : δ *( q, w) F} * 0 00 More Exmples ( M ) = { : 0} ( M ) = { ll strigs with prefix }, ccept Alphet = {, } ccept trp stte 0 Alphet = {, } q 3 0 7
18 ( M ) = { ll strigs without sustrig 00 } λ , A lguge DFA Regulr guges is regulr if there is M such tht = ( M ) All regulr lguges form lguge fmily {0,} Alphet = The lguge = Exmple { w : w {, } *} is regulr q 4 Alphet = {, } 05 8
Course Material. CS Lecture 1 Deterministic Finite Automata. Grading and Policies. Workload. Website:http://www.cs.colostate.
Course Mteril CS 301 - Lecture 1 Determiistic Fiite Automt Fll 2008 Wesite:http://www.cs.colostte.edu/~cs301 Syllus, Outlie, Grdig Policies Homework d Slides Istructor: D Mssey Office hours: 2-3pm Tues
More informationModule 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 informationReview 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 informationFABER Formal Languages, Automata. Lecture 2. Mälardalen University
CD5560 FABER Formal Languages, Automata and Models of Computation Lecture 2 Mälardalen University 2010 1 Content Languages, g Alphabets and Strings Strings & String Operations Languages & Language Operations
More informationLecture 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 informationAUTOMATA 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 informationRegular 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 informationFundamentals 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 informationSome 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 informationFormal 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 informationChapter 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 informationCMSC 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 informationCHAPTER 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 informationChapter 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 informationMTH 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 informationWeek 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 informationCHAPTER 1 Regular Languages. Contents
Finite Automt (FA or DFA) CHAPTE 1 egulr Lnguges Contents definitions, exmples, designing, regulr opertions Non-deterministic Finite Automt (NFA) definitions, euivlence of NFAs nd DFAs, closure under regulr
More informationLet'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 informationNFAs 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 informationTypes 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 informationConverting 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 informationDeterministic 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 informationUNIVERSITY OF BRISTOL. Examination for the Degrees of B.Sc. and M.Sci. (Level C/4) ANALYSIS 1B, SOLUTIONS MATH (Paper Code MATH-10006)
UNIVERSITY OF BRISTOL Exmitio for the Degrees of B.Sc. d M.Sci. (Level C/4) ANALYSIS B, SOLUTIONS MATH 6 (Pper Code MATH-6) My/Jue 25, hours 3 miutes This pper cotis two sectios, A d B. Plese use seprte
More informationFormal 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 informationTypes 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 informationApplications 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 informationCISC 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 informationTheory 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 informationNon Deterministic Automata. Linz: Nondeterministic Finite Accepters, page 51
Non Deterministic Automt Linz: Nondeterministic Finite Accepters, pge 51 1 Nondeterministic Finite Accepter (NFA) Alphbet ={} q 1 q2 q 0 q 3 2 Nondeterministic Finite Accepter (NFA) Alphbet ={} Two choices
More informationAdvanced 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 informationNon-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 informationFinite-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 information0 otherwise. sin( nx)sin( kx) 0 otherwise. cos( nx) sin( kx) dx 0 for all integers n, k.
. Computtio of Fourier Series I this sectio, we compute the Fourier coefficiets, f ( x) cos( x) b si( x) d b, i the Fourier series To do this, we eed the followig result o the orthogolity of the trigoometric
More informationMinimal 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 informationTheory 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 informationDiscrete 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 informationis 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 informationNondeterminism and Nodeterministic Automata
Nondeterminism nd Nodeterministic Automt 61 Nondeterminism nd Nondeterministic Automt The computtionl mchine models tht we lerned in the clss re deterministic in the sense tht the next move is uniquely
More informationWe will begin by supplying the proof to (a).
(The solutios of problem re mostly from Jeffrey Mudrock s HWs) Problem 1. There re three sttemet from Exmple 5.4 i the textbook for which we will supply proofs. The sttemets re the followig: () The spce
More informationChapter 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 informationRegular 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 informationIntroduction 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 informationHomework 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 informationFirst 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 informationDiscrete 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 informationHarvard 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 informationGrammar. Languages. Content 5/10/16. Automata and Languages. Regular Languages. Regular Languages
5//6 Grmmr Automt nd Lnguges Regulr Grmmr Context-free Grmmr Context-sensitive Grmmr Prof. Mohmed Hmd Softwre Engineering L. The University of Aizu Jpn Regulr Lnguges Context Free Lnguges Context Sensitive
More informationSome 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 informationCMPSCI 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 informationLexical Analysis Finite Automate
Lexicl Anlysis Finite Automte CMPSC 470 Lecture 04 Topics: Deterministic Finite Automt (DFA) Nondeterministic Finite Automt (NFA) Regulr Expression NFA DFA A. Finite Automt (FA) FA re grph, like trnsition
More information8.3 Sequences & Series: Convergence & Divergence
8.3 Sequeces & Series: Covergece & Divergece A sequece is simply list of thigs geerted by rule More formlly, sequece is fuctio whose domi is the set of positive itegers, or turl umbers,,,3,. The rge of
More informationNFAs continued, Closure Properties of Regular Languages
lgorithms & Models of omputtion S/EE 374, Spring 209 NFs continued, losure Properties of Regulr Lnguges Lecture 5 Tuesdy, Jnury 29, 209 Regulr Lnguges, DFs, NFs Lnguges ccepted y DFs, NFs, nd regulr expressions
More informationNamely, for regular languages L1. Concatenation. Regular Languages. Star operation L 1. Complement. For regular language L the complement L is regular
CD5560 FABER For guges, Autot d Modes of Coputtio eture 5 Märde Uiversit 2003 Cotet More Properties of Regur guges (R) Stdrd Represettios of R Eeetr Questios out R No-Regur guges The Pigeohoe Priipe The
More informationRULES 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 informationWorked 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 informationNumbers (Part I) -- Solutions
Ley College -- For AMATYC SML Mth Competitio Cochig Sessios v.., [/7/00] sme s /6/009 versio, with presettio improvemets Numbers Prt I) -- Solutios. The equtio b c 008 hs solutio i which, b, c re distict
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.
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 informationis infinite. The converse is proved similarly, and the last statement of the theorem is clear too.
12. No-stdrd lysis October 2, 2011 I this sectio we give brief itroductio to o-stdrd lysis. This is firly well-developed field of mthemtics bsed o model theory. It dels ot just with the rels, fuctios o
More informationa,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 informationFormal 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 informationReview of the Riemann Integral
Chpter 1 Review of the Riem Itegrl This chpter provides quick review of the bsic properties of the Riem itegrl. 1.0 Itegrls d Riem Sums Defiitio 1.0.1. Let [, b] be fiite, closed itervl. A prtitio P of
More informationLinford 1. Kyle Linford. Math 211. Honors Project. Theorems to Analyze: Theorem 2.4 The Limit of a Function Involving a Radical (A4)
Liford 1 Kyle Liford Mth 211 Hoors Project Theorems to Alyze: Theorem 2.4 The Limit of Fuctio Ivolvig Rdicl (A4) Theorem 2.8 The Squeeze Theorem (A5) Theorem 2.9 The Limit of Si(x)/x = 1 (p. 85) Theorem
More informationJava 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 informationCS 336. of n 1 objects with order unimportant but repetition allowed.
CS 336. The importat issue is the logic you used to arrive at your aswer.. Use extra paper to determie your solutios the eatly trascribe them oto these sheets. 3. Do ot submit the scratch sheets. However,
More informationLanguages. 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 informationALGEBRA II CHAPTER 7 NOTES. Name
ALGEBRA II CHAPTER 7 NOTES Ne Algebr II 7. th Roots d Rtiol Expoets Tody I evlutig th roots of rel ubers usig both rdicl d rtiol expoet ottio. I successful tody whe I c evlute th roots. It is iportt for
More informationMathacle. 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 informationCS 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 information1 Nondeterministic Finite Automata
1 Nondeterministic Finite Automt Suppose in life, whenever you hd choice, you could try oth possiilities nd live your life. At the end, you would go ck nd choose the one tht worked out the est. Then you
More information{ } { 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 informationConvert the NFA into DFA
Convert the NF into F For ech NF we cn find F ccepting the sme lnguge. The numer of sttes of the F could e exponentil in the numer of sttes of the NF, ut in prctice this worst cse occurs rrely. lgorithm:
More informationCSCI 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 information1.3 Continuous Functions and Riemann Sums
mth riem sums, prt 0 Cotiuous Fuctios d Riem Sums I Exmple we sw tht lim Lower() = lim Upper() for the fuctio!! f (x) = + x o [0, ] This is o ccidet It is exmple of the followig theorem THEOREM Let f be
More informationToday 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 informationAutomata 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 information1. 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 informationCSCI 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 informationSection IV.6: The Master Method and Applications
Sectio IV.6: The Mster Method d Applictios Defiitio IV.6.1: A fuctio f is symptoticlly positive if d oly if there exists rel umer such tht f(x) > for ll x >. A cosequece of this defiitio is tht fuctio
More informationSection 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 informationState 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 informationGNFA GNFA GNFA GNFA GNFA
DFA RE NFA DFA -NFA REX GNFA Definition GNFA A generlize noneterministic finite utomton (GNFA) is grph whose eges re lele y regulr expressions, with unique strt stte with in-egree, n unique finl stte with
More informationThe Reimann Integral is a formal limit definition of a definite integral
MATH 136 The Reim Itegrl The Reim Itegrl is forml limit defiitio of defiite itegrl cotiuous fuctio f. The costructio is s follows: f ( x) dx for Reim Itegrl: Prtitio [, ] ito suitervls ech hvig the equl
More informationSimilar idea to multiplication in N, C. Divide and conquer approach provides unexpected improvements. Naïve matrix multiplication
Next. Covered bsics of simple desig techique (Divided-coquer) Ch. of the text.. Next, Strsse s lgorithm. Lter: more desig d coquer lgorithms: MergeSort. Solvig recurreces d the Mster Theorem. Similr ide
More informationAutomata Theory 101. Introduction. Outline. Introduction Finite Automata Regular Expressions ω-automata. Ralf Huuck.
Outline Automt Theory 101 Rlf Huuck Introduction Finite Automt Regulr Expressions ω-automt Session 1 2006 Rlf Huuck 1 Session 1 2006 Rlf Huuck 2 Acknowledgement Some slides re sed on Wolfgng Thoms excellent
More informationPOWER 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 informationGeometric Sequences. Geometric Sequence. Geometric sequences have a common ratio.
s A geometric sequece is sequece such tht ech successive term is obtied from the previous term by multiplyig by fixed umber clled commo rtio. Exmples, 6, 8,, 6,..., 0, 0, 0, 80,... Geometric sequeces hve
More informationɛ-closure, Kleene s Theorem,
DEGefW5wiGH2XgYMEzUKjEmtCDUsRQ4d 1 A nice pper relevnt to this course is titled The Glory of the Pst 2 NICTA Resercher, Adjunct t the Austrlin Ntionl University nd Griffith University ɛ-closure, Kleene
More informationInfinite 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 informationFinite Automata. Informatics 2A: Lecture 3. Mary Cryan. 21 September School of Informatics University of Edinburgh
Finite Automt Informtics 2A: Lecture 3 Mry Cryn School of Informtics University of Edinburgh mcryn@inf.ed.c.uk 21 September 2018 1 / 30 Lnguges nd Automt Wht is lnguge? Finite utomt: recp Some forml definitions
More informationThe Basic Properties of the Integral
The Bsic Properties of the Itegrl Whe we compute the derivtive of complicted fuctio, like x + six, we usully use differetitio rules, like d [f(x)+g(x)] d f(x)+ d g(x), to reduce the computtio dx dx dx
More information=> PARALLEL INTERCONNECTION. Basic Properties LTI Systems. The Commutative Property. Convolution. The Commutative Property. The Distributive Property
Lier Time-Ivrit Bsic Properties LTI The Commuttive Property The Distributive Property The Associtive Property Ti -6.4 / Chpter Covolutio y ] x ] ] x ]* ] x ] ] y] y ( t ) + x( τ ) h( t τ ) dτ x( t) * h(
More informationLecture 4 Recursive Algorithm Analysis. Merge Sort Solving Recurrences The Master Theorem
Lecture 4 Recursive Algorithm Alysis Merge Sort Solvig Recurreces The Mster Theorem Merge Sort MergeSortA, left, right) { if left < right) { mid = floorleft + right) / 2); MergeSortA, left, mid); MergeSortA,
More informationCS 330 Formal Methods and Models Dana Richards, George Mason University, Spring 2016 Quiz Solutions
CS 330 Forml Methods nd Models Dn Richrds, George Mson University, Spring 2016 Quiz Solutions Quiz 1, Propositionl Logic Dte: Ferury 9 1. (4pts) ((p q) (q r)) (p r), prove tutology using truth tles. p
More informationNon-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 informationChapter 1, Part 1. Regular Languages. CSC527, Chapter 1, Part 1 c 2012 Mitsunori Ogihara 1
Chpter 1, Prt 1 Regulr Lnguges CSC527, Chpter 1, Prt 1 c 2012 Mitsunori Ogihr 1 Finite Automt A finite utomton is system for processing ny finite sequence of symols, where the symols re chosen from finite
More informationSequence and Series of Functions
6 Sequece d Series of Fuctios 6. Sequece of Fuctios 6.. Poitwise Covergece d Uiform Covergece Let J be itervl i R. Defiitio 6. For ech N, suppose fuctio f : J R is give. The we sy tht sequece (f ) of fuctios
More informationProject 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 informationCMSC 330: Organization of Programming Languages. DFAs, and NFAs, and Regexps (Oh my!)
CMSC 330: Orgniztion of Progrmming Lnguges DFAs, nd NFAs, nd Regexps (Oh my!) CMSC330 Spring 2018 Types of Finite Automt Deterministic Finite Automt (DFA) Exctly one sequence of steps for ech string All
More informationIntermediate 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 informationFirst Midterm Examination
24-25 Fll Semester First Midterm Exmintion ) Give the stte digrm of DFA tht recognizes the lnguge A over lphet Σ = {, } where A = {w w contins or } 2) The following DFA recognizes the lnguge B over lphet
More information