Question: Which grammar from the below CFGs generates the below Language L: L = {0n1m2k where n is not equal to m OR m is not

Which grammar from the below CFGs generates the below Language L: L = {0n1m2k where n is not equal to m OR m is not equal to k}

a. S --> XY | XR | BC A--> 0 | 0A | 0A1 B --> 1 | B1 C --> 2 | 2C X --> 0 | 0X R --> 1 | 1R | 1R2 Y --> 2 | Y2 | 1Y2

b. S --> XR | BC | AC A--> 0 | 0A | 0A1 B --> 1 | B1 | 0B1 C --> 2 | 2C X --> 0 | 0X R --> 1 | 1R | 1R2 Y --> 2 | Y2 | 1Y2

c. S --> XY | XR | BC | AC A--> 0 | 0A | 0A1 B --> 1 | B1 | 0B1 C --> 2 | 2C X --> 0 | 0X | 1 R --> 1 | 1R | 1R2 Y --> 2 | Y2 | 1Y2

d. S --> XY | XR | BC | AC A--> 0 | 0A | 0A1 B --> 1 | B1 | 0B1 C --> 2 | 2C X --> 0 | 0X R --> 2 | 1R | 1R2 Y --> 1 | Y2 | 1Y2

e. S --> XY | XR | BC | AC A--> 0 | 0A | 0A1 B --> 1 | B1 | 0B1 C --> 2 | 2C X --> 0 | 0X R --> 1 | 1R | 1R2 Y --> 2 | Y2 | 1Y2

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 Databases Questions!