Presentation is loading. Please wait.

Presentation is loading. Please wait.

Explorations in Artificial Intelligence Prof. Carla P. Gomes Module 6 Binary CSP.

Similar presentations


Presentation on theme: "Explorations in Artificial Intelligence Prof. Carla P. Gomes Module 6 Binary CSP."— Presentation transcript:

1 Explorations in Artificial Intelligence Prof. Carla P. Gomes gomes@cs.cornell.edu Module 6 Binary CSP

2 Restrict form of CSP with only Unary constraints Binary contraints Constraint graph Note: unary constraints can be satisfied by reducing the domain of the constrained variable (node consistency) Any CSP with n-ary constraints can be converted to another equivalent binary CSP.

3 Example Original constraint and variables: X+Y=Z X::[1,2]; Y::[3,4]; Z::[5,6] X < Z; How to represent this problem using only binary constraints?

4 From N-Ary CSP to Binary Encapsulated variable For each constraint: A new variable that encapsulates the set of constrained variables; Domain – set of values that satisfy the constraint (cartesian product of domains – invalid tuples) (assumed finite domains)

5 Example: original constraint and variables: X+Y=Z X::[1,2]; Y::[3,4]; Z::[5,6] encapsulated variable and reduced domain:U::[(1,4,5),(2,3,5),(2,4,6)] In fact, this transformation solves individual constraints. How to combine solutions from different constraints?

6 Hidden variable encoding (keeping original variables) Dual encoding

7 With original variables (hidden variable encoding) A constraint binds the original variable to the corresponding position of the encapsulated variable; i.e.: X original variable; U encapsulated variable; X=ith_argument_of(U) – i is the "position of X within U". original (non-binary) CSP: X+Y=Z, X<Y X::[1,2]; Y::[3,4]; Z::[5,6] equivalent binary CSP:

8 Without original variables (dual encoding) Constraints bind the encapsulated variables via common components in a following way i_th_argument_of(U)=j_th_argument_of(V), where U and V are encapsulated variables and i and j respectively are the "positions of common component". original (non-binary) CSP: X+Y=Z, X<Y X::[1,2]; Y::[3,4]; Z::[5,6] Each constraint from the original CSP is represented by an encapsulated variable (even binary constraints). Constraint network smaller than when using hidden variable The valuation of original variables, has to be extracted from the valuation of encapsulated variables.


Download ppt "Explorations in Artificial Intelligence Prof. Carla P. Gomes Module 6 Binary CSP."

Similar presentations


Ads by Google