Question
Let be the set of all bijections from to , where denotes the identity function, i.e. . Let denote composition on functions. For a string , let .
Consider the language . The minimum number of states in any DFA accepting is ________.
Official answer and solution
- Official answer
- 120
- From
- Official GATE 2019 answer key
Solution
Use the Myhill-Nerode theorem to determine the number of equivalence classes of the right congruence relation defined by language .
Let . The alphabet is the set of all bijections (permutations) from to . Under function composition , this set forms the symmetric group , which contains elements.
For any string , the accumulated composition is a specific permutation in . The empty string evaluates to the identity permutation .
The language is defined as .
According to the Myhill-Nerode theorem, the minimum number of states in any deterministic finite automaton (DFA) accepting equals the number of equivalence classes of the right congruence relation , where:
Notice that means , which is equivalent to .
Similarly, means .
Therefore:
- If , then , so for any , . Thus .
- If , their inverses are distinct. Choosing as the single symbol representing the bijection , we have (so ), but (so ). Thus .
Consequently, two strings are equivalent under if and only if their compositions yield the exact same permutation in .
Since all 120 permutations in are reachable (each permutation is a single symbol in ), there are exactly 120 distinct equivalence classes. Hence, the minimum number of states in any DFA accepting is 120.
120
Thinking that because the language checks equality with a single element (the identity), only 2 states are needed, ignoring that a DFA must maintain memory of the current state of the permutation.
The answer is the one in the official GATE answer key. The solution is this site's own explanation.
Source
- Paper
- GATE 2019 Computer Science and Information Technology (CS)
- Question
- 58 of 65, printed as CS Q.48
- 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.