Aptitude | GATE IT 2006 | Question 3
Consider the strings u = abbaba, v = bab, and w = aabb. Which of the following statements is true?
(A) The automaton accepts u and v but not w
(B) The automaton accepts each of u, v, and w
(C) The automaton rejects each of u, v, and w
(D) The automaton accepts u but rejects v and w
For the acceptance and rejection of any string we can simply check for the movement on each input alphabet between states. A string is accepted if we stop at any final state of the DFA.
For string u=abbaba the string ends at t (final state) hence it is accepted by the DFA.
For string v=bab the string ends at s (non-final state) and hence rejected by the DFA.
For string w=aabb the string ends at s (non-final state) and hence rejected by the DFA.
This solution is contributed by Yashika Arora.
Quiz of this Question
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.