GATE / CS ARCHIVE

GATE CSE 2007 / QUESTION 74

Language of finite-state automaton

Theory of Computation · Regular Expressions & Languages · Full GATE CSE 2007 paper

GATE 2007, Q74 2 marks · MCQ
Report issue

Regular Expressions & Languages

Question 74, GATE 2007: A DFA over {a,b} has start state q0, accepting states q1,q2 and nonaccepting states q0,q3. Its complete transition table is: q0: a→q1,b→q0; q1: a→q2,b→q1; q2: a→q1,b→q2; q3: a→q1,b→q2.
Which regular expression denotes its language? Here + denotes union.
Options:
(A) b*ab*ab*ab*
(B) (a+b)*
(C) b*a(a+b)*
(D) b*ab*ab*
Question 74, GATE 2007: A DFA over {a,b} has start state q0, accepting states q1,q2 and nonaccepting states q0,q3. Its complete transition table is: q0: a→q1,b→q0; q1: a→q2,b→q1; q2: a→q1,b→q2; q3: a→q1,b→q2.
Which regular expression denotes its language? Here + denotes union.
Options:
(A) b*ab*ab*ab*
(B) (a+b)*
(C) b*a(a+b)*
(D) b*ab*ab*
Tap to enlarge
Your answer
Answer & solution

Answer: C (no official key was published)

1. Approach. Before the first a the machine stays in nonaccepting q0. Once an a occurs, every later transition stays within the accepting pair q1,q2. q3 cannot affect strings read from the start state.

2. Derivation and interpretation. The start state q0 loops on b and is not accepting. Its first a enters accepting q1. Thereafter a alternates between q1 and q2 and b loops in either accepting state, so every suffix over {a,b} is accepted. q3 is unreachable from q0. Thus exactly the strings containing at least one a are accepted: b*a(a+b)*, option C.

Original paper, page 19