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

Size: px
Start display at page:

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

Transcription

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

2

3 Supervisory Control for Nondeterministic Systems Ard Overkmp CWI P.O. Box 94079, 1090 GB Amsterdm, The Netherlnds Astrct In this pper we present the rst results of our ttempt to set up supervisory theory for nondeterministic discrete event systems. The supervisory control prolem for nondeterministic systems is specied nd motivted. A necessry nd sucient condition for the existence of supervisor is derived. Also n lgorithm is presented tht will utomticlly generte supervisor. The results re extended to del with uncontrollle events. AMS Suject Clssiction (1991): 68Q75, 93B25 Keywords & Phrses: Nondeterministic Discrete Event Systems, Filure Semntics, Supervisory Control. 1. Introduction Up till now discrete event systems hve een mostly modelled s deterministic systems. The current stte nd the next event uniquely determine the next stte. Deterministic systems re eectively descried y the lnguge they cn generte. Conditions under which supervisor exists nd the ehvior of the controlled system re lso stted in lnguge context. But in cse of prtil oservtion (nd prtil speciction) systems re more ppropritely modelled s nondeterministic systems. It is not sucient to descrie nondeterministic systems only y the lnguge they generte. The locking properties of the systems re lso importnt [5]. Consider the following exmple. Given two systems, A nd B (Fig. 1, ). A is nondeterministic nd B is its deterministic equivlent. The lnguges tht the systems cn generte re the sme, ut when connected to system C, (Fig. 1 c) AjjC cn dedlock ut BjjC cn not (Fig. 1 d, e). ^ c?? : A? c ^ : B? c: C ^? d: AjjC? e: BjjC Figure 1: Illustrtion of the dierence etween nondeterministic nd deterministic system. The prolem tht we re trying to solve in this pper is the following. Given nondeterministic system nd nondeterministic speciction, nd supervisor such tht the controlled system ehves ccording to the speciction. Here 'ehves like' mens tht the controlled system my only do wht the speciction llows, nd tht it my only lock n event if the speciction cn lso lock tht event. A new spect in this setup is tht the speciction my lso e nondeterministic. This gives the possiility to specify tht some nondeterminism is still llowed in the controlled system. In Section 3 n lterntive for lnguge semntics will e introduced: filure semntics [1, 4]. It is commonly used semntics in computer science. We will use it to stte necessry nd sucient conditions for the existence of supervisor such tht the controlled system ehves ccording to the

