  The Krohn-Rhodes Theorem proves that a finite semigroup divides a wreath
product of groups and aperiodic semigroups. Krohn-Rhodes complexity equals the
minimal number of groups that are needed. Determining an algorithm to compute
complexity has been an open problem for more than 50 years. The main result of
this paper proves that it is decidable whether a semigroup has complexity k for
any k greater than or equal to 0. This builds on our previous work for
complexity 1. In that paper we proved using profinite methods and results on
free Burnside semigroups by McCammond and others that the lower bound from a
2012 paper by Henckell, 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 prove that it is exact for arbitrary complexity.
