Transition systems (motivation)

Size: px
Start display at page:

Download "Transition systems (motivation)"

Transcription

1 Trnsition systems (motivtion) Course Modelling of Conurrent Systems ( Modellierung neenläufiger Systeme ) Winter Semester 2009/0 University of Duisurg-Essen Brr König Tehing ssistnt: Christoph Blume In the following we will look t trnsition systems, whih n e used to represent the ehviour of system in very diret nd expliit wy. 2 3 Brr König Course Modelling of Conurrent Systems Ations nd sequenes of tions We use the following nottion: At: set of tomi tions, often denoted y,,,.... We will sometimes use the internl tion τ, whih should e invisile from outside. At : the set of ll finite words over the lphet At. At ω : the set of ll infinite words over the lphet At. An infinite word w At ω n e represented y mpping w : N0\{0} At. At = At At ω : the set of ll finite nd infinite words over At. Pref(L): given lnguge L At we define the set of ll prefixes of L s follows: Brr König Course Modelling of Conurrent Systems 24 Reltions We use the following nottion for reltions: A reltion R etween the sets A, B is suset of A B, i.e., R A B. Let (, ) A B e pir with (, ) R. Then we lso write R (in words: is relted to ). Pref(L) = {u At w L, v At : w = uv}. Brr König Course Modelling of Conurrent Systems 25 Brr König Course Modelling of Conurrent Systems 26

2 Trnsition systems Trnsition system (definition) Let At e fixed set of tions. A trnsition system T = (Z, ) over At onsists of A set Z of sttes nd set Z At Z of trnsitions etween sttes. A trnsition system is lled finite if the stte set s well s the set of trnsitions is finite. Insted of (, l, ) we will in the following write l. Furthermore we will revite... n y...n. In ddition ε holds for every stte. Given stte we write if there exists stte with nd if there is no suh stte. Trnsition systems (exmples) A lssil exmple: the te/offee-mhine We wnt to model very simple mhine tht outputs te or offee fter hs een inserted nd utton hs een pressed, n show fulty ehviour nd my potentilly ehve non-deterministilly. Brr König Course Modelling of Conurrent Systems 27 Trnsition systems (exmples) Brr König Course Modelling of Conurrent Systems 28 Trnsition systems (exmples) offee te hnge utton(offee) utton(te) utton(offee) utton(te) offee te A te/offee-mhine. A mhine tht gives k hnge. We distinguish etween input tions of the form nd output tions (lso lled otions) of the form. Brr König Course Modelling of Conurrent Systems 29 Brr König Course Modelling of Conurrent Systems 29

3 Trnsition systems (exmples) Trnsition systems (exmples) error error offee te utton(offee) utton(te) offee utton(offee) error utton(te) te A mhine with n error. The ourrene of n error is tully rther n internl tion nd ould lterntively e modelled with τ. An (unfir) mhine with fulty ehviour whih my enter the error stte fter hs een inserted. Brr König Course Modelling of Conurrent Systems 29 Trnsition systems (exmples) Brr König Course Modelling of Conurrent Systems 29 Trnsition systems (exmples) repir error offee te utton(offee) utton(te) offee utton(offee) te utton(te) A mhine with n error stte tht n e repired. A mhine with non-deterministi ehviour tht mkes hoie of everges for the user. Brr König Course Modelling of Conurrent Systems 29 Brr König Course Modelling of Conurrent Systems 29

4 Deterministi trnsition systems Deterministi trnsition system (definition) A trnsition system T = (Z, ) is lled deterministi, if for every stte Z: Remrks: Whenever nd 2, then = 2. All te/offee-mhines, prt from the lst, re deterministi. Opposed to deterministi finite utomt we do not require for deterministi trnsition systems tht every tion is fesile in every stte. Trnsition systems (exmples) The Dining Philosophers prolem onsiders proesses (= philosophers) nd resoures (= forks): Three philosophers re seted t round tle nd there is fork etween eh pir of philosophers sitting side y side. Philosophers eventully get hungry nd need oth djent forks in order to et. Eh philosopher piks up oth forks (in ny order) t n ritrry moment in time, ets nd, fter eting, puts k oth forks. P F3 F F2 P2 P3 Brr König Course Modelling of Conurrent Systems 30 Trnsition systems (exmples) Brr König Course Modelling of Conurrent Systems 3 Trnsition systems (exmples) Question The intention is tht the system runs forever nd never termintes. Cn the system reh dedlok stte in whih no tions re possile? We solve this question y drwing the orresponding trnsition system (t lest prtilly). Sttes: 3-tuples of the form (, 2, 3), where i symolies the stte of fork Fi. It holds tht: {, P, P2} (F is not ssigned, ssigned to P or to P2) 2 {, P2, P3} (nlogous mening) 3 {, P3, P} (nlogous mening) Hene the trnsition system hs 3 3 = 27 sttes. Ations: t(pi, Fj): philosopher Pi tkes fork Fj. ei: philosopher Pi ets. ri: philosopher Pi returns oth forks. Brr König Course Modelling of Conurrent Systems 32 Brr König Course Modelling of Conurrent Systems 33

5 Trnsition systems (exmples) Exerpt from the trnsition system: r (,, ) t(p, F) (P,, ) t(p, F3) t(p2, F2) Trnsition systems (exmples) Exerpt from the trnsition system: r (,, ) t(p, F) (P,, ) t(p, F3) t(p2, F2) e (P,, P) (P, P2, ) e (P,, P) (P, P2, ) t(p2, F2) t(p3, F3) t(p2, F2) t(p3, F3) e2 e (P, P2, P) t(p2, F) (P2, P2, ) (, P2, ) r (P, P2, P3) e2 e (P, P2, P) t(p2, F) (P2, P2, ) (, P2, ) r (P, P2, P3) Dedlok! No more trnsitions re possile. Brr König Course Modelling of Conurrent Systems 34 Trnsition systems (exmples) Possile solutions for the dedlok prolem: Avoid dedloks: A philosopher hs to tke oth forks simultneously. Introdution of left-hnded nd right-hnded philosophers. A left-hnded philosopher tkes the left fork first, right-hnded philosopher tkes the right fork first. If we hve left-hnded s well s right-hnded philosophers, no dedloks n our. Order the resoures: F < F2 < F3. The smller resoure with respet to the ordering, the erlier it hs to e tken. Reognie nd resolve dedloks: dedloks hve to e found (y monitoring proess, vi timeouts,... ) nd to e resolved ordingly. Brr König Course Modelling of Conurrent Systems 34 Behviourl equivlenes (tre equivlene) Lnguge of stte (definition) The lnguge of stte is the set of ll words over At, whih orrespond to pths originting from. There re three distint possiilities to define lnguges: S() = {w At Z : w } S ω () = {23 At ω S () = S() S ω () } The lnguge of stte is lso lled its set of tres. Tre equivlene (definition) Two sttes, Z re lled S-tre equivlent whenever S() = S( ). Anlogously we define S ω - nd S -tre equivlene. Brr König Course Modelling of Conurrent Systems 35 Brr König Course Modelling of Conurrent Systems 36

