|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
Combinations Problem
I want to generate a list of possible combinations of pairs of (subsets of six) letters and numbers.
For example: 1 2 3 A B C D E F The first set of six pairs would be: Set 1 = A1,B1,C1,D1,E1,F1 Set 2 = A1,B1,C1,D1,E1,F2 Set 3 = A1,B1,C1,D1,E1,F3 Set 4 = A1,B1,C1,D1,E2,F1 Set 5 = A1,B1,C1,D1,E3,F1 Set 6 = A1,B1,C1,D1,E2,F2 Can anyone help with VBA algorithm to generate the combinations described above? |
|
#2
|
||||
|
||||
|
Wouldn't the first six be: ??
Set 1 = A1,B1,C1,D1,E1,F1 Set 2 = A1,B1,C1,D1,E1,F2 Set 3 = A1,B1,C1,D1,E1,F3 Set 4 = A1,B1,C1,D1,E2,F1 Set 5 = A1,B1,C1,D1,E2,F2 Set 6 = A1,B1,C1,D1,E2,F3 would "A1,B1,C1,D1,E1,F1" be different from "F1,B1,C1,D1,E1,A1"? If not, then the letters don't mater, since they're static. What your list then becomes is basically: 111111 111112 111113 111121 111122 111123 ... Are you allowing more then just the first 6 letters? If so, then that changes things too.
__________________
"Science is constructed of facts as a house is of stones. But a collection of facts is no more a science than a heap of stones is a house." - Henri Poincare |
|
#3
|
|||
|
|||
|
Thanks for your quick response. You're right. The first six are indeed as you outlined them. Also, the set "A1,B1,C1,D1,E1,F1" is the same as "F1,B1,C1,D1,E1,A1". For practical purposes, the final output would not allow all letters to take on the same number values as in "A1,B1,C1,D1,E1,F1" or its mirror. "A2,B2,C2,D2,E2,F2" and "A3,B3,C3,D3,E3,F3" are not allowed either.
The letters are limited to the first six letters of the alphabet. |
| Viewing: Dev Shed Forums > Programming Languages - More > Software Design > Combinations Problem |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|