anthem/examples/graph-coloring.lp

11 lines
257 B
Plaintext
Raw Normal View History

#external color(1).
#external edge(2).
#external vertex(1).
#show color/2.
2017-06-12 02:43:19 +02:00
{color(V, C)} :- vertex(V), color(C).
covered(V) :- color(V, _).
:- vertex(V), not covered(V).
:- color(V1, C), color(V2, C), edge(V1, V2).
:- color(V, C1), color(V, C2), C1 != C2.