The Gateway to Computer Science Excellence
+18 votes

Consider the finite automaton in the following figure:


What is the set of reachable states for the input string $0011$?

  1. $\{q_0,q_1,q_2\}$
  2. $\{q_0,q_1\}$
  3. $\{q_0,q_1,q_2,q_3\}$
  4. $\{q_3\}$
in Theory of Computation by Veteran (105k points)
edited by | 1.9k views
What is meant by "reachable" over here? Set of terminating states for the string 0011 or set of all the states that can be visited by 0011?

For eg, if q2 was the only state where 0011 could terminate, then the answer will be {q2} or {q0,q1,q2}?

3 Answers

+31 votes
Best answer

$q_0, q_1$ and $q_2$ are reachable from $q_0$ on input $0011$

Correct Answer: $A$

by Veteran (57k points)
edited by
@Praveen Saini

Can't we move like this q0,q0,q0,q1 because q0 has both 0,1 inputs

@ Divya Bharti

It is NFA. So, if we consider for all possibility then answer is q0,q1,q2


@Praveen Saini Sir, can we also convert it to DFA and check, well, I did convert to DFA and found out that string 0011 end up in state {q0 q1 q2} I just want to confirm can we convert NFA to DFA and check it?

yes it will work fine.

1.How to tackle this type of problem.

2.why not Q3 is considered as it is the final state as any string accepted by automata must end up at final state.


Please suggest

Question is not about accept and reject of input
@Mr. Praveen, Can you please justify why we should not reach the final state?

Isn't it mandatory to reach final state for a given input string? I'm in doubt...
$\delta^*(q,w)=$contains only those states which have a walk from state q labelled w.
how to solve it fastly
+11 votes

qo,q1,q2 can be reached in this nfa by enumerating all the possibilities

by Boss (14.4k points)
edited by
0 votes

q0,q1 and q2 are reachable from q0 on input 0011.

hence, reachable states={q0,q1,q2}. Option A is correct.

by (471 points)

Related questions

Quick search syntax
tags tag:apple
author user:martin
title title:apple
content content:apple
exclude -tag:apple
force match +apple
views views:100
score score:10
answers answers:2
is accepted isaccepted:true
is closed isclosed:true
50,737 questions
57,303 answers
105,008 users