Machine-translated by Google. Questions are authored in English.
Top

Discussion

The regular expression (a|b)*abb describes

  • A.exactly the four strings a, b, ab and abb
  • B.all strings over a and b of length exactly three
  • C.all strings over a and b that end in abb
  • D.all strings over a and b that begin with abb

Answer: C

The closure matches any prefix over the alphabet and the literal abb must follow it. Any string ending in abb is therefore accepted, and any string not ending that way is rejected. This expression is the standard worked example in every treatment of the subject.

No comment is present. Be the first to comment.
Loading…

Post your comment

Please log in or register to post a comment.