On Decentralized Observability of Discrete Event Systems

Size: px
Start display at page:

Download "On Decentralized Observability of Discrete Event Systems"

Transcription

1 th 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. Mhule, C. Setzu Astrct In this pper we del with the prolem of decentrlized oservility of discrete event systems. We consider set of sites tht oserve suset of events. Ech site trnsmits its own oservtion to coordintor tht decides if the word oserved elongs to legl ehvior or not. We study two different properties: uniform q oservility nd q dignosility. Then, we prove tht oth properties re decidle for regulr lnguges. Finlly, we give n lgorithm to compute strting from given initil stte, the time instnts t which the synchroniztion hs to e done so s to gurntee tht if n illegl word hs occurred it is immeditely detected. A. Motivtion I. INTRODUCTION In [1] Tripkis defines property tht he clls locl oservility. The ide is the following: set of n locl sites oserve, through their own projection msks P i, word w of symols tht is known to elong to lnguge L. A lnguge K L is loclly oservle if, ssuming ll locl sites send to coordintor ll oserved strings P i (w), the coordintor cn decide for ny w if the word elongs to K or to L \ K. Note tht this property ws shown in [1] to e undecidle even when lnguges L nd K re regulr: this is due to the fct tht the length of word w cn e ritrrily long. On the contrry, ssuming only words of ounded length re considered, the property is decidle for ritrry lnguges, since it must only e checked over finite numer of strings. We oserve tht this property is closely relted to locl dignosility s defined y Smpth et l. [2]. In fct, lnguge K in this setting represents the set of ll fult-free evolutions, while the lrger set L lso includes the fulty ones. The prolem we wnt to ddress is the following. Assume w descries the event driven evolution of system. The coordintor cn t ny moment send request to ll locl sites to know the oserved words since the previous request: such mechnism is clled synchroniztion. After ech synchroniztion coordintor should e le to decide if, on the sis of the informtion received so fr from the locl sites, the word w generted is legl, i.e, elongs to K. Note This work hs een prtilly supported y the Europen Community s Seventh Frmework Progrmme under project DISC (Grnt Agreement n. INFSO-ICT ). At University of Zrgoz it ws prtilly supported lso y CICYT - FEDER projects DPI nd y Fundción Argón I+D. M.P. Csino, A. Giu nd C. Setzu re with the Deprtment of Electricl nd Electronic Engineering, University of Cgliri, Pizz D Armi, Cgliri, Itly {csino,giu,setzu@diee.unic.it}. C. Mhule is with the Argón Institute of Engineering Reserch (I3A), University of Zrgoz, Mri de Lun 1, Zrgoz, Spin {cmhule@unizr.es}. tht synchroniztion is costly, thus lthough we ssume tht the mximl numer of events tht cn e generted y the system etween two consecutive synchroniztions is ounded, the coordintor should request s few synchroniztions s needed to solve the oservility prolem. Also the distnce etween two consecutive synchroniztions, expressed in terms of the numer of events generted etween them, needs not e constnt ut my opportunisticlly vry with the word generted so fr. In this setting, lthough the sic notion of locl oservility given y Tripkis is still fundmentl, two mjor extensions re needed. In fct the oservility property defined in [1] mkes two rther restrictive ssumptions. The first ssumption is tht the oservility property is defined only with respect to words in L. On the contrry, in our setting synchroniztion occurs repetedly. Thus if synchroniztion occurs fter word w hs een generted we re interested in the oservility of the residul lnguge w 1 K, i.e., the set of ll strings tht elong to K nd whose prefix is w, with respect to the residul lnguge w 1 L. Correspondingly, we introduce the notion of uniform q oservility. The second ssumption in [1] is tht when the oservtion strts the word generted so fr (tht s discussed in the previous prgrph is lwys the empty word) is perfectly known. On the contrry, in our setting when synchroniztion occurs the coordintor should e le to determine if the generted string is legl or not, ut my not e le to unmiguously estimte it. Thus when next oservtion strts the word generted so fr is only known to elong to given set. To cpture this condition, we introduce the notion of q dignosility. B. Literture review Oservility is fundmentl property tht hs received lot of ttention during the lst decdes due to the importnce of reconstructing plnt sttes tht cnnot e mesured. Severl contriutions hve een presented in the frmework of utomt [3], [4], [5], [6]. In [3] Cines et l. showed how it is possile to use the informtion contined in the pst sequence of oservtions (given s sequence of oservtion sttes nd control inputs) to compute the set of consistent sttes, while in [4] the oserver output is used to steer the stte of the plnt to desired terminl stte. A similr pproch ws lso used y Kumr et l. [6] when defining oserver sed dynmic controllers in the frmework of supervisory predicte control prolems. Özveren nd Willsky [5] proposed n pproch for uilding oservers tht llows one to reconstruct the stte of finite /11/$ IEEE 378

