0

I've the following problem: Given a set of males and a set of females, with rank between any two people equal to 0 or 1. Pick a subset of people such that:

  • I want to maximize the number of liked people (total sum of all the ranks between any two people in the subset) over the total number people in the subset.

  • In the picked subset of people there must be an equal number of males and females.

My questions are: in order to show np-completeness of this problem I know clique problem reduction can be used... Does anyone can provide an example on how to carry out this reduction? Do I need a reduction FROM or TO clique problem? Many thanks

mp94
  • 47
  • 6

2 Answers2

0

To answer your question, you need a reduction FROM clique problem to the problem you are currently dealing with since clique is a known NP-complete problem.

As for your hints with your transformation process (from known Clique problem to your Ranking problem), a good way to think of this is how would you reduce the scenario of clique to your problem. I am assuming 1 means "linked people" and 0 means "unliked people" in your problem.

Take each person as our vertex in graph G(assumed given graph in clique problem). To distinguish between male and female, we would mark male group as A1,A2,A3...Am, female group as B1,B2,B3...Bf. Now we can draw edges to each pair of people whose rank is 1 between them(liked people). Suppose N(N>=1) cliques formed after the graph is done.

Now, we remove the vertices in each clique that makes the clique has unequal number of As and Bs(to provide equal number of vertices in both genders). Now the largest clique with number K is the one you will be looking for.

This transformation is supposed to be done in polynomial time since what we are doing is sheerly reconstructing our clique graph and labelling them(and removing them). It would be of O(V+E) to perform such transformation.

Later, you will be required to prove the answers works both way between your problem's answer and the clique problem answer if you want to prove that your problem is NP-complete.

Boen Du
  • 21
  • 2
0

I won't write out the actual proof for you, but I hope the following outline of how to structure your proof helps answer your question.

The first step to proving that a problem is NP-complete using reduction is to actually prove that the problem is in NP. That is, that the problem can be verified in polynomial time.

How do you do that? Can your problem be turned into a decision problem (as in, a yes/no problem) Can this decision problem be certified? Is there an answer/solution to your decision problem? Can you verify that the certificate to the decision problem can be done in polynomial time? If yes, then you have proved that your problem is in NP.

Now that you know the problem is in NP, you can use reduction to prove that the problem is NP-complete or NP-hard. (If the problem was in NP, there would be absolutely no use in going to the reduction step because the problem cannot be NP-complete if it is not in NP.)

For the reduction, you should transform the clique problem into your problem. How do you do that? Well, think about what elements of the clique problem can be turned into elements of your problem. There are males/females in your problem, but there are nodes/vertices in the clique problem. There are connections equating to either 0 (unliked) or 1 (liked) in your problem, but there are weighted (or unweighted edges) in the clique problem. You are trying to find a subset of people with the highest number of likes between them, but in the clique problem, you are maximizing the number of vertices within a clique. For the most part, it almost seems like a one-to-one transformation. The tricky part of your problem is that there must be an even number of males and females. For this, you'll need to get a bit more creative and find ways to transform the clique problem.

Once you transform the problem from clique to your problem, you can then simply prove that an answer to the clique problem is an answer to your problem and vice versa.

This is the structure of proving that a problem is NP-hard. The hardest part is the transformation process. However, the point is that if you think deeply enough, the clique problem can be manipulated so that it transforms into your problem.

Hope that helps!