COMPILER DESIGN

LEXICAL ANALYSIS

REGULAR EXPRESSIONS AND FINITE AUTOMATA

Question [CLICK ON ANY CHOICE TO KNOW THE RIGHT ANSWER]
Statement 1:-transition can be called as hidden non-determinism. Statement 2: (q, ) = p means from q it can jump to p with a shift in read head. Which among the following options is correct?
A
Statement 1 and 2, both are correct
B
Statement 1 and 2, both are wrong
C
Statement 1 is correct while Statement 2 is wrong
D
Statement 1 is wrong while Statement 2 is correct
Explanation: 

Detailed explanation-1: -Statement 1: -transition can be called as hidden non-determinism. Statement 2: (q, ) = p means from q it can jump to p with a shift in read head. Which among the following options is correct? Explanation: The transition with leads to a jump but without any shift in read head.

Detailed explanation-2: -An epsilon nondeterministic finite automaton (NFA) has null or epsilon transitions from one state to another. Epsilon NFA is also called a null NFA or an NFA lambda. A regular expression for a language forms an epsilon NFA. This epsilon NFA then converts to a simple NFA.

Detailed explanation-3: -An epsilon transition (also epsilon move or lambda transition) allows an automaton to change its state spontaneously, i.e. without consuming an input symbol. It may appear in almost all kinds of nondeterministic automaton in formal language theory, in particular: Nondeterministic Turing machine.

Detailed explanation-4: -The epsilon closure E(q) of a state q in Q is the union of the set q with the set of all states that can be reached from q via one or more transitions. If R is a set of states from Q, the epsilon closure E(R) is defined as the union of the epsilon closures of all the states in R.

Detailed explanation-5: -From the definition of DFA, “Deterministic Finite Automata is a machine that can’t move on other state without getting any input". And since epsilon means nothing. Hence DFA can’t move on epsilon moves.

There is 1 question to complete.