When I read the book -- Artificial Intelligence (a modern approach), I came across the following sentence describing the method to convert a n-ary Constraint Search Problem to a binary one:
Another way to convert an n-ary CSP to a binary one is the dual graph transformation: create a new graph in which there will be one variable for each constraint in the original graph, and one binary constraint for each pair of constraints in the original graph that share variables. For example, if the original graph has variables {X, Y, Z} and constraints ⟨(X, Y, Z), C1⟩ and ⟨(X, Y ), C2⟩ then the dual graph would have variables {C1, C2} with the binary constraint ⟨(X, Y ), R1 ⟩, where (X, Y ) are the shared variables and R1 is a new relation that defines the constraint between the shared variables, as specified by the original C1 and C2.
I don't quite get the example provided in the book, can anybody help to explain it in another way and may better provide a concrete example? thanks :D
The binary Constraint Satisfaction Problem (CSP) is to decide whether there exists an assignment to a set of variables which satisfies specified constraints between pairs of variables. A binary CSP instance can be presented as a labelled graph encoding both the forms of the constraints and where they are imposed.
Constraint satisfaction problems (CSPs) are mathematical questions defined as a set of objects whose state must satisfy a number of constraints or limitations. CSPs represent the entities in a problem as a homogeneous collection of finite constraints over variables, which is solved by constraint satisfaction methods.
A constraint satisfaction problem (CSP) is a problem that requires its solution to be within some limitations or conditions, also known as constraints, consisting of a finite variable set, a domain set and a finite constraint set.
Let's say your problem has the following constraints:
with the following domains:
The author says that you need to create 2 more variables, one for each constraint. They are defined as follows:
The domains of c1 and c2 are defined so that they don't violate C1 and C2, i.e.:
c1 and c2 will be the nodes of the dual graph, but first you need to define a constraint between them, i.e. R1:
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With