6 Behviourl equivlenes (tre equivlene) Tre equivlene hs the following property: Whenever, re S -tre equivlent, then they re lso S- nd S ω -tre equivlent. Reson: S () = S ( ) implies S() = S () At = S ( ) At = S( ). Anlogously: S ω () = S () At ω = S ( ) At ω = S ω ( ). Behviourl equivlenes (tre equivlene) However: Whenever, re S-tre equivlent sind, then they re not neessrily S ω -tre equivlent (nd vie vers). Counterexmples: Sttes, re S-equivlent, ut not S ω -equivlent. (From only finite pths originte.)... Sttes, re S ω -equivlent, ut not S-equivlent.... Brr König Course Modelling of Conurrent Systems 37 Behviourl equivlenes (filures equivlene) Brr König Course Modelling of Conurrent Systems 38 Behviourl equivlenes (filures equivlene) Motivtion: the sttes, of the following two te/offee-mhines re tre equivlent. offee utton(offee) te utton(te) offee utton(offee) te utton(te) However, one does not relly wnt to onsider these two sttes s equl. In one se the mhine works orretly, in the other the mhine keeps the without giving k everge. Therefore: tre equivlene is not suffiient. We lso need wy of expressing tht the rehle sttes llow respetively disllow the sme tions. Brr König Course Modelling of Conurrent Systems 39 Filures equivlene (Definition) Let T = (Z, ) e trnsition system. The set of filure pirs of stte Z is defined s: F() = {(w, A) At P(At) Z : w nd for ll A} Two sttes, Z re lled filure equivlent whenever F() = F( ). Brr König Course Modelling of Conurrent Systems 40

7 Behviourl equivlenes (filures equivlene) Behviourl equivlenes (filures equivlene) Motivtion: the sttes, of the two following te/offee-mhines re tre equivlent. offee utton(offee) te utton(te) offee utton(offee) te utton(te) In the exmple F( ) ontins the pir (, {utton(offee), utton(te)}) whih is not ontined in F(). Remrks: If pir (w, A) is ontined in the set F(), then we know for every A A tht lso (w, A ) F(). (We lso sy: F() is losed under set inlusion.) Hene it is suffiient to onsider pirs (w, A) where A is mximl. The definition of tivtion equivlene with the following sets A() is not suffiient to distinguish the orret mhine from the fulty one. A() = {(w, A) At P(At) Z : w nd for ll A} Brr König Course Modelling of Conurrent Systems 4 utomt Proess luli Petri nets Grph trnsformtion Introdution Trnsition systems Bühi Behviourl equivlenes (filures equivlene) Another exmple for filures equivlene: It holds tht: F() = {(ε, A) A {, }} {(, A) A {,, }} {(, A) A {,, }} {(, A) A {,, }} = F( ) nd, re hene filure equivlent. Brr König Course Modelling of Conurrent Systems 43 Brr König Course Modelling of Conurrent Systems 42 Behviourl equivlenes (isimilrity) There is nother importnt equivlene whih is slightly finer thn filures equivlene nd usully esier to mehnie: isimilrity or isimultion equivlene. Intuitively we require tht the two sttes, re le to mutully simulte eh other. Bisimultion (definition) Let T = (Z, ) e trnsition system. A reltion R Z Z on sttes is lled isimultion if for every pir (, 2) R nd for every tion At: for every with there exists 2 with 2 2 nd (, 2 ) R. for every 2 with 2 2 there exists with nd (, 2 ) R. Brr König Course Modelling of Conurrent Systems 44

8 Behviourl equivlenes (isimilrity) Behviourl equivlenes (isimilrity) Bisimilrity (Definition) Two sttes, 2 re lled isimilr if there exists isimultion R with (, 2) R. In this se we write 2. The reltion is lled isimilrity or isimultion equivlene. Exmples: offee te utton(offee) utton(te) offee te utton(offee) utton(te) The two sttes, re not isimilr. Brr König Course Modelling of Conurrent Systems 45 Behviourl equivlenes (isimilrity) Brr König Course Modelling of Conurrent Systems 46 Behviourl equivlenes (isimilrity) Exmples: offee te offee te utton(offee) utton(te) utton(offee) utton(te) The two sttes, re not isimilr. Exmples: d 5 d 2 6 7,, The two sttes =, = 5 re isimilr. Bisimultion: R = {(, 5), (2, 6), (2, 7), (3, 8), (4, 8)} d Brr König Course Modelling of Conurrent Systems 47 Brr König Course Modelling of Conurrent Systems 48

9 Behviourl equivlenes (isimilrity) Behviourl equivlenes (isimilrity) Bisimilrity n lso e hrteried s gme: Bisimultion gme Prtiipnts: Plyer I, Plyer II Equipment: 2 tokens, trnsition system Initil sitution: The two tokens re pled on the sttes,. Rules of one round: Plyer I hooses one of the two tokens nd mkes n ritrry (-)trnsition. Plyer II hs to tke the other token nd mke n -trnsition s n nswer. Importnt: In eh round Plyer I n hnge nd hoose the other token! Bisimultion gme (ontinution) Gme plying: Strting with the initil sitution one round fter the other is plyed, until one of the two plyers n not mke nother move. Winning ondition: Plyer I wins if he n mke move tht n not e simulted y Plyer II. Plyer II wins if he n simulte every move of Plyer I. (This n lso men tht the gme ontinues forever.) Brr König Course Modelling of Conurrent Systems 49 Behviourl equivlenes (isimilrity) Brr König Course Modelling of Conurrent Systems 50 Behviourl equivlenes (isimilrity) Corretness of the isimultion gme (proposition) Two sttes, re isimilr if nd only if Plyer II hs winning strtegy in the orresponding isimultion gme, where tokens re initilly pled on,. Remrks: This mens tht Plyer II hs to e le to win if he does not mke mistke. It does not men tht Plyer II will lwys win regrdless of the moves he mkes. The strtegy mentioned ove is isimultion reltion R whih n e used to show tht nd re isimilr. How to desrie winning strtegy for Plyer I? Plyer I mkes the first move. It is possile to set up deision tree tht reords whih moves hve to e mde y Plyer I depending on the nswering moves of Plyer II. The leves of the deision tree re the moves of Plyer I whih n not e nswered y Plyer II. Brr König Course Modelling of Conurrent Systems 5 Brr König Course Modelling of Conurrent Systems 52

