Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
11-08-2013, 07:30 AM #1
- Join Date
- May 2006
- Thanked 4 Times in 4 Posts
How do I systematiccally walk through all combinations of these sets of data ?
I have many sets of data that I want to combined to produce
These are the data sets:
Notice that sets F , I and J have the same number of data elements.
( I was using the random function but this often does
not use all data points and sometimes uses one datapoint 3 or 4 times )
So I want to try and systematically use all the combinations and avoid
duplicating the patterns.
But I am not sure how to do this ...
My output should be something like:
0) A_01 B-01 C-01 D-01 E-01 F-01 G-01 H-01 I-01 J-01
1) A_02 B-02 C-02 D-02 E-02 F-02 G-02 H-02 I-02 J-02
2) A_03 B-03 C-03 D-03 E-03 F-03 G-01 H-03 I-03 J-03
3) A_04 B-04 C-01 D-04 E-04 F-04 G-02 H-04 I-04 J-04
4) A_05 B-05 C-02 D-05 E-05 F-01 G-01 H-05 I-02 J-03 < -- I start position increased by 1 and J by 2
5) A_01 B-06 C-03 D-06 E-06 F-02 G-02 H-06 I-03 J-04
6) A_02 B-07 C-01 D-07 E-07 F-03 G-01 H-07 I-04 J-01
7) A_03 B-08 C-02 D-01 E-08 F-04 G-02 H-08 I-01 J-02
8) A_04 B-09 C-03 D-02 E-09 F-01 G-01 H-09 I-02 J-03
9) A_05 B-10 C-01 D-03 E-10 F-02 G-02 H-01 I-03 J-04
10) A_01 B-11 C-02 D-04 E-01 F-03 G-01 H-02 I-04 J-01
This is just an example ...
I should be able to get a hundred or ( maybe ) several hundred
Any suggestions on how to code this ?
11-08-2013, 01:26 PM #2
- Join Date
- Sep 2002
- Saskatoon, Saskatchewan
- Thanked 2,659 Times in 2,628 Posts
Although you won't be able to process them all in a reasonable time since there appears to be approximately 14.5 million combinations on the results you have provided.
header('HTTP/1.1 420 Enhance Your Calm');