Patrick Lühne
a406cb43bd
This replaces the former graph coloring example with a new formulation that makes use of the newly supported placeholders.
10 lines
212 B
Plaintext
10 lines
212 B
Plaintext
#external color(1).
|
|
#external edge(2).
|
|
#external vertex(1).
|
|
#show color/2.
|
|
|
|
{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).
|