Search for question
Question

4. (a) Write a grammar for the following language consisting of strings that have n copies of the letter 'a' followed by one more number of copies of the letter 'b', where n > 0. Examples of such strings are abb, aabbb, etc, but a, ab, ba, and aaabb are not.

(b) Draw parse trees for the sentences abb and aabbb in Problem 4.