10 Behviourl equivlenes (isimilrity) Behviourl equivlenes (isimilrity) Exmple (winning strtegy for Plyer I): 2 4 Properties of isimilrity: Bisimilrity is isimultion (proposition) Let T = (Z, ) e trnsition system. The isimilrity on Z stisfies: = {R R Z Z, R is isimultion} The isimilrity is isimultion itself. Plyer I: 3 Plyer II: Plyer I: Plyer II: Depending on whether Plyer II nswers with 4 5 or with 4 6, it is neessry for Plyer I to hoose different move. Brr König Course Modelling of Conurrent Systems 53 Behviourl equivlenes (isimilrity) Brr König Course Modelling of Conurrent Systems 54 Behviourl equivlenes (isimilrity) Closure properties (proposition) Let T = (Z, ) e trnsition system nd let R, R2 e isimultions. Then the following reltions re isimultions s well: Id Z = {(, ) Z}. 2 R = {(2, ) (, 2) R} 3 RR2 = {(, 3) 2 : (, 2) R, (2, 3) R2} 4 R R2 The first three sttements of the proposition imply tht isimilrity is n equivlene reltion, i.e., it is reflexive, symmetri nd trnsitive. Similr to the minimition proedure for (deterministi) finite utomt, there exists method for determining isimilr pirs of sttes in trnsition system. Ide: Strt with very orse reltion 0 tht reltes ll possile sttes. Refine this reltion step y step nd onstrut reltions, 2,.... As soon s two susequent reltions ide ( n = n+) we hve found the isimilrity (t lest for finite trnsition systems). Tht is, we hve = n. Brr König Course Modelling of Conurrent Systems 55 Brr König Course Modelling of Conurrent Systems 56

11 Behviourl equivlenes (isimilrity) Method for determining isimilr pirs of sttes Input: A trnsition system T = (Z, ) Define 0 = Z Z. n+ Z Z, where n+ if nd only if for ll At: For every with there exists 2 suh tht 2 nd n 2. 2 For every 2 with 2 there exists suh tht und n 2. The method termintes s soon s n= n+. Output: n Behviourl equivlenes (isimilrity) Exmple: determine the isimilr pirs of sttes of the following trnsition system Brr König Course Modelling of Conurrent Systems 57 Behviourl equivlenes (isimilrity) Brr König Course Modelling of Conurrent Systems 58 Behviourl equivlenes (isimilrity) If we represent the equivlene reltions i vi equivlene lsses, then we otin the following sequene 0,, 2= = Lemm It holds tht: n is n equivlene reltion for ll n N0. 2 n implies m for ll m n. 3 implies n for ll n N0. 4 n= n+ implies n= m for ll m n. Brr König Course Modelling of Conurrent Systems 59 Brr König Course Modelling of Conurrent Systems 60

12 Behviourl equivlenes (isimilrity) Behviourl equivlenes (isimilrity) Proposition Let T = (Z, ) e trnsition system whih is finitely rnhing, i.e., for every stte the set is finite. { At: } Then we hve if nd only if n for ll n N0. In other words: = n N0 n. Corollry For every finite trnsition system we hve: The method for determining isimilr pirs of sttes lwys termintes nd 2 returns the orret isimilrity. This proposition does not hold for trnsition systems whih re not finitely rnhing. Brr König Course Modelling of Conurrent Systems 6 Behviourl equivlenes (isimilrity) Brr König Course Modelling of Conurrent Systems 62 Internl tions Remrks onerning the method for determining isimilr pirs of sttes: For n effiient implementtion the reltions 0,, 2,..., should not e stored expliitly. Espeilly this holds for the reltion 0 whih ontins ll pirs of sttes nd hs hene sie Z 2. An effiient implementtion represents the equivlene reltion i vi its equivlene lsses. At the eginning there is only one equivlene lss whih is then refined ordingly (see lso the previous exmple). In the following we regrd τ-tions s speil internl tions whih re invisile from the outside. This mens speifilly: An tion sequene τ τ... 2 looks from outside s if no tion hs een performed. In n tion sequene τ τ n externl oserver only sees tion. Brr König Course Modelling of Conurrent Systems 63 Brr König Course Modelling of Conurrent Systems 64

13 Internl tions Internl tions Hene we define new wek trnsition reltion: Definition For set At of tions we define the following reltions: ε 2 if nd only if ( ) τ 2, i.e., τ τ For n At we hve 2 if nd only if ε ε 2. Stndrd trnsitions will in the following lso e lled strong trnsitions in order to distinguish them from wek trnsitions. Divergene A trnsition system T = (Z, ) with τ-trnsitions is lled divergent if there exists n infinite run τ τ 2 τ.... It is lled onvergent if there is no suh run. Brr König Course Modelling of Conurrent Systems 65 Internl tions Brr König Course Modelling of Conurrent Systems 66 Internl tions Behviourl equivlenes nd τ-trnsitions Wek tre equivlene, wek filures equivlene nd wek isimilrity re defined on wek trnsitions of the form. In this wy we otin orser ehviourl equivlenes, i.e., more sttes re relted to eh other. Exmple : 3 τ τ τ τ The two sttes, re wekly tre equivlent. Brr König Course Modelling of Conurrent Systems 67 Brr König Course Modelling of Conurrent Systems 68

14 Internl tions Internl tions Exmple 2: 3 τ τ τ 6 τ 8 The two sttes, re wekly tre equivlent s well. We will now onsider wek isimilrity in more detil: Wek isimultion (definition) Let T = (Z, ) e trnsition system. A reltion R Z Z on sttes is lled wek isimultion if for every pir (, 2) R nd for every At\{τ} {ε} we hve: For every with there exists 2 with 2 2 nd (, 2 ) R. For every 2 with 2 2 there exists with nd (, 2 ) R. Brr König Course Modelling of Conurrent Systems 69 Internl tions Brr König Course Modelling of Conurrent Systems 70 Internl tions Wek isimilrity (definition) Two sttes, 2 re lled wekly isimilr if there exists wek isimultion R with (, 2) R. In this se we write 2. The reltion is known s wek isimilrity or oservtionl equivlene. Remrk: the definition of isimilrity given ove is not very stisftory for prtil purposes, sine there re usully mny more strong thn wek trnsitions. Hene the following lterntive hrterition is preferle: Alterntive hrkterition of wek isimultion (proposition) A reltion R Z Z is wek isimultion if nd only if for every pir (, 2) R nd for every At: For eh with there exists 2 with 2 â 2 nd (, 2 ) R. For eh 2 with 2 2 there exists with â nd (, 2 ) R. We define â =, whenever At\{τ}, nd ˆτ = ε. Brr König Course Modelling of Conurrent Systems 7 Brr König Course Modelling of Conurrent Systems 72

