We suggested that individual items could be regarded as states of a nondeterministic finite automaton, while sets of valid items are the states of a deterministic finite automaton (see the box on "Items as States of an NFA" in Section $4.6.5$). For the grammar $S \rightarrow S S + \mid S S * \mid a$ of Question $4.2.1$:
- Draw the transition diagram (NFA) for the valid items of this grammar according to the rule given in the box cited above.
- Apply the subset construction (Algorithm $3.20$) to your NFA from part $(a)$. How does the resulting DFA compare to the set of $LR(0)$ items for the grammar?
- Show that in all cases, the subset construction applied to the NFA that comes from the valid items for a grammar produces the $LR(0)$ sets of items.