Consider the following two statements:
- If all states of an NFA are accepting states then the language accepted by the NFA is .
- There exists a regular language such that for all languages , is regular.
Which one of the following is CORRECT?
View worked solution
Answer: B
Let us analyze both statements individually:
Statement I: False
In a Deterministic Finite Automata (DFA) where all states are accepting, the language accepted is indeed (since a DFA must have a transition defined for every alphabet symbol from every state). However, this does not hold for a Non-deterministic Finite Automata (NFA).
An NFA can have missing transitions. If a string leads to a state with no defined transition for the next symbol, the NFA gets "stuck" and rejects the string, even if all its states are accepting.
Counterexample:
- Let .
- Consider an NFA with a single state which is both the start state and an accepting state, with no transitions defined.
- The language accepted by this NFA is , which is not equal to .
Statement II: True
We need to find at least one regular language such that for any language (regular or non-regular), the intersection is guaranteed to be regular.
- Let (the empty language, which is regular).
- For any language , we have:
- Since is a regular language, the intersection is always regular.
Note: More generally, any finite language also satisfies this condition because the intersection of any language with a finite language is always finite, and all finite languages are regular.
Conclusion
Only Statement II is true. Therefore, the correct option is B.
Free practice · Your answers on this page are not saved.
