299 views
0 votes
0 votes

Answer each part for the following context-free grammar $G.$
                           $R\rightarrow XRX | S$
                           $S\rightarrow aT b | bT a$
                           $T\rightarrow XT X | X | \epsilon$
                          $X\rightarrow a | b$

  1. What are the variables of $G?$
  2. What are the terminals of $G?$
  3. Which is the start variable of $G?$
  4. Give three strings in $L(G).$
  5. Give three strings not in $L(G).$
  6. True or False$:T\Rightarrow aba.$
  7. True or False$:T \overset{*}{\Rightarrow}aba.$
  8. True or False$:T\Rightarrow T.$
  9. True or False$:T\overset{*}{\Rightarrow}T.$
  10. True or False$: XXX\overset{*}{\Rightarrow}aba.$
  11. True or False$:X\overset{*}{\Rightarrow}aba.$
  12. True or False$:T\overset{*}{\Rightarrow}XX.$
  13. True or False$:T\overset{*}{\Rightarrow}XXX.$
  14. True or False$:S\overset{*}{\Rightarrow}\epsilon.$
  15. Give a description in English of $L(G).$

Please log in or register to answer this question.

Related questions

0 votes
0 votes
0 answers
2