Re: efficient compare

From: David Cressey <dcressey_at_verizon.net>
Date: Fri, 21 Apr 2006 19:27:08 GMT
Message-ID: <gma2g.62$bU6.49_at_trnddc06>


"Andersen" <andersen_800_at_hotmail.com> wrote in message news:4448b904$0$16468$892e7fe2_at_authen.yellow.readfreenews.net...
> I have two sets A and B, each containing lots of key/value pairs. I want
> to compare them, to find out what is missing so that I can transfer
> whatever is needed from A to B and whatever is needed from B to A such
> that A=B. Any effective algorithms for that? Where should I look?
>
> Rephrasing it in math terminology:
> If I have two sets A, and B, containing tuples, and I want to find
> complement(A intersect B), how do I do that efficiently?

I'm not sure what you mean by "efficiently". Could you be a little more specific about the envirnment where you intend to do this, and what would be wasted by an inefficient solution?

In the meantime, have you tried (A Union B) minus (A intersect B)? Is this inefficient? Why?

By the way, I'm assuming you don't mean "complement" as in the entire universe of discourse minus the intersection. Received on Fri Apr 21 2006 - 21:27:08 CEST

Original text of this message