I have been searching for hours but I wasn't able to find out any good explanation of why the first step, which is 'Adding a new start symbol S_0 -> S', is important for converting grammar into Chomsky Normal Form. The only explanation I found from the textbook is that it guarantees that new start variable will not occur on the RHS of any rules. Could someone further elaborate on this? Could the appearance of start symbol on RHS be any bad? Isn't it already handled by removing unit rules? Any clarification would be appreciated :)
Asked
Active
Viewed 126 times
0
-
Typo warning: new start variable -> new start symbol – Ted Aug 17 '17 at 18:01
-
1What does this have to do with programming? – reformed Aug 17 '17 at 18:02
-
The start symbol is not allowed to appear on the RHS in Chomsky normal form by definition. – harold Aug 17 '17 at 18:03
-
@harold Yes, that's why we use removing unit rules, don't we? So what's the point of the first step? – Ted Aug 17 '17 at 18:13
-
@Ted the start symbol might appear as part of a non-unit rule – harold Aug 17 '17 at 18:14
-
@Ted like A->SB somewhere, which is not valid in CNF btw – harold Aug 17 '17 at 18:30
-
Okay, I think the wikipedia definition kind of messed me up a bit. It uses the word 'may' and sounds like it's possible for start symbol to appear as a non-unit rule on RHS. – Ted Aug 17 '17 at 18:43