Some basic notation and terminology. Deterministic Finite Automata. COMP218: Decision, Computation and Language Note 1

Size: px
Start display at page:

Download "Some basic notation and terminology. Deterministic Finite Automata. COMP218: Decision, Computation and Language Note 1"

Transcription

1 COMP28: Decision, Compuion nd Lnguge Noe These noes re inended minly s supplemen o he lecures nd exooks; hey will e useful for reminders ou noion nd erminology. Some sic noion nd erminology An lphe is finie se of symols. We use A o denoe n lphe; ofen Σ is used. A word over A is defined o e sring of or more memers of A. The sring consising of excly memers of A is clled he empy sring nd will e denoed y ɛ. The empy sring is lso commonly denoed y he symol or λ. The se of ll words over A will e denoed y A. I is someimes convenien o exclude he empy sring nd define A + o e he se given y Exmple. If A = {} hen A + = A \{ɛ}. A = {ɛ,,,,,...} nd A + = {,,,,...} Exmple. If A = {, } hen A = { ɛ,,,,,,,,,,,,,,,,,... }. Noe h lhough he se A is finie he se A is infinie, s long s A. If w = 2... m (where, 2,..., m A) nd w 2 = 2... n (where, 2,..., n A) re words over n lphe A hen heir produc or concenion is he word w w 2 defined y w w 2 = 2... m 2... n. We lso define ɛw = w = wɛ for ll w A The produc of n copies of he word w will e denoed y w n, so for exmple w = ɛ, w = w, w 3 = www. I is esy o verify h his produc is ssociive, i.e. (uv)w = u(vw) for ll u, v, w A. The lengh of word w A is defined o e he numer of leers i conins nd will e denoed y w. In priculr we hve: w w 2 = w + w 2, for ll w,w 2 A. ɛ = = if A 2... n = n if, 2,..., n A Le u, v, w e words over A. If w = uv hen we sy h u is prefix of w nd v is suffix of w. Noe h he empy word is prefix nd suffix of every word. Also ech word is prefix nd suffix of iself. A prefix or suffix of w will e clled proper if i is neiher ɛ nor w. A lnguge (or forml lnguge) over n lphe A is defined o e suse of A. Le A e n lphe. If L, L 2 A hen he produc L L 2 is defined y L L 2 = {w w 2 : w L nd w 2 L 2 }. If L A hen he Kleene closure of L is he se L defined y L = {w w 2... w n : n nd w,w 2,... w n L} If we define L n y L = {ɛ}, L n+ = L n L for n, hen L = n= L n. Exmples. Le A = {,, c, d}. Then {}{} = {} {, }{c, d} = {c, d, c, d} {} = {ɛ,, 2, 3,...} {c, d} = {ɛ, c, d, c 2,d 2, cd, dc, c 3,c 2 d,...} {} {c, d} = {c, d, c, d, 2 c, 2 d,...} A regulr expression is n expression consruced from union, produc nd closure, for exmple {} {} = {ɛ,,,,, 3, 3,...}. A regulr lnguge is lnguge h cn e represened using regulr expression. Deerminisic Finie Auom A deerminisic finie uomonis mechnism for recognising words in lnguge; simplified model of compuion in which n inpu word is scnned lef-o-righ. The reding of ech leer cuses some chnge o ke plce in he mchine. When ll leers hve een red he finl se is used o deermine wheher he sring hs een cceped or no. This cn e viewed s simple form of oupu wih jus wo possiiliies ccepnce or rejecion. 2

2 A deerminisic finie uomon (or DFA) is quinuple A =(Q, A, φ, i, T ) where. Q is finie nonempy se whose memers re clled ses of he uomon; 2. A is finie nonempy se clled he lphe of he uomon; 3. φ is mp from Q A o Q clled he rnsiion funcion of he uomon; 4. i is memer of Q nd is clled he iniil se; 5. T is nonempy suse of Q whose memers re clled erminl ses or cceping ses. The mp φ descries he chnge of se when single leer is red in if he uomon in se q reds he leer hen is se chnges o φ(q, ). Iniilly he se is i nd if he inpu word is w = 2... n hen, s ech leer is red, he se chnges nd we ge q,q 2,..., q n defined y q = φ(i, ) q 2 = φ(q, 2 ) q 3 = φ(q 2, 3 )... q n = φ(q n, n ) I is useful o exend he definiion of φ so h is second rgumen cn e word insed of jus leer nd we cn wrie q n = φ(i, w). This is done s follows. For deerminisic finie uomon defined using he ove noion, exend he mp φ : Q A Q o φ : Q A Q y defining: φ(q, ɛ) = q for ll q Q φ(q, w) = φ(φ(q, w),) for ll q Q; w A ; A. I is esy o show y inducion h his exended mp sisfies φ(q, vw) =φ(φ(q, v),w) for ll q Q; v, w A. We sy h word w A is cceped (or recognised) y he uomon A if φ(i, w) T, oherwise i is sid o e rejeced. The se of ll words cceped y A is clled he lnguge cceped y A nd will e denoed y L(A). Thus L(A) ={w A : φ(i, w) T }. In priculr word w is cceped y n uomon if nd only if here is ph from he iniil se o erminl se wih lel w (which we cll n cceping ph). Exmple. Le A e he uomon (Q, A, φ, i, T ) where Q = {i,, r}, A = {, }, T = {} nd he rnsiion funcion φ is given y φ(i, ) = r, φ(i, ) =, φ(, ) =, φ(, ) =, φ(r, ) = r, φ(r, ) = r. I is simpler o descrie rnsiion funcion y le of vlues. In his exmple we hve: i r r r r If for exmple he word is inpu o his uomon hen we oin he following ph: i r r r r so his word is rejeced. The word produces he following ph nd so is cceped. i An uomon cn lso e defined y giving is se digrm (which is direced grph wih lelled edges). The verices of he grph re he ses of he uomon. Two ses p nd q re joined y n edge lelled wih leer if nd only if φ(p, ) =q where φ is he rnsiion funcion. Muliple edges re usully comined nd loops re possile. The iniil se is indiced y n rrow poining o i, erminl ses y rrows poining wy (or someimes oher symols). Exmple. The uomon of he ls exmple hs he following se digrm: If w = 2... n A nd φ(p, w) =q hen here re ses r,r 2,..., r n wih r = φ(p, ),r 2 = φ(r, 2 ),r 3 = φ(r 2, 3 ),..., q = φ(r n, n ). We sy h he ses p nd q re conneced y ph wih lel w nd wrie p r 2 3 n r2 r3 r n 2 n w rn q or p q. 3 4

