How to generate all possible combination from a list of number

2002-10-01 Thread Yannik Lefebvre
Exemple: i have a list of numbers ( 1 - 2 - 3 - 4 -5) i need to find all possible combination from that list 1 12 123 1234 12345 13 134 1345 etc Thank u all! -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: How to generate all possible combination from a list of number

2002-10-01 Thread Paul Johnson
On Tue, Oct 01, 2002 at 03:33:42PM -0400, Yannik Lefebvre wrote: > Exemple: i have a list of numbers ( 1 - 2 - 3 - 4 -5) > > i need to find all possible combination from that list > > 1 > 12 > 123 > 1234 > 12345 > 13 > 134 > 1345 > > etc Are you having problems with the Perl or the algori

Re: How to generate all possible combination from a list of number

2002-10-01 Thread James Edward Gray II
So me what you've tried and I will be more than happy to help you fix it. James Gray On Tuesday, October 1, 2002, at 02:33 PM, Yannik Lefebvre wrote: > Exemple: i have a list of numbers ( 1 - 2 - 3 - 4 -5) > > i need to find all possible combination from that list > > 1 > 12 > 123 > 1234 > 12

RE: How to generate all possible combination from a list of number

2002-10-01 Thread Mark Anderson
AIL PROTECTED]] Sent: Tuesday, October 01, 2002 12:34 PM To: [EMAIL PROTECTED] Subject: How to generate all possible combination from a list of number Exemple: i have a list of numbers ( 1 - 2 - 3 - 4 -5) i need to find all possible combination from that list 1 12 123 1234 12345 13 134 1345

Re: How to generate all possible combination from a list of number

2002-10-01 Thread david
Yannik Lefebvre wrote: > Exemple: i have a list of numbers ( 1 - 2 - 3 - 4 -5) > > i need to find all possible combination from that list > > 1 > 12 > 123 > 1234 > 12345 > 13 > 134 > 1345 > > etc > > Thank u all! i found your problem insteresting! the following should solve it: #!/usr/b

Re: How to generate all possible combination from a list of number

2002-10-01 Thread Paul Johnson
On Tue, Oct 01, 2002 at 02:01:53PM -0700, david wrote: > i found your problem insteresting! the following should solve it: Well in that case, please hand this one in for me. perl -e'*,=sub{print+local$*=$*.$_[$_],$/,&,(@_[1+$_..$#_])for$#..$#_};&,(1..5)' Different algorithm, different results,