Solved

# Need an algorithm to create a so called factorial design (not permutations, but sort of combinations)

Posted on 2004-09-02

Imagine having a number of factors (e.g. X,Y,Z) each having a set of values. As an example:

X1,X2,X3,X4 (factor 1 having 4 values)

Y1,Y2 (factor 2 having 2 values)

Z1,Z2,Z3 (factor 3 having 3 values)

This means we can have 4 x 2 x 3 = 24 different combinations. To give the first 6:

X1,Y1,Z1

X1,Y2,Z1

X1,Y1,Z2

X1,Y2,Z2

X1,Y1,Z3

X1,Y2,Z3 etc.etc.

Also Z1,X1,Y1 is regarded the same as X1,Y1,Z1 thus I am looking for unique combinations (I think that this is called 'no permutations')

Now, I tried to devise a generic algorithm that creates the full design set. So the number of Factors and Values is differntly every time. It seemed simple at first glance, but I can't get a grip on it. There's plenty of (statistical and scientific) background material on the subject, but I cannot find a practical example anywhere ...

Can anyone give me a start or a link to a good example?