0

Define a regular expression such that there is a string of 1 or more a's continuous followed by a continuous string of b's so that the number of a's and b's are the same.

I have ideas on how i would do this with a context-free grammar but i don't know how to so this under the restriction of a regular grammar.

  • You can't. See the linked question. – D.W. May 17 '18 at 21:50
  • 2
    Just a rule of thumb on StackExchange: It's always ideal to tell us about what you know. Saying you know about something is vague and makes the person reading your question scratch their head and say, "So what was your point in telling me that you know about something if you're not going to go into further detail?" For everyone's sake, please let us know about what you know :) You want to provide as much detail as possible. Like imagine me saying, "I know how to write code but I don't know how to do XYZ..." Sorta vague, right? –  May 17 '18 at 21:52

0 Answers0