  A polynomial-time algorithm is produced which, given generators for a group
of permutations on a finite set, returns a direct product decomposition of the
group into directly indecomposable subgroups. The process uses bilinear maps
and commutative rings to characterize direct products of p-groups of class 2
and reduces general groups to p-groups using group varieties. The methods apply
to quotients of permutation groups and operator groups as well.
