7 Automata and formal languages. 7.1 Formal languages
|
|
- Mitchell Perry
- 6 years ago
- Views:
Transcription
1 7 Automt nd forml lnguges This exposition ws developed by Clemens Gröpl nd Knut Reinert. It is bsed on the following references, ll of which re recommended reding: 1. Uwe Schöning: Theoretische Informtik - kurz gefsst. 3. Auflge. Spektrum Akdemischer Verlg, Heidelberg, ISBN PROSITE user mnul 3. Sigrist C.J., Cerutti L., Hulo N., Gttiker A., Flquet L., Pgni M., Biroch A., Bucher P.. PROSITE: documented dtbse using ptterns nd profiles s motif descriptors. Brief Bioinform. 3: (2002). We will present bsic fcts bout: forml lnguges, regulr nd context-free grmmrs, deterministic finite utomt, nondeterministic finite utomt, pushdown utomt. 7.1 Forml lnguges An lphbet Σ is nonempty set of symbols (lso clled letters). In the following, Σ will lwys denote finite lphbet. A word over n lphbet Σ is sequence of elements of Σ. This includes the empty word, which contins no letters nd is denoted by ε. For ny lphbet Σ, the set Σ is defined to be the set of ll words over the lphbet Σ. The set Σ + := Σ \ {ε} contins ll nonempty words Σ. nd E. g., if Σ = {, b}, then Σ = {ε,, b,, b, b, bb,, b,...} Σ + = {, b,, b, b, bb,, b,...}. The length of word x is denoted by x. For words x, y Σ we denote their conctention by xy: If x = x 1,... x m nd y = y 1,..., y n (where x i, y j Σ) then xy = x 1,..., x m, y 1,..., y n. For x Σ let x n := xx... x. (Tht is, n conctented copies of x). } {{ } n
2 Finite utomt nd regulr grmmrs, by Clemens Gröpl, Jnury 10, 2013, 12: Thus x n = n x, xy = x + y, nd ε = 0. A (forml) lnguge A over n lphbet Σ is simply set of words over Σ, i. e., subset of Σ. The empty lnguge := {} contins no words. (Note: The empty lnguge must not to be confused with the lnguge {ε}, which contins only the empty word.) The complement of lnguge A (over n lphbet Σ) is the lnguge Ā := Σ \ A. For lnguges A, B we define their product s using the conctention opertion defined bove. AB := {xy x A, y B}, E. g., if A = {, h}, B = {ε, t, ttu} then AB = {, h, t, ht, ttu, httu}. The powers of lnguge L re defined by L 0 := {ε} L n := L n 1 L, for n 1. The Kleene str (or Kleene hull) of lnguge L is L := L n. i=0 Funnily, n = for n 1, but = 0 = {ε}, ccording to these definitions. But (defined this wy) lnguge exponentition works s expected: For every lnguge A nd m, n 0, we hve A m A n = A m+n. Most forml lnguges re infinite objects. In order to del with them lgorithmiclly, we need finite descriptions for them. There re two pproches to this: Grmmrs describe rules how to produce words from given lnguge. We cn clssify lnguges ccording to the kinds of rules which re llowed. Automt describe how to test whether word belongs to given lnguge. We cn clssify lnguges ccording to the computtionl power of the utomt which re llowed. Fortuntely, the two pproches cn be shown to be equivlent in mny cses. 7.2 Grmmrs A grmmr is 4-tuple G = (V, Σ, P, S) stisfying the following conditions. V is finite set of vrible symbols. For brevity, the vrible symbols re often simply clled vribles, or nonterminls.
3 7002 Finite utomt nd regulr grmmrs, by Clemens Gröpl, Jnury 10, 2013, 12:36 Σ is finite set of terminl symbols, lso clled the terminl lphbet. This is the lphbet of the lnguge we wnt to describe. We require tht vrible symbols nd terminl symbols cn be distinguished, i. e., V Σ =. P is finite set of rules or productions. A rule hs the form where lhs (V Σ) + nd rhs (V Σ). S V is the strt vrible. (left hnd side) (right hnd side), We cn think of the productions of grmmr s wys to trnsform words over the lphbet V Σ into other words over V Σ. We cn derive v from u in G in one step if there is production y y in P nd x, z (V Σ) such tht u = xyz nd v = xy z. This is denoted by u G v. If the grmmr is cler from the context, we write just u v. The reflexive nd trnsitive closure G of G is defined s follows. We hve u v if nd only if u = v or v cn G be derived from u in series u w 1 w 2... w n v of steps using the grmmr G. Then L(G) := {w Σ S G w} is the lnguge generted by G. Note: The crucil point is tht we wrote w Σ, not w (V Σ). Vribles re not llowed in generted words which re output. (Note 2: This rises nother question: Productions cn lengthen nd shorten the words. How cn we tell how long it will tke until we hve removed ll vrible symbols? Well, tht s nother story.) Exmple 1. The following grmmr genertes ll words over Σ = {, b} with eqully mny s nd b s. G = ({S}, Σ, P, S), where P := { } S ε, S Sb b b, b b (Cn you prove this?) Exmple 2. The following grmmr genertes well-formed rithmetic expressions over the lphbet Σ = {(, ),, b, c, +, }.
4 Finite utomt nd regulr grmmrs, by Clemens Gröpl, Jnury 10, 2013, 12: G = ({A, M, K}, Σ, P, A), where P := { } A M, A A + M M K, M M K, K, K b, K c, K (A), Chomsky described four sorts of restrictions on grmmr s rewriting rules. The resulting four clsses of grmmrs form hierrchy known s the Chomsky hierchy. In wht follows we use cpitl letters A, B, W, S,... to denote nonterminl symbols, smll letters, b, c,... to denote terminl symbols nd greek letters α, β, γ,... to represent string of terminl nd non-terminl letters. 1. Regulr grmmrs. Only production rules of the form W W or W re llowed. 2. Context-free grmmrs. Any production of the form W α is llowed. 3. Context-sensitive grmmrs. Productions of the form α 1 Wα 2 α 1 βα 2 re llowed. 4. Unrestricted grmmrs. Any production rule of the form α 1 Wα 2 γ is llowed. 7.3 Regulr grmmrs For Bioinformtics we will be interested in the regulr nd context-free grmmrs. definition: Hence more detiled A grmmr is clled regulr if ll productions hve the form l r, where l V nd r Σ ΣV. Tht is, we cn only replce vrible with: terminl (r Σ), or terminl followed by vrible (r ΣV). Exmple. The following regulr grmmr genertes vlid identifier nmes in mny progrmming lnguges. G = ({[lph], [lnum]}, {A,... Z,,..., z,, 0, 1,..., 9}, P, [lph]}, where P := { [lph] A,...,, [lph] A[lnum],..., [lnum], [lnum] A,...,, 0,..., 9, [lnum] A[lnum],..., [lnum], 0[lnum],..., 9[lnum] } Here we used comms to write severl productions shring the sme left hnd side in one line.
5 7004 Finite utomt nd regulr grmmrs, by Clemens Gröpl, Jnury 10, 2013, 12: Context-free grmmrs Here the definition of context-free grmmr: Definition 1. A context free grmmr G is 4-tuple G = (V, Σ, P, S) with V nd Σ being lphbets with V Σ =. V is the nonterminl lphbet. Σ is the terminl lphbet. S N is the strt symbol. P V (V Σ) is the finite set of ll productions. Consider the context-free grmmr G = ( {S}, {, b}, {S S bsb bb}, S ). This CFG produces the lnguge of ll plindromes of the form αα R. For exmple the string bb cn be generted using the following derivtion: S S S bsb bb. The plindrome grmmr cn be redily extended to hndle RNA hirpin loops. For exmple, we could model hirpin loops with three bse pirs nd gc or g loop using the following productions. S W 1 u cw 1 g gw 1 c uw 1, W 1 W 2 u cw 2 g gw 2 c uw 2, W 2 W 3 u cw 3 g gw 3 c uw 3, W 3 g gc. (We don t mention the lphbets V nd Σ explicitly if they re cler from the context.) Grmmrs generte lnguges. They re mens to quickly specify ll (possibly n infinite number) words in lnguge. Now we will turn the ttention to the utomt tht cn decide whether word is in the lnguge or not. If the word is in the lnguge the utomton ccepts the word. We strt with finite utomt nd proove tht they re ble to ccept exctly the words generted by regulr grmmr. 7.5 Deterministic finite utomt A deterministic finite utomton (DFA) is 5-tuple M = (Z, Σ, δ, z 0, E) stisfying the following conditions. Z is finite set of sttes the utomton cn be in. Σ is the lphbet. The utomton moves long the input from left to right. In ech step, it reds single chrcter from the input. δ : Z Σ Z is the trnsition function. When the chrcter hs been red, M chnges its stte depending on the chrcter nd its current stte. Then it proceeds to the next input position.
6 Finite utomt nd regulr grmmrs, by Clemens Gröpl, Jnury 10, 2013, 12: z 0 is the initil stte of M before the first chrcter is red. E is the set of end sttes or ccepting sttes. If M is in stte contined in E fter the lst letter hs been red, the input is ccepted. DFAs cn be drwn s digrphs very intuitively. Sttes correspond to vertices. They re drwn s single circles; ccepting sttes re indicted by double circles. Edges correspond to trnsitions nd re lbeled with letters from Σ. There is n rc from u to v lbeled if nd only if there is trnsition δ(u, ) = v. The initil stte is mrked by n ingoing rrow. Exmple. The following utomton ccepts the lnguge (where % denotes modulus, i. e. reminder of division) L = {x {, b} (# (x) # b (x)) % 3 = 1}. b z 0 b z 1 z 2 b Using the definition of DFA, we hve M = ({z 0, z 1, z 2 }, {, b}, δ, z 0, {z 1 }), where δ(z 0, ) = z 1 δ(z 1, ) = z 2 δ(z 2, ) = z 0 δ(z 0, b) = z 2 δ(z 1, b) = z 0 δ(z 2, b) = z 1 A lnguge L is clled regulr if there is regulr grmmr tht produces L \ {ε}. Lengthy remrk: The issue with ε is relly just technicl compliction. We cn lwys modify grmmr G tht genertes lnguge L into grmmr G tht genertes the lnguge L {ε} by the following trick: Let S be the strt vrible of G. Let S be new vrible symbol not used by G. Then G is obtined by replcing the strt vrible by S nd dding the following productions: S S ε. Whether the resulting grmmr G is lso clled regulr (if G ws regulr) depends on the literture. Schöning uses the following ε-sonderregelung : If ε L(G) is desired, then the production S ε is dmitted, where S is the strt vrible. However, in this cse S must not pper on the right hnd side of production. 7.6 From DFAs to regulr grmmrs Agin, let M = (Z, Σ, δ, z 0, E) be deterministic finite utomton. It is useful to extend the trnsition function δ : Z Σ Z to mpping δ : Z Σ Z, clled the extended trnsition function. We define δ (z, ε) := z for every stte z Z nd inductively, δ (z, x) := δ(δ (z, x), ) for x Σ, Σ.
7 7006 Finite utomt nd regulr grmmrs, by Clemens Gröpl, Jnury 10, 2013, 12:36 Observe tht if x = x[1.. n] is n input string, then δ (z 0, x[1.. 0]), δ (z 0, x[1.. 1]),..., δ (z 0, x[1.. n]) is the pth of sttes followed by the DFA. Hence, the lnguge ccepted by M is L(M) := {x Σ δ (z 0, x) E}. We re now redy to prove: Theorem 2. Every lnguge which is ccepted by deterministic finite utomton is regulr. Proof: Let M = (Z, Σ, δ, z 0, E) be DFA nd A := L(M). We will construct regulr grmmr G = (V, Σ, P, S) tht genertes A. We let V := Z nd S := z 0. Every rc δ(u, ) = v becomes production u v P, nd if v E we lso include production u. Tht is, P := {u v δ(u, ) = v} {u δ(u, ) = v E}. Now we hve x[1.. n] L(M) there re sttes z 1,..., z n Z such tht δ(z i 1, x[i]) = z i for i = 1,..., n, where z 0 is the strt stte nd z n E is n ccepting stte there re vribles z 1,..., z n V such tht z i 1 x[i]z i is production in P, where z 0 is the strt vrible, nd z n 1 x[n] is lso production in P we cn derive S = z 0 x[1]z 1 x[1]x[2]z 2... x[1.. n 1]z n 1 x[1.. n] in G, i. e., S G x x[1.. n] L(G). If ε A, i. e., z 0 E, then we need to pply the ε-sonderregelung nd modify G ccordingly. 7.7 Nondeterministic finite utomt In DFAs, the pth followed upon given input ws completely determined. Next we will introduce nondeterministic finite utomt (NFAs). These re defined similr to DFAs, but ech stte cn hve more thn one successor stte for ny given letter, or none t ll. A nondeterministic finite utomton (NFA) is 5-tuple M = (Z, Σ, δ, U 0, E) stisfying the following conditions. Z is finite set of sttes. Σ is the lphbet. δ : Z Σ P(Z) is the trnsition function. Here P(Z) is the power set of Z, i. e. the set of ll subsets of Z.
8 Finite utomt nd regulr grmmrs, by Clemens Gröpl, Jnury 10, 2013, 12: U 0 is the set of initil sttes. E is the set of ccepting sttes. When the utomton reds Σ nd is in stte z, it is free to choose one of severl sucessor sttes in δ(z, ), or its gets stuck if δ(z, ) =. A nondeterministic finite utomton ccepts n input if there is t lest one ccepting pth. Agin, we cn define n extended trnsition function δ : P(Z) Σ P(Z). We let δ (U, ε) := U for ll subsets of sttes U Z nd inductively, δ (U, x) := δ(v, ) for x Σ, Σ. v δ (U,x) Then the lnguge ccepted by M is L(M) := {x Σ δ (U 0, x) E }. The following illustrtes the definition of δ. The lrge bubble on the left side is δ (U, x), the lrge bubble on the right side is δ (U, x), where is some letter. The stte spce (ft dots) is shown twice for clrity. Time goes from left to right. The smller cones indicte δ(v, ) for ech v δ (U, x). NFAs cn be drwn s digrphs, similr to DFAs. The resulting digrphs re more generl: We cn hve severl rrows pointing to strt sttes. The number of rcs with given lbel leving vertex is no longer required to be exctly 1, it cn be ny number (including 0). Exmple. The following NFA ccepts ll words over the lphbet Σ = {, b} which do not strt or end with the letter b.
9 7008 Finite utomt nd regulr grmmrs, by Clemens Gröpl, Jnury 10, 2013, 12:36 b z 0 z 1 z 2 z DFAs nd NFAs re equivlent Although NFAs re generliztion of DFAs, they ccept the sme lnguges: Theorem 3 (Rbin, Scott). For every nondeterministic finite utomton M there is deterministic finite utomton M such tht L(M) = L(M ). Proof. Let M = (Z, Σ, δ, U 0, E) be n NFA. The bsic ide of the proof is to view the subsets of sttes of Z s single sttes of n DFA M whose stte spce is P(Z). Then the rest of the definition of M is strightforwrd. The power set utomton is defined s M := (P(Z), Σ, δ, U 0, E ), where P(Z) is the stte spce The trnsition function δ : P(Z) Σ P(Z) is defined by δ (U, ) := δ(v, ) = δ (U, ) for U P(Z). U 0 P(Z) is the new strt stte (note tht in M it ws the set of strt sttes). E := {U Z U E } is the new set of end sttes. v U Using the definitions of M nd M, we hve: x[1.. n] L(M) there re ccepting pths in M, δ (U 0, x[1.. n]) E there re subsets U 1, U 2,..., U n Z such tht δ (U i 1, x[i]) = U i nd U n E there is n ccepting pth in M, δ (U 0, x[1.. n]) = U n E x[1.. n] L(M ). Remrks:
10 Finite utomt nd regulr grmmrs, by Clemens Gröpl, Jnury 10, 2013, 12: In the power set construction, we cn sfely leve out sttes which cnnot be reched from the strt stte U 0. Tht is, we cn generte the reched stte sets on the fly. 2. The exponentil blow up of the number of sttes (from Z to 2 Z ) cnnot be voided in generl. For exmple, the lnguge L := {x {, b} x k nd the k-lst letter of x is n } hs n NFA with k + 1 sttes, but it is not hrd to show tht no DFA for L cn hve less tht 2 k sttes. 7.9 From regulr grmmrs to NFAs We hve just seen how to trnsform nondeterministic finite utomton into deterministic finite utomton. We hve seen before how to trnsform deterministic finite utomton into regulr grmmr. Next we will see how to trnsform regulr grmmr into nondeterministic finite utomton. This concludes the proof tht the regulr lnguges re precisely those which re ccepted by finite utomt (of both kinds). Theorem 4. Every regulr lnguge is ccepted by nondeterministic finite utomton. Proof. Let G = (V, Σ, P, S) be regulr grmmr nd A := L(G). We will construct n NFA M = (Z, Σ, δ, {z 0 }, E) such tht L(M) = A. Note tht in every derivtion in regulr grmmr, the intermedite words contin exctly one vrible, nd the vrible must be t the end. This vrible will become stte of the NFA. We need one more extr stte, which M enters when the vrible is eliminted in the lst step. Thus we let the stte set be Z := V {X}. The only possible initil stte is z 0 := S, the strt vrible of G. The set of end sttes is E := {X} if ε A. If ε A, then we let E := {X, S}. Next we trnslte productions into trnsitions. We define δ : Z Σ P(Z) by δ(u, ) v δ(u, ) X iff u v P iff u P Tht is, δ(u, ) = {v u v P} {X u P}. Note tht the end stte X hs no successor sttes. And if S is n end stte, then by the ε-sonderregelung there is no wy to get bck to S, s it does not pper on the right side of production. Now we hve for n 1: x[1.. n] L(G) there re vribles z 1,..., z n V such tht we cn derive z 0 = S G x[1]z 1 G x[1]x[2]z 2 G... G x[1.. n 1]z n 1 G x[1.. n] in G, tht is, z i 1 x[i]z i is production in P, where z 0 = S is the strt vrible, nd z n 1 x[n] is lso production in P there re sttes z 1,..., z n Z {X} such tht δ(z i 1, x[i]) z i for i = 1,..., n, where z 0 is the strt stte, nd z n = X is only end stte which is fesible for word of length 1
11 7010 Finite utomt nd regulr grmmrs, by Clemens Gröpl, Jnury 10, 2013, 12:36 x[1.. n] L(M) Moreover, by construction we hve ε L(M) ε A. Finlly we return to context-free grmmrs nd introduce the utomton tht ccepts context-free lnguge, the pushdown utomton (PDA). We will first define it nd then show t n exmple how we cn decide whether string is in the lnguge generted by given CFG. Recll our smll hirpin generting CFG: S W 1 u cw 1 g gw 1 c uw 1, W 1 W 2 u cw 2 g gw 2 c uw 2, W 2 W 3 u cw 3 g gw 3 c uw 3, W 3 g gc. There is n elegnt representtion for derivtions of sequence in CFG clled the prse tree. The root of the tree is the nonterminl S. The leves re the terminl symbols, nd the inner nodes re nonterminls. For exmple if we extend the bove productions with S SS we cn get the following: S S W 1 S W 1 W 2 W 2 W 3 W 3 c g g c u g g g u g c c c Using pushdown utomton we cn prse sequence left to right ccording. A (nondeterministic) PDA is formlly defined s 6-tuple: M = (Z, Σ, Γ, δ, z 0, S) where Z is finite set of sttes, Σ is finite input lphbet, Γ is finite stck lphbet δ : Z Σ {ɛ} Γ P(Z Γ ) is the z 0 is the strt stte, S is the initil stck symbol S Γ is the lowest stck symbol. There is of course lso deterministic version, however the nondeterministic PDA llows for simple construction when CFG is given.
12 Finite utomt nd regulr grmmrs, by Clemens Gröpl, Jnury 10, 2013, 12: If M is in stte z nd reds the input nd if A is the top stck symbol, then M cn go to stte z nd replce A by other stck symbols. This implies, tht A cn be deleted, replced, or ugmented. After reding the input, the utomton ccepts the word if the stck is empty. Given CFG G = (V, Σ, P, S) we define the corresponding PDA s M = ({z}, Σ, V Σ, δ, z, S). Using the production set P we cn define δ. For ech rule A α P we define δ such tht (z, α) δ(z, ɛ, A) nd (z, ɛ) δ(z,, ). Lets look t our exmple: S W 1 u cw 1 g gw 1 c uw 1, W 1 W 2 u cw 2 g gw 2 c uw 2, W 2 W 3 u cw 3 g gw 3 c uw 3, W 3 g gc. Hence M = ({z}, {, c, g, u}, {, c, g, u, W 1, W 2, W 3, S}, δ, z, S) with δ s explined (blckbord). Lets see how the utomton prses word in our hirpin lnguge. Given our CFG, the utomton s stck is initilized with the strt symbol S. Then the following steps re iterted until no symbols remin. If the stck is empty when no input symbols remin, then the sequence hs been successfully prsed. 1. Pop symbol off the stck. 2. If the popped symbol is non-terminl: Peek hed in the input nd choose vlid production for the symbol. (For deterministic PDAs, there is t most one choice. For non-deterministic PDAs, ll possible choices need to be evluted individully.) If there is no vlid trnsision, terminte nd reject. Push the right side of the production on the stck, rightmost symbols first. 3. If the popped symbol is terminl: Compre it to the current symbol of the input. If it mtches, move the utomton to the right on the input. If not, reject nd terminte. Lets try this with the string gccgcggc. Exmple. (The current symbol is written using cpitl letter): Input string Stck Opertion Gccgcggc S Pop S. Produce S->gW1c Gccgcggc gw1c Pop g. Accept g. Move right on input. gccgcggc W1c Pop W1. Produce W1->cW2g gccgcggc cw2gc Pop c. Accept c. Move right on input. gccgcggc W2gc Pop W2. Produce W2->cW3g gccgcggc cw3ggc Pop c. Accept c. Move right on input. gccgcggc W3ggc Pop W3. Produce W3->gc gccgcggc gcggc Pop g. Accept g. Move right on input (severl cceptnces) gccgcggc c Pop c. Accept c. Move right on input. gccgcggc$ - Stck empty, input string empty. Accept!
13 7012 Finite utomt nd regulr grmmrs, by Clemens Gröpl, Jnury 10, 2013, 12: Summry Forml lnguges re bsic mens in computer science to formlly describe objects tht follow certin rules, tht is tht cn be generted using grmmr. Two fundmentl views on forml lnguges re i) to view them s generted by grmmr, or ii) to view them s ccepted by n utomton. The Chomsky hierrchy plces different restrictions on the grmmrs. This limits the possibilities you hve, but mkes the decision whether word is in such lnguge esier. The nondeterministic utomt (DFA nd PDA) re s powerful s te deterministic counterprts in deciding whether word is in lnguge or not. However, it is esier to define nondeterministic utomton. The importnce for bioinfomtics lies in the stochstic versions of the grmmrs which re used to trin cceptors for biologicl sequence objects (i.e. Genes using Hidden Mrkov models, or RNA using stochstic CFGs).
8 Automata and formal languages. 8.1 Formal languages
8 Automt nd forml lnguges This exposition ws developed y Clemens Gröpl nd Knut Reinert. It is sed on the following references, ll of which re recommended reding: 1. Uwe Schöning: Theoretische Informtik
More information1.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 informationTheory 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 informationTheory 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 informationFinite 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 informationCS375: 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 information1.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 informationFinite Automata. Informatics 2A: Lecture 3. Mary Cryan. 21 September School of Informatics University of Edinburgh
Finite Automt Informtics 2A: Lecture 3 Mry Cryn School of Informtics University of Edinburgh mcryn@inf.ed.c.uk 21 September 2018 1 / 30 Lnguges nd Automt Wht is lnguge? Finite utomt: recp Some forml definitions
More informationFinite 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 informationCMSC 330: Organization of Programming Languages. DFAs, and NFAs, and Regexps (Oh my!)
CMSC 330: Orgniztion of Progrmming Lnguges DFAs, nd NFAs, nd Regexps (Oh my!) CMSC330 Spring 2018 Types of Finite Automt Deterministic Finite Automt (DFA) Exctly one sequence of steps for ech string All
More informationNon Deterministic Automata. Linz: Nondeterministic Finite Accepters, page 51
Non Deterministic Automt Linz: Nondeterministic Finite Accepters, pge 51 1 Nondeterministic Finite Accepter (NFA) Alphbet ={} q 1 q2 q 0 q 3 2 Nondeterministic Finite Accepter (NFA) Alphbet ={} Two choices
More informationCS 275 Automata and Formal Language Theory
CS 275 Automt nd Forml Lnguge Theory Course Notes Prt II: The Recognition Problem (II) Chpter II.6.: Push Down Automt Remrk: This mteril is no longer tught nd not directly exm relevnt Anton Setzer (Bsed
More informationAUTOMATA 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 informationCS 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 information5.1 Definitions and Examples 5.2 Deterministic Pushdown Automata
CSC4510 AUTOMATA 5.1 Definitions nd Exmples 5.2 Deterministic Pushdown Automt Definitions nd Exmples A lnguge cn be generted by CFG if nd only if it cn be ccepted by pushdown utomton. A pushdown utomton
More informationMinimal 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 informationNFAs 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 informationChapter 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 informationAnatomy of a Deterministic Finite Automaton. Deterministic Finite Automata. A machine so simple that you can understand it in less than one minute
Victor Admchik Dnny Sletor Gret Theoreticl Ides In Computer Science CS 5-25 Spring 2 Lecture 2 Mr 3, 2 Crnegie Mellon University Deterministic Finite Automt Finite Automt A mchine so simple tht you cn
More informationAutomata 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 informationHarvard 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 informationAssignment 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 informationCMSC 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 informationFormal 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 informationNondeterminism. Nondeterministic Finite Automata. Example: Moves on a Chessboard. Nondeterminism (2) Example: Chessboard (2) Formal NFA
Nondeterminism Nondeterministic Finite Automt Nondeterminism Subset Construction A nondeterministic finite utomton hs the bility to be in severl sttes t once. Trnsitions from stte on n input symbol cn
More informationFinite 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 informationClosure 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 informationNon-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 informationLecture 6 Regular Grammars
Lecture 6 Regulr Grmmrs COT 4420 Theory of Computtion Section 3.3 Grmmr A grmmr G is defined s qudruple G = (V, T, S, P) V is finite set of vribles T is finite set of terminl symbols S V is specil vrible
More informationTypes 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 informationConvert 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 informationChapter 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 informationTypes 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 informationCS 275 Automata and Formal Language Theory
CS 275 Automt nd Forml Lnguge Theory Course Notes Prt II: The Recognition Problem (II) Chpter II.5.: Properties of Context Free Grmmrs (14) Anton Setzer (Bsed on book drft by J. V. Tucker nd K. Stephenson)
More informationContext-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 informationNondeterminism 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 informationDesigning 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 informationNon Deterministic Automata. Formal Languages and Automata - Yonsei CS 1
Non Deterministic Automt Forml Lnguges nd Automt - Yonsei CS 1 Nondeterministic Finite Accepter (NFA) We llow set of possible moves insted of A unique move. Alphbet = {} Two choices q 1 q2 Forml Lnguges
More information1. 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 informationNon-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 informationDeterministic 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 informationHomework 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 informationCSCI 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 informationTutorial 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 informationRegular 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 informationa b b a pop push read unread
A Finite Automton A Pushdown Automton 0000 000 red unred b b pop red unred push 2 An Exmple A Pushdown Automton Recll tht 0 n n not regulr. cn push symbols onto the stck cn pop them (red them bck) lter
More informationFirst 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 informationTalen 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 informationLecture 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 informationMore 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 information3 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 information5. (±±) Λ = 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 informationLet'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 informationParse 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 informationThis lecture covers Chapter 8 of HMU: Properties of CFLs
This lecture covers Chpter 8 of HMU: Properties of CFLs Turing Mchine Extensions of Turing Mchines Restrictions of Turing Mchines Additionl Reding: Chpter 8 of HMU. Turing Mchine: Informl Definition B
More informationCHAPTER 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 informationCISC 4090 Theory of Computation
9/6/28 Stereotypicl computer CISC 49 Theory of Computtion Finite stte mchines & Regulr lnguges Professor Dniel Leeds dleeds@fordhm.edu JMH 332 Centrl processing unit (CPU) performs ll the instructions
More informationGrammar. 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 informationCS:4330 Theory of Computation Spring Regular Languages. Equivalences between Finite automata and REs. Haniel Barbosa
CS:4330 Theory of Computtion Spring 208 Regulr Lnguges Equivlences between Finite utomt nd REs Hniel Brbos Redings for this lecture Chpter of [Sipser 996], 3rd edition. Section.3. Finite utomt nd regulr
More informationCS375: 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 information12.1 Nondeterminism Nondeterministic Finite Automata. a a b ε. CS125 Lecture 12 Fall 2014
CS125 Lecture 12 Fll 2014 12.1 Nondeterminism The ide of nondeterministic computtions is to llow our lgorithms to mke guesses, nd only require tht they ccept when the guesses re correct. For exmple, simple
More informationFor 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 informationCoalgebra, 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 informationCSC 473 Automata, Grammars & Languages 11/9/10
CSC 473 utomt, Grmmrs & Lnguges 11/9/10 utomt, Grmmrs nd Lnguges Discourse 06 Decidbility nd Undecidbility Decidble Problems for Regulr Lnguges Theorem 4.1: (embership/cceptnce Prob. for DFs) = {, w is
More informationCS 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 informationNon-Deterministic Finite Automata
Non-Deterministic Finite Automt http://users.comlb.ox.c.uk/luke. ong/teching/moc/nf2up.pdf 1 Nondeterministic Finite Automton (NFA) Alphbet ={} q1 q2 2 Alphbet ={} Two choices q1 q2 3 Alphbet ={} Two choices
More informationRegular 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 informationCHAPTER 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 information1 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 informationNormal Forms for Context-free Grammars
Norml Forms for Context-free Grmmrs 1 Linz 6th, Section 6.2 wo Importnt Norml Forms, pges 171--178 2 Chomsky Norml Form All productions hve form: A BC nd A vrile vrile terminl 3 Exmples: S AS S AS S S
More informationCS 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 informationIntermediate 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 informationJava 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 informationUnit #9 : Definite Integral Properties; Fundamental Theorem of Calculus
Unit #9 : Definite Integrl Properties; Fundmentl Theorem of Clculus Gols: Identify properties of definite integrls Define odd nd even functions, nd reltionship to integrl vlues Introduce the Fundmentl
More informationFundamentals 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 informationFirst 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 informationLexical 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 information12.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 informationPART 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 informationCSE : Exam 3-ANSWERS, Spring 2011 Time: 50 minutes
CSE 260-002: Exm 3-ANSWERS, Spring 20 ime: 50 minutes Nme: his exm hs 4 pges nd 0 prolems totling 00 points. his exm is closed ook nd closed notes.. Wrshll s lgorithm for trnsitive closure computtion is
More informationFABER 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 informationSWEN 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 informationImproper Integrals, and Differential Equations
Improper Integrls, nd Differentil Equtions October 22, 204 5.3 Improper Integrls Previously, we discussed how integrls correspond to res. More specificlly, we sid tht for function f(x), the region creted
More informationNFA 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 informationCS103B 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 informationCMPSCI 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 information11.1 Finite Automata. CS125 Lecture 11 Fall Motivation: TMs without a tape: maybe we can at least fully understand such a simple model?
CS125 Lecture 11 Fll 2016 11.1 Finite Automt Motivtion: TMs without tpe: mybe we cn t lest fully understnd such simple model? Algorithms (e.g. string mtching) Computing with very limited memory Forml verifiction
More informationPart 5 out of 5. Automata & languages. A primer on the Theory of Computation. Last week was all about. a superset of Regular Languages
Automt & lnguges A primer on the Theory of Computtion Lurent Vnbever www.vnbever.eu Prt 5 out of 5 ETH Zürich (D-ITET) October, 19 2017 Lst week ws ll bout Context-Free Lnguges Context-Free Lnguges superset
More informationFinite-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 informationProbabilistic Model Checking Michaelmas Term Dr. Dave Parker. Department of Computer Science University of Oxford
Probbilistic Model Checking Michelms Term 2011 Dr. Dve Prker Deprtment of Computer Science University of Oxford Long-run properties Lst lecture: regulr sfety properties e.g. messge filure never occurs
More information1 Structural induction, finite automata, regular expressions
Discrete Structures Prelim 2 smple uestions s CS2800 Questions selected for spring 2017 1 Structurl induction, finite utomt, regulr expressions 1. We define set S of functions from Z to Z inductively s
More informationNFAs 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 information1. 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 informationTREE AUTOMATA AND TREE GRAMMARS
TREE AUTOMATA AND TREE GRAMMARS rxiv:1510.02036v1 [cs.fl] 7 Oct 2015 by Joost Engelfriet DAIMI FN-10 April 1975 Institute of Mthemtics, University of Arhus DEPARTMENT OF COMPUTER SCIENCE Ny Munkegde, 8000
More informationSome 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 informationTuring Machines Part One
Turing Mchines Prt One Wht problems cn we solve with computer? Regulr Lnguges CFLs Lnguges recognizble by ny fesible computing mchine All Lnguges Tht sme drwing, to scle. All Lnguges The Problem Finite
More informationCS 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 informationLecture 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 informationScanner. Specifying patterns. Specifying patterns. Operations on languages. A scanner must recognize the units of syntax Some parts are easy:
Scnner Specifying ptterns source code tokens scnner prser IR A scnner must recognize the units of syntx Some prts re esy: errors mps chrcters into tokens the sic unit of syntx x = x + y; ecomes
More informationGood-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