Consider The Following Grammar S --> ASa | ABa B --≫ BB | B A) Use The Set Notations To Define The Language Generated By The Grammar (3 Marks) B) What Is The Shortest String Produced From The Grammar? (1 Mark) C) Write Another Possible String That Can Be Generated From The Language (2 Marks) 2. Let G Be The Grammar A) Give A Leftmost Derivation Of
1. Consider the following grammar
S --> aSa | aBa
B --> bB | b
a) Use the set notations to define the language generated by the grammar (3 marks)
b) What is the shortest string produced from the grammar? (1 mark)
c) Write another possible string that can be generated from the language (2 marks)
2. Let G be the grammar
a) Give a leftmost derivation of string aabbb (3 marks)
b) Give rightmost derivation of string abbbb (3 marks)
c) Build the derivation tree for the derivations in par (a) and (b) (6 marks)