This lecture covers Chapter 6 of HMU: Pushdown Automata
|
|
- Geoffrey Cunningham
- 6 years ago
- Views:
Transcription
1 This lecture covers Chapter 6 of HMU: ushdown Automata ushdown Automata (DA) Language accepted by a DA Equivalence of CFs and the languages accepted by DAs Deterministic DAs Additional Reading: Chapter 6 of HMU.
2 ushdown Automata Introduction to DAs DA = ɛ-nfa + Stack (LIFO) At each instant, the DA uses: (a) the input symbol, if read; (b) present state; and (c) symbol atop the stack to transition to a new state and alter the top of the stack. Once the string is read, the DA decides to accept/reject the input string. Note: The DA can only read a symbol once (i.e., the reading head is unidirectional). DA = -NFA + Stack Reading head Internal Stack Finite Control Accept/Reject 2 / 27
3 ushdown Automata DA: Formal Definition Definition A DA = (Q, Σ, Γ, δ, q 0, Z 0, F ) where Just like in DFAs: Q is the (finite) set of internal states; Σ is the finite alphabet of input tape symbols; q 0 Q is the (unique) start state; F is the set of final or accepting states of the DA. Γ is the finite alphabet of stack symbols; δ : Q (Σ {ɛ}) Γ 2 Q Γ (power set of Q Γ ) such that δ(q, a, γ) is always a finite set of pairs (q, γ ) Q Γ. Z 0 Γ is the sole symbol atop the stack at the start; and Input symbol (or ) Next State The number of possible transitions resent state (q; a; A) ={(q 0 i; i ):i =1;:::; } Stack symbol on top The string replacing A on top of the stack Convention: lower case symbols s, a, and b will denote input symbols; lower case symbols u, v, w will exclusively denote strings of input symbols; stack symbols are indicated by upper case letters (e.g., A, B, etc); strings of stack symbols are indicated by greek letters (e.g., α, β, etc); 3 / 27
4 ushdown Automata A DA Example Transition Diagram Notation Notation: The label a, A/γ on the edge from a state q to q indicates a possible transition from state q to state q by reading the symbol a when the top of the stack contains the symbol A. This stack symbol is then replaced by the string γ. (q 0 a; A= ; ) 2 (q;a; A), q q 0 (Note: q 0 can be q itself) DA that accepts L = {ww R : w {0.1} } 0;Z 0 =0Z 0 1;Z 0 =1Z 0 0; 0=00 1; 0=10 0; 1=01 1; 1=11 0; 0= 1; 1= ; Z 0 =Z 0 q 0 q 1 q 2 ; 0=0 ; Z 0 =Z 0 ; 1=1 4 / 27
5 Language Accepted by a DA Language Accepted by a DA Definitions The Configuration or Instantaneous Description (ID) of a DA is a triple (q, w, γ) Q Σ Γ where: (i) q is the state of the DA; (ii) w is the unread part of input string; and (iii) γ is the stack contents from top to bottom. An ID tracks the trajectory/operation of the DA as it reads the input string. One-step computation of a DA, denoted by, indicates configuration change due to one transition. Suppose (q, γ) δ(q, a, A). For w Σ, α Γ, (q, aw, Aα) (q, w, γα), [one-step computation] (multi-step) computation, denoted by, indicates configuration change due to zero or any finite number of consecutive DA transitions. ID ID if there are k IDs ID 1,..., ID k (for some k 2) such that: (i) ID 1 = ID and ID k = ID, and (ii) for each i = 1,..., k 1, either ID i = ID i+1 or ID i ID i+1. 5 / 27
6 Language Accepted by a DA Beware of IDs! Lemma Let DA = (Q, Σ, Γ, δ, q 0, Z 0, F ) be given. Let q, q Q, x, y, w Σ, and α, β, γ Σ. Then the following hold. (q, x, α) (q, y, β) (q, xw, α) (q, yw, β) (1) (q, x, α) (q, y, β) (q, x, αγ) (q, y, βγ) (2) roof Idea (1) What hasn t been read cannot affect configuration changes (2) DA transitions cannot occur on empty stack. So the (q, x, α) (q, y, β) must not access any location beneath the last symbol of x. Why is the reverse implication of (2) not true? 6 / 27
7 Language Accepted by a DA Language Accepted by DAs Definition iven DA = (Q, Σ, Γ, δ, q 0, Z 0, F ), the language accepted by by final states is { } L() = w Σ : (q 0, w, Z 0) (q, ɛ, α) for some q F, α Γ. The language accepted by by empty stack is { } N() = w Σ : (q 0, w, Z 0) (q, ɛ, ɛ) for some q Q. Can L() and N() be different? ick a DFA A such that L(A). Convert it to a DA by pushing each symbol that is read onto the stack, increasing the stack size each time a symbol is read. For the derived DA, L() = L(A). However, N() =. Which of the two definitions accepts more languages? 7 / 27
8 Language Accepted by a DA Equivalence of the Two Notions of Language Acceptance Theorem iven DA, there exist DAs and such that L() = N( ) and N() = L( ). roof of Existence of ; X 0= DA DA 00 DA ; X 0= ; Z 0;Z 0X 0 ; X 0= ; X 0= Introduce a new start state and a new final state with the transitions as indicated. The start state first replaces the stack symbol Z 0 by Z 0X 0. If and only if w N() will the computation by end with the stack containing precisely X 0. The DA then transitions to the final state popping X 0. Hence, N() = L( ). 8 / 27
9 Language Accepted by a DA Equivalence of the two Notions of Language Acceptance roof of Existence of such that L( ) = N() DA DA 0 DA ; any= ; any= ; Z 0 ;Z 0 X 0 ; any= ; any= Introduce a new start state and a special state with the transitions as indicated. The start state first replaces the stack symbol Z 0 by Z 0X 0. If and only if w L() will the computation by end in a final state with the stack containing (at least) X 0. The DA then transitions to the special state and starts to pop stack symbols one at time until the stack is empty. Hence, L() = N( ). 9 / 27
10 CFs and DAs CFs and DAs Is every CFL accepted by some DA and vice versa? Theorem For every CF, there exists a DA such that N() = L(). roof Let = (V, T,, S) be given. Construct DA = ({q 0}, V, V T, δ, S, {q 0}) with δ defined by [Type 1] δ(q 0, a, a) = {(q 0, ɛ)}, whenever a Σ, [Type 2] δ(q 0, ɛ, A) = {(q 0, α) : A α is a production rule in }. This DA mimics all possible leftmost derivations. We use induction to show that L() = N() 10 / 27
11 CFs and DAs CFs and DAs roof of 1-1 Correspondence between DA Moves and Leftmost Derivations Suppose w T and S LM w i 2 T V i 2 (V [ T ) i 2 V Leftmost Derivation in rammar w 2 w 3 w 4 V 2 S)LM V 3..)LM )LM )LM )LM w k = w V w. x \ y:=suffix of y in x. S! 1 V 2! 2 V 3! 3 V 4! 4 { { { { Unread art of Input Tape w w w \ w 2 w \ w 2 w \ w 3 w \ w 3 w \ w 4 w \ w k 1 Stack Stack Symbols that have been popped S 1 V V V 4 4. w 2 w 3 w 3 w 4 k 1 k 1 w k 1 A \ B := The suffix of B in A w k [Start] [Type 2] [Type 1] w 2 [Type 2] [Type 1] [Type 2] [Type 1] [Type 2] [Type 1] Configurations in DA 11 / 27
12 CFs and DAs CFs and DAs Theorem For every DA, there exists a CF such that L() = N(). roof iven = (Q, Σ, Γ, δ, q 0, Z 0, F ), we define = (V, T,, S) as follows. T = Σ; V = {S} {[pxq] : p, q Q, X Γ}; Interpretation: Each variable [pxq] will generate a terminal string w iff w a move (in finite steps) from the state p to q popping X from the stack. contains only the following rules: S [q 0Z 0p] for all p Q. Suppose that (r, X 1 X l ) δ(q, a, X ). Then, for any states p 1,..., p l Q, [qxp l ] a[rx 1p 1][p 2X 2p 2] [p l 1 X l p l ]. Note that if (r, ɛ) δ(q, a, X ), then [qxr] a. We will show [qxp] q = q 0, X = Z 0. w (q, w, X ) (p, ɛ, ɛ). The proof is complete by choosing 12 / 27
13 CFs and DAs CFs and DAs roof of (q, w, X ) (p, ɛ, ɛ) [qxp] w. (Induction on # of steps of computation) Basis: Let w N(). Suppose there is a one-step computation (q, w, X ) (p, ɛ, ɛ). Then, w Σ {ɛ}. Since (p, ɛ) δ(q, w, X ), [qxp] w is a production rule. Induction: Let (q, w, X ) (p, ɛ, ɛ). Let a be read in the first step of the computation, and let w = ax. Then the following argument completes the proof. 1 Defn. (q;w;x) (r 1 ;x;y 1 ;:::;Y k ) ` (p; ; ) ) [qxp]! {z} a [r 1 Y 1 r 2 ][r 2 Y 2 r 3 ] [r k Y k p] ` {z } w=ax 2 A portion of x is read, and Y 1 is popped; more is read, Y 2 is popped,::: =x z } { (r 1 ; w 1 w 2 w ;Y 1 Y 2 Y k ) (r2 ;w 2 w k ;Y 2 Y k ) (r 3 ;w 3 w k ;Y 3 Y k ) (r k ;w k ;Y k ) ` ` ` 5 (p; ; ) ` (r 1 ;w 1 ;Y 1 ) (r 2 ; ; ) (r 2 ;w 2 ;Y 2 ) (r 3 ; ; ) ` + Induc. + Induc. [r 1 Y 2 r 2 ] ) w 1 [r 2 Y 3 r 3 ] ) w 2 + [r k Y k p] ) w k Induc. 13 / 27
14 CFs and DAs CFs and DAs roof of [qxp] w (q, w, X ) (p, ɛ, ɛ). (Induction on # of steps of derivation) Basis: Let [qxp] w in one step. Then, [qxp] w must be a production rule. Consequently, (p, ɛ) (q, w, X ) and (q, w, X ) (p, ɛ, ɛ). Induction: Let [qxp] w. 4 (r 0 ;Y 1 Y k ) 2 (q;a;x) () (q;a; X) (r 0 ; ;Y 1 Y k ) ` 3 Induc. (r 0 ;w 1 ;Y 1 ) (r 1 ; ; ) 5 1 [qxp] ) LM ` + a [r 0 Y 1 r 1 ][r 1 Y 2 r 2 ] [r k 1 Y k p] 2 + ) LM ) LM ) LM w 1 w 2 w k + Induc. (r 1 ;w 2 ;Y 2 ) (r 2 ; ; ) ` + ) LM w = aw 1 w k Induc. (r k 1 ;w k ;Y k ) (p; ; ) (q;aw 1 w 2 w k ;X) {z } (r 0 ;w 1 w k ;Y 1 Y k ) (r1 ;w 2 w k ;Y 2 Y k ) (p; ; ) ` ` ` ` w Lemma Lemma Lemma ` 14 / 27
15 Deterministic DAs Deterministic DAs (DDAs) DAs are (by definition) non-deterministic. Deterministic DAs are defined to have no choice in their transitions. Definition A DDA is a DA = (Q, Σ, Γ, δ, q 0, Z 0, F ) such that for each q Q and X Γ, δ(q, a, X ) 1 for any a Σ {ɛ}, i.e., a configuration cannot transition to more than one configuration. δ(q, a, X ) = 1 for some a Σ δ(q, ɛ, X ) =, i.e., both reading or not reading (a tape symbol) cannot lead to valid configurations. DDAs have a computation power that is strictly better than DFAs Example: L() = N() = {0 n 1 n : n 1} : 0;Z 0=0Z 0 0; 0=00 : q 1; 0= 0 q 1 q 2 ; Z 0=Z 0 DDAs have a computation power that is strictly worse that DAs. (We will discuss this later) 15 / 27
16 Deterministic DAs Languages Accepted by DDAs The two notions of acceptance (empty stack and final state) are not equivalent in the case of DDAs. There are languages L such that L = L() for some DDA, but there exists no such that L = N( ). Theorem Every regular language L is the language accepted by the final states of some DDA. roof Simply view the DFA accepting L as a DDA (with the stack always containing Z 0). The regular language L = {0} cannot equal N() for any DDA. Suppose DDA accepts L by emptying its stack. Since 0 is accepted, eventually reaches a configuration (p, ɛ, ɛ) for some state p. Now, suppose that is fed with the input 00. Since is deterministic, reads a 0 and eventually has to get to (p, ɛ, ɛ). However, it hangs at this configuration and cannot read any further input symbols. Hence, cannot accept / 27
17 Deterministic DAs Languages Accepted by DDAs A language L is said to have the prefix property if no two distinct strings in the language are prefixes of one another. Theorem A language L = N() for some DDA iff L has the prefix property and L = L( ) for some DDA. roof Let L = N() for some DDA. Let w, ww be in L with w ɛ. Then (q 0, w, Z 0) (p, ɛ, ɛ) for some p Q. The DDA hangs at this state since the stack is empty. Hence, it cannot accept ww. The fact that L = L( ) for some DDA follows from Theorem since the construction yields a deterministic DA. ; X 0= DA DA 00 DA ; X 0= ; Z 0;Z 0X 0 ; X 0= ; X 0= 17 / 27
18 Deterministic DAs Languages Accepted by DDAs roof Let DDA be given. Let w L( ), (q 0, w, Z 0) (p, ɛ, γ) for some p F, and γ Γ. Since L( ) satisfies the prefix property, the DA cannot enter any final state before reading all of w. Then we can delete all transitions from final states; this X Γ does not alter L( ). Then, the construction of Theorem yields a deterministic DA such that N( ) = L( ) = L DA DA ; any= ; any= ; Z 0 ;Z 0 X 0 ; any= ; any= 18 / 27
19 Deterministic DAs DDAs and Unambiguous rammars Theorem If L = N() for some DDA, then L has an unambiguous CF. roof Let be the CF constructed in Theorem Suppose is ambiguous. Then, for some w L has 2 leftmost derivations. However, each derivation corresponds to a unique trajectory of configurations in that also accepts w by emptying stack. Since is deterministic, the trajectories, and hence, the derivations have to be identical. Hence, is unambiguous. 19 / 27
20 Deterministic DAs DDAs and unambiguous rammars Theorem If L = L() for some DDA, then L has an unambiguous CF. roof Let $ be a symbol not in the alphabet of L. Consider L = {w$ : w L}. Then, L has the prefix property. By Theorem 6.4.2, there must exist a DDA such that L = N( ). By Theorem 6.4.3, L has an unambiguous CF = (V, T,, S). Define CF = (V {$}, T \ {$}, {$ ɛ}, S). generates L. Suppose is ambiguous. Then, for some w L has 2 leftmost derivations. The last steps in the two leftmost derivations of w must use the production $ ɛ. Then, the portions of the two leftmost derivations without the last production step correspond to two leftmost derivations of w$. Hence, must be unambiguous, which is a contradiction. Hence, is also unambiguous. 20 / 27
21 Additional Slides Explanation for Slide 11 Suppose we want to show that if there is a derivation in generating w, then there is a trajectory in accepting w. To do that let S w. LM Then there must be a LM derivation as in the left column. In each step of the leftmost derivation, a part of the string w is uncovered, and the uncovered part is succeeded by a non-terminal. Let after i = 1,..., k 2 production uses: (1) the prefix w i+1 of w be uncovered (shown in purple); (2) the leftmost non-terminal be V i+1 (shown in orange); and (3) is the string to the right of the leftmost non-terminal α i+1 that contains both terminal and non-terminal symbols (shown in beige). After the k th production rule, we have derived w k = w. Now suppose S γ 1 = w 2V 2α 2, V 2 γ 2,..., V k 1 γ k 1 be the k 1 production rules used in the leftmost derivation. Now let us show that a trajectory exists for using the above information we have laid out. Since there is only one state for the DA, the right part of the slide presents only the portion of tape yet to be read, and the stack contents; additionally, it also gives the string of terminals that has been popped up until any point in time. Initially, the tape contains w, the stack contains S, and ɛ has been popped thus far. 21 / 27
22 Additional Slides Explanation for Slide 11 (Continued) Now since S γ 1 is a valid production rule, by the definition of, there is a Type-22 transition that reads nothing from the input tape, reads S from the stack and pushes γ 1 := w 2V 2α 2 onto the stack. Thus, the following one-step computation is valid (q 0, w, S) (q 0, w, w 2V 2α 2). Note that w 1 is the prefix of w uncovered after the first step of the derivation, and hence matches the first few symbols of w. Then, it is clear that one can perform w Type-1 transitions that pop each of these symbols from the stack. Thus, after popping w 1 symbols, we see that: (q 0, w, S) (q 0, w, w 2V 2α 2) (q 0, w \ w 2, V 2α 2), where we let w \ w 2 to denote the suffix of w 2 in w. Now, note that V 2 γ 2 is a valid production rule; hence, there is a valid one-step computation from (q 0, w \ w 2, V 2α 2) that uses the corresponding Type-2 transition. The resultant configuration change will then be (q 0, w, S) (q 0, w, w 2V 2α 2) (q 0, w \ w 2, V 2α 2) (q 0, w \ w 2, (w 3 \ w 2)V 3α 3), where (w 3 \ w 2)V 3α 3 := γ 2α / 27
23 Additional Slides Explanation for Slide 11 (Continued) Again, we see that a portion of the top of the stack contains w \ w 2, which matches the initial segment of the input tape. Then there is a valid multi-step computation involving w 3 \ w 2 Type-1 transitions that pops w 3 \ w 2. The resultant configuration will then be q 0, w \ w 3, V 3α 3). Now, this proceeds until all of w is exhausted (read) from the input tape, and the configuration at the end will be (q 0, ɛ, ɛ). Since the stack is empty, the original string w will be accepted. The direction that a trajectory accepting w in implies a derivation of w in is simply arguing the above in the reverse direction using the facts that: a trajectory for accepting w in must consist only of Type-1 and Type-2 transitions, and each Type-2 transition corresponds to a unique production in. The argument is literally the same as above except that we now uncover the production rule from the corresponding Type-2 transition. 23 / 27
24 Additional Slides Explanation for Slide 13 Inductive proof for (q, w, X ) (p, ɛ, ɛ) [qxp] w based on length of computation. Basis: Let (q, w, X ) (p, ɛ, ɛ) be a one-step computation. Thus, w has to be an input symbol or ɛ. Then, by definition of one-step computation it must be true that (p, ɛ) (q, w, X ). Then, by the construction of, we have [qxr] w (see Slide 12 for the construction), and hence [qxr] Induction: (q, w, X ) (p, ɛ, ɛ) in say k > 1 steps. Let us assume that the in the first step of the computation, the symbol a is read from the input tape (or a = ɛ). Let w = ax. Let s break the k-step computation to a single step followed by a k 1-step computation as detained in 1 (encircled in black). Let r 1 be the state of the DA after the first step and let X be popped and Y 1 Y k be pushed onto the stack after the first step/transition/move. Now, the claim is that the k 1 step portion of the computation can be expanded into the sequence of computations as given in 2 (encircled in black). The reasoning is as follows. The ID (r 1, x, Y 1 Y k ) eventually changes to (p, ɛ, ɛ). There must be a finite number of moves after which the effective stack change is the popping of Y 1, i.e., after a finite number of steps Y 2 is at the top for the very first time. The steps until then could have popped Y 1, pushed a string, and then popped it eventually to reveal Y 2 at the top. w. 24 / 27
25 Additional Slides Explanation for Slide 13 (Continued) Let w 1 be the portion of the input tape read and r 2 be the state pf the DA when this intermediate ID where Y 2 is at the top of the stack (i.e., the stack contains Y 2, Y k ) is attained. Thus, (r, x, Y 1 Y k ) (r 2, x \ w 1, Y 2, Y k ) (p, ɛ, ɛ), where again we let w \ w 1 to be the suffix of w 1 in w. By a similar argument, after reading another segment, say w 2, of the input tape and reaching (some) state r 3, the top of the stack of the DA contains Y 3 for the very first time. Thus, (r, x, Y 1 Y k ) (r 2, x \ w 1, Y 2, Y k ) (r 3, x \ (w 1w 2), Y 3, Y k ) (p, ɛ, ɛ). roceeding inductively, we see that 2 (encircled in black) holds. Note that x is then equal to the concatenation of the w i s, i.e., x = w 1 w k. Now focus on the computation within the blue block in 2. In no intermediate ID of the computation is Y 2 at the top of the stack (since (r 2, x \ w 1, Y 2, Y k ) is the very first time Y 2 is at the top of the stack). Thus, the stack contents Y 2 Y k are never visited in this first set of moves, and hence, we see that (r 1, x, Y 1 Y k ) (r 2, x \ w 1, Y 2, Y k ) (r 1, w 1, Y 1) (r 2, ɛ, ɛ). (3) 25 / 27
26 Additional Slides Explanation for Slide 13 (Continued) Similarly, we see that the in portion of the computation in orange, no intermediate ID of the computation has Y 3 at the top of the stack (since (r 3, x \ (w 1w 2), Y 3, Y k ) is the very first time Y 3 is at the top of the stack). Hence, (r 2, x \ w 2 w k, Y 2, Y k ) (r 3, w 2 w k, Y 3 Y k ) (r 2, w 2, Y 2) (r 3, ɛ, ɛ). (4) We can proceed inductively to argue that (r i, w i, Y i ) (r i+1, ɛ, ɛ) for i = 1,..., k 1. Now each of these derivations (r i, w i, Y i ) (r i+1, ɛ, ɛ) for i = 1,..., k 1 contain k 1 or less steps, because the number of steps they contain is at least one-less than the number of steps in the computation in 1 (encircled in black). Consequently, by the induction hypothesis, we have [r i Y i r i+1 ] By the very same argument [r k Y k p] w k. w i, i = 1,..., k 1. Now focus on the yellow box at the top, the first one-step computation guarantees that there exists a production rule [qxp] a[r 1Y 1r 2][r 2Y 2r 3] [r k 1 Y k 1 r k ][r k Y k p]. (5) Now combining the above production with the known derivations in 4 (encircled in black), we see that [qxp] aw 1 w k = ax = w. 26 / 27
27 Additional Slides (q, w, X ) (r 0, w 1 w k, Y 1 Y k ) (r 1, w 2 w k, Y 2 Y k ) (r k, ɛ, ɛ) = (p, ɛ, ɛ). 27 (6) / 27 Explanation for Slide 14 Inductive proof for (q, w, X ) (p, ɛ, ɛ) [qxp] derivation. Basis: [qxp] w based on length of leftmost w be a one-step derivation. This can be possible only if LM (p, ɛ, ɛ). (p, ɛ) (q, w, X ), which then means (q, w, X ) Induction: Let [qxp] w in k > 1 steps. As in the previous direction, let us split the leftmost derivation into the first step and then rest. The first step must involve the application of some production rule, say, [qxp] a[r 0Y 1r 1][r 1Y 2r 2] [r k 1 Y k p]. By 1 (encircled in 1) each non-terminal [r i 1 Y i r i ] i = 1,..., k must derive (via a leftmost derivation) a segment of w, say w i in k 1 steps or less. [w i is the yield of the parse subtree in the parse tree of [qxp] with yield w, and the depth of the subtree is at most 1 less than the depth of the parse tree of [qxp].). Hence, [r i 1 Y i r i ] LM w i for i = 1,..., k in k 1 steps or less (I ve set r k = p here). By induction hypothesis, then (r i 1, w i, Y i ) (r i, ɛ, ɛ). Then by Lemma 6.2.1, (r i 1, w i w k, Y i Y k ) (r i, w i+1 w k, Y i+1 Y k ). Thus,
This lecture covers Chapter 5 of HMU: Context-free Grammars
This lecture covers Chapter 5 of HMU: Context-free rammars (Context-free) rammars (Leftmost and Rightmost) Derivations Parse Trees An quivalence between Derivations and Parse Trees Ambiguity in rammars
More information60-354, Theory of Computation Fall Asish Mukhopadhyay School of Computer Science University of Windsor
60-354, Theory of Computation Fall 2013 Asish Mukhopadhyay School of Computer Science University of Windsor Pushdown Automata (PDA) PDA = ε-nfa + stack Acceptance ε-nfa enters a final state or Stack is
More informationTheory of Computation (IV) Yijia Chen Fudan University
Theory of Computation (IV) Yijia Chen Fudan University Review language regular context-free machine DFA/ NFA PDA syntax regular expression context-free grammar Pushdown automata Definition A pushdown automaton
More informationUNIT-VI PUSHDOWN AUTOMATA
Syllabus R09 Regulation UNIT-VI PUSHDOWN AUTOMATA The context free languages have a type of automaton that defined them. This automaton, called a pushdown automaton, is an extension of the nondeterministic
More informationThis lecture covers Chapter 7 of HMU: Properties of CFLs
This lecture covers Chapter 7 of HMU: Properties of CFLs Chomsky Normal Form Pumping Lemma for CFs Closure Properties of CFLs Decision Properties of CFLs Additional Reading: Chapter 7 of HMU. Chomsky Normal
More informationPushdown Automata. We have seen examples of context-free languages that are not regular, and hence can not be recognized by finite automata.
Pushdown Automata We have seen examples of context-free languages that are not regular, and hence can not be recognized by finite automata. Next we consider a more powerful computation model, called a
More informationLanguages, regular languages, finite automata
Notes on Computer Theory Last updated: January, 2018 Languages, regular languages, finite automata Content largely taken from Richards [1] and Sipser [2] 1 Languages An alphabet is a finite set of characters,
More informationPushdown Automata (2015/11/23)
Chapter 6 Pushdown Automata (2015/11/23) Sagrada Familia, Barcelona, Spain Outline 6.0 Introduction 6.1 Definition of PDA 6.2 The Language of a PDA 6.3 Euivalence of PDA s and CFG s 6.4 Deterministic PDA
More informationCSE 211. Pushdown Automata. CSE 211 (Theory of Computation) Atif Hasan Rahman
CSE 211 Pushdown Automata CSE 211 (Theory of Computation) Atif Hasan Rahman Lecturer Department of Computer Science and Engineering Bangladesh University of Engineering & Technology Adapted from slides
More informationPushdown Automata. Notes on Automata and Theory of Computation. Chia-Ping Chen
Pushdown Automata Notes on Automata and Theory of Computation Chia-Ping Chen Department of Computer Science and Engineering National Sun Yat-Sen University Kaohsiung, Taiwan ROC Pushdown Automata p. 1
More informationPushdown automata. Twan van Laarhoven. Institute for Computing and Information Sciences Intelligent Systems Radboud University Nijmegen
Pushdown automata Twan van Laarhoven Institute for Computing and Information Sciences Intelligent Systems Version: fall 2014 T. van Laarhoven Version: fall 2014 Formal Languages, Grammars and Automata
More informationHarvard CS 121 and CSCI E-207 Lecture 10: CFLs: PDAs, Closure Properties, and Non-CFLs
Harvard CS 121 and CSCI E-207 Lecture 10: CFLs: PDAs, Closure Properties, and Non-CFLs Harry Lewis October 8, 2013 Reading: Sipser, pp. 119-128. Pushdown Automata (review) Pushdown Automata = Finite automaton
More informationTheory of Computation
Thomas Zeugmann Hokkaido University Laboratory for Algorithmics http://www-alg.ist.hokudai.ac.jp/ thomas/toc/ Lecture 3: Finite State Automata Motivation In the previous lecture we learned how to formalize
More informationDeterministic Finite Automata (DFAs)
CS/ECE 374: Algorithms & Models of Computation, Fall 28 Deterministic Finite Automata (DFAs) Lecture 3 September 4, 28 Chandra Chekuri (UIUC) CS/ECE 374 Fall 28 / 33 Part I DFA Introduction Chandra Chekuri
More informationDeterministic Finite Automata (DFAs)
Algorithms & Models of Computation CS/ECE 374, Fall 27 Deterministic Finite Automata (DFAs) Lecture 3 Tuesday, September 5, 27 Sariel Har-Peled (UIUC) CS374 Fall 27 / 36 Part I DFA Introduction Sariel
More informationTHEORY OF COMPUTATION (AUBER) EXAM CRIB SHEET
THEORY OF COMPUTATION (AUBER) EXAM CRIB SHEET Regular Languages and FA A language is a set of strings over a finite alphabet Σ. All languages are finite or countably infinite. The set of all languages
More informationIntroduction to Formal Languages, Automata and Computability p.1/42
Introduction to Formal Languages, Automata and Computability Pushdown Automata K. Krithivasan and R. Rama Introduction to Formal Languages, Automata and Computability p.1/42 Introduction We have considered
More informationPushdown Automata (PDA) The structure and the content of the lecture is based on
Pushdown Automata (PDA) The structure and the content of the lecture is based on http://www.eecs.wsu.edu/~ananth/cpts317/lectures/index.htm 1 Excursion: Previous lecture n Context-free grammar G=(V,T,P,S),
More information(pp ) PDAs and CFGs (Sec. 2.2)
(pp. 117-124) PDAs and CFGs (Sec. 2.2) A language is context free iff all strings in L can be generated by some context free grammar Theorem 2.20: L is Context Free iff a PDA accepts it I.e. if L is context
More informationEinführung in die Computerlinguistik
Einführung in die Computerlinguistik Context-Free Grammars (CFG) Laura Kallmeyer Heinrich-Heine-Universität Düsseldorf Summer 2016 1 / 22 CFG (1) Example: Grammar G telescope : Productions: S NP VP NP
More informationComputational Models - Lecture 4
Computational Models - Lecture 4 Regular languages: The Myhill-Nerode Theorem Context-free Grammars Chomsky Normal Form Pumping Lemma for context free languages Non context-free languages: Examples Push
More informationCISC4090: Theory of Computation
CISC4090: Theory of Computation Chapter 2 Context-Free Languages Courtesy of Prof. Arthur G. Werschulz Fordham University Department of Computer and Information Sciences Spring, 2014 Overview In Chapter
More informationFinite Automata. Mahesh Viswanathan
Finite Automata Mahesh Viswanathan In this lecture, we will consider different models of finite state machines and study their relative power. These notes assume that the reader is familiar with DFAs,
More informationCpSc 421 Final Exam December 15, 2006
CpSc 421 Final Exam December 15, 2006 Do problem zero and six of problems 1 through 9. If you write down solutions for more that six problems, clearly indicate those that you want graded. Note that problems
More informationComputational Models - Lecture 5 1
Computational Models - Lecture 5 1 Handout Mode Iftach Haitner and Yishay Mansour. Tel Aviv University. April 10/22, 2013 1 Based on frames by Benny Chor, Tel Aviv University, modifying frames by Maurice
More informationComputability and Complexity
Computability and Complexity Push-Down Automata CAS 705 Ryszard Janicki Department of Computing and Software McMaster University Hamilton, Ontario, Canada janicki@mcmaster.ca Ryszard Janicki Computability
More informationEquivalence of CFG s and PDA s
Equivalence of CFG s and PDA s Mridul Aanjaneya Stanford University July 24, 2012 Mridul Aanjaneya Automata Theory 1/ 53 Recap: Pushdown Automata A PDA is an automaton equivalent to the CFG in language-defining
More informationNondeterministic Finite Automata
Nondeterministic Finite Automata Mahesh Viswanathan Introducing Nondeterminism Consider the machine shown in Figure. Like a DFA it has finitely many states and transitions labeled by symbols from an input
More informationSeptember 11, Second Part of Regular Expressions Equivalence with Finite Aut
Second Part of Regular Expressions Equivalence with Finite Automata September 11, 2013 Lemma 1.60 If a language is regular then it is specified by a regular expression Proof idea: For a given regular language
More informationCS481F01 Solutions 6 PDAS
CS481F01 Solutions 6 PDAS A. Demers 2 November 2001 1. Give a NPDAs that recognize the following languages: (a) The set of all strings in {0, 1} that contain twice as many 1s as 0s. (answer a) We build
More informationAutomata Theory (2A) Young Won Lim 5/31/18
Automata Theory (2A) Copyright (c) 2018 Young W. Lim. Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.2 or any later
More informationPushdown Automata: Introduction (2)
Pushdown Automata: Introduction Pushdown automaton (PDA) M = (K, Σ, Γ,, s, A) where K is a set of states Σ is an input alphabet Γ is a set of stack symbols s K is the start state A K is a set of accepting
More informationUndecidable Problems and Reducibility
University of Georgia Fall 2014 Reducibility We show a problem decidable/undecidable by reducing it to another problem. One type of reduction: mapping reduction. Definition Let A, B be languages over Σ.
More informationNon-context-Free Languages. CS215, Lecture 5 c
Non-context-Free Languages CS215, Lecture 5 c 2007 1 The Pumping Lemma Theorem. (Pumping Lemma) Let be context-free. There exists a positive integer divided into five pieces, Proof for for each, and..
More informationIntroduction and Motivation. Introduction and Motivation. Introduction to Computability. Introduction and Motivation. Theory. Lecture5: Context Free
ntroduction to Computability Theory Lecture5: Context Free Languages Prof. Amos sraeli 1 ntroduction and Motivation n our study of RL-s we Covered: 1. Motivation and definition of regular languages. 2.
More informationFooling Sets and. Lecture 5
Fooling Sets and Introduction to Nondeterministic Finite Automata Lecture 5 Proving that a language is not regular Given a language, we saw how to prove it is regular (union, intersection, concatenation,
More informationChapter Five: Nondeterministic Finite Automata
Chapter Five: Nondeterministic Finite Automata From DFA to NFA A DFA has exactly one transition from every state on every symbol in the alphabet. By relaxing this requirement we get a related but more
More informationPushdown Automata. Reading: Chapter 6
Pushdown Automata Reading: Chapter 6 1 Pushdown Automata (PDA) Informally: A PDA is an NFA-ε with a infinite stack. Transitions are modified to accommodate stack operations. Questions: What is a stack?
More informationAutomata and Computability. Solutions to Exercises
Automata and Computability Solutions to Exercises Spring 27 Alexis Maciel Department of Computer Science Clarkson University Copyright c 27 Alexis Maciel ii Contents Preface vii Introduction 2 Finite Automata
More informationTheory of Computation
Thomas Zeugmann Hokkaido University Laboratory for Algorithmics http://www-alg.ist.hokudai.ac.jp/ thomas/toc/ Lecture 10: CF, PDAs and Beyond Greibach Normal Form I We want to show that all context-free
More informationAutomata & languages. A primer on the Theory of Computation. Laurent Vanbever. ETH Zürich (D-ITET) October,
Automata & languages A primer on the Theory of Computation Laurent Vanbever www.vanbever.eu ETH Zürich (D-ITET) October, 5 2017 Part 3 out of 5 Last week, we learned about closure and equivalence of regular
More informationPart 3 out of 5. Automata & languages. A primer on the Theory of Computation. Last week, we learned about closure and equivalence of regular languages
Automata & languages A primer on the Theory of Computation Laurent Vanbever www.vanbever.eu Part 3 out of 5 ETH Zürich (D-ITET) October, 5 2017 Last week, we learned about closure and equivalence of regular
More informationComputational Models - Lecture 1 1
Computational Models - Lecture 1 1 Handout Mode Ronitt Rubinfeld and Iftach Haitner. Tel Aviv University. February 29/ March 02, 2016 1 Based on frames by Benny Chor, Tel Aviv University, modifying frames
More informationFundamentele Informatica II
Fundamentele Informatica II Answer to selected exercises 5 John C Martin: Introduction to Languages and the Theory of Computation M.M. Bonsangue (and J. Kleijn) Fall 2011 5.1.a (q 0, ab, Z 0 ) (q 1, b,
More informationMTH401A Theory of Computation. Lecture 17
MTH401A Theory of Computation Lecture 17 Chomsky Normal Form for CFG s Chomsky Normal Form for CFG s For every context free language, L, the language L {ε} has a grammar in which every production looks
More information(Refer Slide Time: 0:21)
Theory of Computation Prof. Somenath Biswas Department of Computer Science and Engineering Indian Institute of Technology Kanpur Lecture 7 A generalisation of pumping lemma, Non-deterministic finite automata
More informationLecture 17: Language Recognition
Lecture 17: Language Recognition Finite State Automata Deterministic and Non-Deterministic Finite Automata Regular Expressions Push-Down Automata Turing Machines Modeling Computation When attempting to
More informationComputational Models #1
Computational Models #1 Handout Mode Nachum Dershowitz & Yishay Mansour March 13-15, 2017 Nachum Dershowitz & Yishay Mansour Computational Models #1 March 13-15, 2017 1 / 41 Lecture Outline I Motivation
More informationCFGs and PDAs are Equivalent. We provide algorithms to convert a CFG to a PDA and vice versa.
CFGs and PDAs are Equivalent We provide algorithms to convert a CFG to a PDA and vice versa. CFGs and PDAs are Equivalent We now prove that a language is generated by some CFG if and only if it is accepted
More informationcse303 ELEMENTS OF THE THEORY OF COMPUTATION Professor Anita Wasilewska
cse303 ELEMENTS OF THE THEORY OF COMPUTATION Professor Anita Wasilewska LECTURE 6 CHAPTER 2 FINITE AUTOMATA 2. Nondeterministic Finite Automata NFA 3. Finite Automata and Regular Expressions 4. Languages
More informationClosure under the Regular Operations
Closure under the Regular Operations Application of NFA Now we use the NFA to show that collection of regular languages is closed under regular operations union, concatenation, and star Earlier we have
More informationPlease give details of your answer. A direct answer without explanation is not counted.
Please give details of your answer. A direct answer without explanation is not counted. Your answers must be in English. Please carefully read problem statements. During the exam you are not allowed to
More information(pp ) PDAs and CFGs (Sec. 2.2)
(pp. 117-124) PDAs and CFGs (Sec. 2.2) A language is context free iff all strings in L can be generated by some context free grammar Theorem 2.20: L is Context Free iff a PDA accepts it I.e. if L is context
More informationAC68 FINITE AUTOMATA & FORMULA LANGUAGES DEC 2013
Q.2 a. Prove by mathematical induction n 4 4n 2 is divisible by 3 for n 0. Basic step: For n = 0, n 3 n = 0 which is divisible by 3. Induction hypothesis: Let p(n) = n 3 n is divisible by 3. Induction
More informationDeterministic Finite Automata (DFAs)
Algorithms & Models of Computation CS/ECE 374, Spring 29 Deterministic Finite Automata (DFAs) Lecture 3 Tuesday, January 22, 29 L A TEXed: December 27, 28 8:25 Chan, Har-Peled, Hassanieh (UIUC) CS374 Spring
More informationAutomata and Computability. Solutions to Exercises
Automata and Computability Solutions to Exercises Fall 28 Alexis Maciel Department of Computer Science Clarkson University Copyright c 28 Alexis Maciel ii Contents Preface vii Introduction 2 Finite Automata
More informationComputational Models Lecture 8 1
Computational Models Lecture 8 1 Handout Mode Ronitt Rubinfeld and Iftach Haitner. Tel Aviv University. May 11/13, 2015 1 Based on frames by Benny Chor, Tel Aviv University, modifying frames by Maurice
More informationOutline 1 PCP. 2 Decision problems about CFGs. M.Mitra (ISI) Post s Correspondence Problem 1 / 10
Outline 1 PCP 2 Decision problems about CFGs M.Mitra (ISI) Post s Correspondence Problem 1 / 10 PCP reduction Given: M, w in encoded form To construct: an instance (A, B) of MPCP such that M accepts w
More informationTheory of Computation
Theory of Computation COMP363/COMP6363 Prerequisites: COMP4 and COMP 6 (Foundations of Computing) Textbook: Introduction to Automata Theory, Languages and Computation John E. Hopcroft, Rajeev Motwani,
More information3.13. PUSHDOWN AUTOMATA Pushdown Automata
3.13. PUSHDOWN AUTOMATA 317 3.13 Pushdown Automata We have seen that the regular languages are exactly the languages accepted by DFA s or NFA s. The context-free languages are exactly the languages accepted
More informationChapter 5. Finite Automata
Chapter 5 Finite Automata 5.1 Finite State Automata Capable of recognizing numerous symbol patterns, the class of regular languages Suitable for pattern-recognition type applications, such as the lexical
More informationLet us first give some intuitive idea about a state of a system and state transitions before describing finite automata.
Finite Automata Automata (singular: automation) are a particularly simple, but useful, model of computation. They were initially proposed as a simple model for the behavior of neurons. The concept of a
More informationCS5371 Theory of Computation. Lecture 9: Automata Theory VII (Pumping Lemma, Non-CFL, DPDA PDA)
CS5371 Theory of Computation Lecture 9: Automata Theory VII (Pumping Lemma, Non-CFL, DPDA PDA) Objectives Introduce the Pumping Lemma for CFL Show that some languages are non- CFL Discuss the DPDA, which
More informationPumping Lemma for CFLs
Pumping Lemma for CFLs v y s Here we go again! Intuition: If L is CF, then some CFG G produces strings in L If some string in L is very long, it will have a very tall parse tree If a parse tree is taller
More informationLecture 2: Regular Expression
Lecture 2: Regular Expression Instructor: Ketan Mulmuley Scriber: Yuan Li January 8, 2015 In the last lecture, we proved that DFA, NFA, and NFA with ϵ-moves are equivalent. Recall that a language L Σ is
More informationFoundations of Informatics: a Bridging Course
Foundations of Informatics: a Bridging Course Week 3: Formal Languages and Semantics Thomas Noll Lehrstuhl für Informatik 2 RWTH Aachen University noll@cs.rwth-aachen.de http://www.b-it-center.de/wob/en/view/class211_id948.html
More informationOctober 6, Equivalence of Pushdown Automata with Context-Free Gramm
Equivalence of Pushdown Automata with Context-Free Grammar October 6, 2013 Motivation Motivation CFG and PDA are equivalent in power: a CFG generates a context-free language and a PDA recognizes a context-free
More informationHarvard CS 121 and CSCI E-207 Lecture 10: Ambiguity, Pushdown Automata
Harvard CS 121 and CSCI E-207 Lecture 10: Ambiguity, Pushdown Automata Salil Vadhan October 4, 2012 Reading: Sipser, 2.2. Another example of a CFG (with proof) L = {x {a, b} : x has the same # of a s and
More informationChapter 2: Finite Automata
Chapter 2: Finite Automata Peter Cappello Department of Computer Science University of California, Santa Barbara Santa Barbara, CA 93106 cappello@cs.ucsb.edu Please read the corresponding chapter before
More information1 Showing Recognizability
CSCC63 Worksheet Recognizability and Decidability 1 1 Showing Recognizability 1.1 An Example - take 1 Let Σ be an alphabet. L = { M M is a T M and L(M) }, i.e., that M accepts some string from Σ. Prove
More informationTWO-WAY FINITE AUTOMATA & PEBBLE AUTOMATA. Written by Liat Peterfreund
TWO-WAY FINITE AUTOMATA & PEBBLE AUTOMATA Written by Liat Peterfreund 1 TWO-WAY FINITE AUTOMATA A two way deterministic finite automata (2DFA) is a quintuple M Q,,, q0, F where: Q,, q, F are as before
More informationComputational Models Lecture 8 1
Computational Models Lecture 8 1 Handout Mode Ronitt Rubinfeld and Iftach Haitner. Tel Aviv University. April 18/ May 2, 2016 1 Based on frames by Benny Chor, Tel Aviv University, modifying frames by Maurice
More informationIntroduction to Theory of Computing
CSCI 2670, Fall 2012 Introduction to Theory of Computing Department of Computer Science University of Georgia Athens, GA 30602 Instructor: Liming Cai www.cs.uga.edu/ cai 0 Lecture Note 3 Context-Free Languages
More informationFORMAL LANGUAGES, AUTOMATA AND COMPUTABILITY
15-453 FORMAL LANGUAGES, AUTOMATA AND COMPUTABILITY REVIEW for MIDTERM 1 THURSDAY Feb 6 Midterm 1 will cover everything we have seen so far The PROBLEMS will be from Sipser, Chapters 1, 2, 3 It will be
More informationMiscellaneous. Closure Properties Decision Properties
Miscellaneous Closure Properties Decision Properties 1 Closure Properties of CFL s CFL s are closed under union, concatenation, and Kleene closure. Also, under reversal, homomorphisms and inverse homomorphisms.
More informationProperties of Context-Free Languages
Properties of Context-Free Languages Seungjin Choi Department of Computer Science and Engineering Pohang University of Science and Technology 77 Cheongam-ro, Nam-gu, Pohang 37673, Korea seungjin@postech.ac.kr
More informationIntroduction to Turing Machines. Reading: Chapters 8 & 9
Introduction to Turing Machines Reading: Chapters 8 & 9 1 Turing Machines (TM) Generalize the class of CFLs: Recursively Enumerable Languages Recursive Languages Context-Free Languages Regular Languages
More informationComputational Models - Lecture 4 1
Computational Models - Lecture 4 1 Handout Mode Iftach Haitner. Tel Aviv University. November 21, 2016 1 Based on frames by Benny Chor, Tel Aviv University, modifying frames by Maurice Herlihy, Brown University.
More informationFORMAL LANGUAGES, AUTOMATA AND COMPUTATION
FORMAL LANGUAGES, AUTOMATA AND COMPUTATION DECIDABILITY ( LECTURE 15) SLIDES FOR 15-453 SPRING 2011 1 / 34 TURING MACHINES-SYNOPSIS The most general model of computation Computations of a TM are described
More informationSCHEME FOR INTERNAL ASSESSMENT TEST 3
SCHEME FOR INTERNAL ASSESSMENT TEST 3 Max Marks: 40 Subject& Code: Automata Theory & Computability (15CS54) Sem: V ISE (A & B) Note: Answer any FIVE full questions, choosing one full question from each
More informationComputational Models: Class 5
Computational Models: Class 5 Benny Chor School of Computer Science Tel Aviv University March 27, 2019 Based on slides by Maurice Herlihy, Brown University, and modifications by Iftach Haitner and Yishay
More informationGEETANJALI INSTITUTE OF TECHNICAL STUDIES, UDAIPUR I
GEETANJALI INSTITUTE OF TECHNICAL STUDIES, UDAIPUR I Internal Examination 2017-18 B.Tech III Year VI Semester Sub: Theory of Computation (6CS3A) Time: 1 Hour 30 min. Max Marks: 40 Note: Attempt all three
More informationcse303 ELEMENTS OF THE THEORY OF COMPUTATION Professor Anita Wasilewska
cse303 ELEMENTS OF THE THEORY OF COMPUTATION Professor Anita Wasilewska LECTURE 14 SMALL REVIEW FOR FINAL SOME Y/N QUESTIONS Q1 Given Σ =, there is L over Σ Yes: = {e} and L = {e} Σ Q2 There are uncountably
More informationComputational Models Lecture 8 1
Computational Models Lecture 8 1 Handout Mode Nachum Dershowitz & Yishay Mansour. Tel Aviv University. May 17 22, 2017 1 Based on frames by Benny Chor, Tel Aviv University, modifying frames by Maurice
More informationChapter 2: Finite Automata
Chapter 2: Finite Automata 2.1 States, State Diagrams, and Transitions Finite automaton is the simplest acceptor or recognizer for language specification. It is also the simplest model of a computer. A
More informationCS 455/555: Finite automata
CS 455/555: Finite automata Stefan D. Bruda Winter 2019 AUTOMATA (FINITE OR NOT) Generally any automaton Has a finite-state control Scans the input one symbol at a time Takes an action based on the currently
More informationTuring machines Finite automaton no storage Pushdown automaton storage is a stack What if we give the automaton a more flexible storage?
Turing machines Finite automaton no storage Pushdown automaton storage is a stack What if we give the automaton a more flexible storage? What is the most powerful of automata? In this lecture we will introduce
More informationNon-deterministic Finite Automata (NFAs)
Algorithms & Models of Computation CS/ECE 374, Fall 27 Non-deterministic Finite Automata (NFAs) Part I NFA Introduction Lecture 4 Thursday, September 7, 27 Sariel Har-Peled (UIUC) CS374 Fall 27 / 39 Sariel
More informationCPSC 421: Tutorial #1
CPSC 421: Tutorial #1 October 14, 2016 Set Theory. 1. Let A be an arbitrary set, and let B = {x A : x / x}. That is, B contains all sets in A that do not contain themselves: For all y, ( ) y B if and only
More informationHomework 8. a b b a b a b. two-way, read/write
Homework 8 309 Homework 8 1. Describe a TM that accepts the set {a n n is a power of 2}. Your description should be at the level of the descriptions in Lecture 29 of the TM that accepts {ww w Σ } and the
More information5 Context-Free Languages
CA320: COMPUTABILITY AND COMPLEXITY 1 5 Context-Free Languages 5.1 Context-Free Grammars Context-Free Grammars Context-free languages are specified with a context-free grammar (CFG). Formally, a CFG G
More informationComputational Models - Lecture 4 1
Computational Models - Lecture 4 1 Handout Mode Iftach Haitner and Yishay Mansour. Tel Aviv University. April 3/8, 2013 1 Based on frames by Benny Chor, Tel Aviv University, modifying frames by Maurice
More informationCSE 355 Test 2, Fall 2016
CSE 355 Test 2, Fall 2016 28 October 2016, 8:35-9:25 a.m., LSA 191 Last Name SAMPLE ASU ID 1357924680 First Name(s) Ima Regrading of Midterms If you believe that your grade has not been added up correctly,
More informationTheory Bridge Exam Example Questions
Theory Bridge Exam Example Questions Annotated version with some (sometimes rather sketchy) answers and notes. This is a collection of sample theory bridge exam questions. This is just to get some idea
More informationProperties of Context-Free Languages. Closure Properties Decision Properties
Properties of Context-Free Languages Closure Properties Decision Properties 1 Closure Properties of CFL s CFL s are closed under union, concatenation, and Kleene closure. Also, under reversal, homomorphisms
More informationTheory of Computation (II) Yijia Chen Fudan University
Theory of Computation (II) Yijia Chen Fudan University Review A language L is a subset of strings over an alphabet Σ. Our goal is to identify those languages that can be recognized by one of the simplest
More informationRecap DFA,NFA, DTM. Slides by Prof. Debasis Mitra, FIT.
Recap DFA,NFA, DTM Slides by Prof. Debasis Mitra, FIT. 1 Formal Language Finite set of alphabets Σ: e.g., {0, 1}, {a, b, c}, { {, } } Language L is a subset of strings on Σ, e.g., {00, 110, 01} a finite
More informationFinite Automata. BİL405 - Automata Theory and Formal Languages 1
Finite Automata BİL405 - Automata Theory and Formal Languages 1 Deterministic Finite Automata (DFA) A Deterministic Finite Automata (DFA) is a quintuple A = (Q,,, q 0, F) 1. Q is a finite set of states
More informationCpSc 421 Homework 9 Solution
CpSc 421 Homework 9 Solution Attempt any three of the six problems below. The homework is graded on a scale of 100 points, even though you can attempt fewer or more points than that. Your recorded grade
More informationCISC 4090 Theory of Computation
CISC 4090 Theory of Computation Context-Free Languages and Push Down Automata Professor Daniel Leeds dleeds@fordham.edu JMH 332 Languages: Regular and Beyond Regular: a b c b d e a Not-regular: c n bd
More information