Applications of permutations and combinations