permute function

Permutation Generation