Question: Answer each part for the following context-free grammar G. R XRX | S S aT b | bT a T XTX |

Answer each part for the following context-free grammar G.

R → XRX | S

S → aT b | bT a

T → XTX | X | ε

X → a | b


a. What are the variables of G?

b. What are the terminals of G?

c. Which is the start variable of G?

d. Give three strings in L(G).

e. Give three strings not in L(G).

f. True or False: T ⇒ aba.

g. True or False: T ⇒* aba.

h. True or False: T ⇒ T .

i. True or False: T ⇒*T.

j. True or False: XXX ⇒* aba.

k. True or False: X ⇒* aba.

l. True or False: T ⇒* XX.

m. True or False: T ⇒* XXX.

n. True or False: S ⇒* ε.

o. Give a description in English of L(G).

Step by Step Solution

3.40 Rating (159 Votes )

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

a The variables of G are R S T and X b The terminals of G are a and b c The sta... View full answer

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 Introduction theory computation Questions!