Answer :

Answer:

The language of all strings that do not contain both the substring "bba" and "abb" can be described using regular expressions.

The regular expression for strings that do not contain "bba" and "abb" can be written as:

\[ (a|[^b]|b[^b])^*(b[^b]|[^b]|a)^* \]

Explanation:

- \( (a|[^b]|b[^b])^* \) matches any string that does not contain "bba"

- \( (b[^b]|[^b]|a)^* \) matches any string that does not contain "abb"

Combining both parts with an OR operator gives us the desired regular expression.

Other Questions