Synchronization of regular automata

Size: px
Start display at page:

Download "Synchronization of regular automata"

Transcription

1 Synhrniztin f regulr utmt Didier Cul IM CNRS Université Pris-Est ul@univ-mlv.fr strt. Funtinl grph grmmrs re finite devies whih generte the lss f regulr utmt. We rell the ntin f synhrniztin y grmmrs, nd fr ny given grmmr we nsider the lss f lnguges regnized y utmt generted y ll its synhrnized grmmrs. The synhrniztin is n utmtn-relted ntin: ll grmmrs generting the sme utmtn synhrnize the sme lnguges. When the synhrnizing utmtn is unmiguus, the lss f its synhrnized lnguges frms n effetive len lger lying etween the lsses f regulr lnguges nd unmiguus ntext-free lnguges. We dditinlly prvide suffiient nditins fr suh lsses t e lsed under ntentin nd its itertin. Intrdutin n utmtn ver sme lphet n simply e seen s finite r untle set f lelled rs tgether with tw sets f initil nd finl verties. Suh n utmtn regnizes the lnguge f ll wrds lelling n epting pth, i.e. pth leding frm n initil t finl vertex. It is well-knwn tht finite utmt regnize the regulr lnguges. By pplying si nstrutins t finite utmt, we tin the nie lsure prperties f regulr lnguges, nmely their lsure under len pertins, ntentin nd its itertin. Fr instne the synhrniztin prdut nd the determiniztin f finite utmt respetively yield the lsure f regulr lnguges under intersetin nd under mplement. This ide n e extended t mre generl lsses f utmt. In this pper, we will e interested in the lss f regulr utmt, whih regnize ntextfree lnguges nd re defined s the (generlly infinite) utmt generted y funtinl grph grmmrs [C 07]. Regulr utmt f finite degree re ls preisely thse utmt whih n e finitely dempsed y distne, s well s the regulr restritins f trnsitin grphs f pushdwn utmt [MS 85], [C 07]. Even thugh the lss f ntext-free lnguges des nt enjy the sme lsure prperties s regulr lnguges, ne n define sulsses f ntext-free lnguges whih d, using the ntin f synhrniztin. The ntin f synhrniztin ws first defined etween grmmrs [CH 08]. grmmr S is synhrnized y grmmr R if fr ny epting pth µ f (the grph generted y) S, there exists n epting pth λ f R with the sme lel u suh tht λ nd µ re synhrnized: fr every prefix v f u, the prefixes

2 f λ nd µ lelled y v led t verties f the sme level (where the level f vertex is the miniml numer f rewriting steps neessry fr the grmmr t prdue it). lnguge is synhrnized y grmmr R if it is regnized y n utmtn generted y grmmr synhrnized y R. fundmentl result is tht tw grmmrs generting the sme utmtn yield the sme lss f synhrnized lnguges [C 08]. This wy, the ntin f synhrniztin n e trnsferred t the level f utmt: fr regulr utmtn, the fmily Syn() is the set f lnguges synhrnized y ny grmmr generting. By extending the ve-mentined nstrutins frm finite utmt t grmmrs, ne n estlish severl lsure prperties f these fmilies f synhrnized lnguges. The sum f tw grmmrs nd the synhrniztin prdut f grmmr with finite utmtn respetively entil the lsure f Syn() under unin nd under intersetin with regulr lnguge fr ny regulr utmtn. The (level preserving) synhrniztin prdut f tw grmmrs yields the lsure under intersetin f Syn() when is unmiguus i.e. when ny tw epting pths f hve distint lels. Nrmlizing f grmmr int grmmr nly ntining rs nd then determinizing it yields, fr ny unmiguus utmtn, the lsure f Syn() under mplement reltive t L(). This nrmliztin ls llws us t express Syn() in the se f n infinite degree grph, y perfrming the e-lsure f Syn(H) fr sme finite degree utmtn H using n extr lel e. finl useful nrmliztin nly llws the presene f initil nd finl verties t level 0. It yields suffiient nditins fr the lsure f lsses f synhrnized lnguges under ntentin nd its itertin. In Setin, we rell the definitin f regulr utmt. In the next setin, we summrize knwn results n the synhrniztin f regulr utmt [C 06], [NS 07], [CH 08], [C 08]. In the lst setin, we present simpler nstrutin fr the lsure under mplement f Syn() fr unmiguus [C 08] nd present new results, espeilly suffiient nditins fr the lsure f Syn() under ntentin nd its itertin. Regulr utmt n utmtn is lelled riented simple grph with input nd utput verties. It regnizes the set f wrds lelling the pths frm n input t n utput. Finite utmt re utmt hving finite numer f verties, they regnize the lss f regulr lnguges. Regulr utmt re the utmt generted y funtinl grph grmmrs, they regnize the lss f ntext-free lnguges. key result, riginlly due t Muller nd Shupp, identifies the regulr utmt f finite degree with the utmt finitely generted y distne. n utmtn ver n lphet (finite set f symls) T f terminls is just set f rs lelled ver T ( simple lelled riented grph) with initil nd finl verties. We use tw symls nd t mrk respetively the initil nd finl verties. Mre preisely n utmtn is defined y T V V {, } V

3 where V is n ritrry set suh tht the set f verties V = { s V T t V (, s, t) (, t, s) } f is finite r untle. ny triple (, s, t) is n r lelled y frm sure s t gl t ; it is identified with the lelled trnsitin s t r diretly s t if is understd. ny pir (, s) is lured vertex s y {, } ls written s. vertex is initil (resp. finl) if it is lured y (resp. ) i.e. s (resp. s ). n exmple f n utmtn is given y = { n n + n 0 } { n x n n > 0 } { n y n n > 0 } { x n+ x n n > 0 } { y n+ y n n > 0 } {0, y} { x n n > 0 } { y n+ n 0 } nd is represented (up t ismrphism) elw. Figure. n utmtn. n utmtn is thus simple vertex- nd r-lelled grph. hs finite degree if fr ny vertex s, the set { t (s t t s) } f its djent verties is finite. Rell tht (s 0,, s,..., n, s n ) fr n 0 nd s 0 s... s n n s n is pth frm s 0 t s n lelled y u =... n ; u u we write s 0 = s n r diretly s 0 = s n if is understd. n epting pth is pth frm n initil vertex t finl vertex. n utmtn is unmiguus if tw epting pths hve distint lels. The utmtn f Figure. is unmiguus. The lnguge regnized y n utmtn is the set L() f ll lels f its epting pths: L() = { u T s, t (s = u t s, t ) }. Nte tht ε L() if there exists vertex s whih is initil nd finl: s, s. The utmtn f Figure. regnizes the lnguge L() = { m n 0 < n m } { n n n > 0 } { n n 0 }. The lnguges regnized y finite utmt re the regulr lnguges ver T. We generlize finite utmt t regulr utmt using funtinl grph grmmrs. T define grph grmmr, we need t extend n r (resp. grph) t hyperr (resp. hypergrph). lthugh suh n extensin is nturl, this my explin why funtinl grph grmmrs re nt very widespred t the mment. But we will see in the lst setin tht fr ur purpse, we n restrit t grmmrs using nly rs. Let F e set f symls rnked y mpping : F IN ssiting t eh f F its rity (f) 0 suh tht F n = { f F (f) = n } is untle fr every n 0 with T F nd, F. hypergrph is suset f n 0 F n V n where V is n ritrry set. ny tuple (f, s,..., s (f) ), ls written fs...s (f), is hyperr f lel f nd

