Recall that a regular grammar is said to be
-free
if it has no
-productions except possibly for the production
S
, where
S is the start symbol, and does not appear on the right hand side of the production rules.
-productions from G to G'.
Let S be the start symbol in G';
(N
is a production),
we copy every rule in which N appears on the right
hand side both with and without N;

was in the original set of rules,
add a new start symbol S1 in G', add the rule
S1
and copy all the production rules
with S on the left hand side to ones with S'
on the left hand side.
Give an equivalent
-free regular grammar to:
| S |
|
aA | bB | ![]() |
| A |
|
aA | a | |
| B |
|
bB | b | |
where S is the start symbol.
-free productions
| S |
| aA | bB |
| A |
| aA | a |
| B |
| bB | b |
where S is the start symbol.

is in G, copy every rule in which N appears on the
right hand side both with and without N
| S |
| aA | bB | a | b |
| A |
| aA | a |
| B |
| bB | b |
where S is the start symbol.

was a production in the original grammar,
add S1
| S1 |
|
|
| S |
| aA | bB | a | b |
| A |
| aA | a |
| B |
| bB | b |
where S1 is the start symbol.
... and copy all rules from S to S1
| S1 |
|
aA | bB | a | b | ![]() |
| S |
| aA | bB | a | b |
| A |
| aA | a |
| B |
| bB | b |
where S1 is the start symbol.
Construct
-free regular grammars equivalent to the following
regular grammars:
| G = < | { a, b, c }, | ||||||||||||||||
| { S, A, B, C }, | |||||||||||||||||
| |||||||||||||||||
| S > |
| G = < | { a, b, c }, | ||||||||||||||||
| { S, A, B, C }, | |||||||||||||||||
| |||||||||||||||||
| S > |
| G = < | { a, b }, | ||||||||
| { S, A }, | |||||||||
| |||||||||
| S > |
| G = < | { a }, |
| { S }, | |
{ S![]() },
| |
| S > |