On Tue, 15 Mar 2005, Ben Rudiak-Gould wrote:
Henning Thielemann wrote:
I' searching for a function which sorts the numbers and determines the
parity of the number of inversions. I assume that there are elegant and
fast algorithms for this problem (n * log n time steps), e.g. a merge sort
algorit
Henning Thielemann wrote:
I' searching for a function which sorts the numbers and determines the
parity of the number of inversions. I assume that there are elegant and
fast algorithms for this problem (n * log n time steps), e.g. a merge
sort algorithm.
This is a rather nice little problem. I t
On Fri, 11 Mar 2005, William Lee Irwin III wrote:
On Wed, Mar 09, 2005 at 12:42:09PM +0100, Henning Thielemann wrote:
I'm searching for a function which sorts the numbers and determines the
parity of the number of inversions. I assume that there are elegant and
fast algorithms for this problem (n
On Wed, Mar 09, 2005 at 12:42:09PM +0100, Henning Thielemann wrote:
> I think it is a quite popular problem. I have a permutation and I want to
> count how often a big number is left from a smaller one. More precisely
> I'm interested in whether this number is even or odd. That's for instance
>
I think it is a quite popular problem. I have a permutation and I want to
count how often a big number is left from a smaller one. More precisely
I'm interested in whether this number is even or odd. That's for instance
the criterion to decide whether Lloyd's shuffle puzzle is solvable or not.