0

I am trying to solve the max clique problem using Python's constraints api and I am planning to use the MIP-model, where there is a boolean for each n[i] node indicating if the node belongs (1 / true), or not (0 / false), to a clique. The constraint I will add is that for each not connected nodes pair i + j, n[i] + n[j] <=1, because these could only be set to 1 if they were connected. Then to indentify the clique's size, I will calculate the sum of all the node variables, and maximize this measure.

What I am not sure about is this: How do I identify if a node belongs to a clique or not? If I don't know this, then how can I even begin to use the logic above?

C96
  • 477
  • 8
  • 33

0 Answers0