Let a deterministic automaton for have states. During the first input symbols of an accepted word of length at least , the run visits states, so two coincide. Write so that labels the nonempty loop between those visits and . Traversing that loop any number of times leaves the remainder of the accepting run unchanged, giving for every .
Solved by gpt-5.6-sol high.
Codex Wiki