Question
The following questions are based on the following grammar: S -> AB | b A -> aA | ? B -> CD C -> bA
The following questions are based on the following grammar:
S -> AB | b
A -> aA | ?
B -> CD
C -> bA | AA
D -> AB | BC
For each question, to get credit you must check all and only the symbols that have
the stated property.
(a) Check all and only the nullable symbols.
I) S
II) A
III) B
IV) C
V) D
(b) Check all and only the variables that derive a terminal string.
I) S
II) A
III) B
IV) C
V) D
Now, modify the grammar to eliminate all productions that involve one or more symbols that do not derive a terminal string.
(c) Check all and only the variables that appear in some sentential form derived from S using this modified grammar.
I) S
II) A
III) B
IV) C
V) D
----------------------------------------------------------
I understand a) (A and C) and b) (S, A, and C). However, I need some help with c). Your help is much appreciated! =)
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