I am trying to remove ϵ rules from the following grammar (after applying the remove redundant symbols algorithm)
The results of applying the remove ϵ rules algorithm is:
but then, when I re-apply the remove redundant symbols algorithm (as I should do) I get:
(as A =>* will never result in a terminal word)
The problem is, that 010 ∈ L(G),
010 ∉ L(G”)
in fact, not a single word that contains 1 in it belonged to L(G”), as 1 could only have been achieved via A!.
what have I done wrong? Why is L(G) != L(G”)? they are supposed to be the same.