4 2 speciction. An lgorithm to utomticlly generte supervisor will e presented. In Section 5 these results will e extended to del with uncontrollle events. 2. Nottion nd Definitions Definition 2.1 (Finite Stte Mchine) A (nondeterministic) nite stte mchine (FSM) is four tuple (Q; ; ; Q 0 ) where, Q is the stte spce, is the set of event lels, : Q! 2 Q is the trnsition function, nd Q 0 Q is the nonempty set of initil sttes. The domin of the trnsition function cn e extended in nturl wy to strings nd sets of sttes. Let A = (Q ; ; ; A 0 ) e FSM, A Q, q 2 Q, 2, nd s 2. We dene { (q ; ") = q, { (q ; s) = ( (q ; s); ), { (A; s) = S q2a (q; s). For nottionl convenience we will use the stte mchine itself s n rgument insted of the initil sttes. (A; s) = (A 0 ; s). For deterministic nite stte mchine (DFSM) (q; s) is lwys singleton set. In this cse we will write q 0 = (q; s) insted of fq 0 g = (q; s). Also, we will simply write the initil stte insted of singleton set contining the initil stte. A useful function is the out-function, which descries the outgoing rcs of stte. out(q) = f 2 j (q; ) 6= ;g: The set of trces, or lnguge, generted y FSM is dened s L(A) = fs 2 j (A; s) 6= ;g. A lnguge is prex closed if sv 2 L ) s 2 L. All lnguges generted y FSM re prex closed. Control will not e enforced y control mp s in the Rmdge-Wonhm pproch, ut y synchroniztion on common events. The controlled system (i.e. the synchronous composition of the plnt nd the supervisor) cn only execute those events tht oth the supervisor nd the plnt cn execute. Definition 2.2 (Synchronous Composition) Let A = (Q ; ; ; A 0 ) nd B = (Q ; ; ; B 0 ). The synchronous composition of A nd B is AjjB = (Q Q ; ; ; A 0 B 0 ) where ((q ; q ); ) = (q ; ) (q ; ). Note tht for Q Q ; Q Q : ; Q = Q ; = ;. The next lemm is direct result from the denition. Lemm 2.3 For FSMs A; B, nd s 2 ; 1. (q ; q ) 2 (AjjB; s), q 2 (A; s) ^ q 2 (B; s) : 2. For (q ; q ) 2 (AjjB; s) out((q ; q )) = out(q ) \ out(q ) : 3. L(AjjB) = L(A) \ L(B) : 3. Filure Semntics In the introduction we lredy rgued tht the lnguge lone does not provide enough informtion for nondeterministic systems. The locking properties of the systems re lso importnt. In computer science filure semntics is introduced to del with such prolems. In filure semntics system is not only descried y the trces it cn generte ut lso y the set of events tht it cn lock fter trce (fil to execute). We will not elorte on it here. The reder is referred to [1, 4] for more informtion. We will only dene wht we need nd show tht it ts our interests. First, let us dene wht we men y locking. In the speciction it my e stted tht fter certin trces the system is llowed to lock, ut fter other trces it my not. So we hve to dene nonlockingness with respect to n lredy executed trce.

5 3 Definition 3.1 (Blocking) Let A e FSM nd s 2 L(A); A is nonlocking fter s if 8q 2 (A; s) out(q ) 6= ;. A FSM A is nonlocking if it is nonlocking fter ll s 2 L(A). As stted in the introduction, the controlled system my only do wht the speciction llows nd it my only lock n event if the speciction cn lso lock tht event. Becuse the speciction is nondeterministic it is possile tht sometimes n event is locked in one rnch of nondeterministic choice nd llowed in nother rnch. So, the controlled system hs the choice to either lock or execute tht event. Becuse of this freedom the system does not hve to e equivlent to the speciction. It only hs to reduce (implement) it [2, 3]. Definition 3.2 (Reduction) Let A; B e FSMs; A reduces B (A < B) if i) L(A) L(B), nd ii) 8s 2 L(A); 8q 2 (A; s); 9q 2 (B; s) s.t. out(q ) out(q ). Here, point i sttes tht system A my only do wht system B llows, nd point ii sttes tht A my only lock wht B cn lso lock. The reduction reltion gurntees tht the controlled system does not lock in n environment if the speciction does not lock in the sme environment. This is formlly stted in Theorem 3.3. Theorem 3.3 Let A; B e FSMs such tht L(A) L(B). For ll FSM C nd s 2, BjjC nonlocking fter s implies AjjC nonlocking fter s, if nd only if A < B. Proof (if prt) if A < B then 8q 2 (A; s) 9q 2 (B; s) s.t. out(q ) out(q ). If BjjC is nonlocking fter s then, y Lemm 2.3, 8q c 2 (C; s) out(q ) \ out(q c ) 6= ;. Then lso AjjC is nonlocking fter s ecuse out(q ) \ out(q c ) out(q ) \ out(q c ) 6= ;. (only if prt). We will prove tht if A does not reduce B then there exists FSM C nd string s such tht BjjC is nonlocking fter s, ut AjjC cn lock fter s. If not A < B then 9s 2 L(A); 9q 2 (A; s) s.t. 8q 2 (B; s) out(q ) 6 out(q ). Let C e DFSM such tht q c = (C; s) with out(q c ) =? out(q ). Then 8q 2 (B; s) out(q ) \ out(q c ) = out(q ) \ (? out(q )) = out(q )? out(q ) 6= ;. But out(q ) \ out(q c ) = out(q ) \ (? out(q )) = ; Controller Synthesis In this section we will rst stte under wht condition there exists supervisor such tht the controlled system reduces the speciction. We will cll this condition reduciility. Then, n lgorithm will e presented tht genertes such supervisor. In the following G will denote n uncontrolled system nd E speciction. Definition 4.1 (Reduciility) Let G; E e FSMs. A lnguge K is reducile (w.r.t. G; E) if 8s 2 K; 8q g 2 (G; s); 9q e 2 (E; s) s.t. out(q e ) out(q g ) \ f 2 js 2 Kg: Lemm 4.2 Let G; E e FSMs. Let S e DFSM such tht L(S) is reducile. Then GjjS < E. Proof (Point i of the denition of reduction) If s 2 L(S) \ L(G) then (G; s) is not empty. So, y the denition of reduciility, there exists q e 2 (E; s). Hence s 2 L(E), nd L(GjjS) L(E). (Point ii of the denition of reduction). For s 2 L(GjjS) let (q g ; q s ) 2 (GjjS; s), then, y Lemm 2.3, q g 2 (G; s) nd q s = (S; s). Becuse S is deterministic f 2 js 2 L(S)g = out(q s ). Then, y reduciility of L(S), we know 9q e 2 (E; s) such tht out(q e ) out(q g ) \ out(q s ). Hence lso, y Lemm 2.3, out(q e ) out((q g ; q s )). 2 Theorem 4.3 Let G; E e FSMs. There exists supervisor S such tht GjjS < E if nd only if there exists nonempty, prex closed, nd reducile lnguge K.

