Writing a regular expertion for the language $L=\{0^n1^m \mid n\equiv m\pmod 2\}$

87 Views Asked by At

I need to write a regular expertion for the language of all the binary words that contains continuum of even number of zeros and after that even number of ones or odd number of zeros and after that odd number of ones

$L=\{0^n1^m \mid n\equiv m \pmod 2\}$

My try:

$(00)^*(11)^*+0(00)^*1(11)^*$

My attempt is correct?

1

There are 1 best solutions below

0
On BEST ANSWER

Your answer $(00)^*(11)^*+0(00)^*1(11)^*$ is correct.