Write a predicate
min_conflicts(Vars,Count)
that takes two arguments:
The specification of min_conflicts(Vars,Count) is as follows:
cs is empty, instantiate Vars to
their tentative values
V, in a conflict constraint
V to the value (0 or 1) that maximises
the tentative value of Count
V the other way.
This can be tested with the following propositional satisfiability program.
|
To test your program try the following queries:
?- prop_sat([X,Y,Z],[1,2,3]). ?- prop_sat([X,Y,Z],[1,2,3,4]). ?- prop_sat([X,Y,Z],[1,2,3,4,5]).