Question
Consider the following two statements:
I. If all states of an NFA are accepting states then the language accepted by the NFA is .
II. There exists a regular language such that for all languages , is regular.
Which one of the following is CORRECT?
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 .'
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: . If an NFA state has no transition on a symbol , any string reading from that state crashes and is rejected.
For example, consider an NFA with alphabet having a single state (which is an accepting start state) with a transition and no transition on . The language accepted by this NFA is , which is strictly a subset of . Thus, Statement I is FALSE.
Analyze Statement II: 'There exists a regular language such that for all languages , is regular.'
Consider the empty language . The empty language is regular because it is recognized by a finite automaton with no accept states. For any language over the same alphabet (whether regular, context-free, recursive, or undecidable):
Since is regular, is always regular for every language . Thus, such a regular language exists. Statement II is TRUE.
Therefore, only Statement II is true.
B
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.