3 , i r,, Prolem. Find he lnguge cceped y he uomon wih he ove se digrm. Soluion. Afer he firs leer of n inpu word is red he uomon eners one of he ses r, nd remins here no mer wh he oher leers re. Thus he single cceping se cn e enered if nd only if he firs leer red is. So he lnguge cceped y A is he se of i srings which egin wih, i.e. L(A) ={w : w {, } }. Exmples of Deerminisic Finie Auom Prolem. Consruc deerminisic finie uomon cceping he lnguge of ll i srings wih hree consecuive s. Soluion. A sequence of ses cn e used o coun he numer of consecuive zeroes red in. If hree re red we should rech n cceping se nd remin here no mer wh leers follow. If is encounered efore he cceping se is reched hen we reurn o he iniil se nd sr couning zeroes gin. A suile uomon cn herefore e descried y he following se digrm., Prolem. Find he lnguge cceped y he deerminisic finie uomon defined y he following se digrm: 5 Soluion. Noe h he iniil se is lso erminl se his implied h he empy sring ɛ will e cceped. Any inpu sring consising of only s will leve he uomon in he iniil se nd so e cceped. Also from he iniil se ny sring consising of only s will led o n cceping se. This suggess h he lnguge cceped is L = { m n : m, n }. Clerly ny word in L is cceped. We need o show h here re no more words he uomon cceps. A word which is no in L will hve s susring nd will herefore e rejeced since in ech of he hree ses he inpu leds o he righ-hnd se. The lnguge L cn e wrien more compcly using Kleene closures since {w n : n } = {w} for ny w. We hve L = {} {}. Prolem. Give se digrm for deerminisic finie uomon wih lphe {, } which cceps he lnguge of ll words wih n odd numer of s nd n even numer of s. Soluion. A suile mchine cn e consruced using ses which record wheher odd or even numers of ech leer hve een red ech sep. Le he se of ses of he uomon e {odd/even, even/odd, odd/odd, even/even}, where ech is inerpreed s giving he priy of he numer of s followed y he priy of he numer of s red so fr. I is now esy o give le of vlues for he rnsiion funcion: odd/even even/even odd/odd even/odd odd/odd even/even odd/odd even/odd odd/even even/even odd/even even/odd For he se of erminl (i.e. cceping) ses we ke {odd/even}. Iniilly no s nd no s hve een red so we hve n even numer of ech nd cn ke even/even s he iniil se. A suile se digrm is herefore: 6

4 even/even even/odd odd/even odd/odd pril funcion from (Q A) o Q. Hence φ(q, ) my e undefined for some (q, ) pirs, nd if h hppens during compuion we regrd he enire sring s hving een rejeced. The reson why his does no chnge hings is h we my lwys complee n incomplee DFA y dding new rejecing se which he compleed mchine eners when no rnsiion is defined for he originl mchine. An incomplee DFA is someimes esier o define or depic. Nondeerminisic Finie Auom Incomplee rnsiion funcions We would like o e le o sy h he following digrm (lef hnd side) shows DFA h jus cceps words c nd dog. Bu so fr, our noion of vlid DFA requires i o show wh hppens for every se/symol cominion. Using lphe {, c, d, g, o, } we hve o complee i o ge he righ-hnd digrm. The mchines we hve looked so fr re clled deerminisic ecuse when leer is red in, he nex se is deermined y he rnsiion funcion. Suppose we widen he definiion o llow more hn one possile new se when leer is red in. So φ(q, ) is suse of Q, nd incompleeness cn e included y llowing h φ(q, ) my e he empy se. The rule for cceping sring is h where here is choice of new se, here should exis new se h leds o ccepnce. (In generl, here should exis sequence of choices.) This non-deerminism cn simplify he sk of consrucing complex mchines. Le P(S) denoe he se of ll suses of se S. A nondeerminisic finie uomon (or NFA) is quinuple A =(Q, A, φ, i, T ) where. Q is finie nonempy se whose memers re clled ses of he uomon; c d o g c,g,o, c,d,g,o,,c,d,g,o,,c,d,g,o,c,d,o,,c,d,g,o,,c,d,g,,c,d,g,o, d o g 2. A is finie nonempy se clled he lphe of he uomon; 3. φ is mp from Q A o P(Q) clled he rnsiion funcion of he uomon; 4. i is memer of Q nd is clled he iniil se; 5. T is nonempy suse of Q whose memers re clled erminl ses or cceping ses. The mp φ cn e exended o mp Q A P(Q) y defining φ(q, ɛ) = {q} for ll q Q φ(q, w) = p φ(q,w) φ(p, ) for ll q Q; w A ; A. We sr ou y exending our definiion of DFAs in wy h mkes no difference o he kinds of lnguge you cn descrie, u someimes simplifies he descripion of he DFA. We define n incomplee DFA (Q, A, φ, i, T ) y llowing φ o e 7 Thus φ(q, w) is he se of ll possile ses h cn rise when he inpu w is received in he se q. As efore we hen hve φ(q, vw) =φ(φ(q, v),w) for ll q Q; v, w A. 8

