Let's say we have four elements A, B, C, and D.
How can I calculate number of all possible permutations (order matters) for set of 4, if repetitions are allowed, but it is required to have at least one B and one C element in each set?
How can I calculate similar task for same elements, same conditions, but for set of 5?