6 4 Proof (if prt) Let S K e deterministic stte mchine generting K. The proof follows directly from Lemm 4.2. (only if prt). Let K = L(SjjG). Then K is nonempty nd prex closed. We will prove tht K is reducile. 8s 2 K; s 2 L(SjjG), so (SjjG; s) 6= ;. Then, y lemm 2.3, (G; s) 6= ; nd (S; s) 6= ;. Thus 8s 2 K; 8q g 2 (G; s) 9q s s.t. (q g ; q s ) 2 (GjjS; s). By the denition of reduction 9q e 2 (E; s) s.t. out(q e ) out((q g ; q s )). By lemm 2.3 out((q g ; q s )) out(q g ). And y construction of K out((q g ; q s )) f 2 js 2 Kg. So, out(q e ) out(q g ) \ f 2 js 2 Kg. 2 Algorithm 4.4 The following lgorithm will construct supervisor (if it exists) such tht the controlled system reduces the speciction. 1. Generte deterministic stte mchine R 0 = (Q 0 r ; ; 0 r ; R0 0), where Q 0 r = 2 Qg 2 Qe ; R 0 0 = (G 0 ; E 0 ) ; 0 (g (G; ); r ((G; E); ) = e (E; )) ; if g (G; ) 6= ; ^ e (E; ) 6= ; ; empty ; otherwise : 2. Construct R i+1 from R i y removing ll rechle sttes q i r = (G; E) i (including its in- nd out-going trnsitions) from the stte spce of R i tht do not stisfy the following condition, 8q g 2 G 9q e 2 E s.t. out(q e ) out(q g ) \ out(q i r) : 3. Repet the previous step until ll rechle sttes stisfy the condition or until there re no more rechle sttes left. Let R e the lst R i. Theorem 4.5 Let G nd E e FSMs. Then Algorithm 4.4 produces DFSM R in nite numer of steps. If the stte spce of R is nonempty then GjjR < E. If the initil stte is removed from R then no supervisor exists such tht the controlled system reduces the speciction. Proof (The lgorithm stops in nite numer of steps) If in one step of the lgorithm no stte is removed, then the lgorithm stops ecuse ll sttes stisfy the condition. If in every step t lest one stte is removed from the stte spce then the lgorithm will eventully hlt ecuse the stte spce is nite. (The lgorithm returns correct solution). We will proof tht when the lgorithm nds solution then L(R) is reducile. And thus, y Lemm 4.2, GjjR < E. Let s 2 L(R) nd q r = (G; E) = (R; s). Then G = (G; s), E = (E; s), nd ecuse R is deterministic out(q r ) = f 2 js 2 L(R)g. Then, y step 3 of the lgorithm, 8q g 2 (G; s) 9q e 2 (E; s) s.t. out(q e ) out(q g )\out(q r ) = out(q g )\f 2 js 2 L(R)g. (The lgorithm nds solution if one exists). Assume there exists nonempty, prex closed, nd reducile lnguge K. First, we will prove tht K 0 = K \ L(G) is lso nonempty, prex closed nd reducile. Then we will prove tht K 0 L(R). Thus the lgorithm will return nonempty solution. Becuse " 2 K nd " 2 L(G), K \ L(G) 6= ;. Becuse K nd L(G) re prex closed, sv 2 K \ L(G) ) s 2 K ^ s 2 L(G) ) s 2 K \ L(G). So K 0 is prex closed. By reduciility of K, 8s 2 K \ L(G); 8q g 2 (G; s); 9q e 2 (E; s) s.t. out(q e ) out(q g ) \ f 2 js 2 Kg = out(q g ) \ f 2 js 2 K \ L(G)g. So K 0 is lso reducile. Now, we will prove y induction on the numer of steps of the lgorithm tht K 0 L(R i ) for ll i. So, lso K 0 L(R). Initil step: 8s 2 K 0 ; s 2 L(G). Then, y reduciility, (E; s) 6= ;. So s 2 L(E), nd K 0 L(G) \ L(E) = L(R 0 ).

