Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Consider terminal symbols 0 , 1 , 2 , 3 and non - terminals S , A , B , C with S as the
Consider terminal symbols and nonterminals S A BC with S as the start symbol. This ques
tion will involve grammars based on these symbols and the languages they generate.
a If the only productions are S S and S what is the language generated by the grammar? Explain your
answer.
b You want to modify the grammar so as to generate the language consisting of all the strings m n mn where
m n N You are going to do this by adding the production A and exactly two further productions. What
are the productions, and why does this work? Your answer should describe the role of S and A
c Find a grammar which generates the language consisting of all strings of the form m n p mnp where
m n p N You are not required to use the productions from parts a and b although you may find the
ideas involved in those parts helpful. Once again you should explain why your grammar has the desired
effect, and explain the roles of any nonterminals you use
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started