4 f suessive verties s,..., s (f). We dd the nditin tht the set f verties V is finite r untle, nd the set f lels F is finite. n r is hyperr fst lelled y f F nd is ls dented y s f t. Fr n, hyperr fs...s n is depited s n rrw lelled f nd suessively linking s,..., s n. Fr n = nd n = 0, it is respetively depited s lel f (lled lur) n vertex s nd s n islted lel f lled nstnt. This is illustrted in the next figures. Fr instne the fllwing hypergrph: = {4, 5, 5, 5 3, 6 3, 4, 6, 456} with, F nd F 3, is represented elw. 3 Figure. finite hypergrph. (lured) grph is hypergrph whse lels re nly f rity r : F F F. n utmtn ver the lphet T is grph with set f lels F T {, }. We n nw intrdue funtinl grph grmmrs t generte regulr utmt. grph grmmr R is finite set f rules f the frm fx...x (f) H where fx...x (f) is hyperr f lel f lled nn-terminl jining pirwise distint verties x... x (f) nd H is finite hypergrph. We dente y N R the set f nn-terminls f R i.e. the lels f the left hnd sides, y T R = { f F N R H Im(R), f F H } the terminls f R i.e. the lels f R whih re nt nn-terminls, nd y F R = N R T R the lels f R. We use grmmrs t generte utmt hene in the fllwing, we my ssume tht T R T {, }. Similrly t ntext-free grmmrs (n wrds), grph grmmr hs n xim: n initil finite hypergrph. T indite this xim, we ssume tht ny grmmr R hs nstnt nn-terminl Z N R F 0 whih is nt lel f ny right hnd side; the xim f R is the right hnd side H f the rule f Z : Z H Z F K fr ny K Im(R). Strting frm the xim, we wnt R t generte unique utmtn up t ismrphism. S we finlly ssume tht ny grmmr R is funtinl mening tht there is nly ne rule per nn-terminl: if (X, H), (Y, K) R with X() = Y () then (X, H) = (Y, K). Fr ny rule fx...x (f) H, we sy tht x,..., x (f) re the inputs f f, nd V H [H] is the set f utputs f f. T wrk with these grmmrs, it is simpler t ssume tht ny grmmr R is terminl-utside [C 07]: ny terminl r r lur in right hnd side links t t lest ne nn input vertex: H (T R V X V X T R V X ) = fr ny rule (X, H) R. We will use upper-se letters, B, C,... fr nn-terminls nd lwer-se letters,,... fr terminls. Here is n exmple f (funtinl grph) grmmr R : 4 6 5

5 Z ; B ; B 3 Figure.3 (funtinl grph) grmmr. Fr the previus grmmr R, we hve N R = {Z,, B} with Z the xim nd () = (B) = 3, T R = {,,, } nd,, 3 re the inputs f nd B. iven grmmr R, the rewriting reltin is the inry reltin etween R hypergrphs defined s fllws: M rewrites int N, written M R N, if we n hse nn-terminl hyperr X = s...s p in M nd rule x...x p H in R suh tht N n e tined y repling X y H in M: N = (M X) h(h) fr sme funtin h mpping eh x i t s i, nd the ther verties f H injetively t verties utside f M; this rewriting is dented y M R, X f hyperr X is extended in n vius wy t the rewriting R, E f nn-terminl hyperrs. The mplete prllel rewriting = R rewriting rding t the set f ll nn-terminl hyperrs: M= R N. The rewriting R, X f ny set E is simultneus N if M N where E is the set f ll nn-terminl hyperrs f M. We depit elw the first three steps f the prllel derivtin f the previus grmmr frm its nstnt nn-terminl Z: Z = = B = Figure.4 Prllel derivtin fr the grmmr f Figure.3. iven grmmr R, we restrit ny hypergrph H t the utmtn [H] f its terminl rs nd lured verties: [H] = H (T V H V H {, } V H ). n utmtn is generted y R (frm its xim) if elngs t the fllwing set R ω f ismrphi utmt: R ω = { n 0 [H n] Z H 0 =... H n = H n+... }. R R R Nte tht in ll generlity, we need t nsider hypergrphs with multipliities. Hwever using n pprprite nrml frm, this tehnility n e sfely mitted [C 07]. Fr instne the utmtn f Figure. is generted y the grmmr f Figure.3. regulr utmtn is n utmtn generted y (funtinl grph) grmmr. Nte tht regulr utmtn hs finite numer f nn-ismrphi nneted mpnents, nd hs finite numer f distint vertex degrees. nther exmple is given y the fllwing grmmr: Z ; R, E

6 whih genertes the fllwing utmtn: regnizing the lnguge { uũ u {, } + } where ũ is the mirrr f u. The lnguge regnized y grmmr R is the lnguge L(R) regnized y its generted utmtn: L(R) = L() fr (ny) R ω. This lnguge is well-defined sine ll utmt generted y given grmmr re ismrphi. grmmr R is n unmiguus grmmr if the utmtn it genertes is unmiguus. There is nnil wy t generte the regulr utmt f finite degree whih llws t hrterize these utmt withut the expliit use f grmmrs. This is the finite dempsitin y distne. The inverse f n utmtn is the utmtn tined frm y reversing its rs nd y exhnging initil nd finl verties: = { t s s t } { s s } { s s }. S regnizes the mirrr f the wrds regnized y. The restritin I f t suset I f verties is the sugrph f indued y I : I = (T I I {, } I). The distne d I (s) f vertex s t I is the miniml length f the undireted pths u etween s nd I : d I (s) = min{ u r I, r = s } with min( ) = +. We tke new lur # F {, } nd define fr ny integer n 0, De # n(, I) = { s di(s) n } { #s d I (s) = n } In prtiulr De # 0 (, I) = { # s s I }. We sy tht n utmtn is finitely dempsle y distne if fr eh nneted mpnent C f there exists finite nn empty set I f verties suh tht n 0 De# n(c, I) hs finite numer f nn-ismrphi nneted mpnents. Suh definitin llws the hrteriztin f the lss f ll utmt f finite degree whih re regulr. Therem.5 n utmtn f finite degree is regulr if nd nly if it is finitely dempsle y distne nd it hs nly finite numer f nn ismrphi nneted mpnents.

