Enjoy an ad free experience by logging in. Not a member yet? Register.


Results 1 to 2 of 2

11082013, 07:30 AM #1
 Join Date
 May 2006
 Posts
 1,673
 Thanks
 28
 Thanked 4 Times in 4 Posts
How do I systematiccally walk through all combinations of these sets of data ?
Hi,
I have many sets of data that I want to combined to produce
unique groups.
These are the data sets:
{A_01A_02A_03A_04A_05}
{B01B02B03B04B05B06B07B08B09B10B11B12}
{C01C02C03}
{D01D02D03D04D05D06D07}
{E01E02E03E04E05E06E07E08E09E10}
{F01F02F03F04}
{G01G02}
{H01H02H03H04H05H06H07H08H09}
{I01I02I03I04}
{J01J02J03J04}
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 B01 C01 D01 E01 F01 G01 H01 I01 J01
1) A_02 B02 C02 D02 E02 F02 G02 H02 I02 J02
2) A_03 B03 C03 D03 E03 F03 G01 H03 I03 J03
3) A_04 B04 C01 D04 E04 F04 G02 H04 I04 J04
4) A_05 B05 C02 D05 E05 F01 G01 H05 I02 J03 <  I start position increased by 1 and J by 2
5) A_01 B06 C03 D06 E06 F02 G02 H06 I03 J04
6) A_02 B07 C01 D07 E07 F03 G01 H07 I04 J01
7) A_03 B08 C02 D01 E08 F04 G02 H08 I01 J02
8) A_04 B09 C03 D02 E09 F01 G01 H09 I02 J03
9) A_05 B10 C01 D03 E10 F02 G02 H01 I03 J04
10) A_01 B11 C02 D04 E01 F03 G01 H02 I04 J01
...
...
This is just an example ...
I should be able to get a hundred or ( maybe ) several hundred
unique combinations.
Any suggestions on how to code this ?
Thanks.
.If you want to attract and keep more clients, then offer great customer support.
SupportFocus.com. automates the process and gives you a trust seal to place on your website.
I recommend that you at least take the 30 day free trial.
11082013, 01:26 PM
#2
 Join Date
 Sep 2002
 Location
 Saskatoon, Saskatchewan
 Posts
 16,978
 Thanks
 4
 Thanked 2,659 Times in 2,628 Posts
Looping.
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.
PHP Code:
header('HTTP/1.1 420 Enhance Your Calm');