So I have this idea in my head, and finding it hard to represent mathematically. What I want to make is a generator of all possible unique outcomes from an array. But I don't think array is the correct term...matrix maybe? Here's a rough visual representation:
1 2 3 4 5
a g m s y
b h n t z
c i o u .
d j p v .
e k q w
f l r x
So you have 5 columns with 6 variables in each and every variable is unique. I actually want it to be 8 columns with around 10-15 possible variables per column. My goal is to be able to pick a couple variables from each column and have the algorithm generate all possible unique combinations of those variables. For example:
From Column 1 I want b and c
Column 2 just i
Column 3 just p
Column 4 v,u
Column 5 z
So it would give me...
b-i-p-v-z
b-i-p-u-z
c-i-p-v-z
c-i-p-u-z
and I believe that is all the possible unique combinations.
So just to sum up, I want to build an algorithm that will take 8 columns with 10-15 variables per column and let me pick however many I want out of each column and then generate all possible outcomes picking 1 variable from each column.
If this makes any sense and you could lend some help I would greatly appreciate it. I obviously am struggling with just getting the idea out of my head right now. Again, any help...MUCH appreciated.
Seth
1 2 3 4 5
a g m s y
b h n t z
c i o u .
d j p v .
e k q w
f l r x
So you have 5 columns with 6 variables in each and every variable is unique. I actually want it to be 8 columns with around 10-15 possible variables per column. My goal is to be able to pick a couple variables from each column and have the algorithm generate all possible unique combinations of those variables. For example:
From Column 1 I want b and c
Column 2 just i
Column 3 just p
Column 4 v,u
Column 5 z
So it would give me...
b-i-p-v-z
b-i-p-u-z
c-i-p-v-z
c-i-p-u-z
and I believe that is all the possible unique combinations.
So just to sum up, I want to build an algorithm that will take 8 columns with 10-15 variables per column and let me pick however many I want out of each column and then generate all possible outcomes picking 1 variable from each column.
If this makes any sense and you could lend some help I would greatly appreciate it. I obviously am struggling with just getting the idea out of my head right now. Again, any help...MUCH appreciated.
Seth