I just realized I read through your email too quickly and my script does not actually address the constraint on each permutation, sorry about that. You should be able to use the permutations function to generate the vector permutations however. Jason