Hello,
Suppose we have this example (my real problem has 45 regions here is only 7):
%Coloring Australia
coloring(Wa,Nt,Sa,Ql,Nsw,V,T):-
%Country borders relation to other Countries
different(Wa,Nt),
different(Wa,Sa),
different(Nt,Wa),
different(Nt,Sa),
different(Nt,Ql),
different(Sa,Wa),
different(Sa,Nt),
different(Sa,Ql),
different(Sa,Nsw),
different(Sa,V),
different(Ql,Nt),
different(Ql,Sa),
different(Ql,Nsw),
different(Nsw,Ql),
different(Nsw,Sa),
different(Nsw,V),
different(V,T).
%different(T,V).
%Color relation to other Colors
different(yellow,blue).
different(blue,yellow).
different(yellow,red).
different(red,yellow).
different(blue,red).
different(red,blue).
I want to count how many different results the query
coloring(Wa,Nt,Sa,Ql,Nsw,V,T). will give.
Thanks in advance
Suppose we have this example (my real problem has 45 regions here is only 7):
%Coloring Australia
coloring(Wa,Nt,Sa,Ql,Nsw,V,T):-
%Country borders relation to other Countries
different(Wa,Nt),
different(Wa,Sa),
different(Nt,Wa),
different(Nt,Sa),
different(Nt,Ql),
different(Sa,Wa),
different(Sa,Nt),
different(Sa,Ql),
different(Sa,Nsw),
different(Sa,V),
different(Ql,Nt),
different(Ql,Sa),
different(Ql,Nsw),
different(Nsw,Ql),
different(Nsw,Sa),
different(Nsw,V),
different(V,T).
%different(T,V).
%Color relation to other Colors
different(yellow,blue).
different(blue,yellow).
different(yellow,red).
different(red,yellow).
different(blue,red).
different(red,blue).
I want to count how many different results the query
coloring(Wa,Nt,Sa,Ql,Nsw,V,T). will give.
Thanks in advance