7 5 Inductive hypothesis: K 0 L(R i ). Let s 2 K 0 nd q i r = (R i ; s). By the hypothesis, s 2 K 0 ) s 2 L(R i ) ) (R i ; s) = R i(q i r ; ) 6= ; ) 2 out(qr). i So, f 2 js 2 K 0 g out(qr). i By reduciility, 8q g 2 G; 9q e 2 E s.t. out(q e ) out(q g )\f 2 js 2 K 0 g out(q g )\out(qr). i So, q i r will not e removed from R i. Hence, s 2 L(R i+1 ) nd K 0 L(R i+1 ). 2 From the lst prt of the proof it cn e deduced tht the lgorithm genertes the lest restrictive supervisor. (The supreml element with respect to lnguge inclusion). 5. Uncontrollle Events Sometimes system cn generte events tht cn not e locked y supervisor (e.g. mchine rekdown). Rmdge nd Wonhm showed tht in the presence of these uncontrollle events we need the condition of controllility to gurntee the existence of supervisor. We will show tht for nondeterministic systems the sme condition is needed. Recll from [6] the denition of controllility. Let G e FSM, u. A prex closed lnguge K is controllle (w.r.t G; u ) if K u \ L(G) K. Note tht this is equivlent to: 8s 2 K, 8q g 2 (G; s) out(q g ) \ u f 2 js 2 Kg. Rmdge nd Wonhm clled supervisor tht lwys ccepts n uncontrollle event complete. We hve to dpt the denition of completeness to del with nondeterministic systems nd control y synchroniztion. Definition 5.1 (Completeness) A supervisor S is complete (w.r.t FSM G) if 8s 2 L(SjjG); 8q s 2 (S; s); 8q g 2 (G; s); out(q g ) \ u out(q s ) : Theorem 5.2 Let G nd E e FSMs. There exists supervisor S such tht GjjS < E, nd S complete w.r.t G if nd only if there exists nonempty, prex closed, reducile nd controllle lnguge K. Proof (if prt) Let S K e DFSM generting K. Then, y lemm 4.2, GjjS K < E. 8s 2 L(S K jjg), let q s = (S K ; s). Then, y controllility of L(S K ), 8q g 2 (G; s) out(q g ) \ u f 2 js 2 L(S K )g = out(q s ). so S K is complete. (only if prt). Tke K = L(SjjG), then y the proof of Theorem 4.3 (only if prt) K is reducile. 8s 2 L(SjjG); 8q s 2 (S; s); 8q g 2 (G; s) out(q g ) \ u out(q s ) ) out(q g ) \ u out(q s ) \ out(q g ) = out((q g ; q s )) f 2 js 2 L(S)g. So, L(SjjG) is controllle. 2 Algorithm 5.3 This lgorithm constructs complete supervisor (if it exists) such tht the controlled system reduces the speciction. The lgorithm is the sme s Algorithm 4.4, except tht the following is dded to step : : : Also, remove those sttes q i r = (G; E) i tht do not stisfy the following condition, 8q g 2 G out(q g ) \ u out(q i r) : Theorem 5.4 Let G nd E e FSMs. Then Algorithm 5.3 produces DFSM R in nite numer of steps. If the stte spce of R is nonempty then GjjR < E nd R is complete. If the initil stte is removed from R then no complete supervisor exists such tht the controlled system reduces the speciction. Proof The proof goes long the sme lines s the proof of Theorem 4.5. The following hs to e dded to the dierent steps of the proof.

