程序代写

model the Boolean constraints Y = -X, Z = X&Y, Z = XvY, 2 = x+
and Z = X # Y respectively using integer constraints. For example, and can be
defined by

Copyright By PowCoder代写 加微信 powcoder

and(X, Y, Z) : – 2 < X, 2 {Y, X+ Y ≤ Z + 1. Use these predicates to find a solution to the constraints of the fault analysis example in Section 1.5.1 P8.8. Give two different models for solving the matching problem for the graph shown in Figure 8.6. A matching is a set of edges from the graph so that every vertex is the endpoint of exactly one edge. In the figure, the thick edges give one matching for this graph. The first model should have variables representing edges and the second should have variables representing vertices. P8.9. For -queens not only is middle-out best for value ordering, but also for variable ordering. Thus, a better variable ordering strategy is to choose the variable with the smallest current domain, and in the case of a tie, to choose the variable closest to the center of the board. Write a labelling predicate which implements this strategy. 程序代写 CS代考 加微信: powcoder QQ: 1823890830 Email: powcoder@163.com