1
$\begingroup$

My attempt is

We can fairly easily build an expression containing no a, one a, or one aa: (b+c)(€+a+aa)(b+c) but if we want to repeat this, we need to be sure to have at least one non-a between repetitions: (b+c)*(€+a+aa)(b+c)*((b+c)(b+c)*(€+a+aa)(b+c)*)*

Therefore the final answer is (b+c)*(€+a+aa)(b+c)*((b+c)(b+c)*(€+a+aa)(b+c)*)*

Is this ok?

$\endgroup$

closed as unclear what you're asking by David Richerby, Yuval Filmus, Evil, Juho, Tom van der Zanden Mar 15 '17 at 18:52

Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, it’s hard to tell exactly what you're asking. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.

  • 4
    $\begingroup$ We discourage "please check whether my answer is correct" questions, as only "yes/no" answers are possible, which won't help you or future visitors. See here and here. Can you edit your post to ask about a specific conceptual issue you're uncertain about? As a rule of thumb, a good conceptual question should be useful even to someone who isn't looking at the problem you happen to be working on. If you just need someone to check your work, you might seek out a friend, classmate, or teacher. $\endgroup$ – D.W. Mar 11 '17 at 7:35
  • $\begingroup$ @D.W. Will keep this in mind... $\endgroup$ – Aditya Mar 11 '17 at 7:50
  • 2
    $\begingroup$ @ADITYA Your title's fine, yes. Thanks for that. But your question is still "Here's my answer -- is it correct?" Why do you think it might be wrong? Can't you check for yourself that your regular expression matches exactly the right strings, for example by trying to find strings that it matches but shouldn't, or vice-versa. $\endgroup$ – David Richerby Mar 11 '17 at 11:40
  • $\begingroup$ @DavidRicherby Got it... $\endgroup$ – Aditya Mar 11 '17 at 12:23
  • 1
    $\begingroup$ This reference question may be helpful. Converting regular expressions to regular grammars or finite automata is a mechanic task, so feel free to attempt the prove with either of the three models. $\endgroup$ – Raphael Mar 11 '17 at 13:32