Question: L = { w in { a , b , c } * : a b c | n = m / 2 or n
L w in abc: abc n m or n k ; where n m is even & k
Let's say, we have the following CFGs labeled as A to D
CFG A:
S XY PQ
X aXbb epsi
Y ccY c
P aP b
Q bQc c
CFG B:
S XY PQ
X aXb epsi
Y cYb c
P aP epsi
Q bQcc c
CFG C:
S XY PQ
X aXb c
Y cYb epsi
P aP epsi
Q bQcc c
CFG D:
S XY PQ
X aaXb epsi
Y cY cc
P aaP epsi
Q bQc cc
What will be the correct CFG for the language L
Note, for a language L the CFG will be correct if and only if it can parse all the strings, w in L and doesnt parse any string, w L
points
A
B
C
D
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
