26,606 views

4 Answers

Best answer
4 votes
4 votes

Set of all string with atmost one pair of consecutive 0 and one pair of consecutive 1

It means it will not accept any pair of 00 or 11 after accepting 0011 or 1100 .

So DFA will be

selected by
1 votes
1 votes

What we want is $\epsilon + 1 + 11$ .

Now what we don't want is a preceding 1 or a following one. So, $\epsilon + 1 + 11$ can be preceded by ( 0 + 10)* and $\epsilon + 1 + 11$ can be followed by (0+01)*.

So, the Regex becomes ( 0 + 10)*($\epsilon + 1 + 11$)(0+01)*

Related questions

1 votes
1 votes
1 answer
3
Revathy Sudheesh asked Oct 5, 2017
2,663 views
If regular expression (1+01)*(0+1*) is represented as E. Which of the following regular expression denotes the set of all strings in {0,1}* that contains at most one pair...
0 votes
0 votes
1 answer
4
Sanjay Sharma asked Mar 9, 2017
1,606 views
How many bit strings of length n contains 1)at least 2) at most 3) exactly r 1's