LEXICAL ANALYSIS
ROLE OF THE LEXICAL ANALYZER
Question
[CLICK ON ANY CHOICE TO KNOW THE RIGHT ANSWER]
|
The smallest finite automaton which accepts the language {x|length of x is divisible by 3} has how many states?
|
2
|
|
3
|
|
4
|
|
5
|
Explanation:
Detailed explanation-1: -Finite automata have two states, Accept state or Reject state. When the input string is processed successfully, and the automata reached its final state, then it will accept.
Detailed explanation-2: -∴ Minimum number of states required for DFA = 3.
Detailed explanation-3: -Detailed Solution So, total 8 states are needed.
Detailed explanation-4: -Let’s start by showing that a DFA accepting L must have at least 3 states.
There is 1 question to complete.