Question 1 a For each of the following grammars precisely de

Question 1

(a) For each of the following grammars, precisely describe the language generated by the grammar. The set of terminals T is {a, b} unless another set is specified.

1.

S A | B

A aaaA |

B Bbb | b

2.

S RbR

R aRb | bRa | RR | bR |

3.

             S aSbSaS | aSaSbS | bSaSaS |

4.

Set of terminals here is T = {a, b, c}                                                             

S a S b | C

C cc C |

(b) Using the grammar in Part 2 above, give a derivation for the string abbabb. Give your derivation in three different forms: a derivation tree, a left-most derivation and a right-most derivation

Solution

3)

Question 1 (a) For each of the following grammars, precisely describe the language generated by the grammar. The set of terminals T is {a, b} unless another set

Get Help Now

Submit a Take Down Notice

Tutor
Tutor: Dr Jack
Most rated tutor on our site