8 6 (The lgorithm returns correct solution). 8s 2 L(RjjG), let q r = (G; E) = (R; s). Then, y step 3 of the lgorithm, 8q g 2 G = (G; s); out(q g ) \ u out(q r ). Hence R is complete. (The lgorithm nds solution if one exists). After the sentence tht strts with 'By reduciility': Also, y controllility, 8s 2 K 0 ; 8q g 2 G; out(q g ) \ u f 2 js 2 K 0 g out(q i r). So, q i r will not e removed from R i : : : 2 6. Conclusions In cse of systems tht re prtilly oserved or prtilly specied one hs to relize tht the ehviour of system depends on the nondeterministic properties of tht system. This pper hs een n ttempt to set up supervisory theory for nondeterministic systems. A condition (reduciility) is found for the existence of supervisor such tht the controlled system ehves like the speciction. An lgorithm is descried which synthesizes deterministic lest restrictive supervisor. These results re extended to del with uncontrollle events. Wht remins to e done is to nlyze the consequences of these results for systems with prtil speciction nd prtil oservtion. References 1..C.M Beten nd W.P. Weijlnd. Process lger. Cmridge University Press, Cmridge, E. Brinksm, G. Scollo nd C. Steenergen. LOTOS specictions, their implementtions, nd their tests. Proc. of IFIP Workshop 'Protocol Speciction, Testing nd Veriction VI', pges 349{360, S.D. Brooks, C.A.R. Hore, nd A.W. Roscoe. A theory for communicting sequentil processes. ournl of the ACM, 31:560{599, R.. vn Gldeek. The liner time - rnching time spectrum. Proc. CONCUR '90, Amsterdm, Lecture Notes in Computer Science 458, pges 278{297, M. Heymnn. Concurrency nd discrete event control. IEEE Control Systems Mgzine, 10:103{ 112, P..G. Rmdge nd W.M. Wonhm. The control of discrete event systems. Proc. of the IEEE, 77:81{98, 1989.

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

More information

Thoery of Automata CS402

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

More information

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

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

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

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

The size of subsequence automaton

The size of subsequence automaton Theoreticl Computer Science 4 (005) 79 84 www.elsevier.com/locte/tcs Note The size of susequence utomton Zdeněk Troníček,, Ayumi Shinohr,c Deprtment of Computer Science nd Engineering, FEE CTU in Prgue,

More information

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

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

More information

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

Non Deterministic Automata. Linz: Nondeterministic Finite Accepters, page 51

Non Deterministic Automata. Linz: Nondeterministic Finite Accepters, page 51 Non Deterministic Automt Linz: Nondeterministic Finite Accepters, pge 51 1 Nondeterministic Finite Accepter (NFA) Alphbet ={} q 1 q2 q 0 q 3 2 Nondeterministic Finite Accepter (NFA) Alphbet ={} Two choices

More 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

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

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

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

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

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

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

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

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

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

More information

Non-blocking Supervisory Control of Nondeterministic Systems via Prioritized Synchronization 1

Non-blocking Supervisory Control of Nondeterministic Systems via Prioritized Synchronization 1 Non-blocking Supervisory Control of Nondeterministic Systems vi Prioritized Synchroniztion 1 Rtnesh Kumr Deprtment of Electricl Engineering University of Kentucky Lexington, KY 40506-0046 Emil: kumr@engr.uky.edu

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

Some Theory of Computation Exercises Week 1

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

More information

NFAs continued, Closure Properties of Regular Languages

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

More information

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

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

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

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

CS:4330 Theory of Computation Spring Regular Languages. Equivalences between Finite automata and REs. Haniel Barbosa

CS:4330 Theory of Computation Spring Regular Languages. Equivalences between Finite automata and REs. Haniel Barbosa CS:4330 Theory of Computtion Spring 208 Regulr Lnguges Equivlences between Finite utomt nd REs Hniel Brbos Redings for this lecture Chpter of [Sipser 996], 3rd edition. Section.3. Finite utomt nd regulr

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

CHAPTER 1 PROGRAM OF MATRICES

CHAPTER 1 PROGRAM OF MATRICES CHPTER PROGRM OF MTRICES -- INTRODUCTION definition of engineering is the science y which the properties of mtter nd sources of energy in nture re mde useful to mn. Thus n engineer will hve to study the

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

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

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

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

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

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

Overview HC9. Parsing: Top-Down & LL(1) Context-Free Grammars (1) Introduction. CFGs (3) Context-Free Grammars (2) Vertalerbouw HC 9: Ch.

Overview HC9. Parsing: Top-Down & LL(1) Context-Free Grammars (1) Introduction. CFGs (3) Context-Free Grammars (2) Vertalerbouw HC 9: Ch. Overview H9 Vertlerouw H 9: Prsing: op-down & LL(1) do 3 mei 2001 56 heo Ruys h. 8 - Prsing 8.1 ontext-free Grmmrs 8.2 op-down Prsing 8.3 LL(1) Grmmrs See lso [ho, Sethi & Ullmn 1986] for more thorough

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

Non-deterministic Finite Automata

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

More information

Bisimulation. R.J. van Glabbeek

Bisimulation. R.J. van Glabbeek Bisimultion R.J. vn Glbbeek NICTA, Sydney, Austrli. School of Computer Science nd Engineering, The University of New South Wles, Sydney, Austrli. Computer Science Deprtment, Stnford University, CA 94305-9045,

More information

Anatomy of a Deterministic Finite Automaton. Deterministic Finite Automata. A machine so simple that you can understand it in less than one minute

Anatomy of a Deterministic Finite Automaton. Deterministic Finite Automata. A machine so simple that you can understand it in less than one minute Victor Admchik Dnny Sletor Gret Theoreticl Ides In Computer Science CS 5-25 Spring 2 Lecture 2 Mr 3, 2 Crnegie Mellon University Deterministic Finite Automt Finite Automt A mchine so simple tht you cn

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 330 Formal Methods and Models Dana Richards, George Mason University, Spring 2016 Quiz Solutions

CS 330 Formal Methods and Models Dana Richards, George Mason University, Spring 2016 Quiz Solutions CS 330 Forml Methods nd Models Dn Richrds, George Mson University, Spring 2016 Quiz Solutions Quiz 1, Propositionl Logic Dte: Ferury 9 1. (4pts) ((p q) (q r)) (p r), prove tutology using truth tles. p

More information

Java II Finite Automata I

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

More information

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

Quadratic Forms. Quadratic Forms

Quadratic Forms. Quadratic Forms Qudrtic Forms Recll the Simon & Blume excerpt from n erlier lecture which sid tht the min tsk of clculus is to pproximte nonliner functions with liner functions. It s ctully more ccurte to sy tht we pproximte

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

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

Finite Automata. Informatics 2A: Lecture 3. Mary Cryan. 21 September School of Informatics University of Edinburgh

Finite Automata. Informatics 2A: Lecture 3. Mary Cryan. 21 September School of Informatics University of Edinburgh Finite Automt Informtics 2A: Lecture 3 Mry Cryn School of Informtics University of Edinburgh mcryn@inf.ed.c.uk 21 September 2018 1 / 30 Lnguges nd Automt Wht is lnguge? Finite utomt: recp Some forml definitions

More information

a,b a 1 a 2 a 3 a,b 1 a,b a,b 2 3 a,b a,b a 2 a,b CS Determinisitic Finite Automata 1

a,b a 1 a 2 a 3 a,b 1 a,b a,b 2 3 a,b a,b a 2 a,b CS Determinisitic Finite Automata 1 CS4 45- Determinisitic Finite Automt -: Genertors vs. Checkers Regulr expressions re one wy to specify forml lnguge String Genertor Genertes strings in the lnguge Deterministic Finite Automt (DFA) re nother

More information

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

NFAs continued, Closure Properties of Regular Languages

NFAs continued, Closure Properties of Regular Languages lgorithms & Models of omputtion S/EE 374, Spring 209 NFs continued, losure Properties of Regulr Lnguges Lecture 5 Tuesdy, Jnury 29, 209 Regulr Lnguges, DFs, NFs Lnguges ccepted y DFs, NFs, nd regulr expressions

More information

Recursively Enumerable and Recursive. Languages

Recursively Enumerable and Recursive. Languages Recursively Enumerble nd Recursive nguges 1 Recll Definition (clss 19.pdf) Definition 10.4, inz, 6 th, pge 279 et S be set of strings. An enumertion procedure for Turing Mchine tht genertes ll strings

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

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

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

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

Normal Forms for Context-free Grammars

Normal Forms for Context-free Grammars Norml Forms for Context-free Grmmrs 1 Linz 6th, Section 6.2 wo Importnt Norml Forms, pges 171--178 2 Chomsky Norml Form All productions hve form: A BC nd A vrile vrile terminl 3 Exmples: S AS S AS S S

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