7 The prf is given in [C 07] nd is slight extensin f [MS 85] (ut withut using pushdwn utmt). Regulr utmt f finite degree re ls the trnsitin grphs f pushdwn utmt restrited t regulr sets f nfigurtins nd with regulr sets f initil nd finl nfigurtins. In prtiulr, regulr utmt f finite degree regnize the sme lnguges s pushdwn utmt. Prpsitin.6 The (resp. unmiguus) regulr utmt regnize extly the (resp. unmiguus) ntext-free lnguges. This prpsitin remins true if we restrit t utmt f finite degree. We nw use grmmrs t extend the fmily f regulr lnguges t len lgers f unmiguus ntext-free lnguges. 3 Synhrniztin f regulr utmt We intrdue the ide f synhrniztin etween grmmrs. The lss f lnguges synhrnized y grmmr R re the lnguges regnized y grmmrs synhrnized y R. We shw tht these fmilies f lnguges re lsed under unin y pplying the sum f grmmrs, re lsed under intersetin with regulr lnguge y defining the synhrniztin prdut f grmmr with finite utmtn, nd re lsed under intersetin (in the se f grmmrs generting unmiguus utmt) y perfrming the synhrniztin prdut f grmmrs. Finlly we shw tht ll grmmrs generting the sme utmtn synhrnize the sme lnguges. T eh vertex s f n utmtn R ω generted y grmmr R, we ssite nn negtive integer l(s) whih is the miniml numer f rewritings pplied frm the xim neessry t reh s. Mre preisely fr = n 0 [H n] with Z H 0 =...H n = H n+..., the level l(s) f s V, ls written l R (s) R R R t speify nd R,is l(s) = min{ n s V Hn }. We depit elw the levels f sme verties f the regulr utmtn f Figure. generted y the grmmr f Figure.3. This utmtn is represented y verties f inresing level: verties t sme level re ligned vertilly Figure 3. Vertex levels with the grmmr f Figure.3.

8 We sy tht grmmr S is synhrnized y grmmr R written S R, r equivlently tht R synhrnizes S written R S, if fr ny epting pth µ lel y u f the utmtn generted y S, there is n epting pth λ lel y u f the utmtn generted y R suh tht fr every prefix v f u, the prefixes f λ nd µ lelled y v led t verties f the sme level: fr (ny) R ω nd (ny) H S ω nd fr ny t 0 t... n t n with t 0, t n H, H H there exists s 0 s... n s n with s 0, s n nd l R (s i) = l S H (t i) i [0, n]. Fr instne the grmmr f Figure.3 synhrnizes the fllwing grmmr: Z ; B ; Figure 3. grmmr synhrnized y the grmmr f Figure.3. In prtiulr fr S R, we hve L(S) L(R). Nte tht the empty grmmr {(Z, )} is synhrnized y ny grmmr. The synhrniztin reltin is reflexive nd trnsitive reltin. We dente the i-synhrniztin reltin: R S if R S nd S R. Nte tht i-synhrnized grmmrs R S my generte distint utmt: R ω S ω. Fr ny grmmr R, the imge f R y is the fmily (R) = { S S R } f grmmrs synhrnized y R nd Syn(R) = { L(S) S R } is the fmily f lnguges synhrnized y R. Nte tht Syn(R) is fmily f lnguges inluded in L(R) nd ntining the empty lnguge nd L(R). Nte ls tht Syn(R) = Syn(S) fr R S. Stndrd pertins n finite utmt re extended t grmmrs in rder t tin lsure prperties f Syn(R). Fr instne the synhrniztin prdut f finite utmt is extended t ritrry utmt nd H y H = { (s, p) (t, q) s t p q } { (s, p) s p H } { (s, p) s p H } whih regnizes L( H) = L() L(H). This llws us t define the synhrniztin prdut R K f grmmr R with finite utmtn K [CH 08]. Let {q,..., q n } e the vertex set f K. T eh N R, we ssite new syml (, n) f rity () n exept tht (Z, 0) = Z, nd t eh hyperr r...r m with m = (), we ssite the hyperr (r...r m ) K = (, n)(r, q )...(r, q n )...(r m, q )...(r m, q n ). The grmmr R K ssites t eh rule (X, H) R the fllwing rule: X K [H] K { (BY ) K BY H B N R }. Exmple 3.3 Let us nsider the fllwing grmmr R : Z H ; s t generting the fllwing (regulr) utmtn : B

9 nd regnizing the restrited Dyk lnguge D ver the pir (, ) [Be 79] : L(R) = L() = D. We nsider the fllwing finite utmtn K : regnizing the set f wrds ver {, } hving n even numer f. S R K is the fllwing grmmr: p q (s,p) Z (, ) (s,q) (,p) ; (, ) (,q) (,p) (,q) (t,p) (, ) (t,q) generting the utmtn K : whih regnizes D restrited t the wrds with n even numer f. The synhrniztin prdut f grmmr R with finite utmtn K is synhrnized y R i.e. R K R nd regnizes L(R K) = L(R) L(K). Prpsitin 3.4 Fr ny grmmr R, the fmily Syn(R) is lsed under intersetin with regulr lnguge. Prpsitins.6 nd 3.4 imply the well-knwn lsure prperty f the fmily f ntext-free lnguges under intersetin with regulr lnguge. s R K is unmiguus fr R unmiguus nd K deterministi, it ls fllws Therem 6.4. f [H 78] : the fmily f unmiguus ntext-free lnguges is lsed under intersetin with regulr lnguge. nther si pertin n finite utmt is the disjint unin. This pertin is extended t ny grmmrs R nd R. Fr ny i {, }, we dente R i = R ( i { i i T } {i, i} ) in rder t distinguish the verties f R nd R. Fr (Z, H ) R nd (Z, H ) R, the sum f R nd R is the grmmr R + R = {(Z, H H )} (R {(Z, H )}) (R {(Z, H )}). S (R + R ) ω = { R ω R ω V V = } hene L(R + R ) = L(R ) L(R ). In prtiulr if S R nd S R then S + S R + R. Prpsitin 3.5 Fr ny grmmr R, Syn(R) is lsed under unin.

