Question

Write down the regular expressions for the following set of strings over {a, b}: 1.Strings that contain no more than one...

Write down the regular expressions for the following set of strings over {a, b}:

1.Strings that contain no more than one occurrence of the string aa.

2.All strings containing aba:

3.All strings of odd length

4.A string in this language must have at least two a's.

5.All strings that begin with a, and have an even number of b

Bonus - All strings with “a” at every odd position

0 0
Add a comment Improve this question Transcribed image text
✔ Recommended Answer
Answer #1

1.Strings that contain no more than one occurrence of the string aa.
(b*+(ab)*) aa (b*+(ba)*)

2.All strings containing aba:
(a+b)*(aba)(a+b)*

3.All strings of odd length
   (a+b)[(a+b)(a+b)]*

4.A string in this language must have at least two a's.
(a+b)*a(a+b)*a(a+b)*

5.All strings that begin with a, and have an even number of b
    a(a*ba*ba*)*

Add a comment
Know the answer?
Add Answer to:
Write down the regular expressions for the following set of strings over {a, b}: 1.Strings that contain no more than one...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Similar Homework Help Questions
ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT