As said in the title I have this set of data:
A1 A2 A3
B1 B2 B3 B4
C1 C2
D1 D2 D3 D4 D5
I want to find all permutations of combinations like so:
A1 B3 C2 D5
or
A2 B1 C1 D5
etc..
I am trying to do this programmatically and can't find a formula for something like this.
Think about this with just A1, A2, and B1, B2, and B3.
The following are the 6 ways to arrange them:
A1, B1
A1, B2
A1, B3
A2, B1
A2, B2
A2, B3
Therefore, there are $2*3=6$ ways to arrange them. Now, think about the big picture, as in your question. 3 A terms, 4 B terms, 2 C terms, and 5 D terms. What do you do with them?
Spoiler:
This is also known as the Fundamental Counting Principle.