color(red).
color(green).
color(blue).
color(yellow).

different(A,B) :- color(A), 
color(B), 
A \= B.

coloring(WA, NT, SA, QL, V, NSW) :- different(WA, NT), different(WA, SA),
     different(NT, SA), different(SA, QL), different(SA,V), different(QL, NSW), 
     different(NSW, V).
