edited by
40 views
1 votes
1 votes

The regular expression for the language which have strings, starting and ending with different symbol, over $\Sigma = \{a,b\}$ is given by _______ (Mark all the appropriate choices)

  1. $a(a+b)^{\ast}b + b(a+b)^{\ast}b$
  2. $a(a+b)^{\ast}b + a(a+b)^{\ast}a$
  3. $b(a+b)^{\ast}a + a(a+b)^{\ast}a$
  4. $a(a+b)^{\ast}b + b(a+b)^{\ast}a$
edited by

1 Answer

Best answer
1 votes
1 votes
Given that, $\Sigma = \{a,b\}$

$L = \{ab,ba,aaab,bbba,\dots\}$

Now, regular expression $RE = a(a+b)^{\ast}b + b(a+b)^{\ast}a$

So, the correct answer is $(D).$
selected by
Answer:

Related questions

1 votes
1 votes
2 answers
2