welcome: please sign in
location: attachment:Maximal-Clique-Problem-ENCODING.txt of OfficialProblemSuite

Attachment 'Maximal-Clique-Problem-ENCODING.txt'

Download

   1 % Based on the 2009 ASP Competition encoding 
   2 % submitted by the DLV team
   3 
   4 % order edges in order to reduce checks
   5 uedge(X,Y) :- edge(X,Y), X < Y.
   6 uedge(Y,X) :- edge(X,Y), Y < X.
   7 
   8 % guess the clique
   9 clique(X) | nonClique(X) :- node(X).
  10 
  11 % ensure property
  12 :- clique(X), clique(Y), not uedge(X,Y), X < Y.
  13 
  14 % maximize
  15 :~ nonClique(X).

Attached Files

You are not allowed to attach a file to this page.