Let $G_M$ be the transition graph for some dfa $M$. Prove the following:
(a) If $L (M)$ is infinite, then $G_M$ must have at least one cycle for which there is a path from the
initial vertex to some vertex in the cycle and a path from some vertex in the cycle to some final
vertex.
(b) If $L (M)$ is finite, then no such cycle exists.