Open In App

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

Like Article
Like
Save
Share
Report

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


Last Updated : 28 Jun, 2021
Like Article
Save Article
Previous
Next
Share your thoughts in the comments
Similar Reads