1: \begin{abstract}
2: The Krohn--Rhodes Theorem proves that a finite semigroup divides a wreath product of groups and aperiodic semigroups.
3: Krohn--Rhodes complexity equals the minimal number of groups that are needed. Determining an algorithm to compute
4: complexity has been an open problem for more than 50 years. The main result of this paper proves that it is decidable if a
5: semigroup has complexity $k$ for all $k \geqslant 0$. This builds on our previous work for complexity 1. In that paper we
6: proved using profinite methods and results on free Burnside semigroups by McCammond and others that the lower bound from a 2012 paper by Henckell,
7: Rhodes and Steinberg is precise for complexity 1. In this paper we define an improved version of the lower bound from the 2012 paper and
8: prove that it is exact for arbitrary complexity.
9: \end{abstract}
10: