forbidden patterns in constraint satisfaction problems · introduction flat patterns existential...
TRANSCRIPT
IntroductionFlat patterns
Existential patternsConclusion
Forbidden Patternsin Constraint Satisfaction Problems
Guillaume Escamocher,under the supervision of Martin Cooper and Pierre Régnier
Institut de Recherche en Informatique de Toulouse
12/11/2014
Forbidden Patterns in Constraint Satisfaction Problems 1/ 65
IntroductionFlat patterns
Existential patternsConclusion
1 IntroductionConstraint Satisfaction ProblemClassical methods to look for tractable classesA new approach
2 Flat patternsDefinitionClassical elimination operationsThe reductionPatterns on two constraints
3 Existential patternsDefinitionsVariable eliminationTractable classes
4 Conclusion
Forbidden Patterns in Constraint Satisfaction Problems 2/ 65
IntroductionFlat patterns
Existential patternsConclusion
Constraint Satisfaction ProblemClassical methods to look for tractable classesA new approach
Constraint Satisfaction Problem
Data :A set V of n variables {v1, . . . , vn}.A set of n domains {D1, . . . ,Dn}. Each domain Di contains the setof possible values for vi . 〈vi , a〉 represents the assignment of thevalue a ∈ Di to the variable vi . (assignment ≡ point)A set C of constraints {C1, . . . ,Cm}. Each constraint Cj isassociated to a kj -uple of variables
⟨vj1 , . . . , vjkj
⟩and describes the
kj -uples of assignments allowed for this kj -uple of variables. kj isthe arity of Cj .
Question :Is there an assignment of the values to the n variables such that allconstraints in C are satisfied?
Forbidden Patterns in Constraint Satisfaction Problems 3/ 65
IntroductionFlat patterns
Existential patternsConclusion
Constraint Satisfaction ProblemClassical methods to look for tractable classesA new approach
binary CSP
Data :A set V of n variables {v1, . . . , vn}.A set of n domains {D1, . . . ,Dn}. Each domain Di contains the setof possible values for vi . 〈vi , a〉 represents the assignment of thevalue a ∈ Di to the variable vi . (assignment ≡ point)A set C of n(n + 1)/2 binary constraints {C1, . . . ,Cn(n+1)/2}. Eachconstraint Cj is associated to a couple of variables
⟨vj1 , vj2
⟩and
describes the couples of assignments allowed for these 2variables.
Question :Is there an assignment of the values to the n variables such that allconstraints in C are satisfied?
Forbidden Patterns in Constraint Satisfaction Problems 4/ 65
IntroductionFlat patterns
Existential patternsConclusion
Constraint Satisfaction ProblemClassical methods to look for tractable classesA new approach
A CSP instance
j i
ec
a
bb
dd
gg
hh
f
v1
v2
v3
v4
D1
D2
D3
D4
A set of 4 variables {v1, v2, v3, v4}
A set of 4 domains {D1,D2,D3,D4}A set of 6 constraints {C1,C2,C3,C4,C5,C6}C1 = {〈〈v1,a〉 , 〈v3, f 〉〉 , 〈〈v1,b〉 , 〈v3,g〉〉}D1 = {a,b}D2 = {c,d ,e}, D3 = {f ,g}, D4 = {h, i , j}C2 = {〈〈v2,d〉 , 〈v4,h〉〉 , 〈〈v2,d〉 , 〈v4, i〉〉 , 〈〈v2,d〉 , 〈v4, j〉〉}Question : Is there a solution ?Two compatible points.
b
h
Two incompatible points.
h
e
A trivial constraint.The constraint graph.
v1
v2
v3
v4
Answer: Yes! (b,d,g,h)
Forbidden Patterns in Constraint Satisfaction Problems 5/ 65
IntroductionFlat patterns
Existential patternsConclusion
Constraint Satisfaction ProblemClassical methods to look for tractable classesA new approach
A CSP instance
j i
ec
a
bb
dd
gg
hh
fv1
v2
v3
v4
D1
D2
D3
D4
A set of 4 variables {v1, v2, v3, v4}
A set of 4 domains {D1,D2,D3,D4}
A set of 6 constraints {C1,C2,C3,C4,C5,C6}C1 = {〈〈v1,a〉 , 〈v3, f 〉〉 , 〈〈v1,b〉 , 〈v3,g〉〉}D1 = {a,b}D2 = {c,d ,e}, D3 = {f ,g}, D4 = {h, i , j}C2 = {〈〈v2,d〉 , 〈v4,h〉〉 , 〈〈v2,d〉 , 〈v4, i〉〉 , 〈〈v2,d〉 , 〈v4, j〉〉}Question : Is there a solution ?Two compatible points.
b
h
Two incompatible points.
h
e
A trivial constraint.The constraint graph.
v1
v2
v3
v4
Answer: Yes! (b,d,g,h)
Forbidden Patterns in Constraint Satisfaction Problems 5/ 65
IntroductionFlat patterns
Existential patternsConclusion
Constraint Satisfaction ProblemClassical methods to look for tractable classesA new approach
A CSP instance
j i
ec
a
b
b
dd
gg
hh
fv1
v2
v3
v4
D1
D2
D3
D4
A set of 4 variables {v1, v2, v3, v4}A set of 4 domains {D1,D2,D3,D4}A set of 6 constraints {C1,C2,C3,C4,C5,C6}C1 = {〈〈v1,a〉 , 〈v3, f 〉〉 , 〈〈v1,b〉 , 〈v3,g〉〉}
D1 = {a,b}
D2 = {c,d ,e}, D3 = {f ,g}, D4 = {h, i , j}C2 = {〈〈v2,d〉 , 〈v4,h〉〉 , 〈〈v2,d〉 , 〈v4, i〉〉 , 〈〈v2,d〉 , 〈v4, j〉〉}Question : Is there a solution ?Two compatible points.
b
h
Two incompatible points.
h
e
A trivial constraint.The constraint graph.
v1
v2
v3
v4
Answer: Yes! (b,d,g,h)
Forbidden Patterns in Constraint Satisfaction Problems 5/ 65
IntroductionFlat patterns
Existential patternsConclusion
Constraint Satisfaction ProblemClassical methods to look for tractable classesA new approach
A CSP instance
j i
ec
a
b
b
d
d
g
g
h
h
f
v1
v2
v3
v4
D1
D2
D3
D4
A set of 4 variables {v1, v2, v3, v4}A set of 4 domains {D1,D2,D3,D4}A set of 6 constraints {C1,C2,C3,C4,C5,C6}C1 = {〈〈v1,a〉 , 〈v3, f 〉〉 , 〈〈v1,b〉 , 〈v3,g〉〉}D1 = {a,b}
D2 = {c,d ,e}, D3 = {f ,g}, D4 = {h, i , j}
C2 = {〈〈v2,d〉 , 〈v4,h〉〉 , 〈〈v2,d〉 , 〈v4, i〉〉 , 〈〈v2,d〉 , 〈v4, j〉〉}Question : Is there a solution ?Two compatible points.
b
h
Two incompatible points.
h
e
A trivial constraint.The constraint graph.
v1
v2
v3
v4
Answer: Yes! (b,d,g,h)
Forbidden Patterns in Constraint Satisfaction Problems 5/ 65
IntroductionFlat patterns
Existential patternsConclusion
Constraint Satisfaction ProblemClassical methods to look for tractable classesA new approach
A CSP instance
j i
ec
a
b
b
d
d
g
g
h
h
f
v1
v2
v3
v4
D1
D2
D3
D4
A set of 4 variables {v1, v2, v3, v4}A set of 4 domains {D1,D2,D3,D4}
A set of 6 constraints {C1,C2,C3,C4,C5,C6}
C1 = {〈〈v1,a〉 , 〈v3, f 〉〉 , 〈〈v1,b〉 , 〈v3,g〉〉}D1 = {a,b}D2 = {c,d ,e}, D3 = {f ,g}, D4 = {h, i , j}C2 = {〈〈v2,d〉 , 〈v4,h〉〉 , 〈〈v2,d〉 , 〈v4, i〉〉 , 〈〈v2,d〉 , 〈v4, j〉〉}Question : Is there a solution ?Two compatible points.
b
h
Two incompatible points.
h
e
A trivial constraint.The constraint graph.
v1
v2
v3
v4
Answer: Yes! (b,d,g,h)
Forbidden Patterns in Constraint Satisfaction Problems 5/ 65
IntroductionFlat patterns
Existential patternsConclusion
Constraint Satisfaction ProblemClassical methods to look for tractable classesA new approach
A CSP instance
j i
ec
a
b
b
d
d
g
g
h
h
f
v1
v2
v3
v4
D1
D2
D3
D4
A set of 4 variables {v1, v2, v3, v4}A set of 4 domains {D1,D2,D3,D4}A set of 6 constraints {C1,C2,C3,C4,C5,C6}
C1 = {〈〈v1,a〉 , 〈v3, f 〉〉 , 〈〈v1,b〉 , 〈v3,g〉〉}
D1 = {a,b}D2 = {c,d ,e}, D3 = {f ,g}, D4 = {h, i , j}C2 = {〈〈v2,d〉 , 〈v4,h〉〉 , 〈〈v2,d〉 , 〈v4, i〉〉 , 〈〈v2,d〉 , 〈v4, j〉〉}Question : Is there a solution ?Two compatible points.
b
h
Two incompatible points.
h
e
A trivial constraint.The constraint graph.
v1
v2
v3
v4
Answer: Yes! (b,d,g,h)
Forbidden Patterns in Constraint Satisfaction Problems 5/ 65
IntroductionFlat patterns
Existential patternsConclusion
Constraint Satisfaction ProblemClassical methods to look for tractable classesA new approach
A CSP instance
j i
ec
a
b
b
d
d
g
g
h
h
f
v1
v2
v3
v4
D1
D2
D3
D4
A set of 4 variables {v1, v2, v3, v4}A set of 4 domains {D1,D2,D3,D4}A set of 6 constraints {C1,C2,C3,C4,C5,C6}C1 = {〈〈v1,a〉 , 〈v3, f 〉〉 , 〈〈v1,b〉 , 〈v3,g〉〉}D1 = {a,b}D2 = {c,d ,e}, D3 = {f ,g}, D4 = {h, i , j}
C2 = {〈〈v2,d〉 , 〈v4,h〉〉 , 〈〈v2,d〉 , 〈v4, i〉〉 , 〈〈v2,d〉 , 〈v4, j〉〉}
Question : Is there a solution ?Two compatible points.
b
h
Two incompatible points.
h
e
A trivial constraint.The constraint graph.
v1
v2
v3
v4
Answer: Yes! (b,d,g,h)
Forbidden Patterns in Constraint Satisfaction Problems 5/ 65
IntroductionFlat patterns
Existential patternsConclusion
Constraint Satisfaction ProblemClassical methods to look for tractable classesA new approach
A CSP instance
j i
ec
a
b
b
d
d
g
g
h
h
f
v1
v2
v3
v4
D1
D2
D3
D4
A set of 4 variables {v1, v2, v3, v4}A set of 4 domains {D1,D2,D3,D4}A set of 6 constraints {C1,C2,C3,C4,C5,C6}C1 = {〈〈v1,a〉 , 〈v3, f 〉〉 , 〈〈v1,b〉 , 〈v3,g〉〉}D1 = {a,b}D2 = {c,d ,e}, D3 = {f ,g}, D4 = {h, i , j}C2 = {〈〈v2,d〉 , 〈v4,h〉〉 , 〈〈v2,d〉 , 〈v4, i〉〉 , 〈〈v2,d〉 , 〈v4, j〉〉}
Question : Is there a solution ?
Two compatible points.
b
h
Two incompatible points.
h
e
A trivial constraint.The constraint graph.
v1
v2
v3
v4
Answer: Yes! (b,d,g,h)
Forbidden Patterns in Constraint Satisfaction Problems 5/ 65
IntroductionFlat patterns
Existential patternsConclusion
Constraint Satisfaction ProblemClassical methods to look for tractable classesA new approach
A CSP instance
j i
ec
a
b
b
d
d
g
g
h
h
f
v1
v2
v3
v4
D1
D2
D3
D4
A set of 4 variables {v1, v2, v3, v4}A set of 4 domains {D1,D2,D3,D4}A set of 6 constraints {C1,C2,C3,C4,C5,C6}C1 = {〈〈v1,a〉 , 〈v3, f 〉〉 , 〈〈v1,b〉 , 〈v3,g〉〉}D1 = {a,b}D2 = {c,d ,e}, D3 = {f ,g}, D4 = {h, i , j}C2 = {〈〈v2,d〉 , 〈v4,h〉〉 , 〈〈v2,d〉 , 〈v4, i〉〉 , 〈〈v2,d〉 , 〈v4, j〉〉}Question : Is there a solution ?Two compatible points.
b
h
Two incompatible points.
h
e
A trivial constraint.The constraint graph.
v1
v2
v3
v4
Answer: Yes! (b,d,g,h)
Forbidden Patterns in Constraint Satisfaction Problems 5/ 65
IntroductionFlat patterns
Existential patternsConclusion
Constraint Satisfaction ProblemClassical methods to look for tractable classesA new approach
A CSP instance
j i
ec
a
bb
d
d
g
g
hh
f
v1
v2
v3
v4
D1
D2
D3
D4
A set of 4 variables {v1, v2, v3, v4}A set of 4 domains {D1,D2,D3,D4}A set of 6 constraints {C1,C2,C3,C4,C5,C6}C1 = {〈〈v1,a〉 , 〈v3, f 〉〉 , 〈〈v1,b〉 , 〈v3,g〉〉}D1 = {a,b}D2 = {c,d ,e}, D3 = {f ,g}, D4 = {h, i , j}C2 = {〈〈v2,d〉 , 〈v4,h〉〉 , 〈〈v2,d〉 , 〈v4, i〉〉 , 〈〈v2,d〉 , 〈v4, j〉〉}Question : Is there a solution ?
Two compatible points.
b
h
Two incompatible points.
h
e
A trivial constraint.The constraint graph.
v1
v2
v3
v4
Answer: Yes! (b,d,g,h)
Forbidden Patterns in Constraint Satisfaction Problems 5/ 65
IntroductionFlat patterns
Existential patternsConclusion
Constraint Satisfaction ProblemClassical methods to look for tractable classesA new approach
A CSP instance
j i
e
c
a
b
b
d
d
g
g
hh
f
v1
v2
v3
v4
D1
D2
D3
D4
A set of 4 variables {v1, v2, v3, v4}A set of 4 domains {D1,D2,D3,D4}A set of 6 constraints {C1,C2,C3,C4,C5,C6}C1 = {〈〈v1,a〉 , 〈v3, f 〉〉 , 〈〈v1,b〉 , 〈v3,g〉〉}D1 = {a,b}D2 = {c,d ,e}, D3 = {f ,g}, D4 = {h, i , j}C2 = {〈〈v2,d〉 , 〈v4,h〉〉 , 〈〈v2,d〉 , 〈v4, i〉〉 , 〈〈v2,d〉 , 〈v4, j〉〉}Question : Is there a solution ?Two compatible points.
b
h
Two incompatible points.
h
e
A trivial constraint.The constraint graph.
v1
v2
v3
v4
Answer: Yes! (b,d,g,h)
Forbidden Patterns in Constraint Satisfaction Problems 5/ 65
IntroductionFlat patterns
Existential patternsConclusion
Constraint Satisfaction ProblemClassical methods to look for tractable classesA new approach
A CSP instance
j i
ec
a
b
b
d
d
g
g
h
h
f
v1
v2
v3
v4
D1
D2
D3
D4
A set of 4 variables {v1, v2, v3, v4}A set of 4 domains {D1,D2,D3,D4}A set of 6 constraints {C1,C2,C3,C4,C5,C6}C1 = {〈〈v1,a〉 , 〈v3, f 〉〉 , 〈〈v1,b〉 , 〈v3,g〉〉}D1 = {a,b}D2 = {c,d ,e}, D3 = {f ,g}, D4 = {h, i , j}C2 = {〈〈v2,d〉 , 〈v4,h〉〉 , 〈〈v2,d〉 , 〈v4, i〉〉 , 〈〈v2,d〉 , 〈v4, j〉〉}Question : Is there a solution ?Two compatible points.
b
h
Two incompatible points.
h
e
A trivial constraint.
The constraint graph.
v1
v2
v3
v4
Answer: Yes! (b,d,g,h)
Forbidden Patterns in Constraint Satisfaction Problems 5/ 65
IntroductionFlat patterns
Existential patternsConclusion
Constraint Satisfaction ProblemClassical methods to look for tractable classesA new approach
A CSP instance
j i
ec
a
bb
dd
gg
hh
fv1
v2
v3
v4
D1
D2
D3
D4A set of 4 variables {v1, v2, v3, v4}A set of 4 domains {D1,D2,D3,D4}A set of 6 constraints {C1,C2,C3,C4,C5,C6}C1 = {〈〈v1,a〉 , 〈v3, f 〉〉 , 〈〈v1,b〉 , 〈v3,g〉〉}D1 = {a,b}D2 = {c,d ,e}, D3 = {f ,g}, D4 = {h, i , j}C2 = {〈〈v2,d〉 , 〈v4,h〉〉 , 〈〈v2,d〉 , 〈v4, i〉〉 , 〈〈v2,d〉 , 〈v4, j〉〉}Question : Is there a solution ?Two compatible points.
b
h
Two incompatible points.
h
e
A trivial constraint.
The constraint graph.
v1
v2
v3
v4
Answer: Yes! (b,d,g,h)
Forbidden Patterns in Constraint Satisfaction Problems 5/ 65
IntroductionFlat patterns
Existential patternsConclusion
Constraint Satisfaction ProblemClassical methods to look for tractable classesA new approach
Why the CSP ?
The CSP is NP-Complete : it can represent many problems.It is an intuitive problem; reducing other NP-Complete problemsto it can be done quickly.
Reduction from 3-SAT can be done in linear time.
It is used in:Planning.Bioinformatics.Computer vision.and many other fields. . .
Forbidden Patterns in Constraint Satisfaction Problems 6/ 65
IntroductionFlat patterns
Existential patternsConclusion
Constraint Satisfaction ProblemClassical methods to look for tractable classesA new approach
The search for tractable classes
Tractable classThe CSP is NP-Complete. A polynomial subset of the CSP is atractable class.
Examples1 The set of CSP instances where the size of the domains is
smaller or equal than 2.2 The set of CSP instances where the constraint graph is a tree.
Forbidden Patterns in Constraint Satisfaction Problems 7/ 65
IntroductionFlat patterns
Existential patternsConclusion
Constraint Satisfaction ProblemClassical methods to look for tractable classesA new approach
Methods
Two main approaches are used :
Restrictions on the constraints.Restrictions on the constraint graph.
Forbidden Patterns in Constraint Satisfaction Problems 8/ 65
IntroductionFlat patterns
Existential patternsConclusion
Constraint Satisfaction ProblemClassical methods to look for tractable classesA new approach
Restrictions on the constraints
Some constraints are forbidden.All constraint graphs are allowed.
Example : ZOA
∀v , v ′ ∀a ∈ Av , a can be compatible with :ZeroOneor All
points in Av ′ .
Forbidden Patterns in Constraint Satisfaction Problems 9/ 65
IntroductionFlat patterns
Existential patternsConclusion
Constraint Satisfaction ProblemClassical methods to look for tractable classesA new approach
ZOA
a a′
Forbidden Patterns in Constraint Satisfaction Problems 10/ 65
IntroductionFlat patterns
Existential patternsConclusion
Constraint Satisfaction ProblemClassical methods to look for tractable classesA new approach
Restrictions on the constraint graphs
Some constraint graphs are forbidden.All constraints are allowed.
Example : Bounded Tree Width
The set of instances where the constraint graph has a tree width ≤ k .
Forbidden Patterns in Constraint Satisfaction Problems 11/ 65
IntroductionFlat patterns
Existential patternsConclusion
Constraint Satisfaction ProblemClassical methods to look for tractable classesA new approach
Forbidden pattern
Pattern=Part of an instance
The pattern T4.
Forbidden Patterns in Constraint Satisfaction Problems 12/ 65
IntroductionFlat patterns
Existential patternsConclusion
Constraint Satisfaction ProblemClassical methods to look for tractable classesA new approach
Forbidden pattern
We associate to a pattern the set of CSP instances in which thepattern does NOT appear.
Forbidden Patterns in Constraint Satisfaction Problems 13/ 65
IntroductionFlat patterns
Existential patternsConclusion
Constraint Satisfaction ProblemClassical methods to look for tractable classesA new approach
The assets of forbidden patterns
1 Patterns can define classes we could not get with restrictions ononly the constraints or only the graphs.
Forbidden Patterns in Constraint Satisfaction Problems 14/ 65
IntroductionFlat patterns
Existential patternsConclusion
Constraint Satisfaction ProblemClassical methods to look for tractable classesA new approach
More refined classes
A lot of patterns (for instance T4) define classes of instances where :
All possible constraints are represented.All possible constraint graphs are represented.
Forbidden Patterns in Constraint Satisfaction Problems 15/ 65
IntroductionFlat patterns
Existential patternsConclusion
Constraint Satisfaction ProblemClassical methods to look for tractable classesA new approach
The assets of forbidden patterns
1 Patterns can define classes we could not get with restrictions ononly the constraints or only the graphs.
2 Patterns can also define many existing classes based onconstraints or on graphs.
Forbidden Patterns in Constraint Satisfaction Problems 16/ 65
IntroductionFlat patterns
Existential patternsConclusion
Constraint Satisfaction ProblemClassical methods to look for tractable classesA new approach
Binary Boolean CSP
Forbidden Patterns in Constraint Satisfaction Problems 17/ 65
IntroductionFlat patterns
Existential patternsConclusion
Constraint Satisfaction ProblemClassical methods to look for tractable classesA new approach
ZOA
Forbidden Patterns in Constraint Satisfaction Problems 18/ 65
IntroductionFlat patterns
Existential patternsConclusion
Constraint Satisfaction ProblemClassical methods to look for tractable classesA new approach
Forbidden patterns are not perfect...
There is no forbidden pattern equivalent to the set of CSP instanceswhose constraint graph is a tree.
...but we can improve them.
For example, BTP is a tractable class generalizing the class of CSPinstances whose constraint graph is a tree.
Forbidden Patterns in Constraint Satisfaction Problems 19/ 65
IntroductionFlat patterns
Existential patternsConclusion
Constraint Satisfaction ProblemClassical methods to look for tractable classesA new approach
Forbidden patterns are not perfect...
There is no forbidden pattern equivalent to the set of CSP instanceswhose constraint graph is a tree.
...but we can improve them.
For example, BTP is a tractable class generalizing the class of CSPinstances whose constraint graph is a tree.
Forbidden Patterns in Constraint Satisfaction Problems 19/ 65
IntroductionFlat patterns
Existential patternsConclusion
Constraint Satisfaction ProblemClassical methods to look for tractable classesA new approach
Broken Triangle Property
Avi
Avj
Avk
i < j < k
There exists an ordering of the variables such that this pattern doesnot appear.
Forbidden Patterns in Constraint Satisfaction Problems 20/ 65
IntroductionFlat patterns
Existential patternsConclusion
Constraint Satisfaction ProblemClassical methods to look for tractable classesA new approach
The assets of forbidden patterns
1 Patterns can define classes we could not get with restrictions ononly the constraints or only the graphs.
2 Patterns can also define many existing classes based onconstraints or on graphs.
3 Patterns are very malleable, their potential can be easilyincreased.
4 Patterns can be detected in polynomial time.5 A pattern can still appear a limited number of times; one can just
isolate the part of the instance where it does.
Forbidden Patterns in Constraint Satisfaction Problems 21/ 65
IntroductionFlat patterns
Existential patternsConclusion
Constraint Satisfaction ProblemClassical methods to look for tractable classesA new approach
The assets of forbidden patterns
1 Patterns can define classes we could not get with restrictions ononly the constraints or only the graphs.
2 Patterns can also define many existing classes based onconstraints or on graphs.
3 Patterns are very malleable, their potential can be easilyincreased.
4 Patterns can be detected in polynomial time.5 A pattern can still appear a limited number of times; one can just
isolate the part of the instance where it does.
Forbidden Patterns in Constraint Satisfaction Problems 21/ 65
IntroductionFlat patterns
Existential patternsConclusion
DefinitionClassical elimination operationsThe reductionPatterns on two constraints
1 IntroductionConstraint Satisfaction ProblemClassical methods to look for tractable classesA new approach
2 Flat patternsDefinitionClassical elimination operationsThe reductionPatterns on two constraints
3 Existential patternsDefinitionsVariable eliminationTractable classes
4 Conclusion
Forbidden Patterns in Constraint Satisfaction Problems 22/ 65
IntroductionFlat patterns
Existential patternsConclusion
DefinitionClassical elimination operationsThe reductionPatterns on two constraints
A pattern 〈V ,A, var ,E , cpt〉 is defined by:
A set of variables V .A set of points A.A function var which associates a variable with each point.A set of edges E .A function cpt which assigns a compatibility to each edge (eitherT , or F ).
Forbidden Patterns in Constraint Satisfaction Problems 23/ 65
IntroductionFlat patterns
Existential patternsConclusion
DefinitionClassical elimination operationsThe reductionPatterns on two constraints
Example
Av1 Av2
Av0
a b
c
d
e
V = {v0, v1, v2}
A = {a,b, c,d ,e}var(a) = v1, var(b) = v2, var(c) = var(d) = var(e) = v0
E = {(a, c), (a,d), (a,e), (b, c), (b,d)}cpt(a, c) = T , cpt(a,d) = T , cpt(a,e) = F , cpt(b, c) = F , cpt(b,d) = T
Forbidden Patterns in Constraint Satisfaction Problems 24/ 65
IntroductionFlat patterns
Existential patternsConclusion
DefinitionClassical elimination operationsThe reductionPatterns on two constraints
Example
Av1 Av2
Av0
a b
c
d
e
V = {v0, v1, v2}
A = {a,b, c,d ,e}var(a) = v1, var(b) = v2, var(c) = var(d) = var(e) = v0
E = {(a, c), (a,d), (a,e), (b, c), (b,d)}cpt(a, c) = T , cpt(a,d) = T , cpt(a,e) = F , cpt(b, c) = F , cpt(b,d) = T
Forbidden Patterns in Constraint Satisfaction Problems 24/ 65
IntroductionFlat patterns
Existential patternsConclusion
DefinitionClassical elimination operationsThe reductionPatterns on two constraints
Example
Av1 Av2
Av0
a b
c
d
e
V = {v0, v1, v2}A = {a,b, c,d ,e}var(a) = v1, var(b) = v2, var(c) = var(d) = var(e) = v0
E = {(a, c), (a,d), (a,e), (b, c), (b,d)}cpt(a, c) = T , cpt(a,d) = T , cpt(a,e) = F , cpt(b, c) = F , cpt(b,d) = T
Forbidden Patterns in Constraint Satisfaction Problems 24/ 65
IntroductionFlat patterns
Existential patternsConclusion
DefinitionClassical elimination operationsThe reductionPatterns on two constraints
CSP instance
A CSP instance is a pattern 〈V ,A, var ,E , cpt〉 where E is the set ofcouples (a,b) such that a and b belong to different domains.
Forbidden Patterns in Constraint Satisfaction Problems 25/ 65
IntroductionFlat patterns
Existential patternsConclusion
DefinitionClassical elimination operationsThe reductionPatterns on two constraints
Extension
→
P P ′
Forbidden Patterns in Constraint Satisfaction Problems 26/ 65
IntroductionFlat patterns
Existential patternsConclusion
DefinitionClassical elimination operationsThe reductionPatterns on two constraints
Merging
→
P ′P
Forbidden Patterns in Constraint Satisfaction Problems 27/ 65
IntroductionFlat patterns
Existential patternsConclusion
DefinitionClassical elimination operationsThe reductionPatterns on two constraints
Occurence in a pattern
Definition
We say that a pattern P occurs in a pattern P ′ if P ′ can be obtainedfrom P with extension and/or merging.
DefinitionWe say that a pattern P occurs in an instance I if I can be obtainedfrom P with extension and/or merging.
Forbidden Patterns in Constraint Satisfaction Problems 28/ 65
IntroductionFlat patterns
Existential patternsConclusion
DefinitionClassical elimination operationsThe reductionPatterns on two constraints
Pattern→ Class
Notation
We note CSP(P) the set of CSP instances in which the pattern Pdoes NOT occur.
CSP(P) is polynomial → P is tractable.CSP(P) is NP-Complete → P is NP-Complete.
Forbidden Patterns in Constraint Satisfaction Problems 29/ 65
IntroductionFlat patterns
Existential patternsConclusion
DefinitionClassical elimination operationsThe reductionPatterns on two constraints
Arc consistency
j i h
dc e
c e
a
b
g
fAv1
Av2
Av3
Av4
Forbidden Patterns in Constraint Satisfaction Problems 30/ 65
IntroductionFlat patterns
Existential patternsConclusion
DefinitionClassical elimination operationsThe reductionPatterns on two constraints
Arc consistency
j i h
d
c e
c e
a
b
g
fAv1
Av2
Av3
Av4
Forbidden Patterns in Constraint Satisfaction Problems 30/ 65
IntroductionFlat patterns
Existential patternsConclusion
DefinitionClassical elimination operationsThe reductionPatterns on two constraints
Arc consistency
j i h
d
c ec e
a
b
g
fAv1
Av2
Av3
Av4
Forbidden Patterns in Constraint Satisfaction Problems 30/ 65
IntroductionFlat patterns
Existential patternsConclusion
DefinitionClassical elimination operationsThe reductionPatterns on two constraints
Single valued variable elimination
j i h
d
a
b
g
f
Av2
Av1
Av1
Av3
Av4
Forbidden Patterns in Constraint Satisfaction Problems 31/ 65
IntroductionFlat patterns
Existential patternsConclusion
DefinitionClassical elimination operationsThe reductionPatterns on two constraints
Single valued variable elimination
j i h
d
a
b
g
f
Av2
Av1
Av1
Av3
Av4
Forbidden Patterns in Constraint Satisfaction Problems 31/ 65
IntroductionFlat patterns
Existential patternsConclusion
DefinitionClassical elimination operationsThe reductionPatterns on two constraints
Neighborhood substitution
j i
h
h
b
g
fAv1
Av3
Av4
Av4
Forbidden Patterns in Constraint Satisfaction Problems 32/ 65
IntroductionFlat patterns
Existential patternsConclusion
DefinitionClassical elimination operationsThe reductionPatterns on two constraints
Neighborhood substitution
j
i h
h
b
g
fAv1
Av3
Av4
Av4
Forbidden Patterns in Constraint Satisfaction Problems 32/ 65
IntroductionFlat patterns
Existential patternsConclusion
DefinitionClassical elimination operationsThe reductionPatterns on two constraints
Classical operations properties
These operations can be applied in polynomial time.The order in which we do them does not matter.
Combination with forbidden patterns
Removing a point or a variable cannot introduce a pattern⇒We cancombine classical operations and forbidden patterns.
Forbidden Patterns in Constraint Satisfaction Problems 33/ 65
IntroductionFlat patterns
Existential patternsConclusion
DefinitionClassical elimination operationsThe reductionPatterns on two constraints
Dangling point
a
Forbidden Patterns in Constraint Satisfaction Problems 34/ 65
IntroductionFlat patterns
Existential patternsConclusion
DefinitionClassical elimination operationsThe reductionPatterns on two constraints
DP elimination
→
P P ′
Forbidden Patterns in Constraint Satisfaction Problems 35/ 65
IntroductionFlat patterns
Existential patternsConclusion
DefinitionClassical elimination operationsThe reductionPatterns on two constraints
Let P be a pattern and P ′ the result of a DP elimination on P.
P ′ occurs in an instance I⇒ (arc consistency)
P occurs in I
RemarkThe same can be said of merging.
Forbidden Patterns in Constraint Satisfaction Problems 36/ 65
IntroductionFlat patterns
Existential patternsConclusion
DefinitionClassical elimination operationsThe reductionPatterns on two constraints
Let P be a pattern and P ′ the result of a DP elimination on P.
P ′ occurs in an instance I⇒ (arc consistency)
P occurs in I
RemarkThe same can be said of merging.
Forbidden Patterns in Constraint Satisfaction Problems 36/ 65
IntroductionFlat patterns
Existential patternsConclusion
DefinitionClassical elimination operationsThe reductionPatterns on two constraints
Reduction
DefinitionWe say that a pattern P can be reduced to a pattern Q, and that Q isa reduction of P, if one of the following conditions is fulfilled:
1 Q is the result of an extension applied to P.2 Q is the result of a merging applied to P.3 Q is the result of a DP elimination applied to P.4 There is a recursive combination of the above conditions.
Forbidden Patterns in Constraint Satisfaction Problems 37/ 65
IntroductionFlat patterns
Existential patternsConclusion
DefinitionClassical elimination operationsThe reductionPatterns on two constraints
P → P ′
P can be reduced to P ′
P occurs in I ⇐ P ′ occurs in IP does not occur in I ⇒ P ′ does not occur in I
I ∈ CSP(P) ⇒ I ∈ CSP(P ′)
CSP(P) ⊆ CSP(P ′)P is tractable ⇐ P ′ is tractable
P is NP-Complete ⇒ P ′ is NP-Complete
Usefulness of the reduction
Small number of results→ Large number of complexity classes
To establish a dichotomy, we just need to find the patterns located atthe “border” between tractability and NP-Completeness.
Forbidden Patterns in Constraint Satisfaction Problems 38/ 65
IntroductionFlat patterns
Existential patternsConclusion
DefinitionClassical elimination operationsThe reductionPatterns on two constraints
P → P ′
P can be reduced to P ′
P occurs in I ⇐ P ′ occurs in IP does not occur in I ⇒ P ′ does not occur in I
I ∈ CSP(P) ⇒ I ∈ CSP(P ′)
CSP(P) ⊆ CSP(P ′)P is tractable ⇐ P ′ is tractable
P is NP-Complete ⇒ P ′ is NP-Complete
Usefulness of the reduction
Small number of results→ Large number of complexity classes
To establish a dichotomy, we just need to find the patterns located atthe “border” between tractability and NP-Completeness.
Forbidden Patterns in Constraint Satisfaction Problems 38/ 65
IntroductionFlat patterns
Existential patternsConclusion
DefinitionClassical elimination operationsThe reductionPatterns on two constraints
Two constraints
TheoremLet P be a non mergeable flat pattern on two constraints. P istractable if and only if P can be extended to one of the patterns of T .
T1 T2 T3
T4 T5 2I
Forbidden Patterns in Constraint Satisfaction Problems 39/ 65
IntroductionFlat patterns
Existential patternsConclusion
DefinitionClassical elimination operationsThe reductionPatterns on two constraints
Proof
⇐ 1 We give 6 tractability proofs, one for each pattern in T .2 From the properties of the reduction, we have the result.
⇒ 1 We give a set G of gadgets.2 We show that all gadgets in G are NP-Complete.3 We show that for every flat pattern on two constraints P, either P
contains a gadget from G, or P can be extended to one of thepatterns in T .
4 From the properties of the reduction, we have the result.
Forbidden Patterns in Constraint Satisfaction Problems 40/ 65
IntroductionFlat patterns
Existential patternsConclusion
DefinitionClassical elimination operationsThe reductionPatterns on two constraints
Examples of NP-Complete gadgets
ab
a 6= b
Forbidden Patterns in Constraint Satisfaction Problems 41/ 65
IntroductionFlat patterns
Existential patternsConclusion
DefinitionsVariable eliminationTractable classes
Variable eligible for elimination
Definition
Let I = 〈V ,A, var ,E , cpt〉 be a CSP instance satisfying arcconsistency. If the satisfiability of I is the same as the satisfiability ofI \ v , we say that v can be eliminated.
QuestionHow to detect such variables?
Forbidden Patterns in Constraint Satisfaction Problems 42/ 65
IntroductionFlat patterns
Existential patternsConclusion
DefinitionsVariable eliminationTractable classes
Variable eligible for elimination
Definition
Let I = 〈V ,A, var ,E , cpt〉 be a CSP instance satisfying arcconsistency. If the satisfiability of I is the same as the satisfiability ofI \ v , we say that v can be eliminated.
QuestionHow to detect such variables?
Forbidden Patterns in Constraint Satisfaction Problems 42/ 65
IntroductionFlat patterns
Existential patternsConclusion
DefinitionsVariable eliminationTractable classes
1 IntroductionConstraint Satisfaction ProblemClassical methods to look for tractable classesA new approach
2 Flat patternsDefinitionClassical elimination operationsThe reductionPatterns on two constraints
3 Existential patternsDefinitionsVariable eliminationTractable classes
4 Conclusion
Forbidden Patterns in Constraint Satisfaction Problems 43/ 65
IntroductionFlat patterns
Existential patternsConclusion
DefinitionsVariable eliminationTractable classes
Quantified patterns
A quantified pattern 〈V ,A, var ,E , cpt ,v〉 is defined by:
A set of variables V .A set of points A.A function var which associates a variable with each point.A set of edges E .A function cpt which assigns a compatibility to each edge (eitherT , or F ).A distinguished variable v ∈ V .
Forbidden Patterns in Constraint Satisfaction Problems 44/ 65
IntroductionFlat patterns
Existential patternsConclusion
DefinitionsVariable eliminationTractable classes
Example
v
∃v
A quantified pattern 〈V ,A, var ,E , cpt , v〉.
Forbidden Patterns in Constraint Satisfaction Problems 45/ 65
IntroductionFlat patterns
Existential patternsConclusion
DefinitionsVariable eliminationTractable classes
Occurence on a variable
∃v
v
BTP
Av0
Av1 Av2
An instance I
BTP occurs on v0.BTP does not occur on v1.BTP does not occur on v2.
Forbidden Patterns in Constraint Satisfaction Problems 46/ 65
IntroductionFlat patterns
Existential patternsConclusion
DefinitionsVariable eliminationTractable classes
Occurence on a variable
∃v
v
BTP
Av0
Av1 Av2
An instance I
BTP occurs on v0.BTP does not occur on v1.BTP does not occur on v2.
Forbidden Patterns in Constraint Satisfaction Problems 46/ 65
IntroductionFlat patterns
Existential patternsConclusion
DefinitionsVariable eliminationTractable classes
Existential patterns
An existential pattern 〈V ,A, var ,E , cpt ,a〉 is defined by:
A set of variables V .A set of points A.A function var which associates a variable with each point.A set of edges E .A function cpt which assigns a compatibility to each edge (eitherT , or F ).A distinguished point a ∈ A.
Forbidden Patterns in Constraint Satisfaction Problems 47/ 65
IntroductionFlat patterns
Existential patternsConclusion
DefinitionsVariable eliminationTractable classes
Example
a
∃a
An existential pattern 〈V ,A, var ,E , cpt ,a〉.
Forbidden Patterns in Constraint Satisfaction Problems 48/ 65
IntroductionFlat patterns
Existential patternsConclusion
DefinitionsVariable eliminationTractable classes
Occurence on a variable
∃a
a
X1
a0 b0 c0Av0
Av0
Av1 Av2
An instance I
a0 b0 c0a0 b0 c0
X1 occurs on a0.X1 occurs on b0.X1 does not occur on c0.
⇒ X1 does not occur on v0.
Forbidden Patterns in Constraint Satisfaction Problems 49/ 65
IntroductionFlat patterns
Existential patternsConclusion
DefinitionsVariable eliminationTractable classes
Occurence on a variable
∃a
a
X1
a0
b0 c0Av0
Av0
Av1 Av2
An instance I
a0
b0 c0a0 b0 c0
X1 occurs on a0.
X1 occurs on b0.X1 does not occur on c0.
⇒ X1 does not occur on v0.
Forbidden Patterns in Constraint Satisfaction Problems 49/ 65
IntroductionFlat patterns
Existential patternsConclusion
DefinitionsVariable eliminationTractable classes
Occurence on a variable
∃a
a
X1
a0
b0
c0Av0
Av0
Av1 Av2
An instance I
a0
b0
c0a0 b0 c0
X1 occurs on a0.X1 occurs on b0.
X1 does not occur on c0.
⇒ X1 does not occur on v0.
Forbidden Patterns in Constraint Satisfaction Problems 49/ 65
IntroductionFlat patterns
Existential patternsConclusion
DefinitionsVariable eliminationTractable classes
Occurence on a variable
∃a
a
X1
a0 b0
c0
Av0
Av0
Av1 Av2
An instance I
a0 b0
c0
a0 b0 c0
X1 occurs on a0.X1 occurs on b0.X1 does not occur on c0.
⇒ X1 does not occur on v0.
Forbidden Patterns in Constraint Satisfaction Problems 49/ 65
IntroductionFlat patterns
Existential patternsConclusion
DefinitionsVariable eliminationTractable classes
Occurence on a variable
∃a
a
X1
a0 b0 c0Av0
Av0
Av1 Av2
An instance I
a0 b0 c0
a0 b0 c0
X1 occurs on a0.X1 occurs on b0.X1 does not occur on c0.
⇒ X1 does not occur on v0.
Forbidden Patterns in Constraint Satisfaction Problems 49/ 65
IntroductionFlat patterns
Existential patternsConclusion
DefinitionsVariable eliminationTractable classes
VE pattern
DefinitionWe say that a pattern P is a Variable Elimination pattern (or VEpattern) if for every instance I = 〈V ,A, var ,E , cpt〉 satisfying arcconsistency and for every variable v ∈ V we have:P does not occur on v ⇒ v can be eliminated
Forbidden Patterns in Constraint Satisfaction Problems 50/ 65
IntroductionFlat patterns
Existential patternsConclusion
DefinitionsVariable eliminationTractable classes
The reduction for VE patterns
P → P ′
P can be reduced to P ′
P occurs on v ⇐ P ′ occurs on vP does not occur on v ⇒ P ′ does not occur on v
P is a VE pattern ⇐ P ′ is a VE patternP is not a VE pattern ⇒ P ′ is not a VE pattern
Forbidden Patterns in Constraint Satisfaction Problems 51/ 65
IntroductionFlat patterns
Existential patternsConclusion
DefinitionsVariable eliminationTractable classes
Why the arc consistency requirement?
1 Because we can: arc consistency can be established inquadratic time.
2 Because otherwise VE patterns would not be interesting: anypattern containing 1C would not be a VE pattern.
1C
Forbidden Patterns in Constraint Satisfaction Problems 52/ 65
IntroductionFlat patterns
Existential patternsConclusion
DefinitionsVariable eliminationTractable classes
Why the arc consistency requirement?
1 Because we can: arc consistency can be established inquadratic time.
2 Because otherwise VE patterns would not be interesting: anypattern containing 1C would not be a VE pattern.
1C
Forbidden Patterns in Constraint Satisfaction Problems 52/ 65
IntroductionFlat patterns
Existential patternsConclusion
DefinitionsVariable eliminationTractable classes
In what order should we eliminate?
It does not matter:
Eliminating a variable cannot create an occurence of a pattern.Actually, eliminating a variable can remove occurences of apattern, and make other variables eligible for elimination!
Forbidden Patterns in Constraint Satisfaction Problems 53/ 65
IntroductionFlat patterns
Existential patternsConclusion
DefinitionsVariable eliminationTractable classes
TheoremLet P be a non mergeable pattern. P is a VE pattern if and only if Pcan be extended to one of the patterns in B.
Av
∃v
BTP
a
∃a
∃subBTP
a ∃a
∃invsubBTP
a ∃a
∃snake(2)Forbidden Patterns in Constraint Satisfaction Problems 54/ 65
IntroductionFlat patterns
Existential patternsConclusion
DefinitionsVariable eliminationTractable classes
Proof
⇐ 1 We give 4 proofs to show that the 4 patterns in B allow variableelimination.
2 From the properties of the reduction, we have the result.
⇒ 1 We give a set G of gadgets.2 We show that none of the gadgets from G allows variable
elimination.3 We show that for any non mergeable pattern P, either P contains a
gadget from G, or P can be extended to one of the patterns in B.4 From the properties of the reduction, we have the result.
Forbidden Patterns in Constraint Satisfaction Problems 55/ 65
IntroductionFlat patterns
Existential patternsConclusion
DefinitionsVariable eliminationTractable classes
Examples of gadgets which are not VE
Av
∃v
a
∃a
Forbidden Patterns in Constraint Satisfaction Problems 56/ 65
IntroductionFlat patterns
Existential patternsConclusion
DefinitionsVariable eliminationTractable classes
Tractable classes
VE patterns define tractable classes.
P is a VE pattern⇒ P is a tractable pattern
One can just eliminate all variables from the instance.
Forbidden Patterns in Constraint Satisfaction Problems 57/ 65
IntroductionFlat patterns
Existential patternsConclusion
DefinitionsVariable eliminationTractable classes
Occurence in an instance
∃a
a
X1
a2
b2
Av0
Av2
Av1 Av2
An instance I
a2
b2
X1 occurs on a2.X1 occurs on b2.
⇒ X1 occurs on v2.⇒ X1 occurs in I.
Forbidden Patterns in Constraint Satisfaction Problems 58/ 65
IntroductionFlat patterns
Existential patternsConclusion
DefinitionsVariable eliminationTractable classes
Occurence in an instance
∃a
a
X1
a2
b2
Av0
Av2
Av1 Av2
An instance I
a2
b2
X1 occurs on a2.
X1 occurs on b2.⇒ X1 occurs on v2.⇒ X1 occurs in I.
Forbidden Patterns in Constraint Satisfaction Problems 58/ 65
IntroductionFlat patterns
Existential patternsConclusion
DefinitionsVariable eliminationTractable classes
Occurence in an instance
∃a
a
X1
a2
b2
Av0
Av2
Av1 Av2
An instance I
a2
b2
X1 occurs on a2.X1 occurs on b2.
⇒ X1 occurs on v2.⇒ X1 occurs in I.
Forbidden Patterns in Constraint Satisfaction Problems 58/ 65
IntroductionFlat patterns
Existential patternsConclusion
DefinitionsVariable eliminationTractable classes
Occurence in an instance
∃a
a
X1
a2
b2
Av0
Av2Av1
Av2
An instance I
a2
b2
X1 occurs on a2.X1 occurs on b2.
⇒ X1 occurs on v2.
⇒ X1 occurs in I.
Forbidden Patterns in Constraint Satisfaction Problems 58/ 65
IntroductionFlat patterns
Existential patternsConclusion
DefinitionsVariable eliminationTractable classes
Occurence in an instance
∃a
a
X1
a2
b2
Av0
Av2
Av1 Av2
An instance I
a2
b2
X1 occurs on a2.X1 occurs on b2.
⇒ X1 occurs on v2.⇒ X1 occurs in I.
Forbidden Patterns in Constraint Satisfaction Problems 58/ 65
IntroductionFlat patterns
Existential patternsConclusion
DefinitionsVariable eliminationTractable classes
Existential pattern→ Class
Notation
We note CSP(P) the set of CSP instances in which the existentialpattern P does NOT occur.
CSP(P) is polynomial → P is tractable.CSP(P) is NP-Complete → P is NP-Complete.
Forbidden Patterns in Constraint Satisfaction Problems 59/ 65
IntroductionFlat patterns
Existential patternsConclusion
DefinitionsVariable eliminationTractable classes
Two constraints
TheoremLet P be a non mergeable existential pattern on two constraints. P istractable if and only if P can be extended to one of the patterns in X .
∃a
a
X1
∃aa
X2
∃a
a
X3
Forbidden Patterns in Constraint Satisfaction Problems 60/ 65
IntroductionFlat patterns
Existential patternsConclusion
DefinitionsVariable eliminationTractable classes
Dichotomy on two constraints
TheoremLet P be a non mergeable pattern on two constraints. P is tractable ifand only if P is a subpattern of T1, T2, T3, T4, X1, X2 or X3.
RemarkT5 and 2I are not mentioned because they are subpatterns of X2 andX3 respectively.
Forbidden Patterns in Constraint Satisfaction Problems 61/ 65
IntroductionFlat patterns
Existential patternsConclusion
DefinitionsVariable eliminationTractable classes
Dichotomy on two constraints
TheoremLet P be a non mergeable pattern on two constraints. P is tractable ifand only if P is a subpattern of T1, T2, T3, T4, X1, X2 or X3.
RemarkT5 and 2I are not mentioned because they are subpatterns of X2 andX3 respectively.
Forbidden Patterns in Constraint Satisfaction Problems 61/ 65
IntroductionFlat patterns
Existential patternsConclusion
1 IntroductionConstraint Satisfaction ProblemClassical methods to look for tractable classesA new approach
2 Flat patternsDefinitionClassical elimination operationsThe reductionPatterns on two constraints
3 Existential patternsDefinitionsVariable eliminationTractable classes
4 Conclusion
Forbidden Patterns in Constraint Satisfaction Problems 62/ 65
IntroductionFlat patterns
Existential patternsConclusion
Some results from my PhD
Formal definition of forbidden patterns.Flat patterns.Quantified patterns.Existential patterns.
New tool: the reduction.New tractable classes.
Tractable forbidden patterns on two constraints.Several tractable forbidden patterns on three variables.Tractable Max-CSP subproblems.
Instance simplification operations.Forbidden patterns allowing variable elimination.Subdomain fusion.
Forbidden Patterns in Constraint Satisfaction Problems 63/ 65
IntroductionFlat patterns
Existential patternsConclusion
Recent forbidden patterns related work
Value elimination.Fusion of values.Topological minors: related to the notion of minor graph.
Forbidden Patterns in Constraint Satisfaction Problems 64/ 65