Question: = (3) Let G ({S, A}, , R, S) be the context-free grammar with = {a,b} and rules R = S SS | ASa

= (3) Let G ({S, A}, , R, S) be the context-free grammar with = {a,b} and rules R = S SS | ASa | aA, A bA | SAa | a. And let T be the language of strings such that #a(r) is even. (a) Show that this grammar is unsound for T-that is, find a string in L(G) \ T. (6 pts.) (b) Change one of the rules to make a grammar G' that is sound for T. Make it a "single- edit" change: that is, inserting, deleting, or changing just one character (terminal or variable symbol). Then explain why your new G' is sound. (12 pts. total) (c) Is the original grammar comprehensive for T? OK, it's not: T\L(G). So let's change the target language to be T' = T\{e} and revise the question: Is the original grammar comprehensive for T'? If you say yes, argue why as best you can; if you say no, give a nonempty string with an even number of a's that G does not generate, and explain why not. (12 pts., for 30 on this problem and 75 on the set)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