10 The synhrniztin prdut f regulr utmt n e nn regulr. Furthermre fr the regulr utmtn :,,,,,, the lnguges { m m n m, n 0 } nd { m n n m, n 0 } re in Syn() ut their intersetin { n n n n 0 } is nt ntext-free lnguge. The synhrniztin prdut f grmmr with finite utmtn is extended fr tw grmmrs R nd S fr generting the level synhrniztin prdut lh f their generted utmt R ω nd H S ω whih is the restritin f H t pirs f verties with sme level: lh = ( H) P fr P = { (s, p) V V H l R (s) = ls H (p) }. This prdut n e generted y grmmr R ls tht we define. Let (, B) N R N S e ny pir f nnterminls nd E [, ()] [, (B)] e inry reltin ver inputs suh tht fr ll i, j [, ()], if E(i) E(j) then E(i) = E(j), where E(i) = {j (i, j) E} dentes the imge f i [, ()] y E. Intuitively fr pir (, B) N R N S f nn-terminls, reltin E [, ()] [, (B)] is used t memrize whih entries f nd B re eing synhrnized. T ny suh, B nd E, we ssite new syml [, B, E] f rity E (where [Z, Z, ] is ssimilted t Z). T eh nn-terminl hyperr r...r m f R ( N R nd m = ()) nd eh nn-terminl hyperr Bs...s n f S (B N S nd n = (B)), we ssite the hyperr [r...r m, Bs... s n, E] = [, B, E](r, s ) E... (r, s n ) E... (r m, s ) E...(r m, s n ) E with (r i, s j ) E = (r i, s j ) if (i, j) E, nd ε therwise. The grmmr R ls is then defined y ssiting t eh (X, P) R, eh (BY, Q) S, nd eh E ( [ ()] [ (B)], ) the rule f left hnd side [X, BY, E] nd f right hnd side [P] [Q] E {[CU, DV, E ] CU P C N R DV Q D N S } with E = { (X(i), Y (j)) (i, j) E } ( V P V X ) ( VQ V Y ) nd E = { (i, j) [ (C)] [ (D)] (U(i), V (j)) E }. Nte tht R ls is synhrnized y R nd S, nd is i-synhrnnized with S fr S R. Furthermre R ls genertes lh fr R ω nd H S ω hene regnizes suset f L(R) L(S). Hwever fr grmmrs S nd S synhrnized y n unmiguus grmmr R, we hve L(S ls ) = L(S) L(S ). Prpsitin 3.6 Fr ny unmiguus grmmr R, the fmily Syn(R) is lsed under intersetin. By extending si pertins n finite utmt t grmmrs, it ppers tht grph grmmrs re t ntext-free lnguges wht finite utmt re t regulr lnguges. We will ntinue these extensins in the next setin. Let us present fundmentl result nerning grmmr synhrniztin, whih sttes tht Syn(R) is independent f the wy the utmtn R ω is generted.

11 Therem 3.7 Fr ny grmmrs R nd S suh tht R ω = S ω, we hve Syn(R) = Syn(S). Prf sketh. By symmetry f R nd S, it is suffiient t shw tht Syn(R) Syn(S). Let R R. We wnt t shw tht L(R ) Syn(S). We hve t shw the existene f S S suh tht L(S ) = L(R ). Nte tht it is pssile tht there is n grmmr S synhrnized y S nd generting the sme utmtn s R (i.e. S S nd S ω = R ω ). Let R ω = S ω. ny vertex s f hs level l R (s) rding t R nd level l S (s) rding t S. Let H R ω nd let K = ( lh) P e the utmtn tined y level synhrniztin prdut f with H nd restrited t the set P f verties essile frm nd -essile frm. The restritin y essiility frm nd -essiility frm n de dne y i-synhrnized grmmr [C 08]. By definitin f R lr, the utmtn K n e generted y grmmr R i-synhrnized t R with l R K (s, p) = lr (s) = lr H (p) fr every (s, p) V K. In prtiulr L(K) = L(R ). Let us shw tht K is generted y grmmr synhrnized y S. We give the prf fr R ω f finite degree. In tht se nd fr = N R (), l R (s) lr (t).d (s, t) fr every s, t V. Furthermre K is ls f finite degree. We shw tht K is finitely dempsle nt y distne ut rding t l S K (s) fr the verties (s, p) f K. Let n 0 nd C e nneted mpnent f K {(s,p) VK l S (s) n }. S C is fully determined y its frntier : Fr K (C) = V C V K C its interfe : Int K (C) = { s t {s, t} Fr K (C) }. C Let (s 0, p 0 ) Fr K (C) nd D e the nneted mpnent f { s l S (s) n } ntining s 0. It remins t find und independent f n suh tht l R K (s, p) lr K (t, q) fr every (s, p), (t, q) Fr K(C). Fr ny (s, p), (t, q) Fr K (C), we hve s, t Fr (D) hene d D (s, t) is unded y the integer = mx{ d Sω ()(i, j) < + N S i, j [, ()] } whse S ω () = { n 0 [H n]... () = H 0 =... H n = H n+... } S S thus it fllws tht l R K (s, p) lr K (t, q) = lr (s) lr (t) d (s, t) d D (s, t). Fr f infinite degree nd y Prpsitin 4.9, we n express Syn() s n ε-lsure f Syn(H) fr sme regulr utmtn H f finite degree using ε- trnsitins. Therem 3.7 llws t trnsfer the nept f grmmr synhrniztin t the level f regulr utmt: fr ny regulr utmtn, we n define

12 Syn() = Syn(R) fr (ny) R suh tht R ω. Let us illustrte these ides y presenting sme exmples f well-knwn sufmilies f ntext-free lnguges tined y synhrniztin. Exmple 3.8 Fr ny finite utmtn, Syn() is the fmily f regulr lnguges inluded in L(). Exmple 3.9 Fr the fllwing regulr utmtn : Syn() is the fmily f input-driven lnguges [Me 80] with pushing, ppping nd internl. s the initil vertex is nt sure f n r lelled y, Syn() des nt ntin ll the regulr lnguges. Exmple 3.0 We mplete the previus utmtn y dding n -lp n the initil vertex t tin the fllwing utmtn :, The set Syn() is the fmily f visily pushdwn lnguges [M 04] with pushing, ppping nd internl. Exmple 3. Fr the fllwing regulr utmtn : the set Syn() is the fmily f lned lnguges [BB 0] with, pushing with their rrespnding ppping letters,, nd is internl. Exmple 3. Fr the grmmr R f Figure 3., Syn(R) is the fmily f lnguges generted y the fllwing liner ntex-free grmmrs: I = P + m ( m ) with m 0 nd P { i j j i m } = Q + n ( n ) with n > 0 nd Q { i j j i n }. Fr eh regulr utmtn mng the previus exmples, Syn() is len lger rding t L() nd, exept fr the lst tw exmples, is ls lsed under ntentin nd its itertin. We nw nsider new lsure prperties f synhrnized lnguges fr regulr utmt.

13 4 Clsure prperties We hve seen tht the fmily Syn() f lnguges synhrnized y regulr utmtn is lsed under unin nd under intersetin with regulr lnguge, nd under intersetin when is unmiguus. In this setin, we nsider the lsure f Syn() under mplement reltive t L() nd under ntentin nd its trnsitive lsure. T tin these lsure prperties, we first pply grmmr nrmliztins preserving the synhrnized lnguges. These nrmliztins ls llw us t dd ε-rs t ny regulr utmtn t get regulr utmtn f finite degree with the sme synhrnized lnguges. First we put ny grmmr in n equivlent nrml frm with the sme set f synhrnized lnguges. s in the se f finite utmt, we trnsfrm ny utmtn int the pinted utmtn whih is lnguge equivlent L( ) = L(), with unique initil vertex V whih is gl f n r nd n e finl, nd with unique nn initil nd finl vertex V whih is sure f n r: = ( {, } V ) {, } { s (s, s ) } { t s (s t s ) } { s t (s t t ) } { s, t (s t s, t ) }. Fr instne, the finite degree regulr utmtn f Figure. is trnsfrmed int the fllwing infinite degree regulr utmtn : Figure 4. pinted regulr utmtn. Nte tht if is unmiguus, remins unmiguus. The pinted trnsfrmtin f regulr utmtn remins regulr utmtn whih n e generted y n 0-grmmr : nly the xim hs initil nd finl verties. Let R e ny grmmr nd, e tw symls whih re nt verties f R. Let R ω with, V. We define n 0-grmmr R generting nd preserving the synhrnized lnguges: Syn(R ) = Syn(R). First we trnsfrm R int grmmr R in whih we memrize in the nnterminls the input verties whih re linked t initil r finl verties f the generted utmtn. Mre preisely t ny N R nd I, J [, ()], we ssite new syml I,J f rity () with Z = Z,. We define the grmmr

