2,809 views
0 votes
0 votes
The set of all strings with at most one pair of consecutive zeros and one pair of consecutive ones.

1 Answer

Best answer
1 votes
1 votes

No pair of consecutive 0's and 1's

(01+10)*

one pair of consecutive 1's

(01+10)* 11 (01+10)*

one pair of consecutive 0's

(01+10)* 00 (01+10)*

one pair of consecutive 1's and 0's

(01+10)* 00 (01+10)* 11 (01+10)* + (01+10)* 11 (01+10)* 00 (01+10)*

All Together

(01+10)* + (01+10)* 00 (01+10)* +  (01+10)* 11 (01+10)* +  (01+10)* 00 (01+10)* 11 (01+10)* + (01+10)* 11 (01+10)* 00 (01+10)*

selected by