Supervisory Control of Petri Nets with Language Specifications

Size: px
Start display at page:

Download "Supervisory Control of Petri Nets with Language Specifications"

Transcription

1 Supervisory Control of Petri Nets with Lnguge Specifictions Alessndro Giu Dip. di Ing. Elettric ed Elettronic, Università di Cgliri, Itly Emil: Astrct In this chpter we discuss how Petri nets cn e used in the frmework of supervisory control theory. A discrete event system is defined in such theory s lnguge genertor: this motivtes the need to strt the chpter with short ut self-contined introduction to Petri net lnguges. We consider the monolithic supervisory design tht requires to construct the concurrent composition of the plnt with the specifiction, to check this structure for controllility nd nonlockingness, nd eventully to refine it. We show how Petri nets cn e used within this pproch nd show tht while the procedure cn lwys e pplied to ounded nets, in the cse of unounded Petri nets it my not e possile to otin Petri net supervisor. NOTE: A correction to the notion of uncontrollle mrking given in this pper s Definition 7, nd modified proof of Theorem 3 tht tkes into ccount the corrected notion, cn e found in: B. Lcerd, P.U. Lim, On the Notion of Uncontrollle Mrking in Supervisory Control of Petri Nets, IEEE Trns. on Automtic Control, Vol. 59, No. 11, pp , Nov Pulished s: A. Giu, Supervisory control of Petri nets with lnguge specifictions, in Control of Discrete- Event Systems: Automt nd Petri Net Perspectives, C. Setzu, M. Silv, J.H. vn Schuppen (Eds), Lecture Notes in Control nd Informtion Science, Vol. 433, pp , Springer,

2 1 Introduction In this chpter, we study Petri nets (PNs) s lnguge genertors nd we show how PNs cn e used for supervisory control of discrete event systems under lnguge specifictions. Supervisory control, originted y the work of Rmdge nd Wonhm [13], is system theory pproch tht hs een gining incresing importnce ecuse it provides unifying frmework for the control of Discrete Event Systems (DESs). A generl overview of Supervisory Control hs een presented in Chpter??. In the originl work of Rmdge nd Wonhm finite stte mchines (FSMs) were used to model plnts nd specifictions. FSMs provide generl frmework for estlishing fundmentl properties of DES control prolems. They re not convenient models to descrie complex systems, however, ecuse of the lrge numer of sttes tht hve to e introduced to represent severl intercting susystems, nd ecuse of the lck of structure. More efficient models hve een proposed in the DES literture. Here the ttention will e drwn to Petri net models. PNs hve severl dvntges over FSMs. Firstly, PNs hve higher lnguge complexity thn FSM, since Petri net lnguges re proper superset of regulr lnguges. Secondly, the sttes of PN re represented y the possile mrkings nd not y the plces: thus they give compct description, i.e., the structure of the net my e mintined smll in size even if the numer of the mrkings grows 1. Thirdly, PNs cn e used in modulr synthesis, i.e., the net cn e considered s composed of interrelted sunets, in the sme wy s complex system cn e regrded s composed of intercting susystems. Although PNs hve greter modeling power thn FSMs, computility theory shows tht the increse of modeling power often leds to n increse in the computtion required to solve prolems. This is why section of this pper focuses on the decidility properties of Petri nets y studying the corresponding lnguges: note tht some of these results re originl nd will e presented with forml proofs. It will e shown tht Petri nets represent good trde-off etween modeling power nd nlysis cpilities The chpter is structured s follows. In Section 1 Petri net genertors nd lnguges re defined. In Section 2 the concurrent composition opertor on lnguges is defined nd extended to n opertor on genertors. In Section 3 it is shown how the clssicl monolithic supervisory design cn e crried out using Petri net models. Finlly, in Section 4 some issues rising from the use of unounded PNs in supervisory control re discussed. 2 Petri Nets nd Forml Lnguges This section provides short ut selfstnding introduction to Petri net lnguges. PN lnguges represents n interesting topic within the roder domin of forml lnguge theory ut there re few ooks devoted to this topic nd the relevnt mteril is scttered in severl journl pulictions. In this section nd in the following we focus on the definition of Petri net genertors nd opertors tht will lter e used to solve supervisory control prolem. 2.1 Petri Net Genertors Definition 1. A leled Petri net system (or Petri net genertor) [7, 12] is qudruple G = (N,l,m,F) where: N = (P,T,Pre,Post) is Petri net structure with P = m nd T = n; 1 However, we should point out tht mny nlysis techniques for Petri nets re sed on the construction of the rechility grph, tht suffers from the sme stte explosion prolem typicl of utomt. To tke dvntge of the compct PN representtion, other nlysis techniques (e.g. structurl) should e used. 2

