asked 38.0k views
2 votes
Find the shortest string that is not in the language represented

by the regular expression
a*(ab)*b*.

1 Answer

6 votes

Final answer:

The shortest string not in the given language is the empty string.

Step-by-step explanation:

The regular expression a*(ab)*b* represents a language that consists of strings that start with zero or more 'a's, followed by zero or more occurrences of the pattern 'ab', and ending with zero or more 'b's.

To find the shortest string that is not in this language, we need to look for strings that do not follow this pattern. One such string is the empty string, which is the shortest possible string.

To prove that no other string is in the language, we can show that any string longer than the empty string will contain the pattern 'ab', making it part of the language.

answered
User Pushbit
by
7.9k points

No related questions found

Welcome to Qamnty — a place to ask, share, and grow together. Join our community and get real answers from real people.