2 utomt fter word of ounded length hs een oserved, showing tht n oserver my hve n exponentil numer of sttes. A prolem strictly relted to oservility s defined in the present pper is opcity. A system is (current-stte) opque if its (current) stte is never exposed to certinly elong to given set of secret sttes. See the work of Soori nd Hdjicostis [7], [8] nd of Dureil et l. [9]. Finlly, very generl pproch for oservility with communiction hs een presented y Brret nd Lfortune in [10] in the context of supervisory control, nd severl techniques for designing possily optiml communiction policy hve lso een discussed therein. By optiml we men tht the locl sites communicte s lte s possile, only when strictly necessry to prevent the undesirle ehvior. Our work is y lrge specil cse of the rchitecture in [10] ecuse we llow communictions only etween the coordintor nd the locl oservers nd not mong locl oservers nd we do not consider control prolem ut simply n oservtion one. There re, however, few differences in our pproch derived from [1] with respect to [10] tht motivte the need for dditionl investigtion. These differences re listed here. First, we frme our results in the context of lnguges, rther thn utomt: this mens tht some of our definitions nd results pply to possily non regulr lnguges. Secondly, while in [10] communictions re decided y the locl oservers nd re triggered y the oservtion of n event, in our cse the communictions re triggered y the coordintor. Finlly, we ssume tht the coordintor knows the numer of events generted so fr, ut cnnot directly oserve their lel; thus the oservtion structure of the coordintor is not projection msk ut simply function f : L N tht counts the events generted so fr. Recently Ricker nd Cillud [11] hve lso considered setting where communictions my lso e triggered y the receiver, tht requests informtion from sender. Furthermore, they lso discuss policies where communiction occurs fter prefixes of ny of the ehviors involved in violtion of co-oservility, not just those tht my result in undesired ehvior. II. BASIC NOTATIONS Let Σ e finite lphet: Σ denotes the set of ll finite strings over Σ, i.e., the Kleene str, nd ε denotes the empty string. Given two strings u nd v, uv is the conctention of u nd v. A deterministic finite utomton (DFA) is tuple G = (X,Σ,δ,x 0,X m ) where X is the set of sttes, Σ is the finite set of events, prtil function δ : X Σ X is the trnsition function, x 0 X is the initil stte, nd X m X is the set of mrked sttes. The generted nd mrked lnguges of G, denoted y L(G) nd L m (G), respectively, re defined s L(G) = {w Σ δ(x 0,w) is defined} nd L m (G) = {w Σ δ(x 0,w) X m }. Given two deterministic finite utomt G 1 = (X 1,Σ 1,δ 1,x 0,1,X m,1 ) nd G 2 = (X 2,Σ 2,δ 2,x 0,2,X m,2 ), the prllel composition of G 1 nd G 2 is the utomton G 1 G 2 = (X,Σ 1 Σ 2,δ,(x 0,1,x 0,2 ),X m), where X (X 1 X 2 ), X m (X m,1 X m,2 ) nd ( x 1,x 2 ) if e Σ 1 \ Σ 2,δ 1 (x 1,e) = x 1 ; (x 1, x 2 ) if e Σ 2 \ Σ 1,δ 2 (x 2,e) = x 2 ; δ (x,e) = ( x 1, x 2 ) if e Σ 1 Σ 2,δ 1 (x 1,e) = x 1, δ 2 (x 2,e) = x 2 ; not defined otherwise. Given word w Σ, nd n lphet Σ i Σ, we denote s P i (w) the projection of w over Σ i, tht cn e recursively defined s follows. If w = ue, where u Σ nd e Σ, it holds { Pi (u)e if e Σ P i (w) = i, P i (u) otherwise Given lnguge L nd string w Σ, the residul of L with respect to (wrt) w is the lnguge w 1 L = {z wz L}. The lnguge L is regulr iff the set of its residuls s w rnges over Σ is finite, i.e., iff the set {w 1 L w Σ } is finite. The crdinlity of the set {w 1 L w Σ } is clled the index of L. III. UNIFORM q OBSERVABILITY Let us consider two prefix-closed lnguges K nd L defined over n lphet Σ, such tht K L Σ, nd set of n su-lphets Σ i Σ, i = 1,...n. The n su-lphets Σ i s re ssocited to n sites S i, i = 1,...,n. In prticulr, Σ i includes ll the events tht cn e oserved y S i. A first definition of decentrlized oservility hs een given y Tripkis in [1] in the cse of regulr lnguges. Definition 3.1: Let us consider two regulr lnguges L nd K. The lnguge K is jointly oservle wrt L nd Σ i, for i = 1,...,n, if there exists totl function f : Σ 1...Σ n {0,1}, such tht w L w K f(p 1 (w),...,p n (w)) = 1. (1) The ove property uses unounded memory since the word w my hve ritrry length, thus it is undecidle [1]. In this pper we generlize such definition to the cse of finite memory, i.e., the coordintor cn t ny moment send request to ll locl sites to know the oserved words since the previous request. On the sis of the informtion received so fr from the locl sites, the coordintor should estlish if the evolution is legl. Definition 3.2: Let Σ e finite lphet, nd Σ i Σ, with i = 1,...,n, e n su-lphets of Σ. Let L nd K e two prefix closed lnguges such tht K L Σ. The lnguge K is clled uniformly q oservle wrt L nd Σ i, for i = 1,...,n, if w K there exists function f w : Σ 1... Σ n {0,1} such tht u w 1 L with u q, it holds u w 1 K f w (P 1 (u),...,p n (u)) = 1. (2) 379

3 x 1 x 0 x 2 Fig. 1. The DFA considered in Exmple 3.5., In simple words, uniform q oservility implies the possiility of estlishing if the ehvior of given system is legl, only looking t the occurrence of no more thn q events, nd knowing tht the sequence w preceding such events is legl. Let us now introduce n equivlence reltion mong strings tht llows us to rephrse the ove definition of uniform oservility. Definition 3.3: Let Σ e finite lphet, nd Σ i Σ, with i = 1,...,n, e n su-lphets of Σ. Let L nd K e two prefix closed lnguges such tht K L Σ. A word u w 1 L is oservtion equivlent (or simply equivlent) to v w 1 L, i.e., u v, if P i (u) = P i (v) for ll i = 1,...,n. We denote [u] the set of words tht re equivlent to u. Finlly, we sy tht two words tht re not equivlent re distinguishle. Using this notion, the definition of uniform q oservility of lnguge cn e rewritten s follows. Definition 3.4: Let Σ e finite lphet, nd Σ i Σ, with i = 1,...,n, e n su-lphets of Σ. Let L nd K e two prefix closed lnguges such tht K L Σ. The lnguge K is clled uniform q oservle wrt L nd Σ i, i = 1,...,n, if w K, nd u w 1 L, w[u] K w[u] K. (3) The following exmple clrifies the ove definitions. Exmple 3.5: Let Σ = {,}, Σ 1 = {}, Σ 2 = {}, L e the lnguge generted y the regulr expression ( + ), while K is the lnguge generted y the regulr expression K 1 + K 2 where K 1 = ( ) nd K 2 = ( ). It cn e esily verified tht L corresponds to the lnguge generted y the DFA in Fig. 1 strting from x 0, while K is the lnguge generted y the sme DFA neglecting the stte x 2, still ssuming x 0 s the initil stte. Moreover, K 1 corresponds to the set of words tht finish in x 0, while K 2 corresponds to the set of words tht finish in x 1. We wnt to study the uniform q oservility of K wrt L, Σ 1 nd Σ 2. Let s strt with q = 1. According to the definition of uniform q oservility we hve to consider ll possile words u w 1 L of unitry length. This is equivlent to consider n ritrry word w (K 1 + K 2 ) followed y ny word u of length 1. Since ll words w K 1 terminte in x 0, then only two words of unitry length my occur fter w, nmely u 1 = nd u 2 =. Clerly it is wu 1 K nd wu 2 L \ K, therefore it should e f w (P 1 (u 1 ),P 2 (u 1 )) = f w (,ε) = 1 nd f w (P 1 (u 2 ),P 2 (u 2 )) = f w (ε,) = 0. Let us now consider n ritrry word w K 2, i.e., n ritrry word tht termintes in x 1. Strting from x 1 the only dmissile words of length 1 re u 3 = nd u 4 =. In such cse oth wu 3 nd wu 4 re in K, thus it should e nd f w (P 1 (u 3 ),P 2 (u 3 )) = f w (,ε) = 1 f w (P 1 (u 4 ),P 2 (u 4 )) = f w (ε,) = 1. This enles us to conclude tht K is uniformly 1 oservle wrt L, Σ 1 nd Σ 2. Note tht the sme conclusion cn e drwn using the notion of uniform 1-oservility sed on equivlence clsses. Indeed, oth u 1 nd u 2, nd u 3 nd u 4 re distinguishle. Let us now study uniform 2 oservility. As discussed ove, if w K 1 we should consider ll words u L of length 2 tht cn e generted from x 0, i.e., u {,,,}. However, nd re clerly equivlent ut w K while w L \ K. Thus K is not uniformly 2 oservle wrt L, Σ 1 nd Σ 2. In other terms, we cn sy tht function f w stisfying the if nd only if condition in (2) could not e defined. Indeed it should simultneously e nd f w (P 1 (),P 2 ()) = f w (,) = 1 f w (P 1 (),P 2 ()) = f w (,) = 0, i.e., f w should ssume different vlues in correspondence to the sme rguments. The following result trivilly follows from Definition 3.2. Proposition 3.6: If K is uniformly q oservle wrt L nd set of lphets Σ i, i = 1,...,n, then it is lso uniformly (q 1)-oservle wrt them. Proof: Follows y the fct tht the sme f w function used in the cse of uniform q oservility cn e used in the cse of uniform (q 1) oservility, simply restricting its rguments to words of length q 1 rther thn q. This implies tht, if lnguge is uniformly q oservle for some finite q > 1, then it is lso uniformly 1-oservle. A simple condition under which uniform 1-oservility is gurnteed is now given. Proposition 3.7: Let us consider set of lphets Σ i, i = 1,...,n, such tht Σ 1... Σ n = Σ. Any lnguge K L Σ is uniformly 1 oservle wrt to L nd Σ i, i = 1,...,n. Proof: Since Σ 1... Σ n = Σ, there exists t lest one site tht cn detect ny event e tht hs occurred. If the function f w hs een defined for word w, the new function simply ssigns the vlue 1 if we K nd 0 otherwise. Being possile to define the function for ny oserved event, the system is uniformly 1 oservle. 380

4 On the contrry, uniform 1-oservility is no more ensured if one or more events in Σ re not oservle y ll the sites. Let n ˆΣ = Σ \ Σ i (4) i=1 denotes the set of events tht re oservle y no site. If ˆΣ then K L Σ cn e not uniformly 1-oservle wrt L nd Σ i s, even if ll words formed y the conctention of word in K nd word in ˆΣ re still in K, i.e., K ˆΣ L K. A. Regulr lnguges Prticulrly interesting results cn e proved if K nd L re prefix-closed regulr lnguges. First, it cn e shown tht nlyzing uniform q-oservility is decidle prolem. Then, simple criterion cn e given to estlish if certin sequence is legl, sed on DFA. Proposition 3.8: Let us consider set of lphets Σ i, i = 1,...,n, such tht Σ 1... Σ n = Σ. Let K nd L e two prefix-closed lnguges such tht K L Σ. If K nd L re regulr lnguges, the uniform q oservility of K wrt L nd Σ i is decidle for ny finite q N. Proof: According to the Myhill-Nerode Theorem [12], ech regulr lnguge L hs finite index, i.e., the set of lnguges {w 1 L w L} is finite. This implies tht it is sufficient to check the existence of function f w for finite numer of words w over finite suset of Σ 1 Σ n, i.e., the set of projections on Σ i s, i = 1,...,n, with length less thn or equl to q. Thus the prolem is decidle. From the Myhill-Nerode Theorem [12], it follows tht to ech regulr lnguge cn e uniquely ssocited miniml DFA generting it, nmely DFA with the fewest numer of sttes. Now, let L nd K e two regulr prefix-closed lnguges, where K represents the legl ehvior nd L represents the set of ll possile ehviors, including legl nd illegl ehvior. Let G L nd G K e the miniml DFA with generted lnguges L(G L ) nd L(G K ), respectively. Being such lnguges prefix-closed, mrked lnguges coincide with regulr lnguges. Strting from G L nd G K, we wnt to give procedure to construct unique DFA H where some sttes re good nd others re d. The strings terminting in good stte represent legl ehvior nd should elong to K. On the contrry, the strings terminting in d stte represent the foridden lnguge, i.e., should elong to L \ K. The min steps of the procedure to construct such DFA cn e summrized y Algorithm 1. The following property is stisfied y the DFA H uilt using the ove procedure. Proposition 3.9: Let H e the utomton uilt ccording to Algorithm 1, strting from two prefix-closed regulr lnguges K nd L. All strings tht finish in n unmrked stte re in K. All strings tht finish in mrked stte re in L \ K. Algorithm 1 Construction of the DFA H Let G K = (X,E,δ,x 0,X m ) e DFA where X, E, δ nd x 0 re the sme of G K nd X m =. Add new mrked stte to G K tht hs self-loop contining ll events in E. Add rcs leled E \ {e E δ(x,e)!} from ech stte x X to this new stte. Let H = G L G K e the utomton otined y the prllel composition of utomton G L nd utomton G K. Proof: Simply follows from the rules of construction of H using Algorithm 1. Note tht it cn never occur tht string finishes in n unmrked stte pssing through mrked stte. Indeed, y the rules of construction of H, if string reches mrked stte, ll events tht follow, never llow the stte to e chnged. Uniform q oservility cn e studied ccording to Algorithm 2. Algorithm 2 Uniform q-oservility Let X = {X \ X m } e the set of unmrked (good) sttes of H. while X = do Choose ritrrily one stte x X i 1. while i q do Compute the set of words of length i tht cn e generted y H strting from x. Prtition such words in equivlence clsses W j s. if some equivlence clss W : W K ut it is not W K then exit. {The lnguge K is not uniformly q oservle wrt L nd Σ i s}. else i = i + 1 end if end while X X \ {x} end while Exmple 3.10: Let L nd K e the two lnguges lredy considered in Exmple 3.5, nmely, L = ( + ) nd K = K 1 + K 2 where K 1 = ( ) nd K 2 = ( ). The DFA in Fig. 1 cn e otined pplying Algorithm 1 where G K is composed y x 0 nd x 1 while G L lso includes x 2. Therefore, ll strings strting from x 0 voiding x 2 elong to K. However, if string finishes in x 2 it elongs to L \K, i.e., it is d word. To study uniform 1-oservility we initilly ssume X = {x 0,x 1 }. Let us first focus on x 0. The set of words of unitry length strting from x 0 is {,}: nd oviously elong to different equivlence clsses, i.e., they re distinguishle, thus we continue the lgorithm. In prticulr, we repet the sme resoning for x 1 nd we conclude tht K is uniformly 381

5 1-oservle. Using similr rguments we conclude tht the lnguge K is not uniformly 2-oservle. x 1 x 2 x 3 c,, c IV. q DIAGNOSABILITY In this section we introduce new property, strictly relted to uniform q-oservility, tht we denote q-dignosility. Such property still concerns the possiility of estlishing if word given y the conctention of legl word w, nd word u on which we receive some informtion, is legl s well. The min difference of q-dignosility wrt q-oservility is on the informtion on u. We still ssume the presence of n oservers, ech one with its own lphet, nd coordintor. However, in the cse of q-dignosility oservtions re sent to the coordintion y single sites in the form of series of finite numer m of synchronized words, rther thn single word. Definition 4.1: Let Σ e finite lphet, nd Σ i Σ, with i = 1,...,n, e n su-lphets of Σ. Let L nd K e two prefix closed lnguges such tht K L Σ. The lnguge K is clled q dignosle wrt L nd Σ i, i = 1,...,n, if for ll m N nd sequence of m words (u 1,u 2,...,u m ) such tht u 1 u 2...u m L nd u i q, i = 1,...,m, it holds u 1 u 2...u m K f (P 1 (u 1 ),...,P n (u 1 ),...,...,P 1 (u m ),...,P n (u m )) = 1. (5) The notion of equivlence cn e esily extended to the cse of q dignosility. Definition 4.2: Let Σ e finite lphet, nd Σ i Σ, with i = 1,...,n, e n su-lphets of Σ. Let L nd K e two prefix closed lnguges such tht K L Σ. Consider two sequences of word (u 1,u 2,...,u m ) nd (v 1,v 2,...,v m ), where u 1 u 2 u m,v 1 v 2 v m L. The two sequences re dignosle equivlent, or simply equivlent, if P i (v j ) = P i (u j ) for ll i = 1,...,n nd ll j = 1,...,m. We denote this (u 1,u 2,...,u m ) (v 1,v 2,,v m ). Finlly, we sy tht two sequences tht re not equivlent re distinguishle. Oviously, if oth lnguges L nd K re regulr, y Algorithm 1 the nlysis of q dignosility cn e crried out using DFA where finl sttes correspond to d sttes, nd sequences tht terminte in them re not legl. Moreover, the following impliction holds. Proposition 4.3: If lnguge K is q dignosle wrt to lnguge L nd set of lphets Σ 1,...,Σ n, then it is lso q oservle wrt L nd Σ 1,...,Σ n. Proof: It is consequence of Definitions 3.2 nd 4.1. Indeed, consider ny word w K nd write it s w = u 1 u 2 u k where u i q for ll i. Then for ny word u w 1 L with u q we cn define function f w in Definition 3.2 in terms of function x 0 Fig. 2. c x 4 x 5 x 6 The DFA considered in Exmple 4.4 where q 7 is the d stte. f in Definition 4.1 s follows: f w (P 1 (u),...,p n (u)) = f (P 1 (u 1 ),...,P n (u 1 ),...,P 1 (u k ),...,P n (u k ), P 1 (u),...,p n (u)) showing tht K is uniformly q oservle wrt L nd Σ i s. On the contrry, q-oservility does not imply q- dignosility s shown y the following exmple. Although, the results presented ove hold for oth regulr nd non regulr lnguges, for the ske of simplicity the following exmple dels with regulr lnguges. Exmple 4.4: Let L e the lnguge generted y the DFA in Fig. 2 where x 0 is the initil stte, while K is the lnguge generted y the sme DFA with the sme initil stte, ut neglecting x 7, tht is the only d stte. Finlly, ssume three sites with lphets Σ 1 = {}, Σ 2 = {} nd Σ 3 = {c}, respectively. As shown in the following items, K is uniformly 3 oservle wrt L nd Σ i, i = 1,2,3. Let w = ε. All possile words u w 1 L with u = 3 finish in good sttes, without pssing through d stte. In prticulr, u 1 = termintes in x 3 nd u 2 = c in x 6. Therefore, it is f w (P 1 (u 1 ),P 2 (u 1 ),P 3 (u 1 )) = f w (,,ε) = 1 nd f w (P 1 (u 2 ),P 2 (u 2 ),P 3 (u 2 )) = f w (,,c) = 1. Let w =. Two possile sequence of length 3 my follow w, nmely u 3 = c w 1 K nd u 4 = w 1 K. However c, thus they cn e distinguished y the coordintor ssuming f w (P 1 (u 3 ),P 2 (u 3 ),P 3 (u 3 )) = f w (ε,,c) = 0 nd f w (P 1 (u 4 ),P 2 (u 4 ),P 3 (u 4 )) = f w (,,ε) = 1. Let w =. As in the ove item, there re two sequences of length 3 tht cn follow w, nmely u 5 = cc w 1 K nd u 6 = c w 1 K. However, these strings cn e distinguished eing cc c. Let w =. In this cse, there re 4 possile strings of length 3 tht my follow w, one in w 1 K, nmely u 7 =, the other three not in w 1 K, nmely, c, c nd cc. However, the word finishing in good stte cn e distinguished y ll words finishing in the d stte since it does not contin event c, while ll the others do. c x 7 382

6 Let w =. Also in this cse the good word (c) cn e distinguished y the d ones (cc,cc,ccc) since it only contins one c, while the others contin t lest two c. Let w =. Also in this cse the good word cn e distinguished y the d ones since it does not contin c, while ll the d do. Let w = c. The sme s in previous cse: if one c is oserved y Σ 3, the coordintor cn conclude tht the d stte x 7 is reched. Note tht no other words w need to e considered since the previous ones cover ll good sttes of the DFA. Moreover we do not need to consider words u of length smller thn 3 since y Proposition 3.6 uniform q oservility implies uniform (q 1)-oservility. Using similr rguments, we cn prove tht K is not 4 oservle. In prticulr, the two sequences c c my follow w = ε ut c w 1 K while c w 1 K. Thus no function f w my e defined to distinguish them. Finlly, let us prove tht even if K is 3 oservle, it is not 3 dignosle. Indeed, let us ssume u 1 =, u 2 = c, v 1 = nd v 2 = c. Since P 1 () = P 1 () =, P 2 () = P 2 () =, P 3 () = P 3 () = ε, P 1 (c) = P 1 (c) = ε, P 2 (c) = P 2 (c) = nd P 3 (c) = P 3 (c) = c then v 1 v 2 u 1 u 2. Being v 1 v 2 K nd u 1 u 2 K it will e impossile for the coordintor to distinguish mong them. The following result provides useful criterion to the nlysis of q-dignosility. Proposition 4.5: Let K e q oservle wrt given lnguge L nd set of lphets Σ i s. If fter ny ˆq q steps the stte is uniquely determined, q oservility = q dignosility. Proof: If fter ˆq q steps the stte is uniquely determined nd K is q oservle it is lwys possile to sy if the conctented word is in K. Using this rgument for finite numer of susequences, the sttement follows. Exmple 4.6: Let us consider gin the cse of Exmple 4.4 whose corresponding DFA H is tht reported in Fig. 2. As lredy proved K is not 3 dignosle even if it is 3 oservle. This result is consistent with Proposition 4.5. Indeed, if we consider u =, the first site oserves nd the second one oserves. Thus the current stte is not uniquely determined: oth x 2 nd x 5 re possile. We finlly present the following result. Proposition 4.7: Let us consider set of lphets Σ i, i = 1,...,n, such tht Σ 1... Σ n = Σ. Let K nd L e two prefix-closed lnguges such tht K L Σ. If K nd L re regulr lnguges, the q dignosility of K wrt L nd Σ i s is decidle for ny finite q N. Proof: We just give sketch of the proof. Since we re tking into ccount regulr lnguges we cn equivlently spek out DFA H constructed with Algorithm 1 with stte set X. To determine if the property holds for m = 1 we need to check ll words u 1 of length less thn or equl to q tht cn e generted y the DFA strting from the initil stte x 0. Consider the cse m = 2. After the first synchroniztion is performed, we do not know the current stte of the DFA ut we know it elongs to set X(u 1 ) = X(P 1 (u 1 ),...,P n (u 1 )) X nd the set Ξ 1 = {X(u 1 ) u 1 K, u 1 q} is finite. Now, for ll possile X 1 Ξ 1 we consider the the lnguge L(H X 1 ) = x X1 L(H x) where L(H x) denotes the lnguge generted y the utomton with initil stte x nd we need tho check ll words of length less thn or equl to q in this lnguge. As m is incresed one my hve lrger sets Ξ k to check ut eventully Ξ k = Ξ k+1 ecuse for ll k 1 it holds Ξ k 2 X. Hence there re t most 2 X lnguges L(H X k ) to consider nd the prolem is decidle. V. DYNAMIC OBSERVABILITY AND DIAGNOSABILITY In this section we focus on regulr prefix-closed lnguges nd consider prolem tht my occur in severl rel pplictions. We ssume tht the ctul stte of the system is known, nd we wnt to develop n lgorithm to determine the instnts t which it is necessry to synchronize the oservtions coming from the different sites, so tht the d stte is identified exctly s soon s it is reched. Oviously, the lst instnt t which synchroniztion occurs should e equl to the length of the shortest pth (denoted y k) from the ctul stte to d stte. Furthermore, ccording to Proposition 4.5, the stte in which the system is fter k steps should e uniquely determined such tht it is still possile to perform dignosis. The proposed lgorithm is lso sed on the following quite intuitive result. Proposition 5.1: Two consecutive synchroniztion performed fter q 1 nd q 2 steps, respectively, led to numer of consistent words/sttes smller thn unique synchroniztion fter q 1 + q 2 steps. Proof: Follows from the trivil considertion tht n intermedite dditionl synchroniztion cn only led to dditionl informtion, thus to reduced numer of consistent words/sttes. Let us now consider two regulr lnguges L nd K L generted y two DFA G L nd G K, respectively. Given n initil stte, Algorithm 3 computes the instnts t which it is necessry to synchronize to gurntee tht d stte is identified exctly in the instnt in which it is reched, nd in the cse tht no d stte is reched fter numer of steps equl to the length of the shortest pth from the current stte to d stte, the new stte is uniquely identified. Remrk 5.2: Algorithm 3 ensures tht the set of consistent sttes fter the lst synchroniztion t the k-th step is singleton, i.e., the ctul stte of the system is known fter the lst synchroniztion. This is trivil consequence of the fct, tht fter k steps ll equivlence clsses re singleton. On the contrry, the set of consistent sttes fter the intermedite synchroniztion is in generl not singleton. Exmple 5.3: Let us pply Algorithm 3 to the DFA in Fig. 3 ssuming Σ 1 = {}, Σ 2 = {} nd x 12 s the d stte. 383

7 Algorithm 3 Synchroniztion k length of the shortest pth from the ctul stte to d stte. Let I = {k} e the set of indices of steps t which we hve to synchronize. Compute ll words of length k nd split them in equivlence clsses W j with the sme projections on Σ i, i = 1,...,n. while W j 1 for ll j do Choose rndomly one word w W Compute n index p w such tht if new intermedite synchroniztion occurs fter p steps, w will not e equivlent to ny word in W \ { w}. I I {p}. Updte the set of equivlence clsses W j tking into ccount the new synchroniztion. end while x 11 x 10 Fig. 3. x 0 x 9 x 1 x 5 x 6 x 7 x 2 x 3 x 8 x 4 x 12, The DFA considered in Exmple 5.3 where x 12 is the d stte. The length of the shortest pth from x 0 to the d stte x 12 is k = 5. Hence, we intilly tke I = {5}. The set of strings of length k = 5 strting from x 0 is {,,,,}. Therefore, we cn define two equivlence clsses: W 1 = {,,} nd W 2 = {,}. In fct, P 1 () = P 1 () = P 1 () = nd P 2 () = P 2 () = P 2 () =. We rndomly choose n equivlence clss with crdinlity greter thn 1, e.g., W = W1. We rndomly choose w = nd consider p = 1. Thus w = ū v with ū = nd v =. Indeed, P 1 (ū) = while the projection of the first event of ll other sequences in W is equl to the empty string, thus the new synchroniztion mkes w not equivlent to ll the sequences in W \ { w}. Let I = {1,5}. The new equivlence clsses ssuming synchroniztion t steps 1 nd 5 re: W 1 = {}, W 1 = {,}, W 2 = {} nd W 2 = {}. We rndomly choose new equivlence clss of crdinlity greter thn 1, e.g., W = W 1. We rndomly choose w = nd consider p = 2. Let I = {1,2,5}. It is esy to verify tht the new equivlence clsses re singleton nd the lgorithm stops. Therefore, strting from x 0, in order to e le to uniquely identify the stte fter 5 steps (the length of the shortest pth to the d stte x 12 ) two dditionl synchroniztion should e performed. One fter one step, the second one fter one more step, nd the lst third one fter 3 further steps. Let us remrk tht this does not imply tht fter the two intermedite steps the stte is uniquely determined, while this is ensured fter the lst synchroniztion t step 5. At step 5, the lgorithm should e run gin considering s initil stte the new one tht hs een ctully reched fter the occurrence of 5 events. VI. CONCLUSIONS This pper dels with the prolem of estlishing if given ehvior is legl, sed on decentrlized oservtion performed y finite numer of sites, who re only le to oserve suset of the possile events. The sites trnsmit their oservtion to coordintor who tkes the decision concerning legcy of the occurred word. Two different properties hve een defined, nmely q oservility nd q dignosility, tht differ for the criterion used to synchronize the different sites. Finlly, n lgorithm to compute the instnts in which synchroniztion should occur, ssuming tht the initil stte is known, hs een given. It gurntees tht the occurrence of the n illegl word is detected s soon s it hs occurred. REFERENCES [1] S. Tripkis, Undecidle prolems of decentrlized oservtion nd control on regulr lnguges, Informtion Processing Letters, vol. 90, no. 1, pp , [2] M. Smpth, R. Sengupt, S. Lfortune, K. Sinnmohideen, nd D. Teneketzis, Dignosility of Discrete-Event Systems, IEEE Trnsctions on Automtic Control, vol. 40, no. 9, pp , [3] P. E. Cines, R. Greiner, nd S. Wng, Dynmicl logic oservers for finite utomt, in Proc. of 27 th Conference of Decision nd Control, 1988, pp [4] P. E. Cines nd S. Wng, Clssicl nd logic sed regultor design nd its complexity for prtilly oserved utomt, in Proc. of 28 th Conference on Decision nd Control, 1989, pp [5] C. M. Özveren nd A. S. Willsky, Oservility of discrete event dynmic systems, IEEE Trnsctions on Automtic Control, vol. 35, no. 7, p , [6] R. Kumr, V. Grg, nd S. I. Mrkus, Predictes nd predicte trnsformers for supervisory control of discrete event dynmicl systems, IEEE Trnsctions on Automtic Control, vol. 38, no. 2, p , [7] A. Soori nd C. Hdjicostis, Opcity-enforcing supervisory strtegies for secure discrete event systems, in Proc. of the 47th IEEE Conference on Decision nd Control, 2008, pp [8] A. Soori nd C. N. Hdjicostis, Opcity verifiction in stochstic discrete event systems, in Proc. of the 49th IEEE Conference on Decision nd Control, 2010, pp [9] J. Dureil, P. Drondeu, nd H. Mrchnd, Supervisory control for opcity, IEEE Trnsctions on Automtic Control, vol. 55, no. 5, pp , [10] G. Brrett nd S. Lfortune, Decentrlized supervisory control with communicting controllers, IEEE Trns. on Automtic Control, vol. 45, no. 9, pp , Sept [11] S. Ricker nd B. Cillud, Mind the gp: Expnding communiction options in decentrlized discrete-event control, in 46th IEEE Conf. on Decision nd Control, Decemer 2007, pp [12] J. Hopcroft, R. Motwni, nd J. Ullmn, Introduction to Automt Theory, Lnguges nd Computtion (Third Edition). Boston, MA, USA: Addison-Wesley Longmn Pulishing Co., Inc.,

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Verification of Initial-State Opacity in Petri Nets

Verification of Initial-State Opacity in Petri Nets Verifiction of Initil-Stte Opcity in Petri Nets Yin Tong 1, Zhiwu Li, Crl Setzu 3 nd Alessndro Giu 4 Astrct A Petri net system is sid to e initil-stte opque if its initil stte remins opque to n externl

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

Bases for Vector Spaces

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

More information

Lecture 08: Feb. 08, 2019

Lecture 08: Feb. 08, 2019 4CS4-6:Theory of Computtion(Closure on Reg. Lngs., regex to NDFA, DFA to regex) Prof. K.R. Chowdhry Lecture 08: Fe. 08, 2019 : Professor of CS Disclimer: These notes hve not een sujected to the usul scrutiny

More information

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Let's start with an example:

Let's start with an example: Finite Automt Let's strt with n exmple: Here you see leled circles tht re sttes, nd leled rrows tht re trnsitions. One of the sttes is mrked "strt". One of the sttes hs doule circle; this is terminl stte

More information

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

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

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

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

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

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

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

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

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

CMSC 330: Organization of Programming Languages. DFAs, and NFAs, and Regexps (Oh my!)

CMSC 330: Organization of Programming Languages. DFAs, and NFAs, and Regexps (Oh my!) CMSC 330: Orgniztion of Progrmming Lnguges DFAs, nd NFAs, nd Regexps (Oh my!) CMSC330 Spring 2018 Types of Finite Automt Deterministic Finite Automt (DFA) Exctly one sequence of steps for ech string All

More 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

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

Fundamentals of Computer Science

Fundamentals of Computer Science Fundmentls of Computer Science Chpter 3: NFA nd DFA equivlence Regulr expressions Henrik Björklund Umeå University Jnury 23, 2014 NFA nd DFA equivlence As we shll see, it turns out tht NFA nd DFA re equivlent,

More 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

CS103 Handout 32 Fall 2016 November 11, 2016 Problem Set 7

CS103 Handout 32 Fall 2016 November 11, 2016 Problem Set 7 CS103 Hndout 32 Fll 2016 Novemer 11, 2016 Prolem Set 7 Wht cn you do with regulr expressions? Wht re the limits of regulr lnguges? On this prolem set, you'll find out! As lwys, plese feel free to drop

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

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

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

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

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

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

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

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

CSCI 340: Computational Models. Transition Graphs. Department of Computer Science

CSCI 340: Computational Models. Transition Graphs. Department of Computer Science CSCI 340: Computtionl Models Trnsition Grphs Chpter 6 Deprtment of Computer Science Relxing Restrints on Inputs We cn uild n FA tht ccepts only the word! 5 sttes ecuse n FA cn only process one letter t

More information

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

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

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

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

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

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

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

Quantum Nonlocality Pt. 2: No-Signaling and Local Hidden Variables May 1, / 16

Quantum Nonlocality Pt. 2: No-Signaling and Local Hidden Variables May 1, / 16 Quntum Nonloclity Pt. 2: No-Signling nd Locl Hidden Vriles My 1, 2018 Quntum Nonloclity Pt. 2: No-Signling nd Locl Hidden Vriles My 1, 2018 1 / 16 Non-Signling Boxes The primry lesson from lst lecture

More information

Review of Gaussian Quadrature method

Review of Gaussian Quadrature method Review of Gussin Qudrture method Nsser M. Asi Spring 006 compiled on Sundy Decemer 1, 017 t 09:1 PM 1 The prolem To find numericl vlue for the integrl of rel vlued function of rel vrile over specific rnge

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

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

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

BACHELOR THESIS Star height

BACHELOR THESIS Star height BACHELOR THESIS Tomáš Svood Str height Deprtment of Alger Supervisor of the chelor thesis: Study progrmme: Study rnch: doc. Štěpán Holu, Ph.D. Mthemtics Mthemticl Methods of Informtion Security Prgue 217

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

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

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

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