5 We sy h w A is cceped y A if φ(i, w) T, i.e. if he se φ(i, w) of ll possile ses rising from he inpu w conins les one erminl se. Prolem. Wrie down he le of vlues of he rnsiion funcion of he nondeerminisic finie uomon wih he following se digrm. Give he phs lelled y he inpu words nd nd decide if hese re cceped or rejeced. Find he lnguge cceped y he uomon. Soluion. s p φ i {p, q} p {i, s} q {} s The inpu word produces he following ph {i} i {p, q} {i, s} nd is cceped since he finl se conins erminl se. The inpu word produces he following ph {i} {p, q} {i, s} q {p, q} nd is rejeced since he finl se conins no erminl se. The erminl se cn only e reched if he inpu word is one of,,,..., while he erminl se s cn only e reched if he inpu is one of,,,... Hence he lnguge cceped y his uomon is {} { 2 } { } + where L + denoes L \ ɛ. We now show h inroducing nondeerminism does no ffec he lnguges which re cceped y our uom. Theorem. A lnguge which is cceped y nondeerminisic finie uomon is lso cceped y some deerminisic finie uomon. Proof. Le A =(Q, A, φ, i, T ) e nondeerminisic finie uomon. We define deerminisic finie uomon A s follows. The lphe of A is he sme s 9 h of A. The se of ses of A is P(Q). The rnsiion funcion of A is he mp ψ : P(Q) A P(Q) defined y ψ(p, ) = φ(p, ). For he iniil se of A we ke {i} P (Q). We now hve Hence defining T y p P w L(A) φ(i, w) T ψ({i},w) T. T = {P P(Q) :P T } we hve now specified deerminisic uomon A =(P(Q), A, ψ, {i},t ) nd w L(A ) ψ({i},w) T ψ({i},w) T w L(A). Thus L(A) =L(A ). Ofen i is simpler o define nondeerminisic uomon o perform given sk. We look he exmple of serching for pern in sring of ex. Prolem. Design finie se uomon which cceps he lnguge {, } {}{, } of ll i srings conining he susring. Soluion. The lnguge is cceped y he nondeerminisic uomon wih he following se digrm: If n inpu sring does conin hen in one possile compuion he mchine loops round he sr se unil is reched when i proceeds o he erminl se. Thus he inpu is cceped. If he inpu does no conin hen here is no compuion leding from he iniil o he erminl se so he inpu is rejeced.,, Noe h his nondeerminisic uomon hs simpler se digrm hn he following deerminisic one which serched for he sme susring.

