Skip to content
Official PYQ · 2016

GATE CS 2016 Set 2 Q42 — Regular Expressions and Finite Automata

Explain with AI

Consider the following two statements:

  1. If all states of an NFA are accepting states then the language accepted by the NFA is Σ∗\Sigma_{}^{*}.
  2. 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
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 Σ∗\Sigma^* (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 Σ={a}\Sigma = \{a\}.
  • Consider an NFA with a single state q0q_0 which is both the start state and an accepting state, with no transitions defined.
  • The language accepted by this NFA is L={ϵ}L = \{\epsilon\}, which is not equal to Σ∗={a}∗\Sigma^* = \{a\}^*.

Statement II: True

We need to find at least one regular language AA such that for any language BB (regular or non-regular), the intersection A∩BA \cap B is guaranteed to be regular.

  • Let A=∅A = \emptyset (the empty language, which is regular).
  • For any language BB, we have: A∩B=∅∩B=∅A \cap B = \emptyset \cap B = \emptyset
  • Since ∅\emptyset is a regular language, the intersection is always regular.

Note: More generally, any finite language AA 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.

Published
Report a correction
Keep exploringMore Regular Expressions and Finite Automata questions