Question: L = { w epsi { a , b , c } * : a b c | i , j , k >

L ={w \epsi {a,b,c}*: abc| i, j, k >=0 and if i > j then k = i - j, else k =0}
Which of the following CFGs generates L?
CFG A:
S -> AB | AC
A -> aA |\epsi
B -> bB | b
C -> aCc |\epsi
CFG B:
S -> AB | A
A -> aA | a |\epsi
B -> bBc | b
CFG C:
S -> A | B
A -> aAb | Ab |\epsi
B -> aBc | aCc
C -> aCb |\epsi
CFG D:
S -> AB | AC
A -> aAb |\epsi
B -> bB |\epsi
C -> aCc |\epsi
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.
2 points
A
B
C
D

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!