Rob,

Actually you are correct. I was on my way to implement permutation for
a given set of numbers.
In that context, I had designed my own algo as a part of bigger
problem I am trying to solve.
That algo requires rotate and factorial. Rotate to get different
combinations and factorial to limit for loop.
Today, I happened to go through Steinhaus-Johnson-Trotter's algo for the same.
It looks elegant and should be efficient. I plan to use this.
Question: Does anyone know if perl has inuilt function to implement
Steinhaus-Johnson-Trotter's?

Regards,
Sharan

On Fri, Mar 14, 2008 at 8:33 PM, Rob Dixon <[EMAIL PROTECTED]> wrote:
> Sharan Basappa wrote:
>   >
>  > Thanks everybody. I need to use these as a part of algo I am working
>  > on. I will get back if I have any comments ..
>
>  Rotating an array and calculating a factorial are both likely to absorb
>  large amounts of processor time unless your problem is trivial. I'm also
>  intrigued to hear of an algorithm that makes use of factorials. Perhaps
>  your solution needs looking at before you implement it?
>
>  Rob
>
>

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/


Reply via email to