436 views
0 votes
0 votes

#I am confused in the language (iv) . Someone please explain.

1 Answer

1 votes
1 votes

it is regular language 

as language consists of equal number of 10 and 01

Now, suppose in the string you have 01 , now we need another 10 to make count same

this can be thought of as whenever you see a 01 at some point next character should be sequence of 0 or a single 0. in that case string formed is of the type 010*0. therefore, the count of 01 and 10 remains the same. But if you  have 011 type sub string then you need to see another 0 for example 011*0 is also a valid string.

so the regular expression is 1(1+00*1)*+0(0+11*0)* + epsilon 

edited by

Related questions

130
views
1 answers
2 votes
srijanguptaa asked Jun 2
130 views
Captioncreate a DFA for language L={a^n b^m | n=(m%3) } 
219
views
2 answers
0 votes
programmer1218 asked Apr 11
219 views
Can anyone explain how we can write this regular language for the following diagram ?(in depth)
248
views
0 answers
0 votes
Vedantthakkar asked Feb 24
248 views
Consider a regular language R and a context free language C. Let the PDA that recognizes C be called P=(QP,∑,Γ,δP,q0P,FP), and the DFA that reconginzes R be (QR,∑,δR,q0R,FR).
259
views
1 answers
0 votes
Deepak9000 asked Nov 27, 2023
259 views
Why is C is regular as it non regular as?Please help me with this confusion