473,387 Members | 1,578 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

All combination

1
hi there,

i have a huge problem. I have x (selected during runtime) stringsarrays with y values (selected during ruintime, too) each. Now i need a algorithm, which searches all possible combinations of the y stringarrays.

Example (input fom user)

string[] para1 = {"A1","A2"};
string[] para2 ={"B1","B2"" ,"B3"};
string[] para3 ={"C1","C2","C3"};

A1,B2,C3
A2,B1,C1
etc....

Thanks for you help
Oct 27 '08 #1
1 881
tlhintoq
3,525 Expert 2GB
hi there,

i have a huge problem. I have x (selected during runtime) stringsarrays with y values (selected during ruintime, too) each. Now i need a algorithm, which searches all possible combinations of the y stringarrays.

Example (input fom user)

string[] para1 = {"A1","A2"};
string[] para2 ={"B1","B2"" ,"B3"};
string[] para3 ={"C1","C2","C3"};

A1,B2,C3
A2,B1,C1
etc....

Thanks for you help
Posting tips about asking for entire solutions.

I suggest a little bit of google searching about "calculating combinations and permutations" followed by some attempts on your own. Don't search for a code solution that does the work for you. Search for an understanding of the concepts behind combinations, then work up code that achieves your needs.

How would you do it on paper? If you were going to figure out all the combinations how would you write them all out?

A1, B1, C1
A1, B1, C2
A1, B1, C3
[...]
A1, B2, C1
A1, B2, C2
[...]

Now take a stab at the code that would follow this same pattern of behavior.

Regards,
tlhIn'toQ
Oct 28 '08 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: David Walker | last post by:
Hi I've been doing a site in css recently, and have come across the problem of IE not allowing text to be selected. The problem is, sometimes it does allow it, and sometimes it doesn't, and i'm...
1
by: Bo Xu | last post by:
Object of Combination By Bo Xu Introduction A combination of n things, taken s at a time, often referred as an s-combination out of n, is a way to select a subset of size s from a given set of...
3
by: gdogg1587 | last post by:
Greetings. I'm working on a program that will "descramble" words. Think of a word scramble game where there is a list of characters, and several blank spaces to denote the word(s) that you are...
2
by: Ross | last post by:
Is there any combination parsing algorithm/source code available to handle the combination problem of inputting a sequence: YGEQLGMREMVRNCMQDL and generating sequences: YGEQLGMREMVRNCMQDL...
3
by: AsuWoo | last post by:
hi, I want to implement a function that prints all possible combinations of a characters in a string,eg. input "123"into a textbox, add "1","2","3","12","13","23","123",to a listbox,Or "ab" into a...
1
by: Diogo Alves - Software Developer | last post by:
I'm tring to override the combination all the combination like this one Ctrl + Shift + . I just can't catch it... I have already done this for ctrl + or Shift + but for both at same timeI can't...
6
by: aka_eu | last post by:
I have this problem. I'm trying to get all the valid combination C(N,K) that pass one condition. For example C(5,3) can use in any combination this numbers {1,2,3,4,5} But let's say that I...
13
by: Mohammad Omer | last post by:
Hi, I am working on SDI base application using vs2k5. I need to perform some task on combination of keys (link ctrl+v). I wrote WM_KEYDOWN message in my view for control command keys (like...
2
by: dohertywa | last post by:
Hi: I'm working with probstat module which does an excellent job for the project I'm working on. I am passing the Combination objects I generate to generator functions that allow me to scale...
4
by: banderson | last post by:
Hello Bytes/Scripts folks! I am trying to implement validation for a combination of two fields in a table (through a form). I have a form “frmAddAddr2” that is bound to the table “tblLKUPAddr2”....
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.