How to determine if an automata (DFA) accepts an infinite or finite language?
This is well enough known that you should be able to find it in most intro theory texts:

Theorem. The language accepted by a DFA $M$ with $n$ states is infinite if and only if $M$ accepts a string of length $k$, where $n\le k &lt; 2n$.

This makes the decision problem simple: just try all strings of length at least $n$ and less than $2n$ and answer "yes" if $M$ accepts one of them and "no" if there's no string in that range that's accepted.