• edited by
1,058 views
0 0 votes
Design regular expression for no $2$  $a's$ should come together  ...... (Standard question in many text books)

 I came to know the answer is .... $(a + E) (b + ba)$ or $(b + ab) (a + E)$ ...... this I have understood Logically ....

but when I tried it on my own for the first time ... I came up with $(b + ab)^* + (b + ba)^{*} + a + E $....... please help me with any case or scenario where my expression fails.

This community is always helpful to me. Thanks in advance ...

2 Answers

1 1 vote
  • Regular expression for no two a's comes together is 
  1. (a+$\epsilon$)(b+ba)*

  2. (b+ab)*(a+$\epsilon$)

  • Your regular expression (b+ab)*+(b+ab)* +a+ E  is not gives string like 'aba'.so it is wrong.

Position:
Show:

Related questions

1 1 vote
1 1 answer
82
82 views
GO Classes asked Oct 1
82 views
Consider the following regular expressions over the alphabet$\Sigma=\{a,b\}$.$R_1=a(a\cup b)^*$$R_2=b(a\cup b)^*$If $L(R)$ denotes the language associated with regular ex...