Counting and arrangement problem

Determine the number of ways to arrange objects where the order matters.

Theory:

The number of ways to arrange objects from a set of distinct objects is given by:

Where:

  • : Total number of distinct objects
  • : Number of objects to arrange

Multisets (Permutations with Repetition):

If some elements are repeated, the number of distinct permutations is given by:

Where represent the frequencies of the repeated elements.