Question

Consider the following two statements:
I. If all states of an NFA are accepting states then the language accepted by the NFA is Σ∗\Sigma^*.
II. There exists a regular language AA such that for all languages BB, A∩BA \cap B is regular.

Which one of the following is CORRECT?

Choose one option
Official answer and solution
Official answer
B
From
Official GATE 2016 answer key

Solution

Evaluate NFA properties with missing transitions and regular language intersection with the empty language.

Analyze Statement I: 'If all states of an NFA are accepting states then the language accepted by the NFA is Σ∗\Sigma^*.'
Unlike a standard DFA which must have a transition defined for every input symbol from every state, an NFA transition function maps to subsets of states: δ(q,a)⊆Q\delta(q, a) \subseteq Q. If an NFA state has no transition on a symbol aa, any string reading aa from that state crashes and is rejected.
For example, consider an NFA with alphabet Σ={a,b}\Sigma = \{a, b\} having a single state q0q_0 (which is an accepting start state) with a transition δ(q0,a)={q0}\delta(q_0, a) = \{q_0\} and no transition on bb. The language accepted by this NFA is a∗a^*, which is strictly a subset of Σ∗\Sigma^*. Thus, Statement I is FALSE.

Analyze Statement II: 'There exists a regular language AA such that for all languages BB, A∩BA \cap B is regular.'
Consider the empty language A=∅A = \emptyset. The empty language is regular because it is recognized by a finite automaton with no accept states. For any language BB over the same alphabet (whether regular, context-free, recursive, or undecidable):

A∩B=∅∩B=∅A \cap B = \emptyset \cap B = \emptyset

Since ∅\emptyset is regular, A∩BA \cap B is always regular for every language BB. Thus, such a regular language AA exists. Statement II is TRUE.

Therefore, only Statement II is true.

Final answer

B

Common trap

Assuming that all states being accepting in an NFA implies accepting all strings, forgetting that missing transitions cause strings to be rejected.

The answer is the one in the official GATE answer key. The solution is this site's own explanation.

Source

Paper
GATE 2016 Computer Science and Information Technology (CS) Session 2
Question
52 of 65, printed as CS Q.42
Section
Computer Science and Information Technology

Report an error in this question

GATE questions are the work of the organising institutes. This site is independent and is not affiliated with them.