I make an example but I need to understand the general formula. I have a system defined by rows as for instance:
A1,A2,A3,A4 B1,B2,B3 C1,C2 D1 E1
And I need to find all possible combinations of elements choose by 2 (doubles) or I need to find all possible combinations of elements choose by 4 (4 fold) or trebles and so on. For instance valid doubles are:
A1,C1 A2,E1 A3,C2 etc.
A1,A2 (because from the same row).
I need the same for trebles, for instance the following:
A3,C1,D1 A2,C1,D1 etc.
I know the C(n,k) in case the system is composed only by
A1,B1,C1,D1,E1 but I cannot figure out how to include the fact that some of the rows can have different values.
In general a system can be composed by n rows, with each row that can have a different number of elements (different columns), I need a formula to calculate the total number of combinations generated choosing the elements in groups of k and, if possible, a generalisation which permits to find the totals for multiple k's (like total number of combinations for 4-folds, 5-folds and doubles).
Thank you very much in advance to who will help me. Highly appreciated.