Solving specific combination and permutation problems