15 Internl tions Exmple : τ τ τ The two sttes, re wekly isimilr with isimultion R = {(, 3), (, 4), (, 5), (2, 6), (, 7), (, 8)}. Brr König Course Modelling of Conurrent Systems 73 Internl tions τ Internl tions Exmple 2: τ τ τ τ The two sttes, re not wekly isimilr. Plyer I mkes move = 3 7 tht n e nswered y Plyer II only with = 2. Then Plyer I mkes move 2 nd stte 7 does not llow ny further (wek) -move. Brr König Course Modelling of Conurrent Systems 74 Behviourl equivlenes (omprison) Remrks: The lterntive hrterition of wek isimilrity is more onvenient for showing tht two sttes re wekly isimilr. (Sine Plyer I hs fewer possiilities.) Insted the usul hrterition is more onvenient for showing tht two sttes re not wekly isimilr. (Sine Plyer I hs more possiilities.) The other, less onvenient, hrterition works s well. However it might e neessry to invest more effort. We now show how the vrious ehviourl equivlenes re relted. We first restrit ourselves to strong trnsitions. However, the results hold nlogously lso for the wek equivlenes. Filures equivlene implies S-tre equivlene (proposition) Let, e two filure equivlent sttes, i.e., F() = F( ). Then, re lso S-tre equivlent, i.e., S() = S( ). Remrk: two filure equivlent sttes re not neessrily S ω -tre equivlent. Brr König Course Modelling of Conurrent Systems 75 Brr König Course Modelling of Conurrent Systems 76

16 Behviourl equivlenes (omprison) Behviourl equivlenes (omprison) Bisimilrity implies filures equivlene nd S ω -tre equivlene (proposition) Let, e two isimilr sttes, i.e., we hve. Then nd re lso filure equivlent nd S ω -tre equivlent. Finlly we ompre strong nd wek isimilrity: Strong isimilrity implies wek isimilrity Let, two (strongly) isimilr sttes, i.e., we hve. Then, re lso wekly isimilr, i.e.,. Reson: Every strong isimultion ist lso wek isimultion (where eh strong trnsition is simulted gin y strong trnsition). Brr König Course Modelling of Conurrent Systems 77 Behviourl equivlenes (omprison) Brr König Course Modelling of Conurrent Systems 78 Preorders Hene we hve the following sitution (eh rrow stnds for n implition): S-equ. S ω -equ. S -equ. fil. equ. isimilr wekly S-equ. wekly S ω -equ. wekly S -equ. wekly fil. equ. wekly isimilr Aprt from the ehviourl equivlenes onsidered so fr there re lso preorders, whih order sttes, depending on whether they exhiit more or less ehviour. The reltions tht we onsider here re not rel orders, ut only preorders (lso lled qusi-orders) sine they re reflexive nd trnsitive, ut usully not nti-symmetri. Brr König Course Modelling of Conurrent Systems 79 Brr König Course Modelling of Conurrent Systems 80

17 Preorders Preorders Preorders (definition) Let T = (Z, ) e trnsition system nd let, Z e two sttes. The sttes, re ordered with respet to (S-)lnguge inlusion, whenever S() S( ). (Anlogously: S ω -/S -lnguge inlusion) The orresponding preorder is lled tre preorder. The sttes, re ordered with respet to inlusion of the sets of filure pirs, whenever F() F( ). The orresponding preorder is lled filures preorder. The notion of simultion is otined from the definition of isimultion y using only the first of the two onditions. Simultion (definition) Let T = (Z, ) e trnsition system. A reltion R Z Z on sttes is lled simultion whenever for every pir (, 2) R nd for every tion At: For every with there exists 2 with 2 2 nd (, 2 ) R. We sy tht stte 2 simultes stte (in symols: 2) whenever there exists simultion R with (, 2) R. Remrk: 2 implies S() S(2) nd S ω () S ω (2) Brr König Course Modelling of Conurrent Systems 8 Preorders Remrks onerning simultion: Let 2, i.e., 2 simultes. Then it does not neessrily hold tht either F() F(2) or F() F(2). 2 Sine R = {(, 3), (2, 4)} is simultion, we hve 3. However F() F(3) does not hold (sine (, {}) F(3)), nd neither does F(3) F() (sine (, ) F()) Brr König Course Modelling of Conurrent Systems 83 Brr König Course Modelling of Conurrent Systems 82 Preorders 2 nd 2 do not neessrily imply 2. Tht is, mutul similrity does not imply isimilrity. 2 We hve 3 sine {(, 3), (2, 3)} is simultion, nd 3 sine {(3, )} is simultion ist. However: 3. Intuitive explntion: the two sttes n only e reognied s isimilr if Plyer I swithes to the other token. However, this is not possile for mutul simultion. 3 Brr König Course Modelling of Conurrent Systems 84

18 Preorders 2 lwys implies 2 nd 2. This is used y the ft tht every isimultion is lso simultion. Brr König Course Modelling of Conurrent Systems 85

Bisimulation, Games & Hennessy Milner logic

Bisimulation, Games & Hennessy Milner logic Bisimultion, Gmes & Hennessy Milner logi Leture 1 of Modelli Mtemtii dei Proessi Conorrenti Pweł Soboiński Univeristy of Southmpton, UK Bisimultion, Gmes & Hennessy Milner logi p.1/32 Clssil lnguge theory

More information

CS 573 Automata Theory and Formal Languages

CS 573 Automata Theory and Formal Languages Non-determinism Automt Theory nd Forml Lnguges Professor Leslie Lnder Leture # 3 Septemer 6, 2 To hieve our gol, we need the onept of Non-deterministi Finite Automton with -moves (NFA) An NFA is tuple

More information

NON-DETERMINISTIC FSA

NON-DETERMINISTIC FSA Tw o types of non-determinism: NON-DETERMINISTIC FS () Multiple strt-sttes; strt-sttes S Q. The lnguge L(M) ={x:x tkes M from some strt-stte to some finl-stte nd ll of x is proessed}. The string x = is

More information

