A couple of algorithms for generating permutations of a set.