i am looking for algorithm how to genereate all variations with repetitions from two dimensional matrix. There are always trhree columns and row numbers is optional (row count > 1). All three fields in a row need not be filled. Lets assume there is a matrix like this:

I'm not clear exactly what you want to do. If I'm correct, what you want to do is find all combination in the array(matrix as you said). Since you don't want to worry about the repeating something, what's the problem with this?

01-19-2009, 09:42 AM

jnovice

Hi,

I need variations with repetition, no combination and no permutation.

There si an example i my first post and it describes what I need.

I think there is need to be recursive function which will do these variations, but I now can not imagine this algorithm.