61.0k views
0 votes
Write a regular expression for each of the following langunges over the alphabet Σ=0,1}.

Strings that have zeros and ones in double (0011, 110011, 00001100). ε, 011 and 10100 do not belong to the language.

User Kofo
by
8.5k points

1 Answer

3 votes

Final answer:

The regular expression for the given language is (00|11)*(00|11).

Step-by-step explanation:

The regular expression for the given language would be (00|11)*(00|11). This expression matches strings that contain zeros and ones in doubles. The (00|11) part ensures that the string must start and end with double zeros or double ones, and the * indicates that there can be any number of occurrences of 00 or 11 in between.

For example, the string 0011 matches the regular expression because it starts and ends with double zeros and has no other occurrences of double zeros or double ones. On the other hand, the string 011 does not match because it does not start and end with double zeros or double ones.

User Allison Lock
by
8.7k points