The University of Nottingham SCHOOL OF COMPUTER SCIENCE A LEVEL 2 MODULE, SPRING SEMESTER MACHINES AND THEIR LANGUAGES ANSWERS

The University of Nottingham SCHOOL OF COMPUTER SCIENCE A LEVEL 2 MODULE, SPRING SEMESTER MACHINES AND THEIR LANGUAGES ANSWERS The University of ottinghm SCHOOL OF COMPUTR SCIC A LVL 2 MODUL, SPRIG SMSTR 2015 2016 MACHIS AD THIR LAGUAGS ASWRS Time llowed TWO hours Cndidtes my omplete the front over of their nswer ook nd sign their

More information

System Validation (IN4387) November 2, 2012, 14:00-17:00

System Validation (IN4387) November 2, 2012, 14:00-17:00 System Vlidtion (IN4387) Novemer 2, 2012, 14:00-17:00 Importnt Notes. The exmintion omprises 5 question in 4 pges. Give omplete explntion nd do not onfine yourself to giving the finl nswer. Good luk! Exerise

More information

CS311 Computational Structures Regular Languages and Regular Grammars. Lecture 6

CS311 Computational Structures Regular Languages and Regular Grammars. Lecture 6 CS311 Computtionl Strutures Regulr Lnguges nd Regulr Grmmrs Leture 6 1 Wht we know so fr: RLs re losed under produt, union nd * Every RL n e written s RE, nd every RE represents RL Every RL n e reognized

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

Arrow s Impossibility Theorem

Arrow s Impossibility Theorem Rep Voting Prdoxes Properties Arrow s Theorem Arrow s Impossiility Theorem Leture 12 Arrow s Impossiility Theorem Leture 12, Slide 1 Rep Voting Prdoxes Properties Arrow s Theorem Leture Overview 1 Rep

More information

Arrow s Impossibility Theorem

Arrow s Impossibility Theorem Rep Fun Gme Properties Arrow s Theorem Arrow s Impossiility Theorem Leture 12 Arrow s Impossiility Theorem Leture 12, Slide 1 Rep Fun Gme Properties Arrow s Theorem Leture Overview 1 Rep 2 Fun Gme 3 Properties

More information

Coalgebra, Lecture 15: Equations for Deterministic Automata

Coalgebra, Lecture 15: Equations for Deterministic Automata Colger, Lecture 15: Equtions for Deterministic Automt Julin Slmnc (nd Jurrin Rot) Decemer 19, 2016 In this lecture, we will study the concept of equtions for deterministic utomt. The notes re self contined

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

Discrete Structures, Test 2 Monday, March 28, 2016 SOLUTIONS, VERSION α

