Removing epsilon transition from the grammar. What's the difference between accepting languages? I want to remove the epsilon transition from following grammar:
\begin{eqnarray}
S &amp; \rightarrow &amp; A | B \\
A &amp; \rightarrow &amp; \epsilon \\ 
B &amp; \rightarrow &amp;  aBa \\
B &amp; \rightarrow &amp; b \\
\end{eqnarray}
This is the result of removing $\epsilon$ transition:
\begin{eqnarray}
S &amp; \rightarrow &amp; \epsilon | B \\
B &amp; \rightarrow &amp; aBa \\
B &amp; \rightarrow &amp; b
\end{eqnarray}

My question is what's the difference between languages that accept these two grammars?
There is no difference. Both grammars describe the same language $$L = \{ \epsilon \} \cup \{ a^nba^n  | \forall n &gt; 0\}.$$