Answer:
1) The language that contains non-empty strings starting and ending with same symbol must also include single letter strings a and b.Therefore language is
L = {a, b, aa , bb, aba, bab, .....}
The grammar is :
S -> aAa | bAb | a | b
A -> aA | bA | ε
2)
I) Your answer is correct,
In the grammar usually variables are represented with capital letters and terminals represented with small letters and the start symbol is left side variable in first production of grammar.
II & III answers of you are correct.
IV ) False , because T could generate aba , but T is not a start symbol , so it alone could not generate any string.
V ) True, because as explaned in IV when T produce aba before it any substring could definately present.
Automata and Computability Problems Please check my work. Make necessary edits/corrections to my work. Please add...
Automata and Computability problems Please check my work and make necessary corrections/edits. Add details to my work as well :) 3. Determine whether the grammar implicitly defined by the following rules is ambiguous. Prove your answer. S > AB А ЭaA A > abA Αε В ЭbВ B → abB B → 4. Give pushdown automata that recognize the following languages. (a) A = {w € {0,11 w contains at least three 1s) 3. It is ambiguous. Here are two...
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...