This set of Compilers Questions and Answers for Experienced people focuses on “The NFA with Epsilon – Moves – 2”.

1. NFA-εs are defined because certain properties can be more easily proved on them as compared to NFA.

a) True

b) False

View Answer

Explanation: NFA-ε can be transformed into a NFA always, the properties are also true for NFAs.

2. E(q) is known ε-closure of q.

a) True

b) False

View Answer

Explanation: The ε-closure of a set of states Z of an NFA is defined as the set of states reachable from any state in Z following ε-transitions.

3. ε-transitions does not add any extra capacity of recognizing formal

a) True

b) False

View Answer

Explanation: ε-transitions provides a convenient transition in the systems whose current states are not precisely known.

4. Which of the following CFG’s can’t be simulated by an FSM ?

a) S->Sa/b

b) S->aSb/ab

c) S->abX, X->cY, Y->d/aX

d) None of the mentioned

View Answer

Explanation: generates the set {an bn, n=1,2,3 ….}which is not regular ?.

5. The transitions which does not take an input symbol are called

a) ε-transitions

b) λ-transitions

c) ε-transitions & λ-transitions

d) None of the mentioned

View Answer

Explanation: The transitions taking an input symbol are called ε-transitions or λ-transitions.

6. A nondeterministic finite automaton with ε-moves is an extension of nondeterministic finite automaton

a) True

b) False

View Answer

Explanation: Both are equivalent.

7. Is an ordinary NFA and a NFA-ε are equivalent

a) True

b) False

View Answer

Explanation: Yes ordinary NFA and NFA-ε are the same, in that, given either one, one can construct the other, which recognizes the same language.

8. Which is a correct statement?

a) { If an bn | n = 0,1, 2, 3 ..} is regular language

b) Strings with equal number of a’s and b’s denies a regular language

c) L (A* B*)∩ B gives the set A

d) None of the mentioned

View Answer

Explanation: If we include A and B in a set and if we write A* it means except then A i.e. B same as B* means except then B i.e. so if we intersect (A*B*) and B then get A because in any regular language. If we write A-B then A-B=A intersection B’ so if we intersect A and B means A-B So intersection of (A*B*) and B = (BA) intersection B means (BA)-B’ and B’=A so (BA) intersection(A)=A

So ans is (C).

**Sanfoundry Global Education & Learning Series – Compilers.**

To practice all areas of Compilers for Experienced people, __here is complete set of 1000+ Multiple Choice Questions and Answers__.