Nengbing Tao wrote:
> Thanks!
>
> Not quite yet!
> Each number can appear once in each column in the end output! This would
> work for cases where those pair do not overlap. The problem comes in cases
> like
> @xa=(900,1000,1010,2040,2010,8000,);
> @xb=(899,1005,1022,2020,2000,6000,,2)
Thanks!
Not quite yet!
Each number can appear once in each column in the end output! This would
work for cases where those pair do not overlap. The problem comes in cases
like
@xa=(900,1000,1010,2040,2010,8000,);
@xb=(899,1005,1022,2020,2000,6000,,2);
I guess I have to track the vari
Nengbing Tao wrote:
> -90 87658675
> 9012341324
> -198 47654567
>
> Notice that |1500-1485|=|1500-1515|.
>
how can you have negative if they are abs? anyway, have you try:
#!/usr/bin/perl -w
use strict;
my @xa=(8765,6000,4765,3000,1530,1500,1465,1234,1000);
my @xb=(8675,600
>
> Hi, ALL,
>
> I thought there should be a solution/algorithm already
> to this problem and would like to check here first.
>
>
> The problem: To return all the pairs (one number from each
> array, one number can only be in one pair) that have the
> smallest sum of absolute differ
Hi, ALL,
I thought there should be a solution/algorithm already to this
problem and would like to check here first.
The problem: To return all the pairs (one number from each array, one number
can only be in one pair) that have the smallest sum of absolute differences
from two arrays.
Hi - I'll pass - this looks like HOMEWORK!
Please put on your thinking cap and try it...
> -Original Message-
> From: Nengbing Tao [mailto:[EMAIL PROTECTED]]
> Sent: Friday, January 24, 2003 3:00 AM
> To: [EMAIL PROTECTED]
> Subject: Pairs have minimum differ
Hi, ALL,
I thought there should be a solution/algorithm already to this problem
and would like to check here first.
The problem: To return all the pairs (one number from each array, one
number can only be in one pair) that have the smallest sum of absolute
differences from two arrays.