- Make a list of all the variables. Each variable will get a check mark next to it if it is live. Initially no variable has a check mark.
- Make a list of all the productions. Each production will be crossed out when it is used.
- Repeatedly scan the list of productions, ignoring the crossed-out ones. If a production has variable $V$ on the left-hand side, and if all the variables on the right-hand side already have check marks, then give $V$ a check mark also, and cross out all the productions with $V$ on the left-hand side. Note that "all the variables on the right-hand side" includes the case where there are no variables on the right-hand side.
- When you finish a scan of the list of productions without crossing any out, stop.
For example, suppose the productions are:
S → A
S → B
A → aA
A → a
B → bB
C → c
On the first scan of the productions, we see that $A$ and $C$ have productions $A → a$ and $C → c$ where all the variables on the right-hand side are checked. So we check $A$ and $C$ and cross off the productions for these variables. The remaining productions are now:
S → A
S → B
B → bB
Now we see that $S$ has the production $S → A$ where all the variables on the right-hand side are checked, so we check $S$ and cross off its productions, leaving only:
B → bB
We cannot add $B$ to the list of live variables, so we are finished; $A, C, $ and $S$ are live.