Solution (source code)

= Solution

A state $q$ is inaccessible when no word $w\in\Sigma^*$ has $\widehat\delta(q_0,w)=q$.