Blame view

code/asp/color.lp 318 Bytes
808facfe   Francisco Coelho   Main text adapted...
1
2
3
4
5
6
7
8
9
10
11
node(1..6).

edge(1,2). edge(2,4). edge(3,1).
edge(4,1). edge(5,3). edge(6,2).
edge(1,3). edge(2,5). edge(3,4).
edge(4,2). edge(5,4). edge(6,3).
edge(1,4). edge(2,6). edge(3,5).
edge(5,6). edge(6,5).

col(r). col(b). col(g).

53b3b48c   Francisco Coelho   Started pre-paper...
12
1 { color(X,C) : col(C)} 1 :- node(X).
808facfe   Francisco Coelho   Main text adapted...
13
14
15
:- edge(X,Y), color(X,C), color(Y,C).

#show color/2.