Discrete Structures, Test 2 Monday, March 28, 2016 SOLUTIONS, VERSION α Disrete Strutures, Test 2 Mondy, Mrh 28, 2016 SOLUTIONS, VERSION α α 1. (18 pts) Short nswer. Put your nswer in the ox. No prtil redit. () Consider the reltion R on {,,, d with mtrix digrph of R.. Drw

More information

Finite State Automata and Determinisation

Finite State Automata and Determinisation Finite Stte Automt nd Deterministion Tim Dworn Jnury, 2016 Lnguges fs nf re df Deterministion 2 Outline 1 Lnguges 2 Finite Stte Automt (fs) 3 Non-deterministi Finite Stte Automt (nf) 4 Regulr Expressions

More information

Nondeterministic Automata vs Deterministic Automata

Nondeterministic Automata vs Deterministic Automata Nondeterministi Automt vs Deterministi Automt We lerned tht NFA is onvenient model for showing the reltionships mong regulr grmmrs, FA, nd regulr expressions, nd designing them. However, we know tht n

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

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

Technische Universität München Winter term 2009/10 I7 Prof. J. Esparza / J. Křetínský / M. Luttenberger 11. Februar Solution

Technische Universität München Winter term 2009/10 I7 Prof. J. Esparza / J. Křetínský / M. Luttenberger 11. Februar Solution Tehnishe Universität Münhen Winter term 29/ I7 Prof. J. Esprz / J. Křetínský / M. Luttenerger. Ferur 2 Solution Automt nd Forml Lnguges Homework 2 Due 5..29. Exerise 2. Let A e the following finite utomton:

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

= state, a = reading and q j

= state, a = reading and q j 4 Finite Automt CHAPTER 2 Finite Automt (FA) (i) Derterministi Finite Automt (DFA) A DFA, M Q, q,, F, Where, Q = set of sttes (finite) q Q = the strt/initil stte = input lphet (finite) (use only those

More information

1 PYTHAGORAS THEOREM 1. Given a right angled triangle, the square of the hypotenuse is equal to the sum of the squares of the other two sides.

1 PYTHAGORAS THEOREM 1. Given a right angled triangle, the square of the hypotenuse is equal to the sum of the squares of the other two sides. 1 PYTHAGORAS THEOREM 1 1 Pythgors Theorem In this setion we will present geometri proof of the fmous theorem of Pythgors. Given right ngled tringle, the squre of the hypotenuse is equl to the sum of the

More information

Exercises with (Some) Solutions

Exercises with (Some) Solutions Exercises with (Some) Solutions Techer: Luc Tesei Mster of Science in Computer Science - University of Cmerino Contents 1 Strong Bisimultion nd HML 2 2 Wek Bisimultion 31 3 Complete Lttices nd Fix Points

More information

Bases for Vector Spaces

Bases for Vector Spaces Bses for Vector Spces 2-26-25 A set is independent if, roughly speking, there is no redundncy in the set: You cn t uild ny vector in the set s liner comintion of the others A set spns if you cn uild everything

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. 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

6.5 Improper integrals

6.5 Improper integrals Eerpt from "Clulus" 3 AoPS In. www.rtofprolemsolving.om 6.5. IMPROPER INTEGRALS 6.5 Improper integrls As we ve seen, we use the definite integrl R f to ompute the re of the region under the grph of y =

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

Part 4. Integration (with Proofs)

Part 4. Integration (with Proofs) Prt 4. Integrtion (with Proofs) 4.1 Definition Definition A prtition P of [, b] is finite set of points {x 0, x 1,..., x n } with = x 0 < x 1

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

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

Strong Bisimulation. Overview. References. Actions Labeled transition system Transition semantics Simulation Bisimulation

Strong Bisimulation. Overview. References. Actions Labeled transition system Transition semantics Simulation Bisimulation Strong Bisimultion Overview Actions Lbeled trnsition system Trnsition semntics Simultion Bisimultion References Robin Milner, Communiction nd Concurrency Robin Milner, Communicting nd Mobil Systems 32

More information

For a, b, c, d positive if a b and. ac bd. Reciprocal relations for a and b positive. If a > b then a ab > b. then

For a, b, c, d positive if a b and. ac bd. Reciprocal relations for a and b positive. If a > b then a ab > b. then Slrs-7.2-ADV-.7 Improper Definite Integrls 27.. D.dox Pge of Improper Definite Integrls Before we strt the min topi we present relevnt lger nd it review. See Appendix J for more lger review. Inequlities:

More information

Nondeterministic Finite Automata

Nondeterministic Finite Automata Nondeterministi Finite utomt The Power of Guessing Tuesdy, Otoer 4, 2 Reding: Sipser.2 (first prt); Stoughton 3.3 3.5 S235 Lnguges nd utomt eprtment of omputer Siene Wellesley ollege Finite utomton (F)

More information

Behavior Composition in the Presence of Failure

Behavior Composition in the Presence of Failure Behvior Composition in the Presene of Filure Sestin Srdin RMIT University, Melourne, Austrli Fio Ptrizi & Giuseppe De Giomo Spienz Univ. Rom, Itly KR 08, Sept. 2008, Sydney Austrli Introdution There re

More information

AP Calculus BC Chapter 8: Integration Techniques, L Hopital s Rule and Improper Integrals

AP Calculus BC Chapter 8: Integration Techniques, L Hopital s Rule and Improper Integrals AP Clulus BC Chpter 8: Integrtion Tehniques, L Hopitl s Rule nd Improper Integrls 8. Bsi Integrtion Rules In this setion we will review vrious integrtion strtegies. Strtegies: I. Seprte the integrnd into

More information

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

Assignment 1 Automata, Languages, and Computability. 1 Finite State Automata and Regular Languages Deprtment of Computer Science, Austrlin Ntionl University COMP2600 Forml Methods for Softwre Engineering Semester 2, 206 Assignment Automt, Lnguges, nd Computility Smple Solutions Finite Stte Automt nd

More information

Abstraction of Nondeterministic Automata Rong Su

Abstraction of Nondeterministic Automata Rong Su Astrtion of Nondeterministi Automt Rong Su My 6, 2010 TU/e Mehnil Engineering, Systems Engineering Group 1 Outline Motivtion Automton Astrtion Relevnt Properties Conlusions My 6, 2010 TU/e Mehnil Engineering,

More information

Lecture 6: Coding theory

Lecture 6: Coding theory Leture 6: Coing theory Biology 429 Crl Bergstrom Ferury 4, 2008 Soures: This leture loosely follows Cover n Thoms Chpter 5 n Yeung Chpter 3. As usul, some of the text n equtions re tken iretly from those

More information

p-adic Egyptian Fractions

p-adic Egyptian Fractions p-adic Egyptin Frctions Contents 1 Introduction 1 2 Trditionl Egyptin Frctions nd Greedy Algorithm 2 3 Set-up 3 4 p-greedy Algorithm 5 5 p-egyptin Trditionl 10 6 Conclusion 1 Introduction An Egyptin frction

More information

Introduction to Olympiad Inequalities

Introduction to Olympiad Inequalities Introdution to Olympid Inequlities Edutionl Studies Progrm HSSP Msshusetts Institute of Tehnology Snj Simonovikj Spring 207 Contents Wrm up nd Am-Gm inequlity 2. Elementry inequlities......................

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

Discrete Structures Lecture 11

Discrete Structures Lecture 11 Introdution Good morning. In this setion we study funtions. A funtion is mpping from one set to nother set or, perhps, from one set to itself. We study the properties of funtions. A mpping my not e funtion.

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

378 Relations Solutions for Chapter 16. Section 16.1 Exercises. 3. Let A = {0,1,2,3,4,5}. Write out the relation R that expresses on A.

378 Relations Solutions for Chapter 16. Section 16.1 Exercises. 3. Let A = {0,1,2,3,4,5}. Write out the relation R that expresses on A. 378 Reltions 16.7 Solutions for Chpter 16 Section 16.1 Exercises 1. Let A = {0,1,2,3,4,5}. Write out the reltion R tht expresses > on A. Then illustrte it with digrm. 2 1 R = { (5,4),(5,3),(5,2),(5,1),(5,0),(4,3),(4,2),(4,1),

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

CM10196 Topic 4: Functions and Relations

CM10196 Topic 4: Functions and Relations CM096 Topic 4: Functions nd Reltions Guy McCusker W. Functions nd reltions Perhps the most widely used notion in ll of mthemtics is tht of function. Informlly, function is n opertion which tkes n input

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

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

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

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

Solutions for HW9. Bipartite: put the red vertices in V 1 and the black in V 2. Not bipartite!

Solutions for HW9. Bipartite: put the red vertices in V 1 and the black in V 2. Not bipartite! Solutions for HW9 Exerise 28. () Drw C 6, W 6 K 6, n K 5,3. C 6 : W 6 : K 6 : K 5,3 : () Whih of the following re iprtite? Justify your nswer. Biprtite: put the re verties in V 1 n the lk in V 2. Biprtite:

More information

Chapter 4 State-Space Planning

Chapter 4 State-Space Planning Leture slides for Automted Plnning: Theory nd Prtie Chpter 4 Stte-Spe Plnning Dn S. Nu CMSC 722, AI Plnning University of Mrylnd, Spring 2008 1 Motivtion Nerly ll plnning proedures re serh proedures Different

More information

CIT 596 Theory of Computation 1. Graphs and Digraphs

CIT 596 Theory of Computation 1. Graphs and Digraphs CIT 596 Theory of Computtion 1 A grph G = (V (G), E(G)) onsists of two finite sets: V (G), the vertex set of the grph, often enote y just V, whih is nonempty set of elements lle verties, n E(G), the ege

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

STRUCTURE OF CONCURRENCY Ryszard Janicki. Department of Computing and Software McMaster University Hamilton, ON, L8S 4K1 Canada

STRUCTURE OF CONCURRENCY Ryszard Janicki. Department of Computing and Software McMaster University Hamilton, ON, L8S 4K1 Canada STRUCTURE OF CONCURRENCY Ryszrd Jnicki Deprtment of Computing nd Softwre McMster University Hmilton, ON, L8S 4K1 Cnd jnicki@mcmster.c 1 Introduction Wht is concurrency? How it cn e modelled? Wht re the

More information

Matrices SCHOOL OF ENGINEERING & BUILT ENVIRONMENT. Mathematics (c) 1. Definition of a Matrix

Matrices SCHOOL OF ENGINEERING & BUILT ENVIRONMENT. Mathematics (c) 1. Definition of a Matrix tries Definition of tri mtri is regulr rry of numers enlosed inside rkets SCHOOL OF ENGINEERING & UIL ENVIRONEN Emple he following re ll mtries: ), ) 9, themtis ), d) tries Definition of tri Size of tri

