  The structure of transformation semigroups on a finite set is analyzed by
introducing a hierarchy of functions mapping subsets to subsets. The resulting
hierarchy of semigroups has a corresponding hierarchy of minimal ideals, or
kernels. This kernel hierarchy produces a set of tools that provides direct
access to computations of interest in probability limit theorems; in
particular, finding certain factors of idempotent limit measures. In addition,
when considering transformation semigroups that arise naturally from edge
colorings of directed graphs, as in the road-coloring problem, the hierarchy
produces simple techniques to determine the rank of the kernel and to decide
when a given kernel is a right group. In particular, it is shown that all
kernels of rank one less than the number of vertices must be right groups and
their structure for the case of two generators is described.