14 R ssiting t eh (X, H) R nd I, J [, ()] the fllwing rule: I,J X [H] { B I,J Y BY H B N R } with I = { i Y (i) I Y (i) H } nd J = { j Y (j) J Y (j) H } nd we restrit the rules f R t the nn-terminls essile frm Z. Nte tht the set L(R) T f letters regnized y R n e determined s { ( I,J X, H) R ( i I t, X(i) [H] t t H) ( j J s, s X(j) s H) ( s, t, s t s, t H) } [H] [H] nd ε L(R) H Im( R) s (s, s H). T ny N R {Z} nd ny I, J [, ()], we ssite new syml I,J f rity () +, nd we define the grmmr R ntining the xim rule Z H, {, } { ε L(R) } { L(R) T } fr (Z, H) R, nd fr ny ( I,J X, H) R with Z, we tke in R the rule I,J X H I,J suh tht H I,J is the fllwing hypergrph: H I,J = ([H] {, }) V H ) { B P,Q X B P,QX H B P,Q N R } { t i I (X(i) t) s (s H s t) } [H] [H] { s j J (s X(j)) t (t H s t) } nd we put R int terminl-utside frm [C 07]. [H] [H] Exmple 4. Let us nsider the fllwing grmmr R : Z ; B B C ; C generting the fllwing utmtn (with levels f sme verties): First this grmmr is trnsfrmed int the fllwing grmmr R : Z, ;, B, B, C, C ;,, In prtiulr ε,, L(R). Then R is trnsfrmed int the grmmr R :

15 Z,, ;, B, B, C, ; C,, tht we put in terminl-utside frm: Z,, ;, B, B,, ; C, C,,,, S R genertes :,,,,,, The grmmrs R nd R synhrnize the sme lnguges. Prpsitin 4.3 Fr ny regulr utmtn with, V, the pinted utmtn remins regulr nd Syn( ) = Syn(). It fllws tht, in rder t define fmilies f lnguges y synhrniztin y regulr utmtn, we n restrit t pinted utmt. strnger nrmliztin is t trnsfrm ny grmmr R int grmmr S suh tht Syn(S) = Syn(R) nd S is n r-grmmr in the fllwing sense: S is n 0-grmmr whse ny nn-terminl N S {Z} is f rity, nd fr ny nn xim rule st H, there is n r in H f gl s r f sure t : fr ny p q, we hve p t nd q s. H We n trnsfrmed ny 0-grmmr R int i-synhrnized r-grmmr R. We ssume tht eh rule f R is f the frm... () H fr ny N R.

16 We tke new syml 0 (nt vertex f R) nd new lel i,j f rity fr eh N R nd eh i, j [, ()] in rder t generte pths frm i t j in R ω (... ()). We define the splitting f ny F R -hypergrph withut vertex 0 s eing the grph: = [] { X(i) i,j X(j) X N R i, j [ ()] } nd fr p, q V nd P V with 0 V, we define p,p,q = ( { s t t p s q s, t P } ) fr p q I p,p,p = ( { s t t p s, t P } { s 0 s p } ) J with I = { s p = s = q } nd J = { s p = s = 0 }. This llws t define the splitting R f R s eing the fllwing r-grmmr: Z H Z i,j h i,j ( (H ) i,[ ()] {i,j},j ) fr eh NR nd i, j [, ()] where h i,j is the vertex renming defined y h i,j (i) =, h i,j (j) =, h i,j (x) = x therwise, fr i j h i,i (i) =, h i,i (0) =, h i,i (x) = x therwise. Thus R nd R re i-synhrnized, nd R is unmiguus when R is unmiguus. Nte tht we n put R int redued frm y remving ny nn-terminl i,j suh tht R ω ( i,j ) is withut pth frm t. Exmple 4.4 The fllwing 0-grmmr R : Z d ; B ; 3 B 3 genertes the fllwing utmtn : d d d The splitting R f R is the fllwing grmmr:,, Z, ;, B, ; B,,, d B,3 ; B,3, generting the fllwing utmtn:

17 d d d s R R, we hve Syn(R) = Syn( R ). T study lsure prperties f Syn(R) fr ny grmmr R, we n wrk with its nrml frm R whih is n r-grmmr generting pinted utmtn. This nrmliztin is relly useful t study the lsure prperty f Syn(R) under mplement reltive t L(R), under ntentin nd its itertin. We hve seen tht Syn(R) is nt lsed in generl under intersetin, hene it is nt lsed under mplement rding t L(R) sine fr ny L, M L(R), L M = L(R) [(L(R) L) (L(R) M)]. Fr R unmiguus, Syn(R) is lsed under intersetin, nd this remins true under mplement rding t L(R) [C 08]. We give here simpler nstrutin. s R remins unmiguus, we n ssume tht R is n r-grmmr. Let S R. We wnt t shw tht L(R) L(S) Syn(R). S S is n 0-grmmr nd S is level-unmiguus s defined in [C 08]. Thus S is level-unmiguus r-grmmr. We tke new lur F {, } nd fr ny grmmr S, we dente S (resp. S ) the grmmr tined frm S y repling the finl lur y (resp. y ). S R + S is n r-grmmr nd (R + S ) is levelunmiguus. It remins t pply the grmmr determiniztin in [C 08] t get the grmmr R/S = Det(R + S ) suh tht (R/S) is unmiguus nd i-synhrnized t (R+ S ). Finlly we keep in R/S the finl verties whih re nt lured y t tin grmmr synhrnized y R nd regnizing L(R) L(S). Therem 4.5 Fr ny unmiguus regulr utmtn, the set Syn() is n effetive len lger rding t L(), ntining ll the regulr lnguges inluded in L(). S we n deide the inlusin L(S) L(S ) fr tw grmmrs S nd S synhrnized y mmn unmiguus grmmr. Furthermre fr grmmrs R nd R suh tht R + R is level-unmiguus, Syn(R + R ) = { L L L Syn(R ) L Syn(R ) } is len lger inluded in L(R ) L(R ), ntining Syn(R ) nd Syn(R ). The utmt f Exmples 3.8 t 3. re unmiguus hene their fmilies f synhrnized lnguges re len lger. This regulr utmtn :

