> -----Original Message-----
> From: [EMAIL PROTECTED] 
> [mailto:[EMAIL PROTECTED] On 
> Behalf Of So Phal
> Sent: 08 September 2005 09:36
> To: [email protected]
> Subject: Help for this type of combination of letter
> 
> hi, everyone
> 
> How to write a perl program  to generate the following 
> combination of a letter ABCD
> 
> ABCD
> ABDC
> ACBD
> ADBC
> ADCB
> ACDB
> 
> BACD
> BADC
> BDAC
> BCAD
> BDCA
> BCDA
> 
> CABD
> CADB
> CDBA
> CBAD
> CBDA
> CDAB
> 
> DABC
> DBAC
> DACB
> DCAB
> DBCA
> DCBA
> 
> I think it is possible to generate this letter, the rule is: 
> ABCD  1*2*3*4=24 if only ABC 1*2*3=6

Sounds a bit like permutations (IIRC, it's been a long time).

CPAN is your friend. See
http://search.cpan.org/search?query=permutation&mode=all

HTH

-- 
Brian Raven
 


-----------------------------------------------------------------------
The information contained in this e-mail is confidential and solely 
for the intended addressee(s). Unauthorised reproduction, disclosure, 
modification, and/or distribution of this email may be unlawful. If you 
have received this email in error, please notify the sender immediately 
and delete it from your system. The views expressed in this message 
do not necessarily reflect those of LIFFE Holdings Plc or any of its subsidiary 
companies.
-----------------------------------------------------------------------


_______________________________________________
ActivePerl mailing list
[email protected]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

Reply via email to