Content deleted Content added
m →Answer set programming language AnsProlog: Update Clasp URL |
Removed `not e(Y,X)`. The previous formulation would consider nodes unconnected only when they had no connection at all. Rather, we want them to have edges in both ways. |
||
Line 185:
===Large clique===
A [[Clique (graph theory)|clique]] in a graph is a set of pairwise adjacent vertices. The following Lparse program finds a clique of size <math>\geq n</math> in a given directed graph, or determines that it does not exist:
<syntaxhighlight lang="prolog" line="1">
n {in(X) : v(X)}.
:- in(X), in
</syntaxhighlight>
|