Answer Set Programming: Group into two sets so that those who like each other are in same set, and dislike = different set <p>I'm basically a beginner to Answer Set Programming (CLINGO), so I've been attempting this problem for hours now. </p> <p>person(a;b;c;d;e;f).</p> <p>likes(b,e; d,f).</p> <p>dislikes(a,b; c,e).</p> <p>People who like each other must be in the same set, and cannot be in the same set as someone they dislike. So the output should be: b,e | a, c, d,f</p> <p>I know the logic behind it; partition it so that if an element is in both likes &amp; dislikes, then it should be in its own set, and everything else in the other. But this is declarative programming, so I'm not sure how to tackle this. Any help would be appreciated.</p>