in reply to Re: Re: Re: Re: amount permutations
in thread amount permutations
That is misleading because it also removes duplicates. The difference is you are using letters instead of numbers so there should never be any duplicate. The change you have made to dereference slows the code back down again.@_ == keys %{@_,reverse @_);
Again, this is a terrible approach since you are spinning cycles needlessly. If you don't believe me:
Formula for determining number of unique combinations of k values in a set of n letters is n!/k!(n-k)!That is a total of 63 possible combinations you should be testing, but your misuse of Algorithm::Loops has lead to testing 55,986. Unique combination certainly are not permutations.
L~R
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Re: Re: Re: Re: Re: amount permutations
by the_0ne (Pilgrim) on Mar 05, 2004 at 16:36 UTC | |
by Limbic~Region (Chancellor) on Mar 05, 2004 at 16:44 UTC |