0
$\begingroup$

I am not able to convert the following language to a Context Free Grammar. The major problem is how to pump both "sides" of the word to obtain same number of 0s and 1s, but, without creating a series of 01010101.

$$L=\{0^{r_1}1^{s_1}0^{s_2}1^{r_2}\mid r_1+r_2 = s_1 + s_2,\ \ r_1,r_2,s_1,s_2 > 0\}$$

Can someone explain a solution to me?

$\endgroup$
6

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Browse other questions tagged or ask your own question.