Mitschrift Automata on Infinite Words - Exercises Dr. S. Wöhrle Dipl.-Math. Philipp Rohde

Size: px
Start display at page:

Download "Mitschrift Automata on Infinite Words - Exercises Dr. S. Wöhrle Dipl.-Math. Philipp Rohde"

Transcription

1 Mitschrift Automt on Infinite Words - Exercises Dr. S. Wöhrle Dipl.-Mth. Philipp Rohde Ulrich Loup Diese Mitschrift ist eine Mitschrift und deswegen nicht unedingt vollständig oder fehlerfrei! Ds Dokument wird is zum Ende des Semesters sukzessive erweitert. Anmerkungen itte n die ngegeene emil-adresse uf der s-inf Seite. : A dem..26 wurde die Üung von Philipp Rhode üernommen. Contents Exercise from Semntics of regulr expressions Definition (ω-regulr lnguge) Connection to Büchi utomt Exmple Exercise from Equivlence reltion A Trnsition profiles Computing the equivlence clsses s sets Exercise from Exercise Exercise Exercise Exercise from Exercise Exercise

2 5 Exercise from Exercise Exercise Exercise Exercise from Exercise Exercise Exercise Exercise from Exercise Exercise Exercise from Exercise Exercise Exercise Exercise from Exmple: SS definle property Exercise Exercise Exercise from Exercise Exercise Exercise from Exercise Exercise Exercise from Exercise Exercise Exercise from Exercise Exercise

3 4 Exercise from Exercise Exercise Exercise

4 Exercise from Semntics of regulr expressions ε := {ε}, :=, := {} Σ If r, s re regulr expressions then r + s := r s r s := {uv Σ u r, v s} r := {w Σ n N : w = u... u n nd u i r i n} Note: We often do distinguish syntx nd semntics! E.g. we often write U V, r s, r U..2 Definition (ω-regulr lnguge) An ω-regulr lnguge over Σ is of the form r s ω + +r n s ω n for some n N nd regulr expressions r i, s i for ll i n. semntics: extend semntics of regulr expressions y r ω := {α Σ ω α = w w 2..., w i r i N} r s ω := {α Σ ω α = wβ, w r, β s ω } r s ω + + r n s ω := i nr i s ω i Note: (s ω ) ω, sω r, s ω r ω, r (s ω + sω 2 ) re not ω-regulr expressions! ε ω =.3 Connection to Büchi utomt Recll: Given Büchi utomton A = (Q, Σ, q,, F ). The lnguge L(A) cn e descried y the ω-regulr expressioin ω W q qw q q q F where W qq is the regulr lnguge recognized y the utomton A p,q = (Q, Σ, p,, {q}). From A (y Kleene s theorem) we cn construct r pq such tht r pq = L(A pq ). 4

5 .4 Exmple A : q q reching W q q = ( + ) W q q 3 = ( + ) () loop W q q = W q3 q 3 = (), q 2 q 3 Thus L(A) = ( + ) ( ) ω + ( + ) () (() ) ω = ( + ) ω + ( + ) () ω. 2 Exercise from Büchi s complementtion procedure, A : 2 recognizes L(A) = ( + ) ω. 2. Equivlence reltion A p, q Q ((p u q p v q) (p u q p v q)) =: u A v. Lemm: A is even conguence, i.e. u, v Σ Σ u A v u A v. Consequence: u, v Σ Σ [u] = [v] [u] = [v]. 2.2 Trnsition profiles, A : 2 [ε] [] [] [] [] [] [] [] [] = [] = [] = [] = [] = [] [ε], [], [], [] re ll equivlence clsses. Proof: Use Congruence Lemm. 2.3 Computing the equivlence clsses s sets Recll: W p,q := {u A : p u q} nd Wp,q F := {u A : p u q}. Fct: (from the definition of A ) [u] = the intersection of ll W p,q with p u q, ll Wp,q F with p u q ll Σ \ W p,q with not p u q, ll Σ \ Wp,q F with not p u q 5

6 , A : 2 W, = ( + ) = Σ W, F = W,2 = W,2 F = ( + ) + Σ \ W,2 F = ( ) W 2,2 = W2,2 F = Σ \ W2,2 F = ( + ) [ε] = Σ \ W,2 F W 2,2 F = ( ) = ε [] = W,2 F W 2,2 F = ( + ) + = + [] = Σ \ W,2 F Σ \ W2,2 F = ( ) ( + ) = ( ) + [] = W,2 F Σ \ W2,2 F = ( + ) + ( + ) = ( + ) + equivlence clsses: [ε] = ε [] = + [] = ( ) + [] = ( + ) + W A = {[ε], [], [], []} nd Σ = [ε] [] [] []. Tsk: Compute U, V such tht U V ω L(A) = ( + ) ω. Therefore V = [ε] or V = [] is not llowed. All other comintions contin α / L(A). Hence: Σ ω \ L(A) = ( ) ω + ( ( + ) + ) ω + + ( ) ω + + ( ( + ) + ) ω +( ) ω + ( ) + ( ( + ) + ) ω +( ( + ) + )( ) ω + ( ( + ) + ) ω = ( ) ω 3 Exercise from Exercise,,c () q q q 2,,c,,c () q q (c) Ide: rewrite L 3 into from some point onwrds: fter every either or c (such tht L 3 chrcterizes Büchi utomton). q,,c,c,,c q,c q 2 6

