How Do I Get All The Possible Combinations Of Five Sets Of Data?

108 Views Asked by At

For instance, imagine I have $5$ sets. 'APPLE', 'ROOFS', 'TINGL', 'JIPPY', 'CRUXS'. How many combinations are there of strings that contain one letter of each word, in that order?

For instance: "ARTJC"- "ARTJX"- "ARTJU"

Is it $5! \times 5! \times 5! \times 5! \times 5!$?

2

There are 2 best solutions below

0
On

You have $4$ choices for first letter namely $A,P,L,E$
$4$ choices for second $R,O,F,S$
$5$ for third, $4$ for fourth and $5$ for fifth.

Multiply to get $1600$ possible words

0
On

No, you make two mistakes.

First, since some of the sets have multiple of the same letters, you don;t get a factor of $5$ for each set. For example, for the second set you have two $O$'s, so you really have only $4$ different letters to pick from, rather than $5$.

Second, you should not be using factorials here. When you use $5!$ for the first set, you are basically counting the number of 5-letter strings you can form using the first set, using each letter exactly once. But that is not what you are doing. Instead, you take pone letter of the first set ($5$ options), then one letter for the second set ($4$ options), then one letter from the third set ($5$ options), etc. So, you get $5 \cdot 4 \cdot 5 \cdot 4 \cdot 5$ options. Again, you don't get any factorials in there.