We show that any one-counter automaton with $n$ states, if its language is
non-empty, accepts some word of length at most $O(n^2)$. This closes the gap
between the previously known upper bound of $O(n^3)$ and lower bound of
$\Omega(n^2)$. More generally, we prove a tight upper bound on the length of
shortest paths between arbitrary configurations in one-counter transition
systems (weaker bounds have previously appeared in the literature).
Ekaterina Shemetova;Alexander Okhotin;Semyon Grigorev, 2023, Rational Index of Languages Defined by Grammars with Bounded Dimension of Parse Trees, Theory of Computing Systems, 68, 3, pp. 487-511, 10.1007/s00224-023-10159-3.