Skip to content
Related Articles

Related Articles

Improve Article
Save Article
Like Article

GATE | GATE-CS-2015 (Mock Test) | Question 17

  • Last Updated : 28 Jun, 2021

Consider the following Deterministic Finite Automata


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.

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)


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

My Personal Notes arrow_drop_up
Recommended Articles
Page :

Start Your Coding Journey Now!