7 3.2 Exercise 2 () ( + + c) ( + + c) ω () (( + + c) ) ω (c) ( + + c + ) (( + c) + ( + c)) ω 3.3 Exercise 3 There exists function : N N such tht (i) Büchi utomt A with n sttes with L := L(A) w Σ with w = uv, uv ω L nd u + v (n). (ii) Büchi utomton A with n sttes such tht w L := L(A) with w = uv ω nd u + v < (n). Proof: Set (n) := n. Since L(A) there exists loop in the grph of A such tht it contins stte q F it is rechle from initil stte q q q u v q Define u, v, we know uv ω L(A) where we choose u to e s short s possile, i.e. u := m < n. The pth q q does not contin stte from loop (except the lst one). So only n m sttes remin for loop. u The ound (n) = n cnnot e improved: Consider the fmily of Büchi utomt (A n ) n N. A n : q q... q n L(A n ) = n ω. Oviously n ω cnnot e decomposed in u, v with u + v < n nd uv ω = n ω. 4 Exercise from Exercise 4 Σ = {,, c}. 7

8 L := {α Σ ω α contins t lest one infix nd one infix c}. Automton:,,c,,c c,,c c ω-regulr expression: ( + + c) (( + + c) c + c( + + c) )( + + c) ω K := {α Σ ω if α contins infinitely mny then α contins infinitely mny }. Automton:,,c,c,,c ω-regulr expression: ( + + c) ( + + c)( + c) ω + ( + + c) ( + ( + c)( + + c) ( ω direct construction: Σ ( + c) ω + Σ (Σ ) ω (here Σ insted of ( + + c) ).,c,,c 4.2 Exercise 5 () ω-regulr expression: ( + ) ( + ) ω, L(A) = {α Σ ω α contins finitely often the infix }. () A -clss: shortest representtives nd trnsition profiles 8

9 Trnsition profiles of u Σ : p, q Q, is there trnsition in A tht leds from p to q nd is leled y u? no u A v ( p, q : (p u q p v q) (p u q p v q)) yes p u q no Does one of these pths visit finl stte? yes p u q A is congruence (not only right-congruence): If u A v, then w, w 2 Σ : w uw 2 A w vw 2. Consequence: u A v nd v < u, then every word tht hs u s prefix is equivlent to some word tht doesn t hve u s prefix nd is shorter thn the first word. uw A vw = ux A vx. trnsition profiles: [ε] [] [] [] [] [] [] [] [] [] [] = [] = [] = [] = [] [] [] [] [] [] [] [] = [] = [] = [] = [] = [] e.g. verify. (c) Ech α Σ ω cn e fctorized s α U V ω with U nd V equivlence clsses of A. α =... Since A we get }.{{.. } A. Thus α [] [] ω. n 2 9

10 α 2 =... Since A we get }.{{.. } A. So α 2 [] [] ω. Alterntive: α 2 [ε] [] ω. n 2

11 (d) direct construction: Σ ω \ L(A) = {α Σ ω α contins infinitely mny }., 5 Exercise from Exercise 6 UP defines the clss of ultimtely periodic words. Clim: UP is not regulr. Assume tht UP is regulr, then Σ ω \ UP is lso regulr. ultimtely periodic word. Contrdiction. But ny regulr lnguge contins n 5.2 Exercise 7 (),c,c A : q q 2 F = {{q q }, {q, q 2 }} 3 L(A) = L,c Remrk: Muller utomt: F Q. Run ρ is ccepting : Inf(ρ) F. () q c q c q c F = {{q c }, {q }, {q, q c }, {q }, {q, q c }}. (Exclude {q, q }, {q, q, q c }, the rest must work.) {q c } : neither nor ws seen. {q }, {q, q c } : ws -often ut finitely often seen. {q }, {q, q c } : ws -often ut finitely often seen. c 5.3 Exercise 8 () Let U Σ, U finite, L = U Σ ω. Clim: L is E- nd A-recognizle. Proof: W.l.o.g. (without loss of generlity) ssume tht U contins only mx. elements w.r.t. (with respect to) -reltion (prefix-reltion). w U, w w, w w w / U.

12 Define T := {w w w U, w Σ }, E := {(w, w) w T }. Exmple: U = {,, }, ε S, E-utomton A : L(A) = L A-utomton: ll finl sttes (dshed) new sink-stte S () Let L e E- nd A-recognizle. complement-lemm: Σ ω \ L is E-recognizle. [swpping finl/non-finl sttes] There is n E-utomton A with L(A) = L. There is n A-utomton A with L(A ) = L To contrdiction: Assume there is no finite U Σ with L = U Σ ω. Let T := {w Σ α, β Σ : wα L wβ / L} w α β L / L T is prefix-closed nd with E s efore: T is tree. Assume tht T is finite. For ny lef of T, w nd ny Σ either α Σ ω : wα L or α Σ ω : wα / L. Define U := {w Σ w T, w is lef, Σ, α Σ ω : wα L}. Assume tht T is finite. Σ is finite U is finite nd L = U Σ ω. Contrdiction to T is finite. T is finite. Tree T infinite nd finitely rnching ( Σ < ). König s lemm there is n infinite pth in T, i.e there is uσ ω such tht ech finite prefix of u elongs to T. Does A ccept u? If A ccepts u ssumes finl stte fter u,..., u m (finitely mny) β / L. But L = L(A). So the nswer is NO! u / L Anlog.: A cnnot ccept u. u / Σ ω \ L u L 2 } Contrdiction!

13 6 Exercise from Exercise 9 U, V Σ, U ω := {α Σ ω α = u u 2 u 3..., u i U}. lim(u) := {α Σ ω i j with j i : α[... j] U} U + := {v Σ k, v = u... u k, u j U} () U ω = lim(u + )? Answer: NO. U ω lim(u + ): Let α U ω, then α = u u 2 u 3... with u i U, thus u, u u 2, u u 2 u 3,... U +. Thus i j such tht α[... j] U + (choose j such tht j = u... u l i). α lim(u + ) U ω lim(u + ). lim(u + ) U ω : Choose U =. Choose α = ω lim(u) lim(u + ). By definition of U ω every word in ( ) ω will contin infinitely mny. α / U ω. () lim(u V ) = lim(u) lim(v ). Answer: YES. : Let α lim(u) lim(v ), w.l.o.g. α lim(u). α lim(u V ). : Let α lim(u V ). Then i j such tht α[... j] U or α[... j] V. Let N U := {j α[... j] U} nd N V := {j α[... j] U}. At lest one of the two sets hs to e infinite. Either α lim(u) or α lim(v ). 6.2 Exercise Every deterministiclly co-büchi recognizle lnguge is lso deterministiclly Muller recognizle. Proof: Let A = (Q, Σ, q, δ, F ) e deterministic co-büchi utomton. A ccepts α Σ ω if i such tht j i we hve ρ α (j) F, i.e Inf(ρ α ) F. Choose B = (Q, Σ, q, δ, F) where F = 2 F = {A A F }. Then α L(B) Inf(ρ α ) F Inf(ρ α ) F α L(A) 6.3 Exercise L := {α {, } ω α contins infix infinitely often, ut infix only finitely often}. Show in 3 steps: 3

14 () A deterministic Muller utomton for L (intuitively): F = {F Q 5 F, 3 / F } equivlent: F = {{5}, {2, 4, 5}} () L is not Büchi recognizle. Proof: Assume it is, e.g. y A. Consider α = ω L, on α A enters finl stte, e.g. for the first time fter n. Consider α 2 = n ω L, A enters second finl stte, e.g. fter n n 2. Consider α 2 = n n 2 ω L,..... We otin n infinite sequence of ω-words α, α 2,... L, the runs of A on the initil prts gree. Thus α forming the common extension of (α i ) i the utomton A will enter finl stte infinitely often, ut α contins infinitely often. Contrdiction. () L is not deterministiclly co-büchi recognizle. Assume it is, e.g. y A with n sttes. Let α = (() n+ ) ω L. From some point onwrds A only enters finl sttes on α, e.g. fter reding (() n+ ) m, so on (() n+ ) m (() n+ ). }{{} only sttes F α = (() n+ ) m () ω is ccepted y A, ut α / L. Contrdiction. 4

15 7 Exercise from Exercise 2 () Every nondeterministiclly E-recognizle lnguge is lso nondeterministiclly Stigner-Wgner recognizle. Proof: Let A = (Q, Σ, q,, F ) e E-utomton. Construct B = (Q, Σ, q,, F) Stigner- Wgner utomton y choosing Q := Q, q := q, :=, F := {F Q F F }. Then α Σ ω : A E-ccepts α there exists n infinite run ρ α of A on α such tht stte from F is visited Occ(ρ) F Occ(ρ α ) F B ccepts α. () Every nondeterministiclly Stigner-Wgner recognizle lnguge is lso nondeterministiclly co-büchi recognizle. Proof: Let A = (Q, Σ, q,, F) e Stigner-Wgner utomton. Construct co-büchi utomton B = (Q, Σ, q, F ) s follows: Q := Q 2 Q, q := (q, ). given ((p, P ),, (q, R)) (p,, q) nd R = P {p} p, q Q Σ R, P 2 Q. F = {(p, F ) F F}. Then for α Σ ω : A Stigner-Wgner ccepts α infinite run ρ α of A on α such tht Occ(ρ α ) F. infinite run ρ α of B on α such tht from some point onwrds only sttes (, P ) for some P F re visited. B co-büchi ccepts α. (c) Every nondeterministiclly co-büchi recognizle lnguge is lso nondeterministiclly E-recognizle. Proof: Let A = (Q, Σ, q,, F ) e nondeterministic co-büchi utomton. We construct B = (Q, Σ, q,, F ) E-utomton s follows. Q := Q ({} F ), F := {} F, g := q, := {(p,, (, q)) (p,, q), q F } {((, p),, (, q)) (p,, q), q, q F }. Then A co-büchi ccepts α Σ ω infinite run ρ α such tht only sttes from F re seen. run ρ α such tht finlly only sttes from {} F = F re seen. B E-ccepts α. 7.2 Exercise 3 Let L e the lnguge recognized y the given utomton. Apply Lndweer s theorem: 5

16 () L is deterministiclly E-recognizle iff F is closed under rechle loops. L is not deterministiclly E-recognizle. () L is deterministiclly Büchi recognizle iff F is closed under superloops. L is deterministiclly Büchi recognizle. lgorithmic solution:, 3, {} 3, {, 3} 2, {}, {, 3} 2, 2, {, 3}, {3} 3, 3, {3} 8 Exercise from Exercise 4 L = {α Σ ω if occurs in α then occurs lter on}. () Stigner-Wgner-utomton for L with F = {{}, {, 2, 3}}:, c, c,, c 2 3 () Trjn s SCC (strongly connected components) lgorithm on grph G:. Do DFS (depth first serch) through G nd rememer enter/frewell times. 2. Reverse edges of grph G. G 6

17 3. Do DFS on G strting from vertex with highest frewell. The rechle vertices form SCC S of G. 4. Repet step 3 without S. Given Automton A: 2 3 4, , DFS through A: /6 5/6 4/7 4 3/8 8 2/ / 6 5 3/4 2/5 Nottion E/F is used, wheres E indictes the step numer t the entering into the current stte ( enter ) nd F the step numer while leving the current stte ( frewell ). Edge-reversed Automton A: /6 2/ 9/ 5/ V I III IV, , II 2/5 3/4 3/8 4/7 The red mrked components re the SCCs. 7

18 8.2 Exercise 5 For n there exists L n := ω + + ω n (with Σ n = {,..., n }, which is ccepted y Stigner- Wgner utomton with n ccepting stte sets ut not y one with n. Proof:. L is ccepted y. n Σ n \ { }... n Σ n \ { n } Σ n with cceptnce sets F = {{, i} i n}. n 2. L n cnnot e ccepted y Stigner-Wgner utomton with only n cceptnce sets. Assume there is such n utomton A. There exist i j nd runs ρ of A on ω i nd ρ of A on such tht Occ(ρ) = Occ(ρ ) F. Let m miniml such tht Occ(ρ[... m]) = Occ(ρ). ω j Let ρ(m) = q Occ(ρ ). Choose suffix ρ of ρ strting with q, then ρ()... ρ(m )ρ is run on i m ω j occurrence set. Contrdiction. 8.3 Exercise 6 Surprise: A nondeterministic Stigner-Wgner utomton cnnot e determinized! Proof: with sme. Every nondeterministic Stigner-Wgner utomton cn e completed y creting new sink stte to which ll missing edges re connected. 2. Assume Stigner-Wgner utomton cn e determinized. Then the following clss inclusions emerge: ndet-co-büchi Exercise 2 = ndet-sw = det-sw det-co-büchi. But this is contrdiction to the clss hierrchy! 9 Exercise from Exmple: SS definle property property: P holds from some odd position onwrds, e.g

19 formul (intuitive): φ(x ) = t(t odd s t : X (s)) How to formulte odd? Answer: second order logic Replce t odd y Y ( Y () t(y (t) Y (T ))). The resulting formul would then e Y [( Y () t(y (t) Y (T ))) t(y (t) s t : X (s))]. Nottion: The sequence 9.2 Exercise 7 is written s. () L = {α {, } ω α contins infinitely often, ut only finitely often}. Deterministic Rin utomton (thnks to Klus) q q q q rememers every lst two red letters. Ω = {({q }, {q })}. () L recognized y Rin utomton A with Ω = {(Q, F ),..., (E k, F k )} nd E i = i k. By definition α is ccepted y A iff Inf(ρ α ) F i nd E i Inf(ρ α ) = (which is lwys stisfied in this sitution) for some i. If we choose F = k i= F i then A with F s Büchi utomton ccepts L. 9.3 Exercise 8 Tool: Short description of the Muller-Schupp - lgorithm to clculte n updte step of the deterministic Muller utomton from n initil tree t on the input symol Σ:. Copy t, replce green y yellow. 2. () Delete stte sets P of ech lef. () Introduce sons leled with P := {q p P : (p,, q) }. 9

20 (c) Delete ll sttes which occur lso more to the left proceeding from right to left. (d) Split ny set into its finl nd non-finl sttes producing left son leled green nd right son leled red respectively, ech nmed with free node nme. 3. Delete ll nodes which did not get new non-empty (nd hence nmed) descendnt. 4. Compress pth segments into their top node, giving it color green if merged with pth segment contining green or yellow node. Muller-Schupp - construction (for etter redility yellow is set to lue): Given utomton A on the input word α = () ω. initil tree: : q Process : : q : : : q q 2, q q 2 c,d 2 : q q 3,4 Process : : q q : : 2, q q q 2 2 c,d 2 : q 2 3 : q q 3, 4 Process : : : : 2 : q 2 3 : q q 2 : 3 : 2 : 3 : 2, q q q 2c q q 2

21 : : 2 : 3 : 2 : q 3 : q 2d, 3 4 : q 5 : q 4 Process : : : : 2 : q 3 : q 2 : 3 : 2 : 3 : q 2, 2 c,d, 3,4 4 : q q 2 5 : q 4 : q 2 5 : q Process : : : 2 : 3 : q 2 : 3 : 4 : q 2 5 : q 4 : 5 : q 2, q q 2 2 c,d 2

22 : : : 2 : 3 : 2 : 3 : 2 : 3 : q 4 : 5 : 8 : q 5 : 8 : q 6 : q 2 7 : q 6 : q 2 7 : q 3 6 : q 2 7 : q 4 Process : : : 2 : 3 : q 2 : 3 : 6 : q 2 7 : q 6 : 7 : q q 2, q 2c : : : 2 : 3 : 2 : 3 : 2 : 3 : 6 : 7 : q 6 : 7 : 5 : q 6 : 5 : q q 2d 4 : q 3 4 : q 22

23 : 4 2 : q 3 : q Result: The sttes of the deterministic Rin utomton re the lst Muller-Shupp trees in ech processing step. So the run of the resulting deterministic utomton is: : q : q q : : 2 : q 2 3 : q q 2 : q 3 : q : : 2 : 3 : q 2 : 3 : q : 4 : q 2 5 : q 6 : q 2 7 : q 2 : q 3 : q Note: There re other constructions like the Sfr construction which re more complex ut yield etter results in the tool. Exercise from Exercise 9 Given Σ n = {#,,..., n} nd nondeterministic Büchi utomton A n with L(A) =: L n. () Chrcteriztion y sequences. α L n sequence i i 2 i 2 i 3... i k i k i k i, i, j Σ n \ {#}, which is repeted infinitely often nd strts with #. The deterministic Muller utomton checks wether such sequence exists. Choose Q = Σ n Σ n {q, q s }. consists of rules (, c, c),,, c Σ n, (q, #, ), (q,, q s ), Σ n \ {#}, (q s,, q s ), Σ n. 23

24 For F we dd F Q to F iff F contins chrcteristic sequence. Note: The reltion lso defines trnsition function here. () Recll Lndweer s theorem: Let L e recognized y deterministic Muller utomton with ccepting component F, then: L is recognized y deterministic Büchi utomton iff F is closed under superloops. L n is deterministiclly Büchi recognizle..2 Exercise 2 () L := ( ) ( ) ( )ω. Comment: ϕ (X, X 2 ) = X () X 2 () () (): Descries: First letter is ( ). (2): ( ) ppers gin t position t >. (3): In-etween positions nd t only ( ) occurs. (4): After t ( ) nd ( ) lternte. Remrk: ( ) cnnot e replced y Counter-exmple: t ( t > X (t) X 2 (t) (2) s( < s < t X (s) X 2 (s)) (3) s(s t ((X (s) X 2 (s )) (X 2 (s) X 2 (s )))) ). (4) }{{} ( ) (X (s) X 2 (s)) ( X (s ) X 2 (s )) ( ) stisfies the formul ecuse the impliction t the second position lwys is true. () L 2 := ( ) ( )ω. Comment: ϕ 2 (X, X 2 ) = Y ( Y () Y ( ) Y ( ) t(y (t) Y (t ) Y (t )) (5) s(y (s) t < s(x (t) X 2 (t)) t s( X (t) X 2 (t))) ) (6) (5): Y is second order vrile representing mod 3 counter. (6): t mod 3 = nd: efore t only ( ) nd strting t t only ( ) occurs. 24

25 Exercise from Exercise 2 Given Büchi utomton A: q q q 2 Exmple sitution: N X [X = {, 3, 4,...}] Y [Y = {,...}] Y [Y = {, 2, 3,...}] Y 2 [Y 2 = {4,...}] SS-formul for A: ϕ(x) = Y Y Y 2 [Prtition(Y, Y, Y 2 ) Y () }{{} q initil stte t ( (Y (t) X(t) Y (t )) (Y (t) X(t) Y (t )) (Y (t) X(t) Y 2 (t )) (Y 2 (t) X(t) Y (t )) ) t s(t < s Y s (s))], Prtition(Y, Y, Y 2 ) := t ( (Y (t) Y (t) Y 2 (t)) ((Y (t) Y (t)) (Y (t) Y 2 (t)) (Y (t) Y 2 (t))) )..2 Exercise 22 () 4 sttes: unry: Y Y Y 2 Y 3 inry: Z Z q q q 2 q 3 25

26 Let A = (Q, {, }, q,, F ), Q = {q,..., q 7 }. For i 7: (i, i 2, i 3 ) = i [i = i i 2 + i 2 ] { } { Y 2 (t), i 2 = Y (t), i = ψ i (Y, Y, Y 2, t) := Y 2 (t), i 2 = Y (t), i = } { Y (t), i = Y (t), i = }. e.g.: ψ 3 (Y, Y, Y 2, t) = Y 2 (t) Y 2 (t) Y (t) [3 = () ] { ψ i (t) X(t) ψ j (t ), = δ (i,,j) (Y, Y, Y 2, t) := ψ i (t) X(t) ψ j (t ), = } i.e. q i q j δ (i,,j). ϕ(x) := Y Y Y 2 ψ () t (q i,,q j ) δ (i,,j) (Y, Y, Y 2, t) t s t < s ψ i (s). ( ) First ide: Chrcterise position ρ(t) of run ρ not y vector X with Q components ut y the trnsposed one. X(t) Y (t k) q i F Then the position of X(t) cn e clculted s t k, thus ρ() ρ() ρ(2) ρ(3) ρ() ρ() But this of course requires 2nd set vrile! Better ide: q q q 2 corresponds to q q 2. Successful run: It suffices to consider n k sttes for fixed length k. 2. Flg wether we hve seen t lest one finl stte in etween. 3. Mrk eginning of encoding. 26

27 2 Exercise from Exercise 23 SS : Eliminte, <. Successor s Succ(X, Y ) wht especilly mens tht X nd Y re singletons. Eliminte FO-vriles, use X Y, Sing(X). () Given ϕ(x) = t ( X(t) X(t ) ), the corresponding SS -formul in prenex norml form results in ψ(x) = T S( Succ(T, S) }{{} (T X S X) ). }{{} T,S singletons nd in successor closure p q p q Note: T X : {t} X t X. () Find Büchi utomton A for Succ(T, S) (T X S X). Nottion:. T, S re singletons: 2 3 X T S. T : }{{} not llowed, ecuse then two positions elong to T S : 2. S successor of T : } {{ } ( ) Note: This formul lredy contins tht T, S re singletons. 27

28 3. T X: Replce ( ) y or 4. utomton for quntifier-free formul: ( ) ) ( ( ) ( ) ( ) ( ) 5. Quntifiers: S results in projection of trnsition lels onto first two components (i.e. delete third components), for T delete second components. complete utomton: / / / L(A ϕ ) = {, } ω \ { ω }. 2.2 Exercise 24 Ultimtely periodic word α {, } ω : α = u v ω for some u, v {, } (finite) = u v v v v () Define Büchi utomton A α for u = u u 2... u k : u u 2 u k v. L(A) = {α}. 2. Numer of sttes Q α = u + v. A ccepts α iff L(A) L(A α ) = L(A) {α}. Properties: () The intersection of Büchi utomt is effective (there is Büchi utomton A with L(A ) = L(A) L(A α )). 28

29 (2) The emptiness prolem for Büchi utomt is decidle. Reduction to decidle prolem the originl prolem is lso decidle. () Find tight upper ound. Mesure for α: u + v =: n. Mesure for A = (Q, Σ, q,, F ): Q + =: m (usul grph size). () intersection: y construction of the lecture A := (Q Q α {, 2, 3},...,, F ) }{{} #=3 n Q with (Q = Q Q α {, 2} lso possile). (2) emptiness: y Trjn s lgorithm in time O( V + E ) for grph (V, E). For utomton A = (Q,...,, F ) in time O( Q + ) originl prolem cn e solved in time O(3 n Q + ) = O(n m). 3 Exercise from Exercise 25 (ω + ω)-word α β: α()α()α(2) β()β()β(2)... Inf(ρ α ) p Q Emptiness decision procedure: Let A = (Q, Σ, q,, F ).. Collect ll q Q with (P, q) for some P Q. Set Q := {q Q P Q : (P, q) }. 2. Check the Büchi ω-utomton A q = (Q, Σ, q,, F ) for emptiness q Q. 3. Collect ll sets P Q such tht there is q Q with (P, q) nd L(A q ). We otin fmily F := {P Q q Q : (P, q) L(A q ) }. 4. Check the nondeterministic Muller utomton A = (Q, Σ, q,, F) for emptiness. Clim: L(A) L(A ). Proof: : Let α L(A ) e n ccepting run of A on α, in prticulr: Inf(ρ α ) F. By definition exists q Q such tht (Inf(ρ α ), q) nd L(A q ). Let β L(A q ) nd ρ β e n ccepting run of A q on β. Inf(ρ β ) F, ρ β () = q. 29

30 (ρ α, ρ β ) is n ccepting run of A on α β. : Anlogously: (ρ α, ρ β ) on α β... Remrk: Emptiness-check for nondeterministic Muller utomt: st wy: nondeterministic Muller utomton nondeterministic Büchi utomton.. Büchi utomton guesses F F. 2. Büchi utomton guesses the position from which on only F -sttes. 3. Ensures tht ll F -sttes re visited nd no other stte. 2nd wy: direct procedure.. Remove non-rechle sttes nd remove F F tht contins non-rechle stte. 2. For ech F F: Restrict A on F. Check if new A F is strongly connected. 3. Yes, if A f is strongly connected for some F F. No, if A f is not strongly connected for ll F F. 3.2 Exercise 26 To otin the desired form of ϕ(x) we consider two possile wys. st wy:. Trnslte ϕ(x) into equivlent Büchi utomton A. 2. Find complement utomton A with L(A) = {, } ω \ L(A). 3. Find SS-formul ϕ(x) equivlent to A of the form Y... Y n ψ(y,..., Y n, X) (stndrd construction). Clim: ϕ(x) is the desired formul. Proof: ϕ(x) = Y... Y n ψ(y,..., Y n, X) with ψ(y,..., Y n, X) ψ(y,..., Y n, X). α {, } ω, α = ϕ(x) not α = ϕ(x) not α L(A) 2. α L(A). α = ϕ(x). So ϕ(x) ϕ(x) over ω words. 2nd wy: Use the hint.. As ove. 2. Trnsform Büchi utomton A into equivlent deterministic Muller utomton A. (McNughton or Muller-Shupp construction) 3

31 3. Find SS-formul ϕ (X) equivlent to A of the denied form. Muller utomton A = (Q, {, }, q, δ, F), Q = {q,..., q n }. ϕ (X) = Y... Y n (Prtition(Y,..., Y n ) Y () [ n ] t ((Y i (t) X(t) Y δ(qi,)(t )) (Y i (t) X(t) Y δ(qi,)(t ))) F F i= q i F t Y i (t) wheret t χ(t) s t(s < t χ(t)). q j / F ) t Y j (t), 4 Exercise from Exercise 27 ϕ-expnsion up to position : p... p 2... p... p p 2... p U(p p 2 )... Xp 2... XXp 2... (p 2 XXp 2 )... ( p U(p p 2 ))U(p 2 XXp 2 )... Hints: Sort suformuls y incresing complexity. If the right site of n until-formul is true t position the formul itself directly is true. So the first step to evlute the until-formul would e copying ll s of the right-site-formul. 4.2 Exercise 28 () Two interprettions:. ψ holds sometime ϕ ψ ψ ϕnψ ( ψ)u(ψ ϕ) 3

32 2. if ψ holds t ll then lso ϕ ϕnψ G ψ ( ψ)u(ψ ϕ) The opertor N is not fixed ecuse of the different possile interprettions. () Two interprettions:. ϕ nd ψ from now on until the next ψ 2. lwys if ψ then ϕ ψ ϕ ψ or ψ ϕ ϕw ψ (ψ ϕ)u( ψ) G(ψ ϕ) (c) Interprettion: 4.3 Exercise 29 ϕ ψ ϕ ψ, ϕ? ψ ϕ ϕw ψ G(ψ ϕ) ψ ψ or ϕ ϕbψ ( ψ)u(ϕ ψ XF ψ) G ψ A = (Q, Σ, q,, F ), Q Σ Q : # = 2 8 = 52, F Q: # = 4 out 2 possile utomt to consider! Prolem: All ω-words with suffix ( )ω elong to L(ϕ). Solution in three steps:. There is Büchi utomton A with three sttes with the interprettions q : no current request, q : wit for response, q 2 : response nd new request for the sttes nd ( for the trnsition lels. Form of the utomton: p p 2 ) request response 32

33 ( ) ( ) q ( ) q ( ) ( ) ( ) ( ) ( ) q 2 ( ) 2. Clim: There is no Büchi utomton with less thn three sttes. () Since L(ϕ) ech Büchi utomton needs t lest one finl stte q. () Assume tht there is Büchi utomton A with one finl stte such tht L(ϕ) = L(A). ( )ω L(A): Let ρ e n ccepting run of A on ( )ω. ( )ω L(A): Let ρ e n ccepting run of A on ( )ω. ρ visits q infinitely often. Let m with ρ(m) = q. ρ visits q infinitely often. Let m > with ρ (m ) = q. ρ : ρ () ρ : ρ() ( ) ρ () ( ) ρ() ( ) ( ) ( ) ρ (m ) ( ) ρ(m) ( ) ( ) ρ(m + ) ( ) Consider new (red colored) run ˆρ. ˆρ is ccepting run on ( )m ( )ω / L(ϕ). Contrdiction. 3. Assume Büchi utomton A = ({q, q },...), L(A) = L(ϕ). q, q must e finl, q is the initil stte. ( ) q q ( ) ( ) ( ) ( ) ( ) ( ): Trnsition not possile ecuse ( ) ( )ω L(ϕ). ( ): Trnsition not possile ecuse ( ) ( ) ( )ω L(ϕ). But the resulting utomton lso doesn t recognize L(ϕ) ecuse ( )ω / L(ϕ). So the contrdiction is complete. 33

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

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

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

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

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

Regular expressions, Finite Automata, transition graphs are all the same!!

Regular expressions, Finite Automata, transition graphs are all the same!! CSI 3104 /Winter 2011: Introduction to Forml Lnguges Chpter 7: Kleene s Theorem Chpter 7: Kleene s Theorem Regulr expressions, Finite Automt, trnsition grphs re ll the sme!! Dr. Neji Zgui CSI3104-W11 1

More information

Lecture 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

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

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

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

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

Coalgebra, Lecture 15: Equations for Deterministic Automata

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

More information

Chapter 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

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

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

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

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

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

Worked out examples Finite Automata

Worked out examples Finite Automata Worked out exmples Finite Automt Exmple Design Finite Stte Automton which reds inry string nd ccepts only those tht end with. Since we re in the topic of Non Deterministic Finite Automt (NFA), we will

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

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

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

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

3 Regular expressions

3 Regular expressions 3 Regulr expressions Given n lphet Σ lnguge is set of words L Σ. So fr we were le to descrie lnguges either y using set theory (i.e. enumertion or comprehension) or y n utomton. In this section we shll

More information

CS 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

On Determinisation of History-Deterministic Automata.

On Determinisation of History-Deterministic Automata. On Deterministion of History-Deterministic Automt. Denis Kupererg Mich l Skrzypczk University of Wrsw YR-ICALP 2014 Copenhgen Introduction Deterministic utomt re centrl tool in utomt theory: Polynomil

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

NFAs continued, Closure Properties of Regular Languages

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

More information

Software Engineering using Formal Methods

Software Engineering using Formal Methods Softwre Engineering using Forml Methods Propositionl nd (Liner) Temporl Logic Wolfgng Ahrendt 13th Septemer 2016 SEFM: Liner Temporl Logic /GU 160913 1 / 60 Recpitultion: FormlistionFormlistion: Syntx,

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

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

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

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

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-State Automata: Recap

Finite-State Automata: Recap Finite-Stte Automt: Recp Deepk D Souz Deprtment of Computer Science nd Automtion Indin Institute of Science, Bnglore. 09 August 2016 Outline 1 Introduction 2 Forml Definitions nd Nottion 3 Closure under

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

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

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

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

Non-deterministic Finite Automata

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

More information

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

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

More information

CS 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

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

NFAs continued, Closure Properties of Regular Languages

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

More information

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

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

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

Grammar. Languages. Content 5/10/16. Automata and Languages. Regular Languages. Regular Languages 5//6 Grmmr Automt nd Lnguges Regulr Grmmr Context-free Grmmr Context-sensitive Grmmr Prof. Mohmed Hmd Softwre Engineering L. The University of Aizu Jpn Regulr Lnguges Context Free Lnguges Context Sensitive

More information

CS103B Handout 18 Winter 2007 February 28, 2007 Finite Automata

CS103B Handout 18 Winter 2007 February 28, 2007 Finite Automata CS103B ndout 18 Winter 2007 Ferury 28, 2007 Finite Automt Initil text y Mggie Johnson. Introduction Severl childrens gmes fit the following description: Pieces re set up on plying ord; dice re thrown or

More information

Good-for-Games Automata versus Deterministic Automata.

Good-for-Games Automata versus Deterministic Automata. Good-for-Gmes Automt versus Deterministic Automt. Denis Kuperberg 1,2 Mich l Skrzypczk 1 1 University of Wrsw 2 IRIT/ONERA (Toulouse) Séminire MoVe 12/02/2015 LIF, Luminy Introduction Deterministic utomt

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

Non-deterministic Finite Automata

Non-deterministic Finite Automata Non-deterministic Finite Automt Eliminting non-determinism Rdoud University Nijmegen Non-deterministic Finite Automt H. Geuvers nd T. vn Lrhoven Institute for Computing nd Informtion Sciences Intelligent

More information

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

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

More information

Lecture 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

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

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

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

CHAPTER 1 Regular Languages. Contents. definitions, examples, designing, regular operations. Non-deterministic Finite Automata (NFA)

CHAPTER 1 Regular Languages. Contents. definitions, examples, designing, regular operations. Non-deterministic Finite Automata (NFA) Finite Automt (FA or DFA) CHAPTER Regulr Lnguges Contents definitions, exmples, designing, regulr opertions Non-deterministic Finite Automt (NFA) definitions, equivlence of NFAs DFAs, closure under regulr

More information

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

4 Deterministic Büchi Automata

4 Deterministic Büchi Automata Bernd Finkeiner Dte: April 26, 2011 Automt, Gmes nd Verifiction: Lecture 3 4 Deterministic Büchi Automt Theorem 1 The lnguge ( + ) ω is not recognizle y deterministic Büchi utomton. Assume tht L is recognized

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

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

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

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

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

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

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

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

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

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

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

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

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

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

More information

1 From NFA to regular expression

1 From NFA to regular expression Note 1: How to convert DFA/NFA to regulr expression Version: 1.0 S/EE 374, Fll 2017 Septemer 11, 2017 In this note, we show tht ny DFA cn e converted into regulr expression. Our construction would work

More information

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

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

FABER Formal Languages, Automata and Models of Computation

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

More information

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

From LTL to Symbolically Represented Deterministic Automata

From LTL to Symbolically Represented Deterministic Automata Motivtion nd Prolem Setting Determinizing Non-Confluent Automt Det. vi Automt Hierrchy From LTL to Symoliclly Represented Deterministic Automt Andres Morgenstern Klus Schneider Sven Lmerti Mnuel Gesell

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

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

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

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

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

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

CS375: Logic and Theory of Computing

CS375: Logic and Theory of Computing CS375: Logic nd Theory of Computing Fuhu (Frnk) Cheng Deprtment of Computer Science University of Kentucky 1 Tble of Contents: Week 1: Preliminries (set lgebr, reltions, functions) (red Chpters 1-4) Weeks

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

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

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

CS375: Logic and Theory of Computing

CS375: Logic and Theory of Computing CS375: Logic nd Theory of Computing Fuhu (Frnk) Cheng Deprtment of Computer Science University of Kentucky 1 Tle of Contents: Week 1: Preliminries (set lger, reltions, functions) (red Chpters 1-4) Weeks

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

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

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

More information

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

CDM Automata on Infinite Words

CDM Automata on Infinite Words CDM Automt on Infinite Words 1 Infinite Words Klus Sutner Crnegie Mellon Universlity 60-omeg 2017/12/15 23:19 Deterministic Lnguges Muller nd Rin Automt Towrds Infinity 3 Infinite Words 4 As mtter of principle,

More information

Today s Topics Automata and Languages

Today s Topics Automata and Languages Tody s Topics Automt nd Lnguges Prof. Mohmed Hmd Softwre Engineering L. The University of Aizu Jpn DFA to Regulr Expression GFNA DFAèGNFA GNFA è RE DFA è RE Exmples 2 DFA è RE NFA DFA -NFA REX GNFA 3 Definition

More information

Automata and Languages

Automata and Languages Automt nd Lnguges Prof. Mohmed Hmd Softwre Engineering L. The University of Aizu Jpn Tody s Topics DFA to Regulr Expression GFNA DFAèGNFA GNFA è RE DFA è RE Exmples 2 DFA è RE NFA DFA -NFA REX GNFA 3 Definition

More information

Some Theory of Computation Exercises Week 1

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

More information

Context-Free Grammars and Languages

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

More information