Skip to content
Related Articles

Related Articles

Improve Article
Save Article
Like Article

GATE | Quiz for Sudo GATE 2021 | Question 44

  • Last Updated : 18 Dec, 2020

A regular expression is ambiguous when there exists a string which can be constructed in two different ways from the regular expression. Which of the following regular expression(s) are ambiguous?

Note – This question is multiple select questions (MSQ).
(A) a((ab)*cd)* ∪ a(ababcb*)*a*
(B) aab*(ab)* ∪ ab* ∪ a*bba*
(C) aaba* ∪ aaaba ∪ aabba* ∪ a
(D) None of these

Answer: (A) (B)

Explanation: (A) Ambiguous. For instance, the string a can be constructed by using a((ab)*cd)* or a(ababcb*)*a*.
(B) Ambiguous. The string abb can be constructed either by ab* or a*bba*.
(C) Unambiguous.

Quiz of this Question
Please comment below if you find anything wrong in the above post

Attention reader! Don’t stop learning now.  Practice GATE exam well before the actual exam with the subject-wise and overall quizzes available in GATE Test Series Course.

Learn all GATE CS concepts with Free Live Classes on our youtube channel.

My Personal Notes arrow_drop_up
Recommended Articles
Page :

Start Your Coding Journey Now!