Add permutation helper functions.