- Thread starter
- #1

- Apr 13, 2013

- 3,718

I want to construct a grammar for the language $L=\{ a^i b^j \mid i,j \geq 1, i>j\}$. What type of grammar is it?

I have thought to start with the command $S \to aSb$.

Since we can have several times $a,b$ I have thought to continue with the command $S \to aDb$.

Since there have to be more $a$s than $b$s, do we continue with the commands $D \to aD$ and $D \to a$ ?

So is the grammar the following?

S-> aSb

A->aDb

D->aD

D->a