3 t 1 t 2 t 1 t 2 p 1 p 2 p 3 p 2 p 3 () () t 1 t 2 t 1 t 2 p 2 p 3 p 2 λ p 3 (c) (d) Figure 1: PN genertors of Exmple 1 l : T E {λ} is leling function tht ssigns to ech trnsition lel from the lphet of events E or ssigns the empty word 2 λ s lel; m N n is n initil mrking; F N n is finite set of finl mrkings. Three different types of leling functions re usully considered. Free leling: ll trnsitions re leled distinctly nd none is leled λ, i.e., ( t,t T) [t t = l(t) l(t )] nd ( t T) [l(t) λ]. λ-free leling: no trnsition is leled λ. Aritrry leling: no restriction is posed on l. The leling function my e extended to function l : T E defining: l(λ) = λ nd ( t T, σ T ) l(σt) = l(σ)l(t). Exmple 1. Consider the nets in Fig. 1 where the lel of ech trnsition is shown elow the trnsition itself. Net () is free-leled genertor on lphet E = {,}. Nets () nd (c) re λ-free genertors on lphet E = {}. Net (d) is n ritrry leled genertor on lphet E = {}. Three lnguges re ssocited with genertor G depending on the different notions of terminl strings. L-type or terminl lnguge: 3 the set of strings genertedy firing sequences tht rech finl mrking, i.e., L L (G) = {l(σ) m [σ m f F}. G-type or covering lnguge or wek lnguge: the set of strings generted y firing sequences tht rech mrking m covering finl mrking, i.e., L G (G) = {l(σ) m [σ m m f F}. P-type or prefix lnguge: 4 the set of strings generted y ny firing sequence, i.e., L P (G) = {l(σ) m [σ }. 2 While in other prts of this ook the empty string is denoted ε, in this section we hve chosen to use the symol λ for consistency with the literture on PN lnguges. 3 This lnguge is clled mrked ehvior in the frmework of Supervisory Control nd is denoted L m(g). 4 This lnguge is clled closed ehvior in the frmework of Supervisory Control nd is denoted L(G). 3

4 p 2 t 1 t 2 t 3 p 1 c p 3 Figure 2: Free-leled genertor G of Exmple 2 Exmple 2. Consider the free-leled genertor G in Fig. 2. The initil mrking, lso shown in the figure, is m = [1 ] T. Assume the set of finl mrkings is F = {[ 1] T }. The lnguges of this genertor re: L L (G) = { m c m m }; L G (G) = { m c n m n }; L P (G) = { m m } { m c n m n }. 2.2 Deterministic genertors A deterministic PN genertor [7] is such tht the word of events generted from the initil mrking uniquely determines the mrking reched. Definition 2. A λ-free genertor G is deterministic iff for ll t,t T, with t t, nd for ll m R(N,m ): m [t m [t = l(t) l(t ). According to the previous definition, in deterministic genertor two trnsitions shring the sme lel my never e simultneously enled nd no trnsition my e leled y the empty string. Note tht free-leled genertor is lso deterministic. On the contrry, λ-free (ut not free leled) genertor my e deterministic or not depending on its structure nd lso on its initil mrking. Exmple 3. Consider genertors () nd (c) in Fig. 1: they hve the sme net structure nd the sme λ-free leling, ut different initil mrking. The first one is deterministic, ecuse trnsitions t 1 nd t 2, shring lel cn never e simultneously enled. On the contrry, the second one is not deterministic, ecuse rechle mrking [1 1 ] T enles oth trnsitions t 1 nd t 2 : s n exmple, the oserved word my e produced y two different sequences yielding two different mrkings 2 [t [t 1 2 or 2 [t [t 2 The previous definition of determinism ws introduced in [18] nd used in [7, 12]. It my e possile to extend it s follows. Definition 3. A λ-free genertor G is deterministic iff for ll t,t T, with t t, nd for ll m R(N,m ): m [t m [t = [l(t) l(t )] [Post(,t) Pre(,t) = Post(,t ) Pre(,t )]

5 L f L d L L λ G f G d G G λ P f P d P P λ Tle 1: Known reltions mong clsses of Petri net lnguges. An rc represents the set inclusion With this extended definition, we ccept s deterministic genertor in which two trnsitions with the sme lel my e simultneously enled t mrking m, provided tht the two mrkings reched from m y firing t nd t re the sme. Note tht with this extended definition, while the word of events generted from the initil mrking uniquely determines the mrking reched it does not necessrily uniquely determines the sequences tht hs fired. 2.3 Clsses of Petri Net Lnguges The clsses of Petri net lnguges re denoted s follows. L f (resp. G f, P f ) denotes the clss of terminl (resp. covering, prefix) lnguges generted y free-leled PN genertors. L d (resp. G d, P d ) denotes the clss of terminl (resp. covering, prefix) lnguges generted y deterministic PN genertors. L (resp. G, P) denotes the clss of terminl (resp. covering, prefix) lnguges generted y λ-free PN genertors. L λ (resp. G λ, D λ, P λ ) denotes the clss of terminl (resp. covering, prefix) lnguges generted y ritrry leled PN genertors. Fig. 1 shows the reltionship mong these clsses. Here A B represents strict set inclusion A B. While forml proof of ll these reltions cn e found in [1], we point out tht the reltions on ech line tht compre the sme type of lnguges of nets with different leling re rther intuitive. Additionlly, one redily understnd tht ny P-type lnguge of genertor G my lso e otined s G-type lnguge defining s set of finl mrkings F = { }. Prigot nd Peltz[1] hve defined PN lnguges s regulr lnguges with the dditionl cpility of determining if string of prenthesis is well formed. If we consider the clss L of PN lnguges, it is possile to prove [12] tht L is strict superset of regulr lnguges nd strict suset of context-sensitive lnguges. Furthermore L nd the clss of context-free lnguges re not comprle. An exmple of lnguge in L tht is not context-free: L = { m m c m m }. An exmple of lnguge tht is context-free ut is not in L: L = {ww R w E } 5 if E > 1. All these results re summrized in Fig. 3. Note tht the clss L d, lthough contined in L, occupies the sme position of L in the hierrchy shown in the figure. In the frmework of Supervisory Control, we will ssume tht the genertors considered re deterministic. In prticulr, clss L d (or possily G d for unounded nets) will e used to descrie mrked lnguges, while clss P d will e used to descrie closed lnguges. There re severl resons for this choice. Systems of interest in supervisory control theory re deterministic. 5 The string w R is the reversl of string w. 5

6 Recursively enumerle Context sensitive L Regulr Context free Figure 3: Reltions mong the clss L nd other clsses of forml lnguges Although ech clss of deterministic lnguges here defined is strictly included in the corresponding clss of λ-free lnguges, it is pproprite to restrict our nlysis to deterministic genertors. In fct, severl properties of interest re decidle for deterministic nets while they re not for λ-free nets [1, 11, 18] In [1] it ws shown tht the clsses G d nd L d re incomprle, nd furthermore G d L d = R, where R is the clss of regulr lnguges. Hence tking lso into ccount the G-type lnguge (in ddition to the L-type lnguge) one extends the clss of control prolems tht cn e modeled y deterministic unounded PNs. 2.4 Other clsses of Petri net lnguges Guert nd Giu [1] hve explored the use of infinite sets of finl mrkings in the definition of the mrked ehvior of net. With ech more or less clssicl suclss of susets of N m finite, idel (or upper), semi-cylindricl, str-free, recognizle, rtionl (or semiliner) susets it is possile to ssocite the clss of Petri net lnguges whose set of ccepting sttes elongs to the clss. When compring the relted Petri net lnguges, it ws shown tht for ritrry or λ-free PN genertors, the ove hierrchy collpses: one does not increse the generlity y considering semiliner ccepting sets insted of the usul finite ones. However, for freeleled nd deterministic PN genertors, it is shown tht one gets new distinct suclsses of Petri net lnguges, for which severl decidility prolems ecome solvle. 3 Concurrent Composition nd System Structure In this section we recll the definition of the concurrent composition opertor on lnguges nd introduce the corresponding opertor on nets. Definition 4 (Concurrent composition of lnguges). Given two lnguges L 1 E 1 nd L 2 E 2, their concurrent composition is the lnguge L on lphet E = E 1 E 2 defined s follows: L = L 1 L 2 = { w E w E1 L 1, w E2 L 2 } where w Ei denotes the projection of word w on lphet E i, for i = 1,2. We now consider the counterprt of this lnguge opertor on net structure. Definition 5 (Concurrent composition of PN genertors). Let G 1 = (N 1,l 1,m,1,F 1 ) nd G 2 = (N 2,l 2,m,2,F 2 ) e two PN genertors. Their concurrent composition, denoted lso G = G 1 G 2, is the genertorg=(n,l,m,f) tht genertesl L (G) = L L (G 1 ) L L (G 2 ) nd L P (G) = L P (G 1 ) L P (G 2 ). The structure of G my e determined with the following procedure. 6

7 t 1 t 3 p 1 p 2 p 3 p 4 G 1 t 2 G 2 t 4 (t 1,t 3 ) p 1 p 2 p 3 p 4 t 4 G (t 2,t 3 ) Figure 4: Two genertors G 1, G 2 nd their concurrent composition G of Exmple 4 Algorithm 1. Let P i, T i nd E i (i = 1,2) e the plce set, trnsition set, nd the lphet of G i. The plce set P of N is the union of the plce sets of N 1 nd N 2, i.e., P = P 1 P 2. The trnsition set T of N nd the corresponding lels re computed s follows. For ech trnsition t T 1 T 2 leled λ, trnsition with the sme input nd output g of t nd leled λ elongs to T. For ech trnsition t T 1 T 2 leled e (E 1 \E 2 ) (E 2 \E 1 ), trnsition with the sme input nd output g of t nd leled e elongs to T. Consider symol e E 1 E 2 nd ssume it lels m 1 trnsitions T e,1 T 1 nd m 2 trnsitions T e,2 T 2. Then m 1 m 2 trnsitions leled e elong to T. The input (output) g of ech of these trnsitions is the sum of the input (output) gs of one trnsition in T e,1 nd of one trnsition in T e,2. m = [m T,1 mt,2 ]T. F is the crtesin product of F 1 nd F 2, i.e., F = {[m T 1 mt 2 ]T m 1 F 1,m 2 F 2 }. The composition of more thn two genertors cn e computed y repeted ppliction of the procedure. Note tht while the set of plces grows linerly with the numer of composed systems, the set of trnsitions nd of finl mrkings my grow fster. Exmple 4. Let G 1 = (N 1,l 1,m,1,F 1 ) nd G 2 = (N 2,l 2,m,2,F 2 ) e the two genertors shown in Fig. 4. Here F 1 = {[1 ] T } nd F 2 = {[1 ] T,[ 1] T }. Their concurrent composition G = G 1 G 2 is lso shown in Fig. 4. The initil mrking of G is m = [1 1 ] T nd its set of finl mrkings is F = {[1 1 ] T,[1 1] T }. 4 Supervisory Design Using Petri Nets InthissectionwediscusshowPetrinetmodelsmyeusedtodesignsupervisorsforlnguge specifictions within the frmework of Supervisory Control. The design of supervisor in the frmeworkof utomt ws presented in Chpter?? nd we ssume the reder is lredy fmilir with this mteril. 4.1 Plnt, specifiction nd supervisor Here we comment some of the ssumptions tht re peculir to the PN setting. 7

8 The plnt is descried y deterministic PN genertor G on lphet E. Its closed lngugeis L(G) = L P (G) while its mrked 6 lngugeis L m (G) = L L (G). We ssume such genertor is nonlocking, i.e., L L (G) = L P (G). The trnsition set of G is prtitioned s follows T = T c T uc, where T c re the controllle trnsitions tht cn e disled y control gent, while T uc re the uncontrollle trnsitions. Note tht this llows generliztion of the utomt settings where the notion of controllility nd uncontrollility is ssocited to the events. In fct, it is possile tht two trnsitions, sy t nd t, hve the sme event lel l(t ) = l(t ) = e E ut one of them is controllle while the other one is not. In the rest of the chpter, however, we will not consider this cse nd ssume tht the event lphet my e prtitioned s E = E c E uc where E c = l(t), E uc = l(t) nd E c E uc =. t T c t T uc ItislsocommontoconsiderplntscomposedymPNgenertorsG 1,...,G m working concurrently. The lphets of these genertors re E 1,...,E m. The overll plnt is PN genertor G = G 1 G m on lphet E = E 1 E m. The specifiction is lnguge K Ê, where Ê E is suset of the plnt lphet. Such specifiction defines set of legl words on E given y {w E w Ê prefix(k)}. The specifiction K is represented y deterministic nonlocking PN genertor H on lphet Ê whose mrked lnguge is L m(h) = L L (H) = K. As for the plnt, other choices for the mrked lnguge re possile. The supervisor is descried y nonlocking PN genertor S on lphet E. It runs in prllel with the plnt, i.e., ech time the plnt genertes n event e trnsition with the sme lel is executed on the supervisor. The control lw computed y S when its mrking is m is given y g(m) = E uc {e E c ( t T c )m[t,l(t) = e}. 4.2 Monolithic Supervisor Design The monolithic supervisory design requires three steps. In the first step, corse structure for supervisor is synthesized y mens of concurrent composition of the plnt nd specifiction. In the second step, the structure is nlyzed to check if properties of interest (nmely, the sence of uncontrollle nd locking sttes) hold. In the third step, if the properties do not hold, this structure is trimmed to void reching undesirle sttes. Algorithm 2 (Monolithic supervisory design). We re given plnt G nd specifiction H. 1. Construct y concurrent composition the genertor J = G H. 2. Determine if the genertor J stisfies the following properties: nonlockingness, i.e., it does not contin locking mrkings from which finl mrking cnnot e reched; controllility, i.e., it does not contin uncontrollle mrkings such tht when G nd H run in prllel n uncontrollle event is enled in G ut is not enled in H. If J stisfies oth properties, then oth H nd J re suitle supervisors. 6 While in the cse of ounded nets the L-type lnguge cn descrie ny mrked lnguge, in the cse of unounded genertors other choices for the mrked lnguge re possile considering the G-type lnguge of the genertor or even ny other type of terminl lnguges s mentioned in 2.4. This will e discussed in Section 5. 8

9 3. If J contins locking or uncontrollle mrkings, we hve to trim it to otin nonlocking nd controllle genertor S. The genertor S otined through this procedure is t the sme time suitle mximlly permissive supervisor nd the corresponding closed-loop system. In the previous lgorithm, the genertor J constructed in step 1 represents the lrgest ehvior of the plnt tht stisfies ll the constrints imposed y the specifictions. More precisely, its closed lnguge L(J) = {w E w L(G),w Ê L(H)} represents the ehvior of the plnt restricted to the set of legl words, while its mrked ehvior L m (J) = {w E w L m (G),w Ê L m (H)} represents the mrked ehvior of the plnt restricted to the set of legl words mrked y the specifiction. In step 2 we hve used informlly the term locking mrking nd uncontrollle mrking. We will formlly define these notions in the following. We first define some useful nottion. The structure ofthe genertorsis J = (N,l,m,F), G = (N 1,l 1,m,1,F 1 ), nd H = (N 2,l 2,m,2,F 2 ), where N = (P,T, Pre,Post) nd N i = (P i,t i,pre i,post i ), (i = 1,2). We define the projection of mrking m of N on net N i, (i = 1,2), denoted m i, is the vector otined from m y removing ll the components ssocited to plces not present in N i. We first present the notion of locking mrking. Definition 6. A mrking m R(N,m ) of genertor J is locking mrking if no finl mrking my e reched from it, i.e., R(N,m) F =. The genertor J is nonlocking if no locking mrking is rechle. We now present the notion of n uncontrollle mrking. Definition 7. Let T u T e the set of uncontrollle trnsitions of J. A mrking m R(N,m ) of genertor J is uncontrollle if there exists n uncontrollle trnsition t T u tht is enled y m 1 in G ut tht is not enled y m 2 in H. The genertor J is controllle if no uncontrollle mrking is rechle. Determining if genertor J is nonlocking nd controllle is lwys possile, s we will show in the next section. We lso point out tht for ounded nets this test cn e done y construction of the rechility grph 7 s in the following exmple of supervisory design. Exmple 5. Consider the genertors G 1 nd G 2, nd the specifiction H in Fig. 5 (left). Note tht ll nets re free-leled, hence we hve n isomorphism etween the set of trnsitions T nd the set of events E: in the following ech trnsitions will e denoted y the corresponding event. G 1 descries conveyor tht rings in mnufcturing cell rw prt (event ) tht is eventully picked-up y root (event ) so tht new prt cn enter. G 2 descries mchinetht is lodedwith rwprt(eventc) nd, depending onthe opertionit performs, my produce prts of type A or type B (events d or e) efore returning to the idle stte. The set of finl sttes of oth genertors consists of the initil mrking shown in the figure. The specifiction we consider, represented y the genertor H, descries cyclic opertion process where root picks-up rw prt from the conveyor, lods it on the mchine 7 As we hve lredy pointed out, the construction of the rechility grph suffers from the stte explosion prolem. An open re for future reserch is the use of more efficient nlysis techniques (e.g., structurl) to check nonlockingness nd controllility for lnguge specifiction. 9

10 c p 1 p 2 p 4 p 3 d p 1 p 2 G 1 G 2 e p 5 p 7 p 6 d p 3 c p 5 p 6 d c e H p 7 J p 4 Figure 5: Left: Systems G 1,G 2 nd specifiction H for the control prolem of Exmple 5. Right: System J = G 1 G 2 H d [111] [111] [111] [111] d p 1 p 5 p 7 p 2 p 6 c [111] c [111] d p 3 c e [1 1 1] e [ 1 1 1] S p 4 Figure 6: Left: Rechility grph of genertor J of Exmple 5. Right: the structure of the trim genertor S of Exmple 6 nd fter recognizing tht prt of type A hs een produced repets the process. The set of finl sttes consists of the initil mrking shown in the figure. The overll process is G = G 1 G 2 nd the genertor J = G H, is shown in Fig. 5 (right). Its set of finl sttes consists of the initil mrking shown in the figure. Assume now tht the controllle trnsition/event set is E c = {,c,d,e} nd the uncontrollle trnsition/event set is E u = {}. It is immedite to show tht genertor J is locking nd uncontrollle. To show this we hve constructed the rechility grph of J in Fig. 6. The two mrkings shown in thick oxes re locking ecuse from them it is impossile to rech the initil mrking (tht is lso the unique finl mrking). The three mrkings shded in grey re uncontrollle: in fct, in ll these mrkings m(p 2 ) = 1, i.e., uncontrollle trnsition is enled in the plnt G, while m(p 5 ) =, i.e., is not enled in H. 1

11 4.3 Trimming Once the corse structure of cndidte supervisor is constructed y mens of concurrent composition, we need to trim it to otin nonlocking nd controllle genertor. The next exmple shows the prolems involved in the trimming of net. Exmple 6. Let us consider the genertor J constructed in Exmple 5. Refining the PN to void reching the undesirle mrkings shown in Fig. 6 is complex. First, we could certinly remove the trnsition leled y e since its firing lwys leds to n undesirle stte nd it is controllle. After removl of this trnsition, the trnsition leled y will e enled y the following rechlemrkings: m = [1 1 1 ] T,m = [1 1 1 ] T,m = [1 1 1] T. We wnt to lock the trnsition leled when the mrkings m nd m re reched. Since m (p 5 ) = 1 > m (p 5 ) = m (p 5 ) =, we cn dd n rc from p 5 to nd from to p 5 s in Fig. 6. The following lgorithm cn e given for the trimming of net. Algorithm 3. Let t e trnsition to e controlled, i.e., trnsition leding from n dmissile mrking to n undesirle mrking. Let e e its lel. 1. Determine the set of dmissile rechle mrkings tht enle t, nd prtition this set into the disjoint susets M (the mrkings from which t should e llowed to fire), nd M n (the mrkings from which t should not e llowed to fire, to void reching n undesirle mrking). If M = remove t nd stop, else continue. 2. Determine construct in the form: U(m) = [(m(p 1 1 ) n1 1 )... (m(p1 k1 ) n1 k1 )]... [(m(p l 1 ) nl 1 )... (m(pl kl ) nl kl )], such tht U(m) = TRUE if m M, nd U(m) = FALSE if m M n. 3. Replce trnsition t with l trnsitions t 1,...,t l leled. The input (output) rcs of trnsition t j, j = 1,...,l, will e those of trnsition t plus n j i rcs inputting from (outputting to) plce p j i, i = 1,...,k j. It is cler tht following this construction there is n enled trnsition leled e for ny mrking in M, while none of these trnsitions re enled y mrking in M n. We lso note tht in generl severl constructs of this form my e determined. The one which requires the miniml numer of trnsitions, i.e., the one with the smllest l, is preferle. The following theorem gives sufficient condition for the pplicility of the lgorithm. Theorem 1. The construct of Algorithm 3 cn lwys e determined if the net is ounded. Proof. For ske of revity, we prove this result for the more restricted clss of conservtive nets. One should keep in mind, however, tht given ounded non conservtive net, one cn mke the net conservtive dding dummy sink plces tht do not modify its ehvior. AnetisconservtiveifthereexistsnintegervectorY > suchthtfornytwomrkings m nd m rechle from the initil mrking Y T m = Y T m. Hence if m m there exists plce p such tht m(p) > m (p). Also the set of rechle mrkings is finite. On conservtive net, consider m i M, m j M n. We hve tht M nd M n re finite sets nd lso there exists plce p ij such tht m i (p ij ) = n ij > m j (p ij ). Hence U(m) = (m(p ij ) n ij ) j M n is construct for Algorithm 3. i M 11

12 Unfortuntely, the construct my contin up to M OR cluses, i.e., up to M trnsitions my e sustituted for single trnsition to control. Note, however, tht it is often possile to determine simpler construct s in Exmple 6, where the construct for the trnsition leled ws U(m) = [m(p 5 ) 1]. 5 Supervisory control of unounded PN genertors As we hve seen in the previous section, the monolithic supervisory design presented in Algorithm 2 cn lwys e pplied when the plnt G nd the specifiction H re ounded PN genertors. Here we consider the cse of generl, possily unounded, genertors. In step 1 of the monolithic supervisory design lgorithm the unoundedness of the G or H does not require ny specil considertion, since the procedure to construct the concurrent composition J = G H is purely structurl in the PN setting. Thus we need to focus on the lst two steps, nd discuss how it is possile to check if n unounded genertor G is nonlocking nd controllle, nd eventully how it cn e trimmed. We hve previously remrked tht in the cse of ounded nets the L-type lnguge cn descrie ny mrked lnguge. In the cse of unounded genertors other choices for the mrked lnguge re possile considering the G-type lnguge of the genertor or even ny other type of terminl lnguge mentioned in 2.4. In the rest of this section we will only consider two types of mrked lnguges for PN genertor G. L-type lnguge, i.e., L m (G) = L L (G). This implies tht the set of mrked mrkings reched y words in L m (G) is F = F, i.e., it coincides with the finite set of finl mrkings ssocited to the genertor. G-type mrked lnguge, i.e., L m (G) = L G (G). This implies tht the set of mrked mrkings reched y words in L m (G) is F = {m N m m m f }, m f F i.e., it is the infinite covering set of F. 5.1 Checking nonlockingness We will show in this susection tht checking genertor for nonlockingness is lwys possile. Let us first recll the notion of home spce. Definition 8. A mrking m N m of Petri net is home-mrking if it is rechle from ll rechle mrkings. A set of mrkings M N m of Petri net is home spce if for ll rechle mrking m mrking in M is rechle from m. The following result is due to Johnen nd Frutos Escrig. Proposition 1 ([8]). The property of eing home spce for finite unions of liner sets 8 hving the sme periods is decidle. We cn finlly stte the following originl result. Theorem 2. Given genertor J constructed s in step 1 of Algorithm 2 it is decidle if it is nonlocking when its mrked lnguge is the L-type or G-type lnguge. 8 We sy tht E N m is liner set if there exists some v N m nd finite set {v 1,,v n} N m such tht E = {v N m v = v + n i=1kivi with ki N}. The vector v is clled the se of E, nd v1,,vn re clled its periods. 12

13 Proof. Let F e the set of mrked mrkings of the genertor. According to Definition 6 genertor J is nonlocking iff from every rechle mrkings m mrked mrking in F is rechle. Thus checking for nonlockingness is equivlent to checking if the set of mrked mrkings F is home spce. When the mrked lnguge is the L-type lnguge, F = F nd we oserve tht ech mrking m f cn e considered s liner set with se m f nd empty set of genertors. When the mrked lnguge is the G-type lnguge, F = m f F {m N m m m f } = {m f + m k i e i k i N} wherevectorse i rethe cnoniclsisvectors,i.e., e i {,1} n, withe i (i) = 1nde i (j) = if i j. In oth cses F is the finite unions of liner sets hving the sme periods, hence checking if it is home spce is decidle y Proposition Checking controllility We will show in this susection tht checking genertor for controllility is lwys possile. The mteril presented in this susection is originl nd proofs of ll results will e given. We first present some intermedite result. Lemm 1. Let N,m e mrked net with N = (P,T,Pre,Post) nd P = m. Given mrking m N m nd plce p P, we define the set S( m, p) = {m N m m( p) = m( p), ( p P \{ p}) m(p) m(p)} of those mrkings tht re equl to m in component p nd greter thn or equl to m in ll other components. Checking if mrking in this set is rechle in N,m is decidle. Proof. To prove this result, we reduce the prolem of determining if mrking in S( m, p) is rechle to the stndrd mrking rechility prolem of modified net. Consider in fct net N = (P,T,Pre,Post ) otined from N s follows. P = P {p s,p f }; T = T {t f } {t p p P \ { p}}. For p P nd t T it holds Pre (p,t) = Pre(p,t) nd Post (p,t) = Post(p,t), while the rcs incident on the newly dded plces nd trnsitions re descried in the following. Plce p s is self-looped with ll trnsitions in T, i.e., Pre (p s,t) = Post (p s,t) = 1 for ll t T. Plce p f is self-looped with ll new trnsitions t p, for ll p P \{ p}. Trnsition t f hs n input rc from plce p s nd n output rc to plce p f ; furthermore it hs m(p) input rcs from ny plce p P \{ p}. Finlly, for ll p P \{ p} trnsition t p is sink trnsition with single input rc from plce p. WessocitetoN ninitilmrkingm definedsfollows: forllp P, m (p) = m (p), while m (p s ) = 1 nd m (p f ) =. Such construction is shown in Fig. 7 where the originl net N with set of plces P = { p,p,...,p } nd set of trnsitions T = {t 1,ldots,t n } is shown in dshed ox. Arcs with strting nd ending rrows represent self-loops. We clim tht mrking in the set S( m, p) is rechle in the originl net if nd only if mrking m f is rechle in N,m, where m f ( p) = m( p), m f (p f) = 1 nd m f ( p) = for p P \{ p,p f }. This cn e proved y the following resoning. The evolution of net N efore the firing of t f mimics tht of N. Trnsition t f my only fire from mrking greter thn or equl to m in ll components ut eventully p. After the firing of t f, the trnsitions of the originl net re locked (p s is empty) nd only the sink trnsitions t p, for ll p P \{ p}, my fire thus emptying the corresponding plces. The only plce whose mrkings cnnot chnge fter the firing of t f is p. i=1 13

14 p s t f _ m(p )... _ m(p ) t 1... t n _ p p t p p t p p f Figure 7: Construction of Lemm 1 Theorem 3. Given genertor J = G H constructed s in step 1 of Algorithm 2 it is decidle if it is controllle. Proof. We will show tht the set of uncontrollle mrkings to e checked cn e written s the finite union of sets of the form S( m, p). Given n uncontrollle trnsition t T uc let P G (t) (resp., P H (t)) e the set of input plces of t tht elong to genertor G (resp., H). Consider now plce p P H (t) nd n integer k {,1,...,Pre(p,t) 1} nd define the following mrking m t,p,k such tht m t,p,k (p) = k,m t,p,k (p ) = Pre(p,t)ifp P G (t), elsem t,p,k (p ) =. Clerlysuchmrking is uncontrollle ecuse the plces in G contin enough tokens to enle uncontrollle trnsition t while plce p in H does not contin enough tokens to enle it. All other mrkings in S(m t,p,k,p) re eqully uncontrollle. Thus the overll set of uncontrollle mrkings to e checked cn e written s the finite union S(m t,p,k,p) t T uc p P H(t) k {,1,...,Pre(p,t) 1} nd y Lemm 1 checking if n uncontrollle mrking is rechle is decidle. 5.3 Trimming locking genertor The prolem of trimming locking net is the following: given deterministic PN genertor G with lnguges L m (G) nd L(G) L m (G) one wnts to modify the structure of the net to otin new DES G such tht L m (G ) = L m (G) nd L(G ) = L m (G ) = L m (G). On simple model such s stte mchine this my e done, trivilly, y removing ll sttes tht re rechle ut not corechle (i.e., no finl stte my e reched from them) nd ll their input nd output edges. On Petri net models the trimming my e more complex. If the Petri net is ounded, it ws shown in the previous section how the trimming my e done without mjor chnges of the net structure, in the sense tht one hs to dd new rcs nd eventully duplicte trnsitions without introducing new plces. Here we discuss the generl cse of possily unounded nets. When the mrked lnguge of net is its L-type Petri net lnguge, the trimming of the net is not lwys possile s will e shown y mens of the following exmple. Exmple 7. Let G e the deterministic PN genertor in Fig. 8 (left), with m = [1 ] T nd set of finl mrkings F = {[ 1] T }. The mrked (L-type) nd closed ehviors of this net re: L m (G) = { m m m } nd L(G) = { m n m n }. The infinite rechility grph of this net is prtilly shown in Fig. 8 (right): here the unique finl mrking is shown in ox. 14

15 p 2 t 1 t 2 t 3 p 1 p 3 p 4 t 4 [1] [11] [12] [1] [11] [21] [1] [11] [21] Figure 8: Left: Blocking net of Exmple 7: Right: Its leled rechility grph One sees tht ll mrkings of the form [ k 1] T with k 1 re locking. To void reching locking mrking one requires tht p 2 e empty efore firing the trnsition inputting into p 4. However, since p 2 is unounded this cnnot e done with simple plce/trnsition structure. It is possile to prove formlly tht the prefix closure of the mrked lnguge of the net discussed in Exmple 7 is not P-type Petri net lnguge. The proof is sed on the pumping lemm for P-type PN lnguges, given in [7]. Lemm 2. (Pumping lemm). Consider PN lnguge L P. Then there exist numers k,l such tht ny word w L, with w k, hs decomposition w = xyz with 1 y l such tht xy i z L, i 1. Proposition 2. Consider the L-type PN lnguge L = { m m m }. Its prefix closure L = L is not P-type Petri net lnguge. Proof. Given k ccording to the pumping lemm, consider the word w = k k L. Oviously, there is no decomposition of this word tht cn stisfy the pumping lemm. When the mrked lnguge of net is its G-type Petri net lnguge, the trimming of the net is lwys possile ecuse the prefix closure of such lnguge is deterministic P-type Petri net lnguge. This follows from next theorem, tht provides n even stronger result. Theorem 4. [4] Given deterministic PN genertor G = (N,l,m,F) with L G (G) L P (G), there exists finite procedure to construct new deterministic PN genertor G such tht L G (G ) = L G (G) nd L P (G ) = L G (G ). 5.4 Trimming n uncontrollle genertor In this section we show y mens of n exmple tht given PN genertor J = G H otined y concurrent composition of plnt nd of specifiction, it is not lwys possile to trim it removing the uncontrollle mrkings. Exmple 8. Consider plnt G descried y the PN genertor on the left of Fig. 8 (including the dshed trnsition nd rcs). We re interested in the closed lnguge of the net, so we will no specify set of finl mrkings F: ll rechle mrkings re lso finl. We ssume T uc = {t 1,t 3,t 5 }, i.e., E uc = {}. Consider specifiction H descried y the PN genertor on the left of Fig. 9 (excluding the dshed trnsition nd rcs). On the right of Fig. 9 we hve represented the leled rechility grph of G (including the dshed rcs leled on the ottom of the grph) nd the leled rechility grph of H (excluding the dshed rcs leled on the ottom of the grph). Now if we consider the concurrent composition J = G H nd construct its leled rechility grph, we otin grph isomorphic to the leled grph of genertor H (only the leling of the nodes chnges). 15

16 p 2 t 1 t 2 t 3 t 5 t 4 p 1 p 3 p 4 [1] [11] [12] [1] [11] [21] [1] [11] [21] Figure 9: Left: Genertors of Exmple 8. Right: Their leled rechility grphs All mrkings of the form [ k 1] T with k 1 re uncontrollle: in fct, when the plnt is in such mrking the uncontrollle trnsition t 5 leled is enled, while no event leled is enled on J. If we remove ll uncontrollle mrkings, we hve genertor whose closed lnguge is L = { m m m } tht, however, s shown in Proposition 2, is not P-type lnguge. Bsed on these results in [3] the following result ws proven. Theorem 5. The clsses P d, G d nd L d of PN lnguges re not closed under the supreml controllle sulnguge opertor Finl remrks The results we hve presented in this section showed tht in the cse of unounded PN genertors supervisor my not lwys e represented s PN. In fct, while it is lwys possile to check given specifiction for nonlockingness nd controllility even in the cse of genertors with n infinite stte spce when these properties re not stisfied the trim ehvior of the closed loop system my not e represented s net. A chrcteriztion of those supervisory control prolems tht dmit PN supervisors is n re still open to future reserch. 6 Further redings The ook y Peterson[12] contins good introduction to PN lnguges, while other relevnt results cn e found in [18, 1, 11, 7, 1, 16]. Mny issues relted to PNs s discrete event models for supervisory control hve een discussed in the survey y Hollowy et l. [5] nd in the works of Giu nd DiCesre [3, 4]. The existence of supervisory control policies tht enforce liveness hve een discussed y Sreenivs in [15, 17]. Finlly, n interesting topic tht hs received much ttention in recent yers is the supervisory control of PNs under specil clss of stte specifictions clled Generlized Mutul Exclusion Constrints (GMECs) tht cn e enforced y controllers clled monitor plces [2]. Severl monitor sed techniques hve een developed for the control of Petri nets with uncontrollle nd unoservle trnsitions nd good surveys cn e found in [9, 6]. References [1] Guert, S., Giu, A.: Petri net lnguges nd infinite susets of N m. In: Journl of Computer nd System Sciences 59: (1999) 9 See Chpter 3 for forml definition of this opertor. 16

17 [2] Giu, A., DiCesre, F., Silv, M.: Generlized Mutul Exclusion Constrints for Nets with Uncontrollle Trnsitions. In: Proc. IEEE Int. Conf. on Systems, Mn, nd Cyernetics (Chicgo, USA), (1992) [3] Giu, A., DiCesre, F.: Blocking nd controllility of Petri nets in supervisory control. In: IEEE Trnsctions on Automtic Control 39(4): (1994) [4] Giu, A., DiCesre, F.: Decidility nd closure properties of wek Petri net lnguges in supervisory control. In: IEEE Trnsctions on Automtic Control 4(5):96-91 (1995) [5] Hollowy, L.E., Krogh, B.H., Giu, A.: A Survey of Petri Net Methods for Controlled Discrete Event Systems. In: Discrete Event Dynmic Systems, 7: (1997). [6] Iordche, M.V., Antsklis, P.J.: Supervision Bsed on Plce Invrints: A Survey. In: Discrete Event Dynmic Systems, 16: (26) [7] Jntzen, M.: Lnguge theory of Petri nets. In: Petri Nets: Centrl Models nd Their Properties, Advnces in Petri Nets, Lecture Notes in Computer Science 254-I, Bruer, W., Reisig, W., Rozenerg, G. (Editors), Springer Verlg, New York, pp: (1987) [8] Johnen, C., Frutos Escrig, D.: Decidility of home spce property. In: LRI 53, Univ. d Orsy (1989) [9] Moody, J.O.. Antsklis, P.J.: Supervisory Control of Discrete Event Systems Using Petri Nets. Kluwer (1998) [1] Prigot, M., Pelz, E.: A logicl formlism for the study of finite ehviour of Petri nets. In: Advnces in Petri Nets, Lecture Notes in Computer Sciences 222, Springer Verlg, New York, pp: (1985) [11] Pelz, E.: Closure properties of deterministic Petri net lnguges. In: Proc. STACS 1987, Lecture Notes in Computer Sciences 247, Springer Verlg, New York, pp: (1985) [12] Peterson, J.L.: Petri Net Theory nd the Modeling of Systems. Prentice-Hll, Englewood Cliffs, NJ (1981) [13] Rmdge, P.J., Wonhm, W.M.: The control of discrete event systems. In: Proceedings of the IEEE 77(1):81-98 (1989) [14] Reutenuer, C.: The Mthemtics of Petri Nets. Msson nd Prentice-Hll (199) [15] Sreenivs, R.S.: On the existence of supervisory policies tht enforce liveness in discreteevent dynmic systems modeled y controlled Petri nets. In: IEEE Trnsctions on Automtic Control 42(7): (1997) [16] Sreenivs, R.S.: On miniml representtions of Petri net lnguges. In: IEEE Trnsctions on Automtic Control 51(5): (26) [17] Sreenivs, R.S.: On the Existence of Supervisory Policies Tht Enforce Liveness in Prtilly Controlled Free-Choice Petri Nets. In: IEEE Trnsctions on Automtic Control 57(2): (212) [18] Vidl-Nquet, G.: Deterministic Petri net lnguges. In: Appliction nd Theory of Petri Net, Girult, C., Reisig, W. (Editors), Informtick-Fcherichte 52, Springer Verlg, New York (1982) 17

Model Reduction of Finite State Machines by Contraction

Model Reduction of Finite State Machines by Contraction Model Reduction of Finite Stte Mchines y Contrction Alessndro Giu Dip. di Ingegneri Elettric ed Elettronic, Università di Cgliri, Pizz d Armi, 09123 Cgliri, Itly Phone: +39-070-675-5892 Fx: +39-070-675-5900

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

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

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

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

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

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

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

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

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

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

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

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

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

Centrum voor Wiskunde en Informatica REPORTRAPPORT. Supervisory control for nondeterministic systems

Centrum voor Wiskunde en Informatica REPORTRAPPORT. Supervisory control for nondeterministic systems Centrum voor Wiskunde en Informtic REPORTRAPPORT Supervisory control for nondeterministic systems A. Overkmp Deprtment of Opertions Reserch, Sttistics, nd System Theory BS-R9411 1994 Supervisory Control

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

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

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

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

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

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

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

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

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

Compiler Design. Fall Lexical Analysis. Sample Exercises and Solutions. Prof. Pedro C. Diniz

Compiler Design. Fall Lexical Analysis. Sample Exercises and Solutions. Prof. Pedro C. Diniz University of Southern Cliforni Computer Science Deprtment Compiler Design Fll Lexicl Anlysis Smple Exercises nd Solutions Prof. Pedro C. Diniz USC / Informtion Sciences Institute 4676 Admirlty Wy, Suite

More information

Closure Properties of Regular Languages

Closure Properties of Regular Languages Closure Properties of Regulr Lnguges Regulr lnguges re closed under mny set opertions. Let L 1 nd L 2 e regulr lnguges. (1) L 1 L 2 (the union) is regulr. (2) L 1 L 2 (the conctention) is regulr. (3) L

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

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

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

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

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

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

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

More information

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

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

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

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

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

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

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

More information

On Decentralized Observability of Discrete Event Systems

On Decentralized Observability of Discrete Event Systems 2011 50th IEEE Conference on Decision nd Control nd Europen Control Conference (CDC-ECC) Orlndo, FL, USA, Decemer 12-15, 2011 On Decentrlized Oservility of Discrete Event Systems M.P. Csino, A. Giu, C.

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

1.4 Nonregular Languages

1.4 Nonregular Languages 74 1.4 Nonregulr Lnguges The number of forml lnguges over ny lphbet (= decision/recognition problems) is uncountble On the other hnd, the number of regulr expressions (= strings) is countble Hence, ll

More information

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

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

More information

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

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

More information

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

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

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

CS 275 Automata and Formal Language Theory

CS 275 Automata and Formal Language Theory CS 275 utomt nd Forml Lnguge Theory Course Notes Prt II: The Recognition Prolem (II) Chpter II.5.: Properties of Context Free Grmmrs (14) nton Setzer (Bsed on ook drft y J. V. Tucker nd K. Stephenson)

More information

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

Automata Theory 101. Introduction. Outline. Introduction Finite Automata Regular Expressions ω-automata. Ralf Huuck. Outline Automt Theory 101 Rlf Huuck Introduction Finite Automt Regulr Expressions ω-automt Session 1 2006 Rlf Huuck 1 Session 1 2006 Rlf Huuck 2 Acknowledgement Some slides re sed on Wolfgng Thoms excellent

More 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

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

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

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

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

Lecture 09: Myhill-Nerode Theorem

Lecture 09: Myhill-Nerode Theorem CS 373: Theory of Computtion Mdhusudn Prthsrthy Lecture 09: Myhill-Nerode Theorem 16 Ferury 2010 In this lecture, we will see tht every lnguge hs unique miniml DFA We will see this fct from two perspectives

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

Lecture 9: LTL and Büchi Automata

Lecture 9: LTL and Büchi Automata Lecture 9: LTL nd Büchi Automt 1 LTL Property Ptterns Quite often the requirements of system follow some simple ptterns. Sometimes we wnt to specify tht property should only hold in certin context, clled

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

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

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

DFA minimisation using the Myhill-Nerode theorem

DFA minimisation using the Myhill-Nerode theorem DFA minimistion using the Myhill-Nerode theorem Johnn Högerg Lrs Lrsson Astrct The Myhill-Nerode theorem is n importnt chrcteristion of regulr lnguges, nd it lso hs mny prcticl implictions. In this chpter,

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

CS 275 Automata and Formal Language Theory

CS 275 Automata and Formal Language Theory CS 275 Automt nd Forml Lnguge Theory Course Notes Prt II: The Recognition Problem (II) Chpter II.6.: Push Down Automt Remrk: This mteril is no longer tught nd not directly exm relevnt Anton Setzer (Bsed

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

A negative answer to a question of Wilke on varieties of!-languages

A negative answer to a question of Wilke on varieties of!-languages A negtive nswer to question of Wilke on vrieties of!-lnguges Jen-Eric Pin () Astrct. In recent pper, Wilke sked whether the oolen comintions of!-lnguges of the form! L, for L in given +-vriety of lnguges,

More information

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

NFA DFA Example 3 CMSC 330: Organization of Programming Languages. Equivalence of DFAs and NFAs. Equivalence of DFAs and NFAs (cont. NFA DFA Exmple 3 CMSC 330: Orgniztion of Progrmming Lnguges NFA {B,D,E {A,E {C,D {E Finite Automt, con't. R = { {A,E, {B,D,E, {C,D, {E 2 Equivlence of DFAs nd NFAs Any string from {A to either {D or {CD

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

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

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

More information

Concepts of Concurrent Computation Spring 2015 Lecture 9: Petri Nets

Concepts of Concurrent Computation Spring 2015 Lecture 9: Petri Nets Concepts of Concurrent Computtion Spring 205 Lecture 9: Petri Nets Sebstin Nnz Chris Poskitt Chir of Softwre Engineering Petri nets Petri nets re mthemticl models for describing systems with concurrency

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

Finite Automata Theory and Formal Languages TMV027/DIT321 LP4 2018

Finite Automata Theory and Formal Languages TMV027/DIT321 LP4 2018 Finite Automt Theory nd Forml Lnguges TMV027/DIT321 LP4 2018 Lecture 10 An Bove April 23rd 2018 Recp: Regulr Lnguges We cn convert between FA nd RE; Hence both FA nd RE ccept/generte regulr lnguges; More

More information

PART 2. REGULAR LANGUAGES, GRAMMARS AND AUTOMATA

PART 2. REGULAR LANGUAGES, GRAMMARS AND AUTOMATA PART 2. REGULAR LANGUAGES, GRAMMARS AND AUTOMATA RIGHT LINEAR LANGUAGES. Right Liner Grmmr: Rules of the form: A α B, A α A,B V N, α V T + Left Liner Grmmr: Rules of the form: A Bα, A α A,B V N, α V T

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

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

Speech Recognition Lecture 2: Finite Automata and Finite-State Transducers. Mehryar Mohri Courant Institute and Google Research Speech Recognition Lecture 2: Finite Automt nd Finite-Stte Trnsducers Mehryr Mohri Cournt Institute nd Google Reserch mohri@cims.nyu.com Preliminries Finite lphet Σ, empty string. Set of ll strings over

More information

I1 = I2 I1 = I2 + I3 I1 + I2 = I3 + I4 I 3

I1 = I2 I1 = I2 + I3 I1 + I2 = I3 + I4 I 3 2 The Prllel Circuit Electric Circuits: Figure 2- elow show ttery nd multiple resistors rrnged in prllel. Ech resistor receives portion of the current from the ttery sed on its resistnce. The split is

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

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

Exercises Chapter 1. Exercise 1.1. Let Σ be an alphabet. Prove wv = w + v for all strings w and v. 1 Exercises Chpter 1 Exercise 1.1. Let Σ e n lphet. Prove wv = w + v for ll strings w nd v. Prove # (wv) = # (w)+# (v) for every symol Σ nd every string w,v Σ. Exercise 1.2. Let w 1,w 2,...,w k e k strings,

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

Myhill-Nerode Theorem

Myhill-Nerode Theorem Overview Myhill-Nerode Theorem Correspondence etween DA s nd MN reltions Cnonicl DA for L Computing cnonicl DFA Myhill-Nerode Theorem Deepk D Souz Deprtment of Computer Science nd Automtion Indin Institute

More information

Deterministic Finite Automata

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

More information

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

Revision Sheet. (a) Give a regular expression for each of the following languages: Theoreticl Computer Science (Bridging Course) Dr. G. D. Tipldi F. Bonirdi Winter Semester 2014/2015 Revision Sheet University of Freiurg Deprtment of Computer Science Question 1 (Finite Automt, 8 + 6 points)

More information

Lexical Analysis Finite Automate

Lexical Analysis Finite Automate Lexicl Anlysis Finite Automte CMPSC 470 Lecture 04 Topics: Deterministic Finite Automt (DFA) Nondeterministic Finite Automt (NFA) Regulr Expression NFA DFA A. Finite Automt (FA) FA re grph, like trnsition

More 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

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

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

Hybrid Control and Switched Systems. Lecture #2 How to describe a hybrid system? Formal models for hybrid system

Hybrid Control and Switched Systems. Lecture #2 How to describe a hybrid system? Formal models for hybrid system Hyrid Control nd Switched Systems Lecture #2 How to descrie hyrid system? Forml models for hyrid system João P. Hespnh University of Cliforni t Snt Brr Summry. Forml models for hyrid systems: Finite utomt

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

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

FABER Formal Languages, Automata and Models of Computation

FABER Formal Languages, Automata and Models of Computation DVA337 FABER Forml Lnguges, Automt nd Models of Computtion Lecture 5 chool of Innovtion, Design nd Engineering Mälrdlen University 2015 1 Recp of lecture 4 y definition suset construction DFA NFA stte

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

GNFA GNFA GNFA GNFA GNFA

GNFA GNFA GNFA GNFA GNFA DFA RE NFA DFA -NFA REX GNFA Definition GNFA A generlize noneterministic finite utomton (GNFA) is grph whose eges re lele y regulr expressions, with unique strt stte with in-egree, n unique finl stte with

More information

Context-Free Grammars and Languages

Context-Free Grammars and Languages Context-Free Grmmrs nd Lnguges (Bsed on Hopcroft, Motwni nd Ullmn (2007) & Cohen (1997)) Introduction Consider n exmple sentence: A smll ct ets the fish English grmmr hs rules for constructing sentences;

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

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

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

More information

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

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

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

NFAs and Regular Expressions. NFA-ε, continued. Recall. Last class: Today: Fun: CMPU 240 Lnguge Theory nd Computtion Spring 2019 NFAs nd Regulr Expressions Lst clss: Introduced nondeterministic finite utomt with -trnsitions Tody: Prove n NFA- is no more powerful thn n NFA Introduce

More information

CISC 4090 Theory of Computation

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

More information

CS 267: Automated Verification. Lecture 8: Automata Theoretic Model Checking. Instructor: Tevfik Bultan

CS 267: Automated Verification. Lecture 8: Automata Theoretic Model Checking. Instructor: Tevfik Bultan CS 267: Automted Verifiction Lecture 8: Automt Theoretic Model Checking Instructor: Tevfik Bultn LTL Properties Büchi utomt [Vrdi nd Wolper LICS 86] Büchi utomt: Finite stte utomt tht ccept infinite strings

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