0

Here's the question:

Let Σ = {a, b, c}. Write a regular expression for the set of all strings in Σ* (the * represents a Kleene star) such that the sum of the number of a’s and b’s in the string is at most two. Thus the string can have an a and a b but cannot have two a’s and a b, for example.

MJD
  • 65,394
  • 39
  • 298
  • 580
  • 1
    Welcome to Math.SE! Please, help us help you: by telling us what you've tried and where you're getting stuck, you are much more likely to get the help you need. – Nick Peterson Jan 22 '19 at 22:09
  • 1
    Hint: see if you can deal with the case with exactly one $a$ and exactly one $b$. If that doesn't help you get to the answer, then tell us how you got on and you're more likely to get some more detailed help as Nick pointed out in his comment. – Rob Arthan Jan 22 '19 at 22:21
  • 1
    Try writing down all of the strings consisting only of $a$’s and $b$’s that are in this language. Where can you put $c$’s in these strings? – amd Jan 22 '19 at 22:37

0 Answers0