GATE / CS ARCHIVE

GATE CSE 1999 / QUESTION 6(b)

Decide strict inclusion of automaton languages

Theory of Computation · Finite Automata · Full GATE CSE 1999 paper

GATE 1999, Q6(b) 3 marks · Descriptive
Report issue

Finite Automata

Question 6(b), GATE 1999: Given finite automata M₁ and M₂, outline an algorithm to decide L(M₁)⊊L(M₂). The prose explicitly says strict subset even though a reproduced symbol permits equality.
Question 6(b), GATE 1999: Given finite automata M₁ and M₂, outline an algorithm to decide L(M₁)⊊L(M₂). The prose explicitly says strict subset even though a reproduced symbol permits equality.
Tap to enlarge
Shared context

Given finite automata M₁ and M₂, outline an algorithm to decide L(M₁)⊊L(M₂). The prose explicitly says strict subset even though a printed symbol permits equality.

Answer & solution

Answer: Require L(M₁)\L(M₂)=∅ and L(M₂)\L(M₁)≠∅. (no official key was published)

1. Put the automata over the same alphabet Σ, taking the union of their alphabets if needed. Determinize any NFAs and complete both resulting DFAs with sink states for missing transitions. This makes complementing acceptance correct.

2. Explore the product states (q₁,q₂) from the initial pair, with δ((q₁,q₂),a)=(δ₁(q₁,a),δ₂(q₂,a)). A reachable pair with q₁ accepting and q₂ rejecting witnesses a word in L(M₁)\L(M₂). If such a pair exists, answer NO.

3. Also look for a reachable pair with q₂ accepting and q₁ rejecting. If none exists, the languages are equal, so strict inclusion is false. If one exists while the first kind does not, answer YES.

4. Breadth-first or depth-first search suffices because a finite automaton language is nonempty exactly when an accepting state is reachable. On complete DFAs the search takes O(|Σ||Q₁||Q₂|) time; determinization can add exponential cost for NFA input. Both tests are necessary: ordinary inclusion alone incorrectly accepts equal languages.

Original paper, page 6