Question

In: Advanced Math

Let G = (AN , AT , S, P) be a context-free grammar in Chomsky normal...

Let G = (AN , AT , S, P) be a context-free grammar in Chomsky normal form. Prove that if there exists a word w ∈ L(G) generated by a derivation that uses more than |P| + |AT | steps, then L(G) is infinite.

Solutions

Expert Solution


Related Solutions

Consider the context-free grammar G = ( {S}, {a, b}, S, P) where P = {...
Consider the context-free grammar G = ( {S}, {a, b}, S, P) where P = { S -> aaSb | aab }. Construct a NPDA M that such that L(M) = L(G). I would like the transition graph for this NPDA please.
convert the following grammar to Chomsky Normal Form S -> D0S1 | 1 D -> F0D1...
convert the following grammar to Chomsky Normal Form S -> D0S1 | 1 D -> F0D1 | 0 | e | FG F -> SF | DD | S G -> GK | DG
Prove that if G is a context-free grammar in which every variable occurs on the left...
Prove that if G is a context-free grammar in which every variable occurs on the left side of at most one production, then G is unambiguous.
What makes a deterministic context free grammar deterministic?
What makes a deterministic context free grammar deterministic?
Theory of Computation Problem Let G be an arbitrary CFG (Context-free Grammer), and let DG be...
Theory of Computation Problem Let G be an arbitrary CFG (Context-free Grammer), and let DG be the string-pushing PDA(pushdown automata) for it. Let w be some string of length n in L(G). Suppose you know that the leftmost derivation of w in G consists of m substitutions. How many transitions would be in the corresponding computation of DG for input string w? Justify your answer carefully.
Consider the following context-free grammar G: E ® T + E ® * T i E...
Consider the following context-free grammar G: E ® T + E ® * T i E ® f i E ® * f + T ® + Questions: (5 points) Compute the Canonical LR(1) Closure set for state I0 for grammar G. (10 points) Compute (draw) the DFA that recognizes the Canonical LR(1) sets of items for grammar G. (5 points) Construct the corresponding Canonical LR(1) parsing table. (10 points) Compute (draw) the DFA for LALR(1). (5 points) Construct LALR(1)...
For a grammar G with the productions where G = ( {S, A, B}, {a, b},...
For a grammar G with the productions where G = ( {S, A, B}, {a, b}, S, P ) with productions                                              S --> AB | bbbB,              A --> b | Ab,       B --> a.. 1.Show that the grammar G is ambiguous. 2.Give language L that is generated by G, L = L(G), in a formal expression (including a regular expression). 3.Can you construct an unambiguous grammar that is equivalent to G? Otherwise, show that G is inherently ambiguous.
Give a context-free grammar for {w ∈ {b, c}∗| #c(w) = #b(w)}.
Give a context-free grammar for {w ∈ {b, c}∗| #c(w) = #b(w)}.
Given a grammar G, G = (Ν, Σ, Π, S), where Ν = { ... }...
Given a grammar G, G = (Ν, Σ, Π, S), where Ν = { ... } Σ = { ... } Π = { ... } S is ... For a string ... write (a) A leftmost derivation (b) A rightmost derivation
Let G be a group and K ⊂ G be a normal subgroup. Let H ⊂...
Let G be a group and K ⊂ G be a normal subgroup. Let H ⊂ G be a subgroup of G such that K ⊂ H Suppose that H is also a normal subgroup of G. (a) Show that H/K ⊂ G/K is a normal subgroup. (b) Show that G/H is isomorphic to (G/K)/(H/K).
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT