View Single Post
Old April 23rd, 2005, 08:22 AM
DolphinBay DolphinBay is offline
Authorized User
Join Date: Dec 2003
Location: , , .
Posts: 49
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to DolphinBay
Default Create All Possible Combinations From Varying Sets

Good morning,

This is the task I am trying to achieve in graphical format:

Set 1 - Red, Yellow, Blue
Set 2 - 8, 9
Set 3 - Covered


This is where my dilemna occurs... The number of sets, as well as the number of options within each set is determined at runtime.

I have been trying to code this for 2 days and my brain is fried. I am hoping that someone elses "eyeballs" may shed some new light on an approach.

I need to be able to create a result set that includes all possible combinations (without duplicates) of a multi-dimensional array. As stated above the number of dimensions is not known until run-time so I am not able to hard-code a specific number of loops to iterate through.

I am coding in VB.NET so I would appreciate any help be provided in the same language.

MANY MANY thanks in advance.


Dolphin Bay, Inc. -- turning visions into eReality(tm) -- West Palm Beach, FL
Website Design, Internet Strategy, Search Engine Marketing