I have a set S. I have reflexive, symmetric and non-transitive relation R on SxS.
I have to find size of set P, which is the biggest subset of S where :
Any two distinct elements of P are not in relation R.
Any idea how to solve this in better way then brute-forcing? I think, I can put elements of S into graph and use some kind of graph algorithm, but I am completely lost here. Notice, I only need size of P, not elements of P.