90.9k views
3 votes
Which of the following regular expressions represents the set of strings over the alphabet {a,b} containing at least two a's

a)a(a+b)∗ a
b)(a+b)∗ aa(a+b)∗
c)(a+b)∗ a(a+b)∗
d)(a+b)∗a(a+b)∗ a(a+b)∗

User Oligofren
by
7.5k points

1 Answer

4 votes

Final answer:

The regular expression (a+b)*aa(a+b)* represents the set of strings containing at least two a's.

Step-by-step explanation:

The regular expression that represents the set of strings over the alphabet {a,b} containing at least two a's is (a+b)*aa(a+b)*.

This expression means that any string can start with any combination of a's or b's, then must have at least two a's, and can end with any combination of a's or b's. Here are a few examples of strings that match this regular expression: aa, aba, abaa, babaa.

User Adam Peck
by
7.1k points