Skip to content
Related Articles
Open in App
Not now

Related Articles

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

Improve Article
Save Article
  • Last Updated : 28 Jun, 2021
Improve Article
Save Article

Consider the following Deterministic Finite 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)


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
Related Articles

Start Your Coding Journey Now!