# Thread: Writing Grammar Problems

1. ## Writing Grammar Problems

I have a grammar problem that I just re-did and I'd like to hear your feed back on it:

Given the alphabet {a, b} write a grammar for the following language:
The language that has/accepts all strings that start with an a

Answer:

1. S → AB
2. A→ a
3. B→ b
4. A → Aa
5. B → Bb

2. ## Re: Writing Grammar Problems

This will give only strings that start with a string of $a$'s and end with a string of $b$'s. There is no way to get, for example, $aba$