COMPILER DESIGN

LEXICAL ANALYSIS

REGULAR EXPRESSIONS AND FINITE AUTOMATA

Question [CLICK ON ANY CHOICE TO KNOW THE RIGHT ANSWER]
The sum of minimum and maximum number of final states for a DFA n states is equal to:
A
n+1
B
n
C
n-1
D
n+2
Explanation: 

Detailed explanation-1: -A state in a DFA will be a subset of the set of states of the equivalent NFA. So, the maximum number of states in the equivalent DFA of an NFA, will be 2n, where n is the number of states in NFA, as a set with n items has maximum 2n subsets.

Detailed explanation-2: -∴ Minimum number of states required for DFA = 3.

Detailed explanation-3: -8. The maximum number of transition which can be performed over a state in a DFA? Explanation: The maximum number of transitions which a DFA allows for a language is the number of elements the transitions constitute.

Detailed explanation-4: -(Same as for DFA) Number of possible start states =n (assuming NFA can have only one start state) (Same as for DFA) Number of final states =2n, since any subset of states can be set of final states.

There is 1 question to complete.