Theory of Computation20805 marksNumerical: Regular expressions for stringsRegular Expressions
Write regular expression over {a,b} that represents a. Strings having exactly two a's and at least two b's. b. Strings having an even number of a's and each a followed by at least one b.
Write regular expression over {a,b} that represents a. Strings having exactly two a's and at least two b's. b. Strings having an even number of a's and each a followed by at least one b. [5]
- Alphabet: $\Sigma = {a, b}$ - Part (a): strings with exactly two a's AND at least two b's. - Part (b): strings with an even number of a's, and each a immediately followed by at least one b. --- Structure. With exactly two a's, every string has the shape: $$b^,a,b^,a,b^$$ The three $b^$ bl...