COMPILER DESIGN

LEXICAL ANALYSIS

REGULAR EXPRESSIONS AND FINITE AUTOMATA

Question [CLICK ON ANY CHOICE TO KNOW THE RIGHT ANSWER]
NFA, in its name has ‘non-deterministic’ because of:
A
The result is undetermined
B
The choice of path is non-deterministic
C
The state to be transited next is non-deterministic
D
All of the mentioned
Explanation: 

Detailed explanation-1: -In NDFA, for a particular input symbol, the machine can move to any combination of the states in the machine. In other words, the exact state to which the machine moves cannot be determined. Hence, it is called Non-deterministic Automaton.

Detailed explanation-2: -NFA stands for non-deterministic finite automata. It is easy to construct an NFA when compared to DFA for a given regular language. The finite automata are called NFA when there exist many paths for specific input from the current state to the next state. Each NFA can be translated into DFA but every NFA is Non DFA.

Detailed explanation-3: -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.

There is 1 question to complete.