I have the following context-free grammar from which I have to remove epsilon transitions:$S \to 0A0|0$$A \to BC|2| CCC$$B \to 1C | 3D | \epsilon$$C \to AA3 | \epsilon$$D \to AAB | 2$By algorithm, I create $N_{0}$ that will hold all non-terminals that contain $\epsilon$ and in next steps add non-terminals that have rule that contains only non-terminals from the previous iteration of N e.g.$N_{0} = \{\}$$N_{1} = \{B,C\}$$N_{2} = \{B,C,A\}$$N_{3} = \{B,C,A,D,S\}$Now I have to adjust rules, we can remove non-terminals in $N_{3}$ object from rules, thus we have to create all combinations without it e.g.$S \to 0A0 | 00 | 0$$A \to BC | B | C | CCC | CC$$B \to 1C | 1 | 3D | 3$$C \to AA3| A3 | 3$$D \to AAB | AA | A | AB | B | 2$We see that no non-terminal isn't useless, so is this the final context-free grammar? Or did I make mistake somewhere?Thanks for answers and help.
Removing epsilon transition from context-free grammar
context free;automata;formal grammars