Question: Write a grammar for the language consisting of strings built only of the letters a and b. The strings may have any number of these
Write a grammar for the language consisting of strings built only of the letters a and b. The strings may have any number of these letters, but the letter combination aba must be in the strings somewhere, and they must end in a b.
e.g. string aaaabab, bbbaaababbbb, abab are in the language, but a, aabb, baaa, aab are not
Then, draw a parse tree for the sentence aababab as derived from the grammar you created
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
