Is $L=\{o^{i}1^{j}o^{j}1^{k}o^{k}1^{i} | i,j,k>0\}$ a context free language?

211 Views Asked by At

I need some help in finding and proving (by the pumping lemma or by building a grammar) if $L=\{o^{i}1^{j}o^{j}1^{k}o^{k}1^{i} | i,j,k>0\}$ is a context free language.

thanks!

1

There are 1 best solutions below

0
On

$\mathcal L=\{0^{i}1^{j}0^{j}1^{k}0^{k}1^{i} | i,j,k>0\}$ is a context free language?

Yes, here is a grammar that will generate the language:

$$S\to 0A1\\ A\to 0A1|B\\ B\to CC\\ C\to1D0\\ D\to1D0|\varepsilon$$