Software Design
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsProgramming Languages - MoreSoftware Design

Closed Thread
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old July 9th, 2004, 10:23 AM
jazzike1 jazzike1 is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: May 2004
Posts: 2 jazzike1 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
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?

Reply With Quote
  #2  
Old July 9th, 2004, 02:19 PM
dog135's Avatar
dog135 dog135 is offline
Doggie
Dev Shed Novice (500 - 999 posts)
 
Join Date: Jul 2003
Location: Seattle, WA
Posts: 751 dog135 User rank is Corporal (100 - 500 Reputation Level)dog135 User rank is Corporal (100 - 500 Reputation Level)dog135 User rank is Corporal (100 - 500 Reputation Level)dog135 User rank is Corporal (100 - 500 Reputation Level) 
Time spent in forums: 10 h 38 m 25 sec
Reputation Power: 7
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

Reply With Quote
  #3  
Old July 9th, 2004, 03:41 PM
jazzike1 jazzike1 is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: May 2004
Posts: 2 jazzike1 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
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.

Reply With Quote
Closed Thread

Viewing: Dev Shed ForumsProgramming Languages - MoreSoftware Design > Combinations Problem


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 5 hosted by Hostway
Stay green...Green IT