Answer the questions for the following CFG G.
? → ??? | ?
? → 0?1 | 1?0
? → ??? | ? |?
? → 0 | 1
a) Is G in Chomsky normal form? (You just need to answer yes or no.)
b) Give the description in English of L(G).
Answer the questions for the following CFG G. ? → ??? | ? ? → 0?1...
can you plzz do question 1 and 2 Question 1. Design a CFG for the language over = {1, #} whose elements consist of every pair of distinct, #-separated unary values: L = {rı#x2 | 21, 22 € 1", 21 * x2}. Question 2. Design a CFG for the language of binary strings that contain at least one 1 in their second half: L = {uv | UE (OU 1)", v € OU 1)*1(0U 1)", [u '}. Question 3. This...
A CFG G, is specified by its productions below. Convert G to Chomsky Normal Form. S ® aSb | bSa | SS | lambda b) Use the CYK algorithm to determine whether or not the string abba is in L(G).
Exercise 3. Convert the following CFG into an equivalent CFG in Chomsky normal form using the procedure seen in class.
Please answer any 7 of them ТОС Answer any 7 from the followings: 1. Regular expression to NFA: i) ab(aUb)* ii) (aba U a)*ab 2. Explain and construct a generalized NFA, 3. NFA to regular expression 0 3 91 93 8 a 4. DFA to regular expression 011 5. Explain the rules of pumping lemma briefly with an example. 6. Give an example of right linear grammar and left linear grammar. 7. L(G) = {1*20 m >= 1 and >=1}....
Hi, Theory of Computation Could i please get the answer with explanation for the following, thank you. 3. Consider the following CFG with starting variable Sand Σ ={1, 2, 3,4,5,6,7,8,9,0}: S→MUV U→N|ε V→VV| N N→M| 3| 4| 5| 6| 7| 8| 9| 0 M→1| 2 b. Is this grammar ambiguous or unambiguous? Briefly explain why. c. Convert the CFG into Chomsky normal form.
help 3. Answer each part for the following CFG G (The * symbom in the derivation means with any number of steps): R + XRXS S + aTb | b Ta T→ XTX | x | 6 X + ab (a) What are the variables of G? (b) What are the terminals of G? (c) Which is the start variable of G? (d) Give three strings in L(G) (e) Give three strings not in L(G) (f) True or False: T...
Please answer a-f Answer all the following questions. (a) Find a CFG for the language defined by a' (b) Find a CFG for the language defined by b (c) Find a CFG for the language defined by a'b. (d) Find a CFG for the language defined by ab. (e) Find a CFG for the language defined by a"b2n. (f) Find a CFG for the language defined by an + b 2n.
CFG questions 1. True or false? Given G: S → aSbSÍ bSaS | λ, L(G) = EQUAL. 2. Provide a grammar for all words that are not palindromes. 3. Provide a grammar for L = { a,b' : is js 2 4. Provide a grammar for L = { aibak: i + j = k }. 5. Provide a grammar for L = { aba: i + k = j).
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)-
Hello, I need help solving these two computer science questions. 3. Give a CFG for each of the following: (a) The language {0416 with a +b}. (b) All binary palindromes with exactly three 1's (such as 001010100). 4. Consider the following CFG with start state S: SOAS 1BS € A → OAA 1 B + 1BBO Determine the language generated by S. Justify your answer.