Question
Instructions: * Answer all questions. *Though the questions sound abstract in some cases due to the nature of the module, you are required to clearly
Instructions:
* Answer all questions.
*Though the questions sound abstract in some cases due to the nature of the module, you are required to clearly describe the steps involved in producing the final solution, which means your solution should be comprehensive. Simply showing the final solution will attract heavy penalty.
*Each question carries 10 Marks.
Q1) Describe in words the language generated by the following grammar. 2 Marks
What abstract machine is appropriate to recognize this grammar? Why? 1 Mark
Construct the machine. 4 Marks
Verify whether it recognizes the language you described. 3 Marks
(i.e., you need to show how a valid string is recognized and an invalid string is rejected by the machine.)
S | aS | bA | cD
A | cD
D dA
Q2) Describe in words the language generated by the following grammar. 2 Marks
What abstract machine is appropriate to recognize this grammar? Why? 1 Mark
Construct the machine. 4 Marks
Verify whether your machine recognizes the language you described. 3 Marks
(i.e., you need to show how a valid string is recognized and an invalid string is rejected by the machine.)
S aAb
A | c | aBb
B aCb
C A
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