Question discussion

Which of the following strings is accepted by the regular expression (a|b)*abb ?

2529Medium DSSSB TGT Computer Science 0 replies 1 views
0

Which of the following strings is accepted by the regular expression (a|b)*abb ?

  • Aaabb
  • Bababa
  • Cabbab
  • Dbbaba
Correct answer: A

Explanation

The expression describes all strings over {a, b} that end with abb, and of the given strings only aabb ends with abb.

Discussion 0

Nobody has replied yet. Start the discussion!