More information

Line Integrals and Entire Functions

Line Integrals and Entire Functions Line Integrls nd Entire Funtions Defining n Integrl for omplex Vlued Funtions In the following setions, our min gol is to show tht every entire funtion n be represented s n everywhere onvergent power series

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

Logic, Set Theory and Computability [M. Coppenbarger]

Logic, Set Theory and Computability [M. Coppenbarger] 14 Orer (Hnout) Definition 7-11: A reltion is qusi-orering (or preorer) if it is reflexive n trnsitive. A quisi-orering tht is symmetri is n equivlene reltion. A qusi-orering tht is nti-symmetri is n orer

More information

Project 6: Minigoals Towards Simplifying and Rewriting Expressions

Project 6: Minigoals Towards Simplifying and Rewriting Expressions MAT 51 Wldis Projet 6: Minigols Towrds Simplifying nd Rewriting Expressions The distriutive property nd like terms You hve proly lerned in previous lsses out dding like terms ut one prolem with the wy

More information

1.3 SCALARS AND VECTORS

1.3 SCALARS AND VECTORS Bridge Course Phy I PUC 24 1.3 SCLRS ND VECTORS Introdution: Physis is the study of nturl phenomen. The study of ny nturl phenomenon involves mesurements. For exmple, the distne etween the plnet erth nd

More information

CS 2204 DIGITAL LOGIC & STATE MACHINE DESIGN SPRING 2014

CS 2204 DIGITAL LOGIC & STATE MACHINE DESIGN SPRING 2014 S 224 DIGITAL LOGI & STATE MAHINE DESIGN SPRING 214 DUE : Mrh 27, 214 HOMEWORK III READ : Relte portions of hpters VII n VIII ASSIGNMENT : There re three questions. Solve ll homework n exm prolems s shown

More information

where the box contains a finite number of gates from the given collection. Examples of gates that are commonly used are the following: a b

where the box contains a finite number of gates from the given collection. Examples of gates that are commonly used are the following: a b CS 294-2 9/11/04 Quntum Ciruit Model, Solovy-Kitev Theorem, BQP Fll 2004 Leture 4 1 Quntum Ciruit Model 1.1 Clssil Ciruits - Universl Gte Sets A lssil iruit implements multi-output oolen funtion f : {0,1}

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

INTEGRATION. 1 Integrals of Complex Valued functions of a REAL variable

INTEGRATION. 1 Integrals of Complex Valued functions of a REAL variable INTEGRATION NOTE: These notes re supposed to supplement Chpter 4 of the online textbook. 1 Integrls of Complex Vlued funtions of REAL vrible If I is n intervl in R (for exmple I = [, b] or I = (, b)) nd

More information

Tutorial Automata and formal Languages

Tutorial Automata and formal Languages Tutoril Automt nd forml Lnguges Notes for to the tutoril in the summer term 2017 Sestin Küpper, Christine Mik 8. August 2017 1 Introduction: Nottions nd sic Definitions At the eginning of the tutoril we

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

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

The University of Nottingham SCHOOL OF COMPUTER SCIENCE A LEVEL 2 MODULE, SPRING SEMESTER LANGUAGES AND COMPUTATION ANSWERS

The University of Nottingham SCHOOL OF COMPUTER SCIENCE A LEVEL 2 MODULE, SPRING SEMESTER LANGUAGES AND COMPUTATION ANSWERS The University of Nottinghm SCHOOL OF COMPUTER SCIENCE LEVEL 2 MODULE, SPRING SEMESTER 2016 2017 LNGUGES ND COMPUTTION NSWERS Time llowed TWO hours Cndidtes my complete the front cover of their nswer ook

More information

2.4 Theoretical Foundations

2.4 Theoretical Foundations 2 Progrmming Lnguge Syntx 2.4 Theoretil Fountions As note in the min text, snners n prsers re se on the finite utomt n pushown utomt tht form the ottom two levels of the Chomsky lnguge hierrhy. At eh level

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

The Word Problem in Quandles

The Word Problem in Quandles The Word Prolem in Qundles Benjmin Fish Advisor: Ren Levitt April 5, 2013 1 1 Introdution A word over n lger A is finite sequene of elements of A, prentheses, nd opertions of A defined reursively: Given

More information

Ch. 2.3 Counting Sample Points. Cardinality of a Set

Ch. 2.3 Counting Sample Points. Cardinality of a Set Ch..3 Counting Smple Points CH 8 Crdinlity of Set Let S e set. If there re extly n distint elements in S, where n is nonnegtive integer, we sy S is finite set nd n is the rdinlity of S. The rdinlity of

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 491G Combinatorial Optimization Lecture Notes

CS 491G Combinatorial Optimization Lecture Notes CS 491G Comintoril Optimiztion Leture Notes Dvi Owen July 30, August 1 1 Mthings Figure 1: two possile mthings in simple grph. Definition 1 Given grph G = V, E, mthing is olletion of eges M suh tht e i,

More information

A Lower Bound for the Length of a Partial Transversal in a Latin Square, Revised Version

A Lower Bound for the Length of a Partial Transversal in a Latin Square, Revised Version A Lower Bound for the Length of Prtil Trnsversl in Ltin Squre, Revised Version Pooy Htmi nd Peter W. Shor Deprtment of Mthemtil Sienes, Shrif University of Tehnology, P.O.Bo 11365-9415, Tehrn, Irn Deprtment

More information

Test Generation from Timed Input Output Automata

Test Generation from Timed Input Output Automata Chpter 8 Test Genertion from Timed Input Output Automt The purpose of this hpter is to introdue tehniques for the genertion of test dt from models of softwre sed on vrints of timed utomt. The tests generted

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

Running an NFA & the subset algorithm (NFA->DFA) CS 350 Fall 2018 gilray.org/classes/fall2018/cs350/

Running an NFA & the subset algorithm (NFA->DFA) CS 350 Fall 2018 gilray.org/classes/fall2018/cs350/ Running n NFA & the suset lgorithm (NFA->DFA) CS 350 Fll 2018 gilry.org/lsses/fll2018/s350/ 1 NFAs operte y simultneously exploring ll pths nd epting if ny pth termintes t n ept stte.!2 Try n exmple: L

More information

