algorithm - Is this a special case of the NP-complete set packing? -
I'm almost certain that my problem is equal to setting packing, and thus, NP-complete, but I To verify.
I have the following situation:
There is a set of pen (i.e. the universe).
A shop sells bundles of these pens, which are subsets of the universe.
I know a person who has some pen (the largest part of the universe) from the store, but I do not know which bundle he bought.
She has lost some pen and others have received from other bundles which her friends gave to her.
What I want to do is sell the bundle sold from the shop to a subset of my pen, so that my friend has such a large number that I cover the maximum amount of pen and choose There should not be a pen in the bundle which is not my friend.
For example:
Possible pen: {0, 1, 2, 3, 4, 5} Bundle sold by store: {0, 1} | {0, 1, 2} | {2, 3} | {3} | {3, 4, 5} | {4, 5} My friend is: {0, 1, 2, 3} Here, the correct matches are: {{0, 1, 2}, {3}} and {{0, 1}, {2, 3} }}. These will be friends equal to 2: {0, 2, 3} In this case, there is no perfect match, possible matches {{3}} and {{2, 3}}. The best match {{2, 3}} is
I get this problem NP-complete a number of m
of a pen, a number n
Bundles and a number were given
of my friend's pen?
Comments
Post a Comment