6 , Limiions of Finie Auom If w A for some lphe A nd w = 2... n where, 2,... n A, hen he reverse of w is he word w R given y w R = n We lso define ɛ R = ɛ. If A hen clerly R =. If w = w R hen he word w is clled plindrome. Exmples. Le A = {,, c,..., x, y, z}. Then (compuer) R = reupmoc. The following words re plindromes in A : o, deed, roor. We now show h here re lnguges h cnno e cceped y ny finie-se uomon. Exmple. There is no deerminisic finie uomon which cceps he lnguge L = { n n : n =, 2, 3,...}. This is proved y conrdicion. Suppose h here is DFA (Q, {, }, φ, i, T ) which cceps he lnguge L. For ech n le q n e he se fer he word n is inpu, i.e. q n = φ(i, n ). Then q,q 2,q 3,... cnno ll e disinc since he se Q of ses is finie. Hence q r = q s for some r, s wih r s. Now if he word r s is inpu we oin he finl se φ(i, r s )=φ(q r, s )=φ(q s, s )=φ(i, s s ) T. Hence r s L. Bu since r s we hve r s L, conrdicion. If word z elongs o lnguge cceped y n uomon wih N ses nd z > Nhen he cceping ph for z mus conin repeed se nd herefore will hve he form i u q v q w where i is he iniil se, is n cceping se nd z = uvw, where v ɛ. Now we cn repe he ph lelled wih v ny numer n of imes nd oin n cceping ph wih lel uv n w. Hence uv n w is lso cceped y he uomon. Also if q is ken o e he firs repeed se hen he ph from i o he second q cn conin mos N + ses, so is lel uv hs lengh mos N. The word uv n w cn e hough of s hving een oined y pumping he susring v of z = uvw. We hve now proved he following resul which is ofen used for showing h cerin lnguges cnno e cceped y finie uom. The Pumping Lemm. Le L A e lnguge which is cceped y some deerminisic finie uomon wih N ses. Then every word z L wih z N cn e wrien in he form z = uvw for some u, v, w A wih. v ɛ 2. uv N 3. uv n w L for n =, 2, 3,... This jus sys h ny sufficienly long word which is cceped hs susring which cn e repeed ( pumped ) o give us more words which re cceped. As n pplicion of he pumping lemm we show h here is no deerminisic finie uomon which cn recognise wheher is inpu is plindrome or no. This lso shows he limied power of finie se uomon s model of compuion. Prolem. Le A e n lphe which conins les 2 leers nd le P e he se of plindromes over A, i.e. P = {w A : w = w R }. Show h here is no deerminisic finie uomon which cceps P. Soluion. Suppose y wy of conrdicion h here is n uomon h cceps P nd le N e he numer of ses h i possesses. Le, e disinc leers in A nd choose some m wih m > N. The word m m is plindrome nd hs lengh >N so y he pumping lemm we cn wrie m m = uvw where v ɛ nd uv N < m nd uv n w is plindrome for every n. Bu now m m = uvw where uv is shorer hn m. Compring he leers in hese wo words we see h uv mus e sring of s nd hence v mus e sring of les one. I now follows h uv 2 w = m+r m for some r. By he pumping lemm his word mus elong o he lnguge P of ll plindromes, u is clerly no plindrome, giving us conrdicion. Hence he lnguge P is no cceped y ny deerminisic finie uomon. 2

The solution is often represented as a vector: 2xI + 4X2 + 2X3 + 4X4 + 2X5 = 4 2xI + 4X2 + 3X3 + 3X4 + 3X5 = 4. 3xI + 6X2 + 6X3 + 3X4 + 6X5 = 6.

The solution is often represented as a vector: 2xI + 4X2 + 2X3 + 4X4 + 2X5 = 4 2xI + 4X2 + 3X3 + 3X4 + 3X5 = 4. 3xI + 6X2 + 6X3 + 3X4 + 6X5 = 6. [~ o o :- o o ill] i 1. Mrices, Vecors, nd Guss-Jordn Eliminion 1 x y = = - z= The soluion is ofen represened s vecor: n his exmple, he process of eliminion works very smoohly. We cn elimine ll enries

More information

e t dt e t dt = lim e t dt T (1 e T ) = 1

e t dt e t dt = lim e t dt T (1 e T ) = 1 Improper Inegrls There re wo ypes of improper inegrls - hose wih infinie limis of inegrion, nd hose wih inegrnds h pproch some poin wihin he limis of inegrion. Firs we will consider inegrls wih infinie

More information

Motion. Part 2: Constant Acceleration. Acceleration. October Lab Physics. Ms. Levine 1. Acceleration. Acceleration. Units for Acceleration.

Motion. Part 2: Constant Acceleration. Acceleration. October Lab Physics. Ms. Levine 1. Acceleration. Acceleration. Units for Acceleration. Moion Accelerion Pr : Consn Accelerion Accelerion Accelerion Accelerion is he re of chnge of velociy. = v - vo = Δv Δ ccelerion = = v - vo chnge of velociy elpsed ime Accelerion is vecor, lhough in one-dimensionl

More information

ESSLLI 2007 COURSE READER. ESSLLI is the Annual Summer School of FoLLI, The Association for Logic, Language and Information

ESSLLI 2007 COURSE READER. ESSLLI is the Annual Summer School of FoLLI, The Association for Logic, Language and Information ESSLLI 2007 19h Europen Summer School in Logic, Lnguge nd Inormion Augus 6-17, 2007 hp://www.cs.cd.ie/esslli2007 Triniy College Dulin Irelnd COURSE READER ESSLLI is he Annul Summer School o FoLLI, The

More information

0 for t < 0 1 for t > 0

0 for t < 0 1 for t > 0 8.0 Sep nd del funcions Auhor: Jeremy Orloff The uni Sep Funcion We define he uni sep funcion by u() = 0 for < 0 for > 0 I is clled he uni sep funcion becuse i kes uni sep = 0. I is someimes clled he Heviside

More information

ENGR 1990 Engineering Mathematics The Integral of a Function as a Function

ENGR 1990 Engineering Mathematics The Integral of a Function as a Function ENGR 1990 Engineering Mhemics The Inegrl of Funcion s Funcion Previously, we lerned how o esime he inegrl of funcion f( ) over some inervl y dding he res of finie se of rpezoids h represen he re under

More information

Designing finite automata II

Designing finite automata II Designing finite utomt II Prolem: Design DFA A such tht L(A) consists of ll strings of nd which re of length 3n, for n = 0, 1, 2, (1) Determine wht to rememer out the input string Assign stte to ech of

More information

Contraction Mapping Principle Approach to Differential Equations

Contraction Mapping Principle Approach to Differential Equations epl Journl of Science echnology 0 (009) 49-53 Conrcion pping Principle pproch o Differenil Equions Bishnu P. Dhungn Deprmen of hemics, hendr Rn Cmpus ribhuvn Universiy, Khmu epl bsrc Using n eension of

