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

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!