Efficient algorithm to find a maximum common subset of two sets?

Posted by datasunny on Stack Overflow See other posts from Stack Overflow or by datasunny
Published on 2010-03-09T01:43:27Z Indexed on 2010/03/09 1:51 UTC
Read the original article Hit count: 320

Filed under:
|
|
|

Each set contains bunch of checksums. For example:
Set A:
{
4445968d0e100ad08323df8c895cea15
a67f8052594d6ba3f75502c0b91b868f
07736dde2f8484a4a3af463e05f039e3
5b1e374ff2ba949ab49870ca24d3163a
}

Set B:
{
6639e1da308fd7b04b7635a17450df7c
4445968d0e100ad08323df8c895cea15
a67f8052594d6ba3f75502c0b91b868f
}

The maximum common subset of A and B is:
{
4445968d0e100ad08323df8c895cea15
a67f8052594d6ba3f75502c0b91b868f
}

A lot of this operations will be performed, so I'm looking for an efficient algorithm to do so. Thanks for your help.

© Stack Overflow or respective owner

Related posts about algorithm

Related posts about find