More information

4.8 Improper Integrals

4.8 Improper Integrals 4.8 Improper Inegrls Well you ve mde i hrough ll he inegrion echniques. Congrs! Unforunely for us, we sill need o cover one more inegrl. They re clled Improper Inegrls. A his poin, we ve only del wih inegrls

More information

An integral having either an infinite limit of integration or an unbounded integrand is called improper. Here are two examples.

An integral having either an infinite limit of integration or an unbounded integrand is called improper. Here are two examples. Improper Inegrls To his poin we hve only considered inegrls f(x) wih he is of inegrion nd b finie nd he inegrnd f(x) bounded (nd in fc coninuous excep possibly for finiely mny jump disconinuiies) An inegrl

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

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

Minimum Squared Error

Minimum Squared Error Minimum Squred Error LDF: Minimum Squred-Error Procedures Ide: conver o esier nd eer undersood prolem Percepron y i > for ll smples y i solve sysem of liner inequliies MSE procedure y i = i for ll smples

More information

Minimum Squared Error

Minimum Squared Error Minimum Squred Error LDF: Minimum Squred-Error Procedures Ide: conver o esier nd eer undersood prolem Percepron y i > 0 for ll smples y i solve sysem of liner inequliies MSE procedure y i i for ll smples

More information

5.1-The Initial-Value Problems For Ordinary Differential Equations

5.1-The Initial-Value Problems For Ordinary Differential Equations 5.-The Iniil-Vlue Problems For Ordinry Differenil Equions Consider solving iniil-vlue problems for ordinry differenil equions: (*) y f, y, b, y. If we know he generl soluion y of he ordinry differenil

More information

PHYSICS 1210 Exam 1 University of Wyoming 14 February points

