GATE / CS ARCHIVE

GATE CSE 2019 / QUESTION 48

Minimal DFA for identity permutations

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

GATE 2019, Q48 2 marks · NAT
Report issue

Finite Automata

Question 48, GATE 2019: The alphabet Σ consists of all bijections of {1,...,5} to itself. A word x=x1...xn denotes the composition π(x)=x1∘...∘xn; the empty composition is identity. L contains words whose composition is identity. Find the number of states in a smallest DFA recognizing L.
Tap to enlarge
Answer & solution

Official answer: 120

1. Each alphabet symbol is a permutation of five objects, so there are 5!=120 possible permutations. A prefix matters only through its accumulated composition, suggesting a state for each permutation.
2. Construct that DFA: start in the identity state; if the current state is g and the next symbol is σ, transition to g∘σ. Make identity the sole accepting state. Associativity ensures the stored state after x is exactly π(x), so this 120-state DFA recognizes L.
3. All 120 states are reachable: reading the single alphabet symbol g takes the identity start to g. Hence there are no unreachable states to discard.
4. To prove no states can be merged, take distinct permutations g and h. Append the one-letter suffix g^−1, which is available because inverses are also permutations in Σ. From g this produces g∘g^−1=id and accepts.
5. From h the same suffix produces h∘g^−1. It cannot equal id, since that would imply h=g after composing with g. Thus it rejects, so the two states are distinguishable.
6. Every pair is distinguishable, proving a lower bound of 120 states. Combined with the construction, the minimum is exactly 120. Merely counting symbols would not prove minimality without the reachability and distinguishing-suffix arguments.

Original paper, page 14 · Answer key