Suppose I have four groups A, B, C, D filled with items belonging to groups:
- A
- A1
- A2
- A3
- B
- B1
- B2
- B3
- B4
- C
- C1
- C2
- D
- D1
- D2
- D3
I would like to create a combination with four items, for example:
- A1, B2, C1, D2
- A2, B1, C2, D1
- so on ...
Such that every item must be from a different group.
This would be wrong: A1, A2, B1, B2 because we cannot have two items from same group.
Is it mathematically possible to create such combinations given the groups and number of items and know how many would be there?