PHYSICS 1210 Exam 1 University of Wyoming 14 February points PHYSICS 1210 Em 1 Uniersiy of Wyoming 14 Februry 2013 150 poins This es is open-noe nd closed-book. Clculors re permied bu compuers re no. No collborion, consulion, or communicion wih oher people (oher

More information

Convert the NFA into DFA

Convert 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 information

September 20 Homework Solutions

September 20 Homework Solutions College of Engineering nd Compuer Science Mechnicl Engineering Deprmen Mechnicl Engineering A Seminr in Engineering Anlysis Fll 7 Number 66 Insrucor: Lrry Creo Sepember Homework Soluions Find he specrum

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

1.0 Electrical Systems

1.0 Electrical Systems . Elecricl Sysems The ypes of dynmicl sysems we will e sudying cn e modeled in erms of lgeric equions, differenil equions, or inegrl equions. We will egin y looking fmilir mhemicl models of idel resisors,

More information

( ) ( ) ( ) ( ) ( ) ( y )

( ) ( ) ( ) ( ) ( ) ( y ) 8. Lengh of Plne Curve The mos fmous heorem in ll of mhemics is he Pyhgoren Theorem. I s formulion s he disnce formul is used o find he lenghs of line segmens in he coordine plne. In his secion you ll

More information

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

More on automata. Michael George. March 24 April 7, 2014 More on utomt Michel George Mrch 24 April 7, 2014 1 Automt constructions Now tht we hve forml model of mchine, it is useful to mke some generl constructions. 1.1 DFA Union / Product construction Suppose

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

MTH 146 Class 11 Notes

MTH 146 Class 11 Notes 8.- Are of Surfce of Revoluion MTH 6 Clss Noes Suppose we wish o revolve curve C round n is nd find he surfce re of he resuling solid. Suppose f( ) is nonnegive funcion wih coninuous firs derivive on he

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

Finite Automata-cont d

Finite Automata-cont d Automt Theory nd Forml Lnguges Professor Leslie Lnder Lecture # 6 Finite Automt-cont d The Pumping Lemm WEB SITE: http://ingwe.inghmton.edu/ ~lnder/cs573.html Septemer 18, 2000 Exmple 1 Consider L = {ww

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

CS103B Handout 18 Winter 2007 February 28, 2007 Finite Automata

CS103B Handout 18 Winter 2007 February 28, 2007 Finite Automata CS103B ndout 18 Winter 2007 Ferury 28, 2007 Finite Automt Initil text y Mggie Johnson. Introduction Severl childrens gmes fit the following description: Pieces re set up on plying ord; dice re thrown or

More information

Chapter 2: Evaluative Feedback

Chapter 2: Evaluative Feedback Chper 2: Evluive Feedbck Evluing cions vs. insrucing by giving correc cions Pure evluive feedbck depends olly on he cion ken. Pure insrucive feedbck depends no ll on he cion ken. Supervised lerning is

More information

Regular Language. Nonregular Languages The Pumping Lemma. The pumping lemma. Regular Language. The pumping lemma. Infinitely long words 3/17/15

Regular Language. Nonregular Languages The Pumping Lemma. The pumping lemma. Regular Language. The pumping lemma. Infinitely long words 3/17/15 Regulr Lnguge Nonregulr Lnguges The Pumping Lemm Models of Comput=on Chpter 10 Recll, tht ny lnguge tht cn e descried y regulr expression is clled regulr lnguge In this lecture we will prove tht not ll

More information

1 From NFA to regular expression

1 From NFA to regular expression Note 1: How to convert DFA/NFA to regulr expression Version: 1.0 S/EE 374, Fll 2017 Septemer 11, 2017 In this note, we show tht ny DFA cn e converted into regulr expression. Our construction would work

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

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

A Kalman filtering simulation

A Kalman filtering simulation A Klmn filering simulion The performnce of Klmn filering hs been esed on he bsis of wo differen dynmicl models, ssuming eiher moion wih consn elociy or wih consn ccelerion. The former is epeced o beer

More information

3D Transformations. Computer Graphics COMP 770 (236) Spring Instructor: Brandon Lloyd 1/26/07 1

3D Transformations. Computer Graphics COMP 770 (236) Spring Instructor: Brandon Lloyd 1/26/07 1 D Trnsformions Compuer Grphics COMP 770 (6) Spring 007 Insrucor: Brndon Lloyd /6/07 Geomery Geomeric eniies, such s poins in spce, exis wihou numers. Coordines re nming scheme. The sme poin cn e descried

More information

REAL ANALYSIS I HOMEWORK 3. Chapter 1

REAL ANALYSIS I HOMEWORK 3. Chapter 1 REAL ANALYSIS I HOMEWORK 3 CİHAN BAHRAN The quesions re from Sein nd Shkrchi s e. Chper 1 18. Prove he following sserion: Every mesurble funcion is he limi.e. of sequence of coninuous funcions. We firs

More information

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.

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. Regulr Expressions, Pumping Lemm, Right Liner Grmmrs Ling 106 Mrch 25, 2002 1 Regulr Expressions A regulr expression descries or genertes lnguge: it is kind of shorthnd for listing the memers of lnguge.

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

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

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

First Midterm Examination

First 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

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

Mathematics 805 Final Examination Answers

Mathematics 805 Final Examination Answers . 5 poins Se he Weiersrss M-es. Mhemics 85 Finl Eminion Answers Answer: Suppose h A R, nd f n : A R. Suppose furher h f n M n for ll A, nd h Mn converges. Then f n converges uniformly on A.. 5 poins Se

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

1 jordan.mcd Eigenvalue-eigenvector approach to solving first order ODEs. -- Jordan normal (canonical) form. Instructor: Nam Sun Wang

1 jordan.mcd Eigenvalue-eigenvector approach to solving first order ODEs. -- Jordan normal (canonical) form. Instructor: Nam Sun Wang jordnmcd Eigenvlue-eigenvecor pproch o solving firs order ODEs -- ordn norml (cnonicl) form Insrucor: Nm Sun Wng Consider he following se of coupled firs order ODEs d d x x 5 x x d d x d d x x x 5 x x

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

More on Magnetically C Coupled Coils and Ideal Transformers

More on Magnetically C Coupled Coils and Ideal Transformers Appenix ore on gneiclly C Couple Coils Iel Trnsformers C. Equivlen Circuis for gneiclly Couple Coils A imes, i is convenien o moel mgneiclly couple coils wih n equivlen circui h oes no involve mgneic coupling.

More information

ɛ-closure, Kleene s Theorem,

ɛ-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 information

3 Regular expressions

3 Regular expressions 3 Regulr expressions Given n lphet Σ lnguge is set of words L Σ. So fr we were le to descrie lnguges either y using set theory (i.e. enumertion or comprehension) or y n utomton. In this section we shll

More information

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

CS 311 Homework 3 due 16:30, Thursday, 14 th October 2010 CS 311 Homework 3 due 16:30, Thursdy, 14 th Octoer 2010 Homework must e sumitted on pper, in clss. Question 1. [15 pts.; 5 pts. ech] Drw stte digrms for NFAs recognizing the following lnguges:. L = {w

More information

1. Consider a PSA initially at rest in the beginning of the left-hand end of a long ISS corridor. Assume xo = 0 on the left end of the ISS corridor.

1. Consider a PSA initially at rest in the beginning of the left-hand end of a long ISS corridor. Assume xo = 0 on the left end of the ISS corridor. In Eercise 1, use sndrd recngulr Cresin coordine sysem. Le ime be represened long he horizonl is. Assume ll ccelerions nd decelerions re consn. 1. Consider PSA iniilly res in he beginning of he lef-hnd

More information

1.3 Regular Expressions

1.3 Regular Expressions 56 1.3 Regulr xpressions These hve n importnt role in describing ptterns in serching for strings in mny pplictions (e.g. wk, grep, Perl,...) All regulr expressions of lphbet re 1.Ønd re regulr expressions,

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

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

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

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 That Are and Are Not Context-Free

Languages That Are and Are Not Context-Free Languages Tha re and re No Conex-Free Read K & S 3.5, 3.6, 3.7. Read Supplemenary Maerials: Conex-Free Languages and Pushdown uomaa: Closure Properies of Conex-Free Languages Read Supplemenary Maerials:

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

1. Find a basis for the row space of each of the following matrices. Your basis should consist of rows of the original matrix.

1. Find a basis for the row space of each of the following matrices. Your basis should consist of rows of the original matrix. Mh 7 Exm - Prcice Prolem Solions. Find sis for he row spce of ech of he following mrices. Yor sis shold consis of rows of he originl mrix. 4 () 7 7 8 () Since we wn sis for he row spce consising of rows

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

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

Properties of Logarithms. Solving Exponential and Logarithmic Equations. Properties of Logarithms. Properties of Logarithms. ( x)

Properties of Logarithms. Solving Exponential and Logarithmic Equations. Properties of Logarithms. Properties of Logarithms. ( x) Properies of Logrihms Solving Eponenil nd Logrihmic Equions Properies of Logrihms Produc Rule ( ) log mn = log m + log n ( ) log = log + log Properies of Logrihms Quoien Rule log m = logm logn n log7 =

More information

f t f a f x dx By Lin McMullin f x dx= f b f a. 2

f t f a f x dx By Lin McMullin f x dx= f b f a. 2 Accumulion: Thoughs On () By Lin McMullin f f f d = + The gols of he AP* Clculus progrm include he semen, Sudens should undersnd he definie inegrl s he ne ccumulion of chnge. 1 The Topicl Ouline includes

More information

CHAPTER 1 Regular Languages. Contents

CHAPTER 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 information

Nondeterminism and Nodeterministic Automata

Nondeterminism 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 information

1 Nondeterministic Finite Automata

1 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

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

CS 310 (sec 20) - Winter Final Exam (solutions) SOLUTIONS CS 310 (sec 20) - Winter 2003 - Finl Exm (solutions) SOLUTIONS 1. (Logic) Use truth tles to prove the following logicl equivlences: () p q (p p) (q q) () p q (p q) (p q) () p q p q p p q q (q q) (p p)

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

Physics 2A HW #3 Solutions

Physics 2A HW #3 Solutions Chper 3 Focus on Conceps: 3, 4, 6, 9 Problems: 9, 9, 3, 41, 66, 7, 75, 77 Phsics A HW #3 Soluions Focus On Conceps 3-3 (c) The ccelerion due o grvi is he sme for boh blls, despie he fc h he hve differen

More information

Honours Introductory Maths Course 2011 Integration, Differential and Difference Equations

Honours Introductory Maths Course 2011 Integration, Differential and Difference Equations Honours Inroducory Mhs Course 0 Inegrion, Differenil nd Difference Equions Reding: Ching Chper 4 Noe: These noes do no fully cover he meril in Ching, u re men o supplemen your reding in Ching. Thus fr

More information

Average & instantaneous velocity and acceleration Motion with constant acceleration

Average & instantaneous velocity and acceleration Motion with constant acceleration Physics 7: Lecure Reminders Discussion nd Lb secions sr meeing ne week Fill ou Pink dd/drop form if you need o swich o differen secion h is FULL. Do i TODAY. Homework Ch. : 5, 7,, 3,, nd 6 Ch.: 6,, 3 Submission

More information

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

Finite Automata. Informatics 2A: Lecture 3. John Longley. 22 September School of Informatics University of Edinburgh Lnguges nd Automt Finite Automt Informtics 2A: Lecture 3 John Longley School of Informtics University of Edinburgh jrl@inf.ed.c.uk 22 September 2017 1 / 30 Lnguges nd Automt 1 Lnguges nd Automt Wht is

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

f(x) dx with An integral having either an infinite limit of integration or an unbounded integrand is called improper. Here are two examples dx x x 2

f(x) dx with An integral having either an infinite limit of integration or an unbounded integrand is called improper. Here are two examples dx x x 2 Impope Inegls To his poin we hve only consideed inegls f() wih he is of inegion nd b finie nd he inegnd f() bounded (nd in fc coninuous ecep possibly fo finiely mny jump disconinuiies) An inegl hving eihe

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

CSE396 Prelim I Answer Key Spring 2017

CSE396 Prelim I Answer Key Spring 2017 Nme nd St.ID#: CSE96 Prelim I Answer Key Spring 2017 (1) (24 pts.) Define A to e the lnguge of strings x {, } such tht x either egins with or ends with, ut not oth. Design DFA M such tht L(M) = A. A node-rc

More information

2.7. Some common engineering functions. Introduction. Prerequisites. Learning Outcomes

2.7. Some common engineering functions. Introduction. Prerequisites. Learning Outcomes Some common engineering funcions 2.7 Inroducion This secion provides a caalogue of some common funcions ofen used in Science and Engineering. These include polynomials, raional funcions, he modulus funcion

More information

23.2. Representing Periodic Functions by Fourier Series. Introduction. Prerequisites. Learning Outcomes

23.2. Representing Periodic Functions by Fourier Series. Introduction. Prerequisites. Learning Outcomes Represening Periodic Funcions by Fourier Series 3. Inroducion In his Secion we show how a periodic funcion can be expressed as a series of sines and cosines. We begin by obaining some sandard inegrals

More information

22.615, MHD Theory of Fusion Systems Prof. Freidberg Lecture 10: The High Beta Tokamak Con d and the High Flux Conserving Tokamak.

22.615, MHD Theory of Fusion Systems Prof. Freidberg Lecture 10: The High Beta Tokamak Con d and the High Flux Conserving Tokamak. .615, MHD Theory of Fusion Sysems Prof. Freidberg Lecure 1: The High Be Tokmk Con d nd he High Flux Conserving Tokmk Proeries of he High Tokmk 1. Evlue he MHD sfey fcor: ψ B * ( ) 1 3 ρ 1+ ν ρ ρ cosθ *

More information

10. State Space Methods

10. State Space Methods . Sae Space Mehods. Inroducion Sae space modelling was briefly inroduced in chaper. Here more coverage is provided of sae space mehods before some of heir uses in conrol sysem design are covered in he

More information

23.5. Half-Range Series. Introduction. Prerequisites. Learning Outcomes

23.5. Half-Range Series. Introduction. Prerequisites. Learning Outcomes Half-Range Series 2.5 Inroducion In his Secion we address he following problem: Can we find a Fourier series expansion of a funcion defined over a finie inerval? Of course we recognise ha such a funcion

More information

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

12.1 Nondeterminism Nondeterministic Finite Automata. a a b ε. CS125 Lecture 12 Fall 2016 CS125 Lecture 12 Fll 2016 12.1 Nondeterminism The ide of nondeterministic computtions is to llow our lgorithms to mke guesses, nd only require tht they ccept when the guesses re correct. For exmple, simple

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

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

Solutions to assignment 3

Solutions to assignment 3 D Sruure n Algorihm FR 6. Informik Sner, Telikeplli WS 03/04 hp://www.mpi-.mpg.e/~ner/oure/lg03/inex.hml Soluion o ignmen 3 Exerie Arirge i he ue of irepnie in urreny exhnge re o rnform one uni of urreny

More information

ODEs II, Lecture 1: Homogeneous Linear Systems - I. Mike Raugh 1. March 8, 2004

ODEs II, Lecture 1: Homogeneous Linear Systems - I. Mike Raugh 1. March 8, 2004 ODEs II, Lecure : Homogeneous Linear Sysems - I Mike Raugh March 8, 4 Inroducion. In he firs lecure we discussed a sysem of linear ODEs for modeling he excreion of lead from he human body, saw how o ransform

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

INTEGRALS. Exercise 1. Let f : [a, b] R be bounded, and let P and Q be partitions of [a, b]. Prove that if P Q then U(P ) U(Q) and L(P ) L(Q).

INTEGRALS. Exercise 1. Let f : [a, b] R be bounded, and let P and Q be partitions of [a, b]. Prove that if P Q then U(P ) U(Q) and L(P ) L(Q). INTEGRALS JOHN QUIGG Eercise. Le f : [, b] R be bounded, nd le P nd Q be priions of [, b]. Prove h if P Q hen U(P ) U(Q) nd L(P ) L(Q). Soluion: Le P = {,..., n }. Since Q is obined from P by dding finiely

More information

Solutions to Problems from Chapter 2

Solutions to Problems from Chapter 2 Soluions o Problems rom Chper Problem. The signls u() :5sgn(), u () :5sgn(), nd u h () :5sgn() re ploed respecively in Figures.,b,c. Noe h u h () :5sgn() :5; 8 including, bu u () :5sgn() is undeined..5

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

Math 2142 Exam 1 Review Problems. x 2 + f (0) 3! for the 3rd Taylor polynomial at x = 0. To calculate the various quantities:

Math 2142 Exam 1 Review Problems. x 2 + f (0) 3! for the 3rd Taylor polynomial at x = 0. To calculate the various quantities: Mah 4 Eam Review Problems Problem. Calculae he 3rd Taylor polynomial for arcsin a =. Soluion. Le f() = arcsin. For his problem, we use he formula f() + f () + f ()! + f () 3! for he 3rd Taylor polynomial

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

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

Chapter Direct Method of Interpolation

Chapter Direct Method of Interpolation Chper 5. Direc Mehod of Inerpolion Afer reding his chper, you should be ble o:. pply he direc mehod of inerpolion,. sole problems using he direc mehod of inerpolion, nd. use he direc mehod inerpolns o

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

rank Additionally system of equation only independent atfect Gawp (A) possible ( Alb ) easily process form rang A. Proposition with Definition

rank Additionally system of equation only independent atfect Gawp (A) possible ( Alb ) easily process form rang A. Proposition with Definition Defiion nexivnol numer ler dependen rows mrix sid row Gwp elimion mehod does no fec h numer end process i possile esily red rng fc for mrix form der zz rn rnk wih m dcussion i holds rr o Proposiion ler

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

Homework Solution - Set 5 Due: Friday 10/03/08

Homework Solution - Set 5 Due: Friday 10/03/08 CE 96 Introduction to the Theory of Computtion ll 2008 Homework olution - et 5 Due: ridy 10/0/08 1. Textook, Pge 86, Exercise 1.21. () 1 2 Add new strt stte nd finl stte. Mke originl finl stte non-finl.

More information

Magnetostatics Bar Magnet. Magnetostatics Oersted s Experiment

Magnetostatics Bar Magnet. Magnetostatics Oersted s Experiment Mgneosics Br Mgne As fr bck s 4500 yers go, he Chinese discovered h cerin ypes of iron ore could rc ech oher nd cerin mels. Iron filings "mp" of br mgne s field Crefully suspended slivers of his mel were

More information

Lecture 3: Equivalence Relations

Lecture 3: Equivalence Relations Mthcmp Crsh Course Instructor: Pdric Brtlett Lecture 3: Equivlence Reltions Week 1 Mthcmp 2014 In our lst three tlks of this clss, we shift the focus of our tlks from proof techniques to proof concepts

More information