COMPILER DESIGN

LEXICAL ANALYSIS

CONSTRUCTION OF A LEXICAL ANALYZER

Question [CLICK ON ANY CHOICE TO KNOW THE RIGHT ANSWER]
The final state of DFA will be every combination of final state of NFA.
A
True
B
False
C
Either A or B
D
None of the above
Explanation: 

Detailed explanation-1: -Statement 2: The final state of DFA will be every combination of final state of NFA. This statement is also true because the final state of the DFA is the set of states that can be reached from the initial state of the DFA by following transitions that correspond to input symbols.

Detailed explanation-2: -The correct answer is option 4. Option i: For every NFA with an arbitrary number of final states, there is an equivalent NFA with only one final state.

Detailed explanation-3: -In DFA, there is only one path for specific input from the current state to the next state. DFA does not accept the null move, i.e., the DFA cannot change state without any input character. DFA can contain multiple final states.

Detailed explanation-4: -A DFA accepts a string if starting from the start state and moving from state to state, each time following the arrow that corresponds the current input character, it reaches a final state when the entire input string is consumed.

Detailed explanation-5: -In particular, every DFA is also an NFA. Sometimes the term NFA is used in a narrower sense, referring to an NFA that is not a DFA, but not in this article. Using the subset construction algorithm, each NFA can be translated to an equivalent DFA; i.e., a DFA recognizing the same formal language.

There is 1 question to complete.