Path: DBAI > Research > Projects > D-FLAT Project > Software > D-FLAT System > Practice > 3-Colorability
Tools: Print
%dflat: --tables -e vertex -e edge --no-empty-leaves --no-empty-root
%Extend table rows from child node.
1 { extend(R) : childRow(R,N) } 1 :- childNode(N).
%Retain relevant information from child nodes.
item(map(X,C)) :- extend(R), childItem(R,map(X,C)), current(X).
%Ensure that there are no invalid colorings.
:- item(map(X,C0)), item(map(X,C1)), C0 != C1.
:- edge(X,Y), item(map(X,C)), item(map(Y,C)).
%Guess coloring.
1 { item(map(X,C)) : color(C) } 1 :- introduced(X).
#show item/1. #show extend/1.