18 is -miguus: there re tw epting pths fr the wrds n n n with n > 0 nd unique epting pth fr the ther epted wrds. But Syn() is nt lsed under intersetin sine { m m n m, n 0 } nd { m n n m, n 0 } re lnguges synhrnized y. Fr ny regulr utmtn, the lsure f Syn() under ntentin (resp. under its trnsitive lsure + ) des nt require the unmiguity f. s L() Syn(), neessry nditin is t hve L().L() Syn() (resp. L() + Syn()). Nte tht this neessry nditin implies tht L() is lsed under (resp. + ). In prtiulr Syn() is nt lsed under nd + fr the utmt f Exmples 3. nd 3.. But this neessry nditin is nt suffiient sine the fllwing regulr utmtn :, regnizes L() = ε + M( + ) fr M = { n n n > 0 }, hene L().L() = L() = L() + ut M Syn() nd M.M, M + Syn(). Let us give simple nd generl nditin n grmmr R suh tht Syn(R) is lsed under nd +. We sy tht grmmr is itertive if ny initil vertex is in the xim nd fr (ny) R ω nd ny epting pth s 0 s... n s n with s 0, s n nd fr ny finl vertex t i.e. t, there exists pth t... n t n with t n suh tht l(t i ) = l(t) + l(s i ) fr ll i [, n]. t Fr instne the utmtn f Exmple 3.9 n e generted y n itertive grmmr. nd ny 0-grmmr generting regulr utmtn hving unique initil vertex whih is the unique finl vertex, is itertive. Stndrd nstrutins n finite utmt fr the ntentin nd its itertin n e extended t itertive grmmrs. Prpsitin 4.6 Fr ny itertive grmmr R, the fmily Syn(R) is lsed under ntentin nd its trnsitive lsure. Hwever the utmtn f Exmple 3.0 nnt e generted y n iterted grmmr ut Syn() is lsed under nd +. We n ls tin fmilies f synhrnized lnguges whih re lsed under nd + y sturting grmmrs. The sturtin + f n utmtn is the utmtn + = { s r r t (s t t ) } regnizing L( + ) = (L()) +.

19 Nte tht if is regulr with infinite sets f initil nd finl verties, + n e nn regulr (ut is lwys prefix-regnizle). If is generted y n 0- grmmr R, its sturtin + n e generted y grmmr R + tht we define. Let (Z, H) e the xim rule f R nd r,..., r p e the initil verties f H ; we n ssume tht r,..., r p re nt verties f R {(Z, H)}. T eh N R {Z} nd I [, ()], we ssite new syml I f rity () + p nd we define R + with the fllwing rules: Z [H] + { { i X(i) H } Xr...r p X H N R } I Xr...r p K I fr eh (X, K) R nd Z nd I [, ()] whse K I is the utmtn tined frm K s fllws: K I = [K] { s r j j [p] i I (s X(i)) } { B { j i I, Y (j)=x(i) } Y r...r p BY K B N R }. S R is synhrnized y R + nd + (R + ) ω fr R ω. T hrterize Syn(R + ) frm Syn(R), we define the regulr lsure Reg(E) f ny lnguge fmily E s eing the smllest fmily f lnguges ntining E nd lsed under,, +. Prpsitin 4.7 Fr ny 0-grmmr R, Syn(R + ) = Reg(Syn(R)). By Prpsitins 4.3, 4.6 nd 4.7, the fllwing regulr utmtn : K,,,,,,, hs the sme synhrnized lnguges thn the utmtn f Exmple 3.9: Syn() is the fmily f input-driven lnguges (fr pushing, ppping nd internl). By dding n -lp n the initil (nd finl) vertex f, we tin n utmtn H suh tht Syn(H) is the fmily f visily pushdwn lnguges hene y Prpsitin 4.7, is lsed under nd +. Exmple 4.8 nturl extensin f the visily pushdwn lnguges is t dd reset letters. Fr pushing, ppping nd internl, we dd reset letter d t define the fllwing regulr utmtn :,, d, d d d ny lnguge f Syn() is visily pushdwn lnguge tking d s n internl letter, ut nt the nverse: { n d n n 0 } Syn(). By Therem 4.5, Syn() is len lger. Furthermre the fllwing utmtn H :

20 ,,, d,,, d,,, d,,, d stisfies Syn(H) = Syn() nd H + = H hene y Prpsitin 4.7, Syn() is ls lsed under nd +. Nte tht the utmt f the previus exmple hve infinite degree. Furthermre fr ny utmtn f finite degree hving n infinite set f initil r finl verties, the pinted utmtn is f infinite degree. Hwever ny regulr utmtn f infinite degree (in ft ny prefix-regnizle utmtn) n e tined y ǫ-lsure frm regulr utmtn f finite degree using ε-trnsitins. Fr instne let us tke new letter e T (insted f the empty wrd) nd let us dente π e the mrphism ersing e in the wrds ver T {e}: π e () = fr ny T nd π e (e) = ε, tht we extend y unin t ny lnguge L (T {e}) : π e (L) = { π e (u) u L }, nd y pwerset t ny fmily P f lnguges: π e (P) = { π e (L) L P }. The fllwing regulr utmtn K :,, d, d e d d e e is f finite degree nd stisfies π e (Syn(K)) = Syn() fr the utmtn f Exmple 4.8. Let us give simple trnsfrmtin f ny grmmr R t grmmr R e suh tht Re ω is f finite degree nd π e(syn(r e )) = Syn(R). s Syn(R) = Syn( R ), we restrit this trnsfrmtin t r-grmmrs. Let R e n r-grmmr. We define R e t e n r-grmmr tined frm R y repling eh nn xim rule st H y the rule: st ( [H] {s e e s e, t e t} h(h [H]) ) P with s e, t e e new verties nd h the vertex mpping defined fr ny r V H y h(r) = r if r {s, t}, h(s) = s e nd h(t) = t e, nd P is the set f verties essile frm s nd -essile frm t. Fr instne the r-grmmr R Z ; is trnsfrmed int the fllwing r-grmmr R e : Z ; e e

21 Fr ny rule f R e, the inputs re seprted frm the utputs (y e-trnsitins), hene R ω e is f finite degree. Furthermre this trnsfrmtin preserves the synhrnized lnguges. Prpsitin 4.9 Fr ny r-grmmr R, Syn(R) = π e (Syn(R e )). S fr ny R, Syn(R) = π e (Syn( R e)) nd ( R e) ω is f finite degree. ll the nstrutins given in this pper re nturl generliztins f usul trnsfrmtins n finite utmt t grph grmmrs. In this wy, si lsure prperties uld e lifted t su-fmilies f ntext-free lnguges. Cnlusin The synhrniztin f regulr utmt is defined thrugh devies generting these utmt, nmely funtinl grph grmmrs. It n ls e defined using pushdwn utmt with ε-trnsitins [NS 07] euse Therem 3.7 sserts tht the fmily f lnguges synhrnized y regulr utmtn is independent f the wy the utmtn is generted; it is grph-relted ntin. This pper shws tht the mehnism f funtinl grph grmmrs prvides nturl nstrutins n regulr utmt generlizing usul nstrutins n finite utmt. This pper is ls n invittin t extend the ntin f synhrniztin t mre generl su-fmilies f utmt. knwledgements Mny thnks t rnud Cryl nd ntine Meyer fr helping me prepre the finl versin f this pper. Referenes [M 04] R. lur nd P. Mdhusudn Visily pushdwn lnguges, 36 th STOC, CM Preedings, L. Bi (Ed.), 0 (004). [Be 79] J. Berstel Trnsdutins nd ntext-free lnguges, Ed. Teuner, pp. 78, 979. [BB 0] J. Berstel nd L. Bssn Blned grmmrs nd their lnguges, Frml nd Nturl Cmputing, LNCS 300, W. Bruer, H. Ehrig, J. Krhumäki,. Slm (Eds.), 3 5 (00). [C 06] D. Cul Synhrniztin f pushdwn utmt, 0 th DLT, LNCS 4036, O. Irr, Z. Dng (Eds.), 0-3 (006). [C 07] D. Cul Deterministi grph grmmrs, Texts in Lgi nd mes, msterdm University Press, J. Flum, E. rädel, T. Wilke (Eds.), (007). [C 08] D. Cul Blen lgers f unmiguus ntext-free lnguges, 8 th FSTTCS, Dgstuhl Reserh Online Pulitin Server, R. Hrihrn, M. Mukund, V. Viny (Eds.) (008).

