Solution (source code)

= Solution

A state $q$ is inaccessible if no word reaches it from the initial state:
$$
\boxed{\widehat\delta(q_0,w)\ne q\qquad\text{for every }w\in\mathbb W.}
$$