Solves Problems Involving Permutations