In the other direction, suppose that "RL" has finitely many equivalence classes. In this case, it is possible to design a deterministic finite automaton that has one state for each equivalence class. The start state of the automaton corresponds to the equivalence class containing the empty string, and the transition function from a state "X" on input symbol "y" takes the automaton to a new state, the state corresponding to the equivalence class containing string "xy", where "x" is an arbitrarily chosen string in the equivalence class for "X". The definition of the Myhill–Nerode relation implies that the transition function is well-defined: no matter which representative string "x" is chosen for state "X", the same transition function value will result. A state of this automaton is accepting if the corresponding equivalence class contains a string in "L"; in this case, again, the definition of the relation implies that all strings in the same equivalence class must also belong to "L", for otherwise the empty string would be a distinguishing string for some pairs of strings in the class.