Skip to content
Related Articles

Related Articles

Improve Article
GATE | GATE-CS-2015 (Mock Test) | Question 17
  • Last Updated : 26 Jan, 2015

Consider the following Deterministic Finite Automata

Automata

Which of the following is true?
(A) It only accepts strings with prefix as “aababb”
(B) It only accepts strings with substring as “aababb”
(C) It only accepts strings with suffix as “aababb”
(D) None of the above


Answer: (B)

Explanation:  

To reach the accepting state, any string will have to go through edges having aababb as labels in
order. Though it might not be a continuous substring, but it sure will be a substring. There might
be some cases where same substring always exists as a prefix or suffix for some DFA, but in this
situation we don’t have to consider those cases, given this question has single choice answer.

> O − a− > O − a− > O − b− > O − a− > O − b− > O − b− > O



Hence, correct answer should be (B).

This solution is contributed by vineet purswani.

Quiz of this Question

Attention reader! Don’t stop learning now. Learn all GATE CS concepts with Free Live Classes on our youtube channel.

My Personal Notes arrow_drop_up
Recommended Articles
Page :