Log In
0 votes

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

in Theory of Computation 82 views
4th is regular... it will be like 0(0+1)*0 + 1(0+1)*1 + 0 + 1 +  epsilon

1 Answer

1 vote

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
your regular expression is not accepting epsilon but according to language epsilon is also part of it.
mistake accepted...:)

Related questions

0 votes
2 answers
0 votes
1 answer
Consider the following language: L = {w| w $\epsilon$ {0,1}* ; w has equal number of occurances of 001' and 010' } The solution they provided: The absolute difference between the number of occurrences of 001' and 010' is at most 1. Hence a DFA can be found. I ... going to find an occurrence of 010' (and vice-versa)). But, since such info is not given, so how this can be a regular language?
asked Jan 29, 2019 in Theory of Computation Harsh Kumar 105 views
0 votes
0 answers
Which of the following option is correct regarding dependability? A. Given a regular language R and context-free C. Is every string in R also in C, i.e., Is L(R)⊆L(C) decidable? B. Given a regular language R and context-free C. Is every string in C also in R, i.e., Is L(C)⊆L(R) decidable? C. Both (A) and (B) D. None of these
asked Jan 7, 2019 in Theory of Computation Shivangi Parashar 2 44 views