22 [CH 08] D. Cul nd S. Hssen Synhrniztin f grmmrs, 3 rd CSR, LNCS 500, E. Hirsh,. Rzrv,. Semenv,. Slissenk (Eds.), 0 (008). [H 78] M. Hrrisn Intrdutin t frml lnguge thery, ddisn-wesley (978). [Me 80] K. Mehlhrn Peling muntin rnges nd its pplitin t DCFL regnitin, 7 th ICLP, LNCS 85, J. de Bkker, J. vn Leeuwen (Eds.), 4 43 (980). [MS 85] D. Muller nd P. Shupp The thery f ends, pushdwn utmt, nd send-rder lgi, Theretil Cmputer Siene 37, 5 75 (985). [NS 07] D. Nwtk nd J. Sr Height-deterministi pushdwn utmt, 3 nd MFCS, LNCS 4708, L. Kuer,. Kuer (Eds.), 5 34 (007).

On-Line Construction. of Suffix Trees. Overview. Suffix Trees. Notations. goo. Suffix tries

On-Line Construction. of Suffix Trees. Overview. Suffix Trees. Notations. goo. Suffix tries On-Line Cnstrutin Overview Suffix tries f Suffix Trees E. Ukknen On-line nstrutin f suffix tries in qudrti time Suffix trees On-line nstrutin f suffix trees in liner time Applitins 1 2 Suffix Trees A suffix

More information

MAT 1275: Introduction to Mathematical Analysis

MAT 1275: Introduction to Mathematical Analysis 1 MT 1275: Intrdutin t Mtemtil nlysis Dr Rzenlyum Slving Olique Tringles Lw f Sines Olique tringles tringles tt re nt neessry rigt tringles We re ging t slve tem It mens t find its si elements sides nd

More information

MAT 1275: Introduction to Mathematical Analysis

MAT 1275: Introduction to Mathematical Analysis MAT 75: Intrdutin t Mthemtil Anlysis Dr. A. Rzenlyum Trignmetri Funtins fr Aute Angles Definitin f six trignmetri funtins Cnsider the fllwing girffe prlem: A girffe s shdw is 8 meters. Hw tll is the girffe

More information

CS311 Computational Structures Regular Languages and Regular Grammars. Lecture 6

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

More information

CS 573 Automata Theory and Formal Languages

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

More information

Synchronization of regular automata

Synchronization of regular automata Synhrniztin f rgulr utmt Diir Cul IM CNRS Univrsité Pris-Est ul@univ-mlv.fr strt. Funtinl grph grmmrs r finit vis whih gnrt th lss f rgulr utmt. W rll th ntin f synhrniztin y grmmrs, n fr ny givn grmmr

More information

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

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

More information

Project 6: Minigoals Towards Simplifying and Rewriting Expressions

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

More information

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

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

More information

7. SOLVING OBLIQUE TRIANGLES: THE LAW OF SINES

7. SOLVING OBLIQUE TRIANGLES: THE LAW OF SINES 7 SOLVING OLIQUE TRINGLES: THE LW OF SINES n ique tringe is ne withut n nge f mesure 90 When either tw nges nd side re knwn (S) in the tringe r tw sides nd the nge ppsite ne f them (SS) is given, then

More information

Discrete Structures Lecture 11

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

More information

The Laws of Sines and Cosines

The Laws of Sines and Cosines The Lws f Sines nd sines I The Lw f Sines We hve redy seen tht with the ute nge hs re: re sin In se is tuse, then we hve re h where sin 80 h 0 h sin 80 S re Thus, the frmu: 0 h sin y the Suppementry nge

More information

STRAND F: GEOMETRY F1 Angles and Symmetry

STRAND F: GEOMETRY F1 Angles and Symmetry PRIMRY Mthemtis SKE, Strn F UNIT F1 ngles n Symmetry: Text STRND F: GEOMETRY F1 ngles n Symmetry Text ntents Setin F1.1 Mesuring ngles F1.2 Line n Rttinl Symmetry F1.3 ngle Gemetry F1.4 ngles with Prllel

More information

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

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

More information

Section 1.3 Triangles

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

More information

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

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

More information

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

NON-DETERMINISTIC FSA

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

More information

Finite State Automata and Determinisation

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

More information

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

SMARANDACHE GROUPOIDS

SMARANDACHE GROUPOIDS SMARANDACHE GROUPOIDS W. B. Vsnth Kndsmy Deprtment f Mthemtics Indin Institute f Technlgy Mdrs Chenni - 6 6 Indi. E-mil: vsntk@md.vsnl.net.in Astrct: In this pper we study the cncept f Smrndche Grupids

More information

Nondeterministic Automata vs Deterministic Automata

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

More information

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

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

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

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

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

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

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

Free groups, Lecture 2, part 1

Free groups, Lecture 2, part 1 Free groups, Lecture 2, prt 1 Olg Khrlmpovich NYC, Sep. 2 1 / 22 Theorem Every sugroup H F of free group F is free. Given finite numer of genertors of H we cn compute its sis. 2 / 22 Schreir s grph The

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

Automata and Languages

Automata and Languages Automt nd Lnguges Prof. Mohmed Hmd Softwre Engineering Lb. The University of Aizu Jpn Grmmr Regulr Grmmr Context-free Grmmr Context-sensitive Grmmr Regulr Lnguges Context Free Lnguges Context Sensitive

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

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

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

Compression of Palindromes and Regularity.

Compression of Palindromes and Regularity. Compression of Plinromes n Regulrity. Kyoko Shikishim-Tsuji Center for Lierl Arts Eution n Reserh Tenri University 1 Introution In [1], property of likstrem t t view of tse is isusse n it is shown tht

More information

Mid-Term Examination - Spring 2014 Mathematical Programming with Applications to Economics Total Score: 45; Time: 3 hours

Mid-Term Examination - Spring 2014 Mathematical Programming with Applications to Economics Total Score: 45; Time: 3 hours Mi-Term Exmintion - Spring 0 Mthemtil Progrmming with Applitions to Eonomis Totl Sore: 5; Time: hours. Let G = (N, E) e irete grph. Define the inegree of vertex i N s the numer of eges tht re oming into

