TRUE OR FALSE? (Note: E = belongs to)
1. A context-free grammar G is in Chomsky normal form. Then G is
not recursive.
2. Let G be an arbitrary context-free grammar. uAv =>* u'A'v' ,
where u, v, u' and v' E V* and A E (V - Eps), then L(G) is
infinite.
3. {ww : w E {a, b}*} is accepted by some NDPDA with exactly two
states
Question 1:
It is true.
If a context-free grammar G is in Chomsky normal form, then it is not recursive.
Question 3:
It is true.
The language {ww : w (a, b)*} is accepted by some NDPDA with exactly two states.
Unfortunately, question 2 is not understandable. Requesting you to kindly re-post the question with proper symbols so we can resolve it.
Please comment in case of any doubt.
Please upvote if this helps.
TRUE OR FALSE? (Note: E = belongs to) 1. A context-free grammar G is in Chomsky...
1)Convert the following context free grammar to Chomsky Normal Form S → a X | Yb X → S | λ Y → b Y | λ 2)Some languages distinguish between uppercase and lowercase in identifiers. What are the pros and cons of this design decision? 3)Use the pumping lemma to prove that the following languages are not regular. (The alphabet is Σ = {a, b}.) a) L = {an b1 ak: k >= n+ l} b) L = {ww:...
2. Let w 100101 and G be the context-free grammar whose productions are given below (Note that G is in Chomsky Normal Form) 2. SKY 7. K ->YC 8. K 1 3, C CY 4. C1 Draw a parse tree for w. a. b. Test membership of w in L(G) using CYK algorithm (CYK algorithm is discussed in Section 7.4.4 of the textbook). Write down your solution step by step by giving proper explanations. c. Which nonterminals in G can...
Convert the following context free grammar G to Chomsky normal form. G:S → AB A → aAb|B2 B → BA2
TRUE OR FALSE? (Note: E = belongs to) 1. (a* U b*a*)* = (b U a)*. 2. There is an algorithm to decide if the language generated by a CFG is infinite. 3. The language L = {an b m : 0 <= n, 0 <= m, and n + m is even} is not a context-free language.
Say True/False 1. If A is a context-free language that is also non-regular, then A has a CFG in Chomsky normal form. 2. If A ⊆ B and A is a context-free language, then B is a context-free language.
QUESTION 3 Convert the context Free Grammar below to Chomsky Normal Form. Use the tech- nique shown on the textbook, show every step while explaining what you did. SaPa aQbR P + aQbQa | S | Sb Q+QE RRE Attach File Browse My Computer Browse Content Collection
Given the following ambiguous context free grammar (3x20) 1. (a) Explain why the grammar is ambiguous (b) Find an equivalent unambiguous context-free grammar. (c) Give the unique leftmost derivation and derivation tree for the string s generated from the unambiguous grammar above. 2. Construct non-deterministic pushdown automata to accept the following language (20) 3. Convert the following CFG into an cquivalent CFG in Chomsky Normal Form (CNF) (20)-
Q1: Given the below language and context free gramma:, a. Show that the grammar is ambiguous using the string ( abc) by using substitutions. b. Then design a push down automata that recognizes the language. C. Then show the tracing of (abc, abbccc) using the push down automata. d. Then Show which two simple languages create the greaterlanguage. Give set builder notation for each language. e. Then produce Chomsky normal form for the grammar. The following context-free language is inherently...
1. Consider the alphabet {a,b,c}. Construct a finite automaton that accepts the language described by the following regular expression. 6* (ab U bc)(aa)* ccb* Which of the following strings are in the language: bccc, babbcaacc, cbcaaaaccbb, and bbbbaaaaccccbbb (Give reasons for why the string are or are not in the language). 2. Let G be a context free grammar in Chomsky normal form. Let w be a string produced by that grammar with W = n 1. Prove that the...
Theory of Computation 7. Write down the Chomsky Normal Form for the context-free language de- fined by the productions: S bAļaB. A bAA laSla, and B aBB bS b, where S, A, B are nonterminal symbols and a, b are terminal symbol 8. For the context-free grammar Ģ -(X, T, R, S) with X (A, B. C, a, b), T a, b and productions R: SAB |BC, ABAa, BCClb,C AB la, check by applying the CYK Theorem whether the string...