Skip to content
Prev 200279 / 398502 Next

A combinatorial optimization problem: finding the best permutation of a complex vector

Hi,

It was pointed out to me by Hans Borchers that the timing that I reported (0.3 sec) in the previous email for solving the LSAP problem, for N=1000, was too optimistic, because "X" and "Y" were equivalent up to a permutation.  

In order to test this out, I ran a few more experiments with different random variate distributions for X and Y.  In all the experiments, I took N = 500.

The execution times were faster when X and Y had the same or similar distributions.  This is generally around 8 - 9 seconds.  The more different the distributions are, the greater the time.   For example, when I took the real and imaginary parts of X to be from a t-distribution with 3 degrees of freedom, and Y to be from uniform distribution in (0, 1), the execution times were around 80-90 seconds. 

n <- 500

x <- rt(n, df=3) + 1i * rt(n, df=3)

y <- runif(n) + 1i * runif(n)

Cmat <- outer(x, y, FUN=function(x,y) Mod(x - y))

system.time(ans <- solve_LSAP(Cmat, maximum=FALSE))


When I increased N = 1000, the time was about 1400 seconds!  


Ravi.

____________________________________________________________________

Ravi Varadhan, Ph.D.
Assistant Professor,
Division of Geriatric Medicine and Gerontology
School of Medicine
Johns Hopkins University

Ph. (410) 502-2619
email: rvaradhan at jhmi.edu


----- Original Message -----
From: Ravi Varadhan <rvaradhan at jhmi.edu>
Date: Saturday, November 14, 2009 10:53 am
Subject: Re: [R] A combinatorial optimization problem: finding the best permutation of a complex vector
To: "Charles C. Berry" <cberry at tajo.ucsd.edu>
Cc: r-help at r-project.org