in Theory of Computation edited by
7,877 views
26 votes
26 votes

The smallest finite automaton which accepts the language $\{x \mid$ length of $x$ is divisible by $3\}$ has

  1. $2$ states
  2. $3$ states
  3. $4$ states
  4. $5$ states
in Theory of Computation edited by
7.9k views

1 comment

Modulo 3 gives remainder as ( 0, 1, 2 )

3 states needed
0
0

3 Answers

30 votes
30 votes
Best answer

Correct Option: B

It is $3$ states as we need a state each for length mod $3 = 0, 1$ and $2$.

edited by

4 Comments

edited by

In the question it is saying {x | length of the x is divisible by 3}  not the x itself is divisible by 3 . So, the

answer should be B. 3 states but diagram would be 

 

3
3

what about length 0,why initial state is final state?

0
0
because 0 mod 3 =0
0
0
6 votes
6 votes

Option B is Correct

1 vote
1 vote

Correct option is B. 

1 comment

but your thought on this is not correct question is saying for  length of the string must be  divisible   on by 3 .

0
0
Answer:

Related questions