Farey Fractions. Rickard Fernström. U.U.D.M. Project Report 2017:24. Department of Mathematics Uppsala University

Farey Fractions. Rickard Fernström. U.U.D.M. Project Report 2017:24. Department of Mathematics Uppsala University U.U.D.M. Project Report 07:4 Frey Frctions Rickrd Fernström Exmensrete i mtemtik, 5 hp Hledre: Andres Strömergsson Exmintor: Jörgen Östensson Juni 07 Deprtment of Mthemtics Uppsl University Frey Frctions

More information

Section 1.3 Triangles

Section 1.3 Triangles Se 1.3 Tringles 21 Setion 1.3 Tringles LELING TRINGLE The line segments tht form tringle re lled the sides of the tringle. Eh pir of sides forms n ngle, lled n interior ngle, nd eh tringle hs three interior

More information

2.4 Linear Inequalities and Interval Notation

2.4 Linear Inequalities and Interval Notation .4 Liner Inequlities nd Intervl Nottion We wnt to solve equtions tht hve n inequlity symol insted of n equl sign. There re four inequlity symols tht we will look t: Less thn , Less thn or

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

Global alignment. Genome Rearrangements Finding preserved genes. Lecture 18

Global alignment. Genome Rearrangements Finding preserved genes. Lecture 18 Computt onl Biology Leture 18 Genome Rerrngements Finding preserved genes We hve seen before how to rerrnge genome to obtin nother one bsed on: Reversls Knowledge of preserved bloks (or genes) Now we re

More information

(a) A partition P of [a, b] is a finite subset of [a, b] containing a and b. If Q is another partition and P Q, then Q is a refinement of P.

(a) A partition P of [a, b] is a finite subset of [a, b] containing a and b. If Q is another partition and P Q, then Q is a refinement of P. Chpter 7: The Riemnn Integrl When the derivtive is introdued, it is not hrd to see tht the it of the differene quotient should be equl to the slope of the tngent line, or when the horizontl xis is time

More information

Chapter 3. Vector Spaces. 3.1 Images and Image Arithmetic

Chapter 3. Vector Spaces. 3.1 Images and Image Arithmetic Chpter 3 Vetor Spes In Chpter 2, we sw tht the set of imges possessed numer of onvenient properties. It turns out tht ny set tht possesses similr onvenient properties n e nlyzed in similr wy. In liner

More information

Counting Paths Between Vertices. Isomorphism of Graphs. Isomorphism of Graphs. Isomorphism of Graphs. Isomorphism of Graphs. Isomorphism of Graphs

Counting Paths Between Vertices. Isomorphism of Graphs. Isomorphism of Graphs. Isomorphism of Graphs. Isomorphism of Graphs. Isomorphism of Graphs Isomorphism of Grphs Definition The simple grphs G 1 = (V 1, E 1 ) n G = (V, E ) re isomorphi if there is ijetion (n oneto-one n onto funtion) f from V 1 to V with the property tht n re jent in G 1 if

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

Parse trees, ambiguity, and Chomsky normal form

Parse trees, ambiguity, and Chomsky normal form Prse trees, miguity, nd Chomsky norml form In this lecture we will discuss few importnt notions connected with contextfree grmmrs, including prse trees, miguity, nd specil form for context-free grmmrs

More information

Part I: Study the theorem statement.

Part I: Study the theorem statement. Nme 1 Nme 2 Nme 3 A STUDY OF PYTHAGORAS THEOREM Instrutions: Together in groups of 2 or 3, fill out the following worksheet. You my lift nswers from the reding, or nswer on your own. Turn in one pket for

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

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

Vectors , (0,0). 5. A vector is commonly denoted by putting an arrow above its symbol, as in the picture above. Here are some 3-dimensional vectors:

Vectors , (0,0). 5. A vector is commonly denoted by putting an arrow above its symbol, as in the picture above. Here are some 3-dimensional vectors: Vectors 1-23-2018 I ll look t vectors from n lgeric point of view nd geometric point of view. Algericlly, vector is n ordered list of (usully) rel numers. Here re some 2-dimensionl vectors: (2, 3), ( )

More information

April 8, 2017 Math 9. Geometry. Solving vector problems. Problem. Prove that if vectors and satisfy, then.

April 8, 2017 Math 9. Geometry. Solving vector problems. Problem. Prove that if vectors and satisfy, then. pril 8, 2017 Mth 9 Geometry Solving vetor prolems Prolem Prove tht if vetors nd stisfy, then Solution 1 onsider the vetor ddition prllelogrm shown in the Figure Sine its digonls hve equl length,, the prllelogrm

More information

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

Grammar. 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 information

Matrix Algebra. Matrix Addition, Scalar Multiplication and Transposition. Linear Algebra I 24

Matrix Algebra. Matrix Addition, Scalar Multiplication and Transposition. Linear Algebra I 24 Mtrix lger Mtrix ddition, Sclr Multipliction nd rnsposition Mtrix lger Section.. Mtrix ddition, Sclr Multipliction nd rnsposition rectngulr rry of numers is clled mtrix ( the plurl is mtrices ) nd the

More information

Linear Algebra Introduction

Linear Algebra Introduction Introdution Wht is Liner Alger out? Liner Alger is rnh of mthemtis whih emerged yers k nd ws one of the pioneer rnhes of mthemtis Though, initilly it strted with solving of the simple liner eqution x +

More information

Prefix-Free Regular-Expression Matching

Prefix-Free Regular-Expression Matching Prefix-Free Regulr-Expression Mthing Yo-Su Hn, Yjun Wng nd Derik Wood Deprtment of Computer Siene HKUST Prefix-Free Regulr-Expression Mthing p.1/15 Pttern Mthing Given pttern P nd text T, find ll sustrings

More information

Intermediate Math Circles Wednesday 17 October 2012 Geometry II: Side Lengths

Intermediate Math Circles Wednesday 17 October 2012 Geometry II: Side Lengths Intermedite Mth Cirles Wednesdy 17 Otoer 01 Geometry II: Side Lengths Lst week we disussed vrious ngle properties. As we progressed through the evening, we proved mny results. This week, we will look t

More information

Petri Nets. Rebecca Albrecht. Seminar: Automata Theory Chair of Software Engeneering

Petri Nets. Rebecca Albrecht. Seminar: Automata Theory Chair of Software Engeneering Petri Nets Ree Alreht Seminr: Automt Theory Chir of Softwre Engeneering Overview 1. Motivtion: Why not just using finite utomt for everything? Wht re Petri Nets nd when do we use them? 2. Introdution:

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