- Thread starter
- #1

- Apr 13, 2013

- 3,723

The grammar that is given is this:

[tex] w\epsilon \left \{ k,l,m,n \right \}^{*}:I\rightarrow I_{kn},I_{kn}\rightarrow kI_{kn}n|I_{ln}|I_{km},I_{ln}\rightarrow lI_{ln}n|I_{lm},I_{km}\rightarrow kI_{km}m|I_{lm},I_{lm}\rightarrow lI_{lm}m|\O [/tex] ,

and I found that it generates the following strings:

[tex]I\rightarrow I_{kn}\rightarrow k I_{kn} n \rightarrow kknn[/tex]

[tex]I\rightarrow I_{ln}\rightarrow l I_{kn} n \rightarrow llnn[/tex]

[tex]I\rightarrow I_{km}\rightarrow k I_{km} m \rightarrow kkmm[/tex]

[tex]I\rightarrow I_{lm}\rightarrow l I_{kn} m \rightarrow llmm[/tex]

Is this right??