1 1 vote regular expression for " set of all strings over {a,b} in which there are at least two occurrences of b between any two occurrences of a ". Unknown Category regular-expression expression + – gate_forum 7.2k views answer comment Share Follow Print 0 reply Please log in or register to add a comment.
3 3 votes Here is my try: $b^{*} + b^{*}(abb^{+})^{*}ab^{*}$ Pranav Kant Gaur answered May 31, 2016 Pranav Kant Gaur comment Share Follow See all 7 Comments 7 7 Comments reply Tauhin Gangwar commented May 31, 2016 reply Follow flag this is correct.. 0 0 replyShare gate_forum commented May 31, 2016 reply Follow flag b* + b* (a(bb)+)* ab* 0 0 replyShare shekhar chauhan commented Jun 18, 2016 reply Follow flag the restriction is only on a means if there are 2 a's side by side then there should be 2 b's b/w them rt ? but if there is no a in the language then there is no restriction on b. So question is how can we generate only b , bb ,bbb...... out of this regular expression ? from the given RE which is b*+b*(abb+)*ab* how can we get rid-off this a b*+b*(abb+)*ab* Please tell me is this argument is right or wrong ...I'm so confused with RE 0 0 replyShare shekhar chauhan commented Jun 18, 2016 reply Follow flag please resolve my comment... 0 0 replyShare Tauhin Gangwar commented Jun 18, 2016 reply Follow flag yes...b,bb,bb....can be generated...clear ur doubt assume R.E ====> A+B means we can either take A or B at a time but not both...for generating any string.. and A* + B*/////means we can either take A any no.of time or B any no.of time but not both...for generating any string.. and ( A + B)*///brackets are important..means we can either take A any no.of time or B any no.of time or BOTH...for generating any string.. 1 1 replyShare shekhar chauhan commented Jun 18, 2016 reply Follow flag if we write (a,b)^+ or (aUb)^+ or (a+b)^+ does they all mean same ? 0 0 replyShare Tauhin Gangwar commented Jun 18, 2016 reply Follow flag yes.. 0 0 replyShare Please log in or register to add a comment.