Give the regular expressions for the following language over alphabet {a, b}.

  1. Set of all strings with substring bab or abb.
  2. Set of all strings whose 3rd symbol is ‘a’ and 5th symbol is ‘b’.

This answer is restricted. Please login to view the answer of this question.

Login Now

Given

Σ = {a, b}

a) Regular Expression for a set of strings with substring bab or aab is

(a+b)*bab(a+b)*+(a+b)*aab(a+b)*

b) Regular expression for a set of strings whose 3rd symbol is ‘a’ and 5th symbol is ‘b’ is

(a+b)(a+b)a(a+b)b(a+b)*

If you found any type of error on the answer then please mention on the comment or report an answer or submit your new answer.
Leave your Answer:

Click here to submit your answer.

Discussion
0 Comments
  Loading . . .