Theory of Computation20785 marksRegular Expressions
Give the regular expressions for the following language over alphabet {a, b}. a. Set of all strings with substring bab or abb. b. Set of all strings whose 3rd symbol is 'a' and 5th symbol is 'b'.
Give the regular expressions for the following language over alphabet {a, b}. a. Set of all strings with substring bab or abb. b. Set of all strings whose 3rd symbol is 'a' and 5th symbol is 'b'. [5]
We need all strings over {a, b} that contain bab as a substring, or contain abb as a substring (or both). Step-by-step reasoning: - Any string containing bab: prefix can be any string over {a,b}, then bab, then any suffix over {a,b} - RE: (a+b) bab (a+b) - Any string containing abb: similarly - R...