More information

More Properties of the Riemann Integral

More Properties of the Riemann Integral More Properties of the Riemnn Integrl Jmes K. Peterson Deprtment of Biologil Sienes nd Deprtment of Mthemtil Sienes Clemson University Februry 15, 2018 Outline More Riemnn Integrl Properties The Fundmentl

More information

Pre-Lie algebras, rooted trees and related algebraic structures

Pre-Lie algebras, rooted trees and related algebraic structures Pre-Lie lgers, rooted trees nd relted lgeri strutures Mrh 23, 2004 Definition 1 A pre-lie lger is vetor spe W with mp : W W W suh tht (x y) z x (y z) = (x z) y x (z y). (1) Exmple 2 All ssoitive lgers

More information

The Word Problem in Quandles

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

More information

CSCI 340: Computational Models. Kleene s Theorem. Department of Computer Science

CSCI 340: Computational Models. Kleene s Theorem. Department of Computer Science CSCI 340: Computtionl Models Kleene s Theorem Chpter 7 Deprtment of Computer Science Unifiction In 1954, Kleene presented (nd proved) theorem which (in our version) sttes tht if lnguge cn e defined y ny

More information

First Midterm Examination

First Midterm Examination 24-25 Fll Semester First Midterm Exmintion ) Give the stte digrm of DFA tht recognizes the lnguge A over lphet Σ = {, } where A = {w w contins or } 2) The following DFA recognizes the lnguge B over lphet

More information

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

Chapter 3. Vector Spaces. 3.1 Images and Image Arithmetic

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

More information

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

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

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

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

More information

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

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

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

Prefix-Free Regular-Expression Matching

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

More information

Intermediate Math Circles Wednesday, 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

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

SWEN 224 Formal Foundations of Programming WITH ANSWERS

SWEN 224 Formal Foundations of Programming WITH ANSWERS T E W H A R E W Ā N A N G A O T E Ū P O K O O T E I K A A M Ā U I VUW V I C T O R I A UNIVERSITY OF WELLINGTON Time Allowed: 3 Hours EXAMINATIONS 2011 END-OF-YEAR SWEN 224 Forml Foundtions of Progrmming

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

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

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

Introduction to Olympiad Inequalities

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

More information

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

OVERVIEW Using Similarity and Proving Triangle Theorems G.SRT.4

OVERVIEW Using Similarity and Proving Triangle Theorems G.SRT.4 OVRVIW Using Similrity nd Prving Tringle Therems G.SRT.4 G.SRT.4 Prve therems ut tringles. Therems include: line prllel t ne side f tringle divides the ther tw prprtinlly, nd cnversely; the Pythgren Therem

More information

Arrow s Impossibility Theorem

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

More information

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

CS 491G Combinatorial Optimization Lecture Notes

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

More information

Random subgroups of a free group

Random subgroups of a free group Rndom sugroups of free group Frédérique Bssino LIPN - Lortoire d Informtique de Pris Nord, Université Pris 13 - CNRS Joint work with Armndo Mrtino, Cyril Nicud, Enric Ventur et Pscl Weil LIX My, 2015 Introduction

More information

Greedy Algorithms. Kye Halsted. Edited by Chuck Cusack. These notes are based on chapter 17 of [1] and lectures from CSCE423/823, Spring 2001.

Greedy Algorithms. Kye Halsted. Edited by Chuck Cusack. These notes are based on chapter 17 of [1] and lectures from CSCE423/823, Spring 2001. #! Greedy Algrithms Kye Halsted Edited by Chuk Cusak These ntes are based n hapter 17 f [1] and letures frm CCE423/823, pring 2001. Greedy algrithms slve prblems by making the hie that seems best at the

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

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

Homology groups of disks with holes

Homology groups of disks with holes Hmlgy grups f disks with hles THEOREM. Let p 1,, p k } be a sequence f distinct pints in the interir unit disk D n where n 2, and suppse that fr all j the sets E j Int D n are clsed, pairwise disjint subdisks.

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

CSCI565 - Compiler Design

CSCI565 - Compiler Design CSCI565 - Compiler Deign Spring 6 Due Dte: Fe. 5, 6 t : PM in Cl Prolem [ point]: Regulr Expreion nd Finite Automt Develop regulr expreion (RE) tht detet the longet tring over the lphet {-} with the following

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

Global alignment. Genome Rearrangements Finding preserved genes. Lecture 18

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

More information

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

= state, a = reading and q j

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

More information

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

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

a) Read over steps (1)- (4) below and sketch the path of the cycle on a P V plot on the graph below. Label all appropriate points.

a) Read over steps (1)- (4) below and sketch the path of the cycle on a P V plot on the graph below. Label all appropriate points. Prole 3: Crnot Cyle of n Idel Gs In this prole, the strting pressure P nd volue of n idel gs in stte, re given he rtio R = / > of the volues of the sttes nd is given Finlly onstnt γ = 5/3 is given You

More information

6.5 Improper integrals

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

More information

Bisimulation, Games & Hennessy Milner logic

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

More information

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

Arrow s Impossibility Theorem

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

More information

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

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

Nondeterministic Finite Automata

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

More information

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

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

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

More information

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

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

CS 330 Formal Methods and Models

CS 330 Formal Methods and Models CS 330 Forml Methods nd Models Dn Richrds, section 003, George Mson University, Fll 2017 Quiz Solutions Quiz 1, Propositionl Logic Dte: Septemer 7 1. Prove (p q) (p q), () (5pts) using truth tles. p q

More information

For convenience, we rewrite m2 s m2 = m m m ; where m is repeted m times. Since xyz = m m m nd jxyj»m, we hve tht the string y is substring of the fir

For convenience, we rewrite m2 s m2 = m m m ; where m is repeted m times. Since xyz = m m m nd jxyj»m, we hve tht the string y is substring of the fir CSCI 2400 Models of Computtion, Section 3 Solutions to Homework 4 Problem 1. ll the solutions below refer to the Pumping Lemm of Theorem 4.8, pge 119. () L = f n b l k : k n + lg Let's ssume for contrdiction

More information

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

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

More information

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

Solutions to Assignment 1

Solutions to Assignment 1 MTHE 237 Fll 2015 Solutions to Assignment 1 Problem 1 Find the order of the differentil eqution: t d3 y dt 3 +t2 y = os(t. Is the differentil eqution liner? Is the eqution homogeneous? b Repet the bove

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

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

NFA and regex. the Boolean algebra of languages. non-deterministic machines. regular expressions

NFA and regex. the Boolean algebra of languages. non-deterministic machines. regular expressions NFA nd regex l the Boolen lger of lnguges non-deterministi mhines regulr expressions Informtis The intersetion of two regulr lnguges is regulr Run oth mhines in prllel? Build one mhine tht simultes two

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

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

11.2. Infinite Series

11.2. Infinite Series .2 Infinite Series 76.2 Infinite Series An infinite series is the sum f n infinite seuence f numbers + 2 + 3 + Á + n + Á The gl f this sectin is t understnd the mening f such n infinite sum nd t develp

More information