An extension of Hu's group minimization algorithm