Open In App
Related Articles

UGC-NET | UGC NET CS 2015 Jun – III | Question 21

Improve Article
Save Article
Like Article

The transition function for the language L = {w|na (w) and nb(w) are both odd} is given by:
δ (q0, a) = q1 ; δ (q0, b) = q2
δ (q1, a) = q0 ; δ (q1, b) = q3
δ (q2, a) = q3 ; δ (q2, b) = q0
δ (q3, a) = q2 ; δ (q3, b) = q1
The initial and final states of the automata are:
(A) q0 and q0respectively
(B) q0 and q1respectively
(C) q0 and q2respectively
(D) q0 and q3respectively

Answer: (D)

Explanation: Transition diagram for L = {w|na (w) and nb(w) are both odd}:

q3 satisfies the condition – {w|na (w) and nb(w) are both odd} , so q3 is final state and all strings starts from q0 so q0 is final state.
So, option (D) is correct.

Quiz of this Question

Whether you're preparing for your first job interview or aiming to upskill in this ever-evolving tech landscape, GeeksforGeeks Courses are your key to success. We provide top-quality content at affordable prices, all geared towards accelerating your growth in a time-bound manner. Join the millions we've already empowered, and we're here to do the same for you. Don't miss out - check it out now!

Last Updated : 19 Jun, 2018
Like Article
Save Article
Similar Reads