permutation algorithm fixed
sub set generate algorithm added