projection, consistency, and george boolepublic.tepper.cmu.edu/jnh/booleconsistencycp.pdf ·...
TRANSCRIPT
![Page 1: Projection, Consistency, and George Boolepublic.tepper.cmu.edu/jnh/booleConsistencyCP.pdf · Projection as a Unifying Concept • Projection underlies both optimization and logical](https://reader036.vdocuments.site/reader036/viewer/2022062604/5f762a85775e9d39dd061cb6/html5/thumbnails/1.jpg)
Projection, Consistency, and George Boole
John Hooker
Carnegie Mellon University
CP 2015, Cork, Ireland
![Page 2: Projection, Consistency, and George Boolepublic.tepper.cmu.edu/jnh/booleConsistencyCP.pdf · Projection as a Unifying Concept • Projection underlies both optimization and logical](https://reader036.vdocuments.site/reader036/viewer/2022062604/5f762a85775e9d39dd061cb6/html5/thumbnails/2.jpg)
Projection as a Unifying Concept
• Projection underlies both optimization and
logical inference.
• Optimization is projection onto a cost variable.
• Logical inference is projection onto a subset
of variables.
• These 3 concepts are linked in George Boole’s work
on probability logic.
2
![Page 3: Projection, Consistency, and George Boolepublic.tepper.cmu.edu/jnh/booleConsistencyCP.pdf · Projection as a Unifying Concept • Projection underlies both optimization and logical](https://reader036.vdocuments.site/reader036/viewer/2022062604/5f762a85775e9d39dd061cb6/html5/thumbnails/3.jpg)
Projection as a Unifying Concept
• Projection underlies both optimization and
logical inference.
• Optimization is projection onto a cost variable.
• Logical inference is projection onto a subset
of variables.
• These 3 concepts are linked in George Boole’s work
on probability logic.
• Consistency maintenance can likewise be seen
as projection.
• Leads to a simple type of consistency based explicitly
on projection.
3
![Page 4: Projection, Consistency, and George Boolepublic.tepper.cmu.edu/jnh/booleConsistencyCP.pdf · Projection as a Unifying Concept • Projection underlies both optimization and logical](https://reader036.vdocuments.site/reader036/viewer/2022062604/5f762a85775e9d39dd061cb6/html5/thumbnails/4.jpg)
Probability Logic
• George Boole is best
known for propositional
logic and Boolean
algebra.
• But he proposed a highly
original approach to
probability logic.
4
![Page 5: Projection, Consistency, and George Boolepublic.tepper.cmu.edu/jnh/booleConsistencyCP.pdf · Projection as a Unifying Concept • Projection underlies both optimization and logical](https://reader036.vdocuments.site/reader036/viewer/2022062604/5f762a85775e9d39dd061cb6/html5/thumbnails/5.jpg)
Logical Inference
• The problem:
– Given a set S of propositions
– Each with a given probability.
– And a proposition P that can be
deduced from S…
– What probability can be assigned
to P?
5
![Page 6: Projection, Consistency, and George Boolepublic.tepper.cmu.edu/jnh/booleConsistencyCP.pdf · Projection as a Unifying Concept • Projection underlies both optimization and logical](https://reader036.vdocuments.site/reader036/viewer/2022062604/5f762a85775e9d39dd061cb6/html5/thumbnails/6.jpg)
• In 1970s, Theodore
Hailperin offered an
interpretation of
Boole’s probability logic
– …based on modern
concept of linear
programming.
– LP first clearly formulated
in 1930s by Kantorovich.
6
Boole’s Probability Logic
Hailperin (1976)
![Page 7: Projection, Consistency, and George Boolepublic.tepper.cmu.edu/jnh/booleConsistencyCP.pdf · Projection as a Unifying Concept • Projection underlies both optimization and logical](https://reader036.vdocuments.site/reader036/viewer/2022062604/5f762a85775e9d39dd061cb6/html5/thumbnails/7.jpg)
1
1 2
2 3
0.9
0if then
if then
.8
0.4
x
x x
x x
Example
Clause Probability
Deduce probability
range for x3
Boole’s Probability Logic
![Page 8: Projection, Consistency, and George Boolepublic.tepper.cmu.edu/jnh/booleConsistencyCP.pdf · Projection as a Unifying Concept • Projection underlies both optimization and logical](https://reader036.vdocuments.site/reader036/viewer/2022062604/5f762a85775e9d39dd061cb6/html5/thumbnails/8.jpg)
1
1 2
2 3
0.9
0if then
if then
.8
0.4
x
x x
x x
Example
Clause Probability
Deduce probability
range for x3
Interpret if-then statements
as material conditionals
Boole’s Probability Logic
![Page 9: Projection, Consistency, and George Boolepublic.tepper.cmu.edu/jnh/booleConsistencyCP.pdf · Projection as a Unifying Concept • Projection underlies both optimization and logical](https://reader036.vdocuments.site/reader036/viewer/2022062604/5f762a85775e9d39dd061cb6/html5/thumbnails/9.jpg)
Boole’s Probability Logic
1
1 2
2 3
0.9
0.8
0.4
x
x x
x x
Example
Clause Probability
Deduce probability
range for x3
Interpret if-then statements
as material conditionals
![Page 10: Projection, Consistency, and George Boolepublic.tepper.cmu.edu/jnh/booleConsistencyCP.pdf · Projection as a Unifying Concept • Projection underlies both optimization and logical](https://reader036.vdocuments.site/reader036/viewer/2022062604/5f762a85775e9d39dd061cb6/html5/thumbnails/10.jpg)
10
1
1 2
2 3
0.9
0.8
0.4
x
x x
x x
Example
Clause Probability
01010101
00001111
11110011
11011101
11111111
0min/ max
000
001
010
111
p
p
p
p
0
0.9
0.8
0.4
1
Deduce probability
range for x3
Linear programming model
p000 = probability that (x1,x2,x3) = (0,0,0)
Boole’s Probability Logic
![Page 11: Projection, Consistency, and George Boolepublic.tepper.cmu.edu/jnh/booleConsistencyCP.pdf · Projection as a Unifying Concept • Projection underlies both optimization and logical](https://reader036.vdocuments.site/reader036/viewer/2022062604/5f762a85775e9d39dd061cb6/html5/thumbnails/11.jpg)
11
1
1 2
2 3
0.9
0.8
0.4
x
x x
x x
Example
Clause Probability
01010101
00001111
11110011
11011101
11111111
0min/ max
000
001
010
111
p
p
p
p
0
0.9
0.8
0.4
1
Deduce probability
range for x3
Linear programming model
p000 = probability that (x1,x2,x3) = (0,0,0)
Solution: 0 [0.1, 0.4]
Boole’s Probability Logic
![Page 12: Projection, Consistency, and George Boolepublic.tepper.cmu.edu/jnh/booleConsistencyCP.pdf · Projection as a Unifying Concept • Projection underlies both optimization and logical](https://reader036.vdocuments.site/reader036/viewer/2022062604/5f762a85775e9d39dd061cb6/html5/thumbnails/12.jpg)
12
Boole’s Probability Logic
• This LP model was re-invented in AI community.
• Column generation methods are now available.
• To deal with exponential number of variables.
Nilsson (1986)
![Page 13: Projection, Consistency, and George Boolepublic.tepper.cmu.edu/jnh/booleConsistencyCP.pdf · Projection as a Unifying Concept • Projection underlies both optimization and logical](https://reader036.vdocuments.site/reader036/viewer/2022062604/5f762a85775e9d39dd061cb6/html5/thumbnails/13.jpg)
13
Projection
• An LP can be solved by Fourier elimination
– The only known method in Boole’s day
– This is a projection method.
Fourier (1827)
![Page 14: Projection, Consistency, and George Boolepublic.tepper.cmu.edu/jnh/booleConsistencyCP.pdf · Projection as a Unifying Concept • Projection underlies both optimization and logical](https://reader036.vdocuments.site/reader036/viewer/2022062604/5f762a85775e9d39dd061cb6/html5/thumbnails/14.jpg)
14
Projection
• Eliminate variables we want to project out.
– To solve
project out all variables yj except y0.
0 0min/ max | ,y y ay Ay b
![Page 15: Projection, Consistency, and George Boolepublic.tepper.cmu.edu/jnh/booleConsistencyCP.pdf · Projection as a Unifying Concept • Projection underlies both optimization and logical](https://reader036.vdocuments.site/reader036/viewer/2022062604/5f762a85775e9d39dd061cb6/html5/thumbnails/15.jpg)
15
Projection
• Eliminate variables we want to project out.
– To solve
project out all variables yj except y0.
– To project out yj , eliminate it from pairs of inequalities:
0 0min/ max | ,y y ay Ay b
0 jcy c y 0 jdy d y
0 0where , 0c d
![Page 16: Projection, Consistency, and George Boolepublic.tepper.cmu.edu/jnh/booleConsistencyCP.pdf · Projection as a Unifying Concept • Projection underlies both optimization and logical](https://reader036.vdocuments.site/reader036/viewer/2022062604/5f762a85775e9d39dd061cb6/html5/thumbnails/16.jpg)
16
Projection
• Eliminate variables we want to project out.
– To solve
project out all variables yj except y0.
– To project out yj , eliminate it from pairs of inequalities:
0 0min/ max | ,y y ay Ay b
0 jcy c y 0 jdy d y
0 0 0 0
j
c dy y y
c c d d
![Page 17: Projection, Consistency, and George Boolepublic.tepper.cmu.edu/jnh/booleConsistencyCP.pdf · Projection as a Unifying Concept • Projection underlies both optimization and logical](https://reader036.vdocuments.site/reader036/viewer/2022062604/5f762a85775e9d39dd061cb6/html5/thumbnails/17.jpg)
17
Projection
• Eliminate variables we want to project out.
– To solve
project out all variables yj except y0.
– To project out yj , eliminate it from pairs of inequalities:
0 0min/ max | ,y y ay Ay b
0 jcy c y 0 jdy d y
0 0 0 0
j
c dy y y
c c d d
![Page 18: Projection, Consistency, and George Boolepublic.tepper.cmu.edu/jnh/booleConsistencyCP.pdf · Projection as a Unifying Concept • Projection underlies both optimization and logical](https://reader036.vdocuments.site/reader036/viewer/2022062604/5f762a85775e9d39dd061cb6/html5/thumbnails/18.jpg)
18
Projection
• Eliminate variables we want to project out.
– To solve
project out all variables yj except y0.
– To project out yj , eliminate it from pairs of inequalities:
0 0min/ max | ,y y ay Ay b
0 jcy c y 0 jdy d y
0 0 0 0
j
c dy y y
c c d d
0 0 0 0
c dy
c d c d
![Page 19: Projection, Consistency, and George Boolepublic.tepper.cmu.edu/jnh/booleConsistencyCP.pdf · Projection as a Unifying Concept • Projection underlies both optimization and logical](https://reader036.vdocuments.site/reader036/viewer/2022062604/5f762a85775e9d39dd061cb6/html5/thumbnails/19.jpg)
19
Projection
• Projection as a common theme:
– Optimization: Project onto objective function variable
– Logical inference: Project onto propositional variables
of interest
– Consistency maintenance: ???
• Look at logical inference next…
![Page 20: Projection, Consistency, and George Boolepublic.tepper.cmu.edu/jnh/booleConsistencyCP.pdf · Projection as a Unifying Concept • Projection underlies both optimization and logical](https://reader036.vdocuments.site/reader036/viewer/2022062604/5f762a85775e9d39dd061cb6/html5/thumbnails/20.jpg)
20
Inference as Projection
• Project onto propositional variables of interest
– Suppose we wish to infer from these clauses
everything we can about propositions x1, x2, x3
![Page 21: Projection, Consistency, and George Boolepublic.tepper.cmu.edu/jnh/booleConsistencyCP.pdf · Projection as a Unifying Concept • Projection underlies both optimization and logical](https://reader036.vdocuments.site/reader036/viewer/2022062604/5f762a85775e9d39dd061cb6/html5/thumbnails/21.jpg)
21
Inference as Projection
• Project onto propositional variables of interest
– Suppose we wish to infer from these clauses
everything we can about propositions x1, x2, x3
We can deduce
1 2
1 3
x x
x x
This is a projection
onto x1, x2, x3
![Page 22: Projection, Consistency, and George Boolepublic.tepper.cmu.edu/jnh/booleConsistencyCP.pdf · Projection as a Unifying Concept • Projection underlies both optimization and logical](https://reader036.vdocuments.site/reader036/viewer/2022062604/5f762a85775e9d39dd061cb6/html5/thumbnails/22.jpg)
22
Inference as Projection
• Resolution as a projection method
– Similar to Fourier elimination
– Actually, identical to Fourier elimination + rounding
– To project out xj, eliminate it from pairs of clauses:
jC x jD x
C D Quine (1952,1955)
JH (1992,2012)
![Page 23: Projection, Consistency, and George Boolepublic.tepper.cmu.edu/jnh/booleConsistencyCP.pdf · Projection as a Unifying Concept • Projection underlies both optimization and logical](https://reader036.vdocuments.site/reader036/viewer/2022062604/5f762a85775e9d39dd061cb6/html5/thumbnails/23.jpg)
23
Inference as Projection
• Resolution as a projection method
– Similar to Fourier elimination
– Actually, identical to Fourier elimination + rounding
– To project out xj, eliminate it from pairs of clauses:
– This is too slow.
– Another approach is logic-based Benders decomposition…
jC x jD x
C D
![Page 24: Projection, Consistency, and George Boolepublic.tepper.cmu.edu/jnh/booleConsistencyCP.pdf · Projection as a Unifying Concept • Projection underlies both optimization and logical](https://reader036.vdocuments.site/reader036/viewer/2022062604/5f762a85775e9d39dd061cb6/html5/thumbnails/24.jpg)
24
Inference as Projection
• Benders decomposition computes a projection
– Benders cuts describe projection onto master problem
variables.
1 2x x
Current
Master problem
Benders cut
from previous
iteration
![Page 25: Projection, Consistency, and George Boolepublic.tepper.cmu.edu/jnh/booleConsistencyCP.pdf · Projection as a Unifying Concept • Projection underlies both optimization and logical](https://reader036.vdocuments.site/reader036/viewer/2022062604/5f762a85775e9d39dd061cb6/html5/thumbnails/25.jpg)
25
Inference as Projection
• Benders decomposition computes a projection
– Benders cuts describe projection onto master problem
variables.
1 2x x solution of master
(x1,x2,x3) = (0,1,0)
Current
Master problemResulting
subproblem
![Page 26: Projection, Consistency, and George Boolepublic.tepper.cmu.edu/jnh/booleConsistencyCP.pdf · Projection as a Unifying Concept • Projection underlies both optimization and logical](https://reader036.vdocuments.site/reader036/viewer/2022062604/5f762a85775e9d39dd061cb6/html5/thumbnails/26.jpg)
26
Inference as Projection
• Benders decomposition computes a projection
– Benders cuts describe projection onto master problem
variables.
1 2x x solution of master
(x1,x2,x3) = (0,1,0)
Current
Master problemResulting
subproblem
Subproblem is
infeasible.
(x1,x3)=(0,0)
creates infeasibility
![Page 27: Projection, Consistency, and George Boolepublic.tepper.cmu.edu/jnh/booleConsistencyCP.pdf · Projection as a Unifying Concept • Projection underlies both optimization and logical](https://reader036.vdocuments.site/reader036/viewer/2022062604/5f762a85775e9d39dd061cb6/html5/thumbnails/27.jpg)
27
Inference as Projection
• Benders decomposition computes a projection
– Benders cuts describe projection onto master problem
variables.
1 2x x solution of master
(x1,x2,x3) = (0,1,0)
Current
Master problem
Subproblem is
infeasible.
(x1,x3)=(0,0)
creates infeasibility
Benders cut
(nogood)
1 3x x
Resulting
subproblem
![Page 28: Projection, Consistency, and George Boolepublic.tepper.cmu.edu/jnh/booleConsistencyCP.pdf · Projection as a Unifying Concept • Projection underlies both optimization and logical](https://reader036.vdocuments.site/reader036/viewer/2022062604/5f762a85775e9d39dd061cb6/html5/thumbnails/28.jpg)
28
Inference as Projection
• Benders decomposition computes a projection
– Benders cuts describe projection onto master problem
variables.
1 2x x solution of master
(x1,x2,x3) = (0,1,1)
Current
Master problemResulting
subproblem
1 3x x
![Page 29: Projection, Consistency, and George Boolepublic.tepper.cmu.edu/jnh/booleConsistencyCP.pdf · Projection as a Unifying Concept • Projection underlies both optimization and logical](https://reader036.vdocuments.site/reader036/viewer/2022062604/5f762a85775e9d39dd061cb6/html5/thumbnails/29.jpg)
29
Inference as Projection
• Benders decomposition computes a projection
– Benders cuts describe projection onto master problem
variables.
1 2x x solution of master
(x1,x2,x3) = (0,1,1)
Current
Master problemResulting
subproblem
1 3x x
Subproblem is
feasible
![Page 30: Projection, Consistency, and George Boolepublic.tepper.cmu.edu/jnh/booleConsistencyCP.pdf · Projection as a Unifying Concept • Projection underlies both optimization and logical](https://reader036.vdocuments.site/reader036/viewer/2022062604/5f762a85775e9d39dd061cb6/html5/thumbnails/30.jpg)
30
Inference as Projection
• Benders decomposition computes a projection
– Benders cuts describe projection onto master problem
variables.
1 2x x solution of master
(x1,x2,x3) = (0,1,1)
Current
Master problemResulting
subproblem
Enumerative
Benders cut
1 3x x
Subproblem is
feasible
1 2 3x x x
![Page 31: Projection, Consistency, and George Boolepublic.tepper.cmu.edu/jnh/booleConsistencyCP.pdf · Projection as a Unifying Concept • Projection underlies both optimization and logical](https://reader036.vdocuments.site/reader036/viewer/2022062604/5f762a85775e9d39dd061cb6/html5/thumbnails/31.jpg)
31
Inference as Projection
• Benders decomposition computes a projection
– Logic-based Benders cuts describe projection onto master
problem variables.
1 2x x solution of master
(x1,x2,x3) = (0,1,1)
Current
Master problemResulting
subproblem
Enumerative
Benders cut
1 3x x
Continue until master
is infeasible.
Black Benders cuts
describe projection.
1 2 3x x x
JH and Yan (1995)
JH (2012)
![Page 32: Projection, Consistency, and George Boolepublic.tepper.cmu.edu/jnh/booleConsistencyCP.pdf · Projection as a Unifying Concept • Projection underlies both optimization and logical](https://reader036.vdocuments.site/reader036/viewer/2022062604/5f762a85775e9d39dd061cb6/html5/thumbnails/32.jpg)
32
Inference as Projection
• Benders cuts = conflict clauses in a SAT algorithm
– Branch on x1, x2 first.
![Page 33: Projection, Consistency, and George Boolepublic.tepper.cmu.edu/jnh/booleConsistencyCP.pdf · Projection as a Unifying Concept • Projection underlies both optimization and logical](https://reader036.vdocuments.site/reader036/viewer/2022062604/5f762a85775e9d39dd061cb6/html5/thumbnails/33.jpg)
33
Inference as Projection
• Benders cuts = conflict clauses in a SAT algorithm
– Branch on x1, x2 first.
Conflict
clauses
![Page 34: Projection, Consistency, and George Boolepublic.tepper.cmu.edu/jnh/booleConsistencyCP.pdf · Projection as a Unifying Concept • Projection underlies both optimization and logical](https://reader036.vdocuments.site/reader036/viewer/2022062604/5f762a85775e9d39dd061cb6/html5/thumbnails/34.jpg)
34
Inference as Projection
• Benders cuts = conflict clauses in a SAT algorithm
– Branch on x1, x2 first.
Conflict
clauses
Backtrack to x3 at
feasible leaf nodes
![Page 35: Projection, Consistency, and George Boolepublic.tepper.cmu.edu/jnh/booleConsistencyCP.pdf · Projection as a Unifying Concept • Projection underlies both optimization and logical](https://reader036.vdocuments.site/reader036/viewer/2022062604/5f762a85775e9d39dd061cb6/html5/thumbnails/35.jpg)
35
Inference as Projection
• Benders cuts = conflict clauses in a SAT algorithm
– Branch on x1, x2 first.
Conflict clauses containing
x1, x2, x3 describe projection
![Page 36: Projection, Consistency, and George Boolepublic.tepper.cmu.edu/jnh/booleConsistencyCP.pdf · Projection as a Unifying Concept • Projection underlies both optimization and logical](https://reader036.vdocuments.site/reader036/viewer/2022062604/5f762a85775e9d39dd061cb6/html5/thumbnails/36.jpg)
36
Inference as Projection
• Projection methods similar to Fourier elimination
– For logical clauses
– For cardinality clauses
– For 0-1 linear inequalities
– For general integer linear inequalities
Quine (1952,1955)
JH (1992)
JH (1988)
Williams & JH (2015)
![Page 37: Projection, Consistency, and George Boolepublic.tepper.cmu.edu/jnh/booleConsistencyCP.pdf · Projection as a Unifying Concept • Projection underlies both optimization and logical](https://reader036.vdocuments.site/reader036/viewer/2022062604/5f762a85775e9d39dd061cb6/html5/thumbnails/37.jpg)
37
Consistency as Projection
• Domain consistency
– Project onto each individual variable xj.
![Page 38: Projection, Consistency, and George Boolepublic.tepper.cmu.edu/jnh/booleConsistencyCP.pdf · Projection as a Unifying Concept • Projection underlies both optimization and logical](https://reader036.vdocuments.site/reader036/viewer/2022062604/5f762a85775e9d39dd061cb6/html5/thumbnails/38.jpg)
38
Consistency as Projection
• Domain consistency
– Project onto each individual variable xj.
1 2 3
1
2
3
alldiff , ,
,
,
,
x x x
x a b
x a b
x b c
Example:
Constraint set
![Page 39: Projection, Consistency, and George Boolepublic.tepper.cmu.edu/jnh/booleConsistencyCP.pdf · Projection as a Unifying Concept • Projection underlies both optimization and logical](https://reader036.vdocuments.site/reader036/viewer/2022062604/5f762a85775e9d39dd061cb6/html5/thumbnails/39.jpg)
39
Consistency as Projection
• Domain consistency
– Project onto each individual variable xj.
1 2 3
1
2
3
alldiff , ,
,
,
,
x x x
x a b
x a b
x b c
1 2 3, ,
( , , )
( , , )
x x x
a b c
b a c
Example:
Constraint set Solutions
![Page 40: Projection, Consistency, and George Boolepublic.tepper.cmu.edu/jnh/booleConsistencyCP.pdf · Projection as a Unifying Concept • Projection underlies both optimization and logical](https://reader036.vdocuments.site/reader036/viewer/2022062604/5f762a85775e9d39dd061cb6/html5/thumbnails/40.jpg)
40
Consistency as Projection
• Domain consistency
– Project onto each individual variable xj.
1 2 3
1
2
3
alldiff , ,
,
,
,
x x x
x a b
x a b
x b c
1 2 3, ,
( , , )
( , , )
x x x
a b c
b a c
Example:
Constraint set Solutions Projection onto x1
1 ,x a b
Projection onto x2
2 ,x a b
Projection onto x3
3x c
![Page 41: Projection, Consistency, and George Boolepublic.tepper.cmu.edu/jnh/booleConsistencyCP.pdf · Projection as a Unifying Concept • Projection underlies both optimization and logical](https://reader036.vdocuments.site/reader036/viewer/2022062604/5f762a85775e9d39dd061cb6/html5/thumbnails/41.jpg)
41
Consistency as Projection
• Domain consistency
– Project onto each individual variable xj.
1 2 3
1
2
3
alldiff , ,
,
,
,
x x x
x a b
x a b
x b c
1 2 3, ,
( , , )
( , , )
x x x
a b c
b a c
Example:
Constraint set Solutions Projection onto x1
1 ,x a b
Projection onto x2
2 ,x a b
Projection onto x3
3x c
This achieves domain consistency.
![Page 42: Projection, Consistency, and George Boolepublic.tepper.cmu.edu/jnh/booleConsistencyCP.pdf · Projection as a Unifying Concept • Projection underlies both optimization and logical](https://reader036.vdocuments.site/reader036/viewer/2022062604/5f762a85775e9d39dd061cb6/html5/thumbnails/42.jpg)
42
Consistency as Projection
• Domain consistency
– Project onto each individual variable xj.
1 2 3
1
2
3
alldiff , ,
,
,
,
x x x
x a b
x a b
x b c
1 2 3, ,
( , , )
( , , )
x x x
a b c
b a c
Example:
Constraint set Solutions Projection onto x1
1 ,x a b
Projection onto x2
2 ,x a b
Projection onto x3
3x c
This achieves domain consistency.
We will regard a projection as a
constraint set.
![Page 43: Projection, Consistency, and George Boolepublic.tepper.cmu.edu/jnh/booleConsistencyCP.pdf · Projection as a Unifying Concept • Projection underlies both optimization and logical](https://reader036.vdocuments.site/reader036/viewer/2022062604/5f762a85775e9d39dd061cb6/html5/thumbnails/43.jpg)
43
Consistency as Projection
• k-consistency
– Can be defined:
– A constraint set S is k-consistent if:
• for every J {1, …, n} with |J| = k 1,
• every assignment xJ = vJ Dj for which (xJ,xj) does not
violate S,
• and every variable xj xJ,
there is an assignment xj = vj Dj for which (xJ,xj) = (vJ,vj)
does not violate S.
xJ = (xj | j J)
![Page 44: Projection, Consistency, and George Boolepublic.tepper.cmu.edu/jnh/booleConsistencyCP.pdf · Projection as a Unifying Concept • Projection underlies both optimization and logical](https://reader036.vdocuments.site/reader036/viewer/2022062604/5f762a85775e9d39dd061cb6/html5/thumbnails/44.jpg)
44
Consistency as Projection
• k-consistency
– Can be defined:
– A constraint set S is k-consistent if:
• for every J {1, …, n} with |J| = k 1,
• every assignment xJ = vJ Dj for which (xJ,xj) does not
violate S,
• and every variable xj xJ,
there is an assignment xj = vj Dj for which (xJ,xj) = (vJ,vj)
does not violate S.
– To achieve k-consistency:
– Project the constraints containing each set of k variables
onto subsets of k 1 variables.
xJ = (xj | j J)
![Page 45: Projection, Consistency, and George Boolepublic.tepper.cmu.edu/jnh/booleConsistencyCP.pdf · Projection as a Unifying Concept • Projection underlies both optimization and logical](https://reader036.vdocuments.site/reader036/viewer/2022062604/5f762a85775e9d39dd061cb6/html5/thumbnails/45.jpg)
45
Consistency as Projection
• Consistency and backtracking:
– Strong k-consistency for entire constraint set avoids
backtracking…
– if the primal graph has width < k with respect to branching
order.
– No point in achieving strong k-consistency for individual
constraints if we propagate through domain store.
– Domain consistency has same effect.
Freuder (1982)
![Page 46: Projection, Consistency, and George Boolepublic.tepper.cmu.edu/jnh/booleConsistencyCP.pdf · Projection as a Unifying Concept • Projection underlies both optimization and logical](https://reader036.vdocuments.site/reader036/viewer/2022062604/5f762a85775e9d39dd061cb6/html5/thumbnails/46.jpg)
46
J-Consistency
• A type of consistency more directly related to
projection.
– Constraint set S is J-consistent if it contains the
projection of S onto xJ.
– S is domain consistent if it is { j }-consistent for each j.
– Resolution and logic-based Benders achieve J-consistency
for SAT.
xJ = (xj | j J)
![Page 47: Projection, Consistency, and George Boolepublic.tepper.cmu.edu/jnh/booleConsistencyCP.pdf · Projection as a Unifying Concept • Projection underlies both optimization and logical](https://reader036.vdocuments.site/reader036/viewer/2022062604/5f762a85775e9d39dd061cb6/html5/thumbnails/47.jpg)
47
J-Consistency
• J-consistency and backtracking:
– If we branch on variables x1, x2, …, a natural strategy is
to project out xn, xn1, …
– until computational burden is excessive.
![Page 48: Projection, Consistency, and George Boolepublic.tepper.cmu.edu/jnh/booleConsistencyCP.pdf · Projection as a Unifying Concept • Projection underlies both optimization and logical](https://reader036.vdocuments.site/reader036/viewer/2022062604/5f762a85775e9d39dd061cb6/html5/thumbnails/48.jpg)
48
J-Consistency
• J-consistency and backtracking:
– If we branch on variables x1, x2, …, a natural strategy is
to project out xn, xn1, …
– until computational burden is excessive.
– No point in achieving J-consistency for individual
constraints if we propagate through a domain store.
– However, J-consistency can be useful if we propagate
through a richer data structure
– …such as decision diagrams
– …which can be more effective as a propagation medium.
Andersen, Hadžić JH, Tiedemann (2007)
Bergman, Ciré, van Hoeve, JH (2014)
![Page 49: Projection, Consistency, and George Boolepublic.tepper.cmu.edu/jnh/booleConsistencyCP.pdf · Projection as a Unifying Concept • Projection underlies both optimization and logical](https://reader036.vdocuments.site/reader036/viewer/2022062604/5f762a85775e9d39dd061cb6/html5/thumbnails/49.jpg)
49
Propagating J-Consistency
1 2
1 2
1 2 3 4
1 2
3
4
among ( , ),{ , },1,2
( ) ( )
alldiff , , ,
, , , ,
,
,
x x c d
x c x d
x x x x
x x a b c d
x a b
x c d
Already domain
consistent for
individual constraints.
If we branch on x1 first,
must consider all 4
branches x1= a,b,c,d
Example:
![Page 50: Projection, Consistency, and George Boolepublic.tepper.cmu.edu/jnh/booleConsistencyCP.pdf · Projection as a Unifying Concept • Projection underlies both optimization and logical](https://reader036.vdocuments.site/reader036/viewer/2022062604/5f762a85775e9d39dd061cb6/html5/thumbnails/50.jpg)
50
Propagating J-Consistency
Suppose we propagate through a
relaxed decision diagram of width 2
for these constraints
1 2
1 2
1 2 3 4
1 2
3
4
among ( , ),{ , },1,2
( ) ( )
alldiff , , ,
, , , ,
,
,
x x c d
x c x d
x x x x
x x a b c d
x a b
x c d
Example:
a,b,d
a,b,c,d
c
d
a,b
c,d
52 paths from top to bottom
represent assignments to
x1, x2, x3, x4
36 of these are the feasible
assignments.
![Page 51: Projection, Consistency, and George Boolepublic.tepper.cmu.edu/jnh/booleConsistencyCP.pdf · Projection as a Unifying Concept • Projection underlies both optimization and logical](https://reader036.vdocuments.site/reader036/viewer/2022062604/5f762a85775e9d39dd061cb6/html5/thumbnails/51.jpg)
51
Propagating J-Consistency
Suppose we propagate through a
relaxed decision diagram of width 2
for these constraints
1 2
1 2
1 2 3 4
1 2
3
4
among ( , ),{ , },1,2
( ) ( )
alldiff , , ,
, , , ,
,
,
x x c d
x c x d
x x x x
x x a b c d
x a b
x c d
Example:
a,b,d
a,b,c,d
c
d
a,b
c,d
52 paths from top to bottom
represent assignments to
x1, x2, x3, x4
36 of these are the feasible
assignments.
1 2
1 2
1 2
alldiff ,
atmost ( , ),{ , },1
atmost ( , ),{c,d},1
x x
x x a b
x x
Projection of alldiff
onto x1, x2 is
![Page 52: Projection, Consistency, and George Boolepublic.tepper.cmu.edu/jnh/booleConsistencyCP.pdf · Projection as a Unifying Concept • Projection underlies both optimization and logical](https://reader036.vdocuments.site/reader036/viewer/2022062604/5f762a85775e9d39dd061cb6/html5/thumbnails/52.jpg)
52
Propagating J-Consistency
Let’s propagate the 2nd atmost constraint in the projected alldiff
through the relaxed decision diagram.
a,b,d
a,b,c,d
c
d
a,b
c,d
Let the length of a
path be number of
arcs with labels in
{c,d}.
For each arc,
indicate length of
shortest path from
top to that arc.
1 2
1 2
1 2
alldiff ,
atmost ( , ),{ , },1
atmost ( , ),{c,d},1
x x
x x a b
x x
Projection of alldiff
onto x1, x2 is
![Page 53: Projection, Consistency, and George Boolepublic.tepper.cmu.edu/jnh/booleConsistencyCP.pdf · Projection as a Unifying Concept • Projection underlies both optimization and logical](https://reader036.vdocuments.site/reader036/viewer/2022062604/5f762a85775e9d39dd061cb6/html5/thumbnails/53.jpg)
53
Propagating J-Consistency
Let’s propagate the 2nd atmost constraint in the projected alldiff
through the relaxed decision diagram.
a,b,d
a,b,c,d
c
d
a,b
c,d
Let the length of a
path be number of
arcs with labels in
{c,d}.
For each arc,
indicate length of
shortest path from
top to that arc.
1 2
1 2
1 2
alldiff ,
atmost ( , ),{ , },1
atmost ( , ),{c,d},1
x x
x x a b
x x
Projection of alldiff
onto x1, x2 is
0,0,1
0,0,1,12
1
![Page 54: Projection, Consistency, and George Boolepublic.tepper.cmu.edu/jnh/booleConsistencyCP.pdf · Projection as a Unifying Concept • Projection underlies both optimization and logical](https://reader036.vdocuments.site/reader036/viewer/2022062604/5f762a85775e9d39dd061cb6/html5/thumbnails/54.jpg)
54
Propagating J-Consistency
Let’s propagate the 2nd atmost constraint in the projected alldiff
through the relaxed decision diagram.
a,b,d
a,b,c,d
c
d
a,b
c,d
Let the length of a
path be number of
arcs with labels in
{c,d}.
For each arc,
indicate length of
shortest path from
top to that arc.
1 2
1 2
1 2
alldiff ,
atmost ( , ),{ , },1
atmost ( , ),{c,d},1
x x
x x a b
x x
Projection of alldiff
onto x1, x2 is
0,0,1
0,0,1,12
1
Remove arcs
with label > 1
![Page 55: Projection, Consistency, and George Boolepublic.tepper.cmu.edu/jnh/booleConsistencyCP.pdf · Projection as a Unifying Concept • Projection underlies both optimization and logical](https://reader036.vdocuments.site/reader036/viewer/2022062604/5f762a85775e9d39dd061cb6/html5/thumbnails/55.jpg)
55
Propagating J-Consistency
Let’s propagate the 2nd atmost constraint in the projected alldiff
through the relaxed decision diagram.
a,b,d
a,b,c,d
c
a,b
c,d
Let the length of a
path be number of
arcs with labels in
{c,d}.
For each arc,
indicate length of
shortest path from
top to that arc.
1 2
1 2
1 2
alldiff ,
atmost ( , ),{ , },1
atmost ( , ),{c,d},1
x x
x x a b
x x
Projection of alldiff
onto x1, x2 is
0,0,1
0,0,1,1
1
Remove arcs
with label > 1
![Page 56: Projection, Consistency, and George Boolepublic.tepper.cmu.edu/jnh/booleConsistencyCP.pdf · Projection as a Unifying Concept • Projection underlies both optimization and logical](https://reader036.vdocuments.site/reader036/viewer/2022062604/5f762a85775e9d39dd061cb6/html5/thumbnails/56.jpg)
56
Propagating J-Consistency
Let’s propagate the 2nd atmost constraint in the projected alldiff
through the relaxed decision diagram.
a,b,d
a,b,c,d
c
a,b
c,d
Let the length of a
path be number of
arcs with labels in
{c,d}.
For each arc,
indicate length of
shortest path from
top to that arc.
1 2
1 2
1 2
alldiff ,
atmost ( , ),{ , },1
atmost ( , ),{c,d},1
x x
x x a b
x x
Projection of alldiff
onto x1, x2 is
0,0,1
0,0,1,1
1
Remove arcs
with label > 1
Clean up.
![Page 57: Projection, Consistency, and George Boolepublic.tepper.cmu.edu/jnh/booleConsistencyCP.pdf · Projection as a Unifying Concept • Projection underlies both optimization and logical](https://reader036.vdocuments.site/reader036/viewer/2022062604/5f762a85775e9d39dd061cb6/html5/thumbnails/57.jpg)
57
Propagating J-Consistency
Let’s propagate the 2nd atmost constraint in the projected alldiff
through the relaxed decision diagram.
a,b,d
a,b,c,d
a,b
c,d
Let the length of a
path be number of
arcs with labels in
{c,d}.
For each arc,
indicate length of
shortest path from
top to that arc.
1 2
1 2
1 2
alldiff ,
atmost ( , ),{ , },1
atmost ( , ),{c,d},1
x x
x x a b
x x
Projection of alldiff
onto x1, x2 is
0,0,1
0,0,1,1
Remove arcs
with label > 1
Clean up.
![Page 58: Projection, Consistency, and George Boolepublic.tepper.cmu.edu/jnh/booleConsistencyCP.pdf · Projection as a Unifying Concept • Projection underlies both optimization and logical](https://reader036.vdocuments.site/reader036/viewer/2022062604/5f762a85775e9d39dd061cb6/html5/thumbnails/58.jpg)
58
Propagating J-Consistency
Let’s propagate the 2nd atmost constraint in the projected alldiff
through the relaxed decision diagram.
a,b,d
a,b,c,d
a,b
c,d
We need only branch
on a,b,d rather than
a,b,c,d
1 2
1 2
1 2
alldiff ,
atmost ( , ),{ , },1
atmost ( , ),{c,d},1
x x
x x a b
x x
Projection of alldiff
onto x1, x2 is
Remove arcs
with label > 1
Clean up.
![Page 59: Projection, Consistency, and George Boolepublic.tepper.cmu.edu/jnh/booleConsistencyCP.pdf · Projection as a Unifying Concept • Projection underlies both optimization and logical](https://reader036.vdocuments.site/reader036/viewer/2022062604/5f762a85775e9d39dd061cb6/html5/thumbnails/59.jpg)
59
Achieving J-consistency
Constraint How hard to project?
among Easy and fast.
sequence More complicated but fast.
regular Easy and basically same labor as
domain consistency.
alldiff Quite complicated but practical for
small domains.
![Page 60: Projection, Consistency, and George Boolepublic.tepper.cmu.edu/jnh/booleConsistencyCP.pdf · Projection as a Unifying Concept • Projection underlies both optimization and logical](https://reader036.vdocuments.site/reader036/viewer/2022062604/5f762a85775e9d39dd061cb6/html5/thumbnails/60.jpg)
60
J-consistency for Among
Projection of onto x1,…,xn1 is
where
( 1) , 1 if
( , ) ,min{ , 1} if
( 1) ,min{ , 1} otherwise
n
n
t u D V
t u t u n D V
t u n
1among ( , , ), , ,nx x V t u
1 1among ( , , ), , ,nx x V t u
![Page 61: Projection, Consistency, and George Boolepublic.tepper.cmu.edu/jnh/booleConsistencyCP.pdf · Projection as a Unifying Concept • Projection underlies both optimization and logical](https://reader036.vdocuments.site/reader036/viewer/2022062604/5f762a85775e9d39dd061cb6/html5/thumbnails/61.jpg)
61
J-consistency for Among
Projection of onto x1,…,xn1 is
where
( 1) , 1 if
( , ) ,min{ , 1} if
( 1) ,min{ , 1} otherwise
n
n
t u D V
t u t u n D V
t u n
1among ( , , ), , ,nx x V t u
1
2
3
4
5
,
, ,
,d
,
D a b
D a b c
D a
D c d
D d
Example
1 1among ( , , ), , ,nx x V t u
1 2 3 4 5among ( , , , , ),{ , }, ,x x x x x c d t u
![Page 62: Projection, Consistency, and George Boolepublic.tepper.cmu.edu/jnh/booleConsistencyCP.pdf · Projection as a Unifying Concept • Projection underlies both optimization and logical](https://reader036.vdocuments.site/reader036/viewer/2022062604/5f762a85775e9d39dd061cb6/html5/thumbnails/62.jpg)
62
J-consistency for Among
Projection of onto x1,…,xn1 is
where
( 1) , 1 if
( , ) ,min{ , 1} if
( 1) ,min{ , 1} otherwise
n
n
t u D V
t u t u n D V
t u n
1among ( , , ), , ,nx x V t u
1
2
3
4
5
,
, ,
,d
,
D a b
D a b c
D a
D c d
D d
Example
1 1among ( , , ), , ,nx x V t u
1 2 3 4 5among ( , , , , ),{ , }, ,x x x x x c d t u
1 2 3 4among ( , , , ),{ , },( 1) , 1x x x x c d t u
![Page 63: Projection, Consistency, and George Boolepublic.tepper.cmu.edu/jnh/booleConsistencyCP.pdf · Projection as a Unifying Concept • Projection underlies both optimization and logical](https://reader036.vdocuments.site/reader036/viewer/2022062604/5f762a85775e9d39dd061cb6/html5/thumbnails/63.jpg)
63
J-consistency for Among
Projection of onto x1,…,xn1 is
where
( 1) , 1 if
( , ) ,min{ , 1} if
( 1) ,min{ , 1} otherwise
n
n
t u D V
t u t u n D V
t u n
1among ( , , ), , ,nx x V t u
1
2
3
4
5
,
, ,
,d
,
D a b
D a b c
D a
D c d
D d
Example
1 1among ( , , ), , ,nx x V t u
1 2 3 4 5among ( , , , , ),{ , }, ,x x x x x c d t u
1 2 3 4among ( , , , ),{ , },( 1) , 1x x x x c d t u
1 2 3among ( , , ),{ , },( 2) , 2x x x c d t u
![Page 64: Projection, Consistency, and George Boolepublic.tepper.cmu.edu/jnh/booleConsistencyCP.pdf · Projection as a Unifying Concept • Projection underlies both optimization and logical](https://reader036.vdocuments.site/reader036/viewer/2022062604/5f762a85775e9d39dd061cb6/html5/thumbnails/64.jpg)
64
J-consistency for Among
Projection of onto x1,…,xn1 is
where
( 1) , 1 if
( , ) ,min{ , 1} if
( 1) ,min{ , 1} otherwise
n
n
t u D V
t u t u n D V
t u n
1among ( , , ), , ,nx x V t u
1
2
3
4
5
,
, ,
,d
,
D a b
D a b c
D a
D c d
D d
Example
1 1among ( , , ), , ,nx x V t u
1 2 3 4 5among ( , , , , ),{ , }, ,x x x x x c d t u
1 2 3 4among ( , , , ),{ , },( 1) , 1x x x x c d t u
1 2 3among ( , , ),{ , },( 2) , 2x x x c d t u
1 2among ( , ),{ , },( 3) ,min{ 2,2}x x c d t u
![Page 65: Projection, Consistency, and George Boolepublic.tepper.cmu.edu/jnh/booleConsistencyCP.pdf · Projection as a Unifying Concept • Projection underlies both optimization and logical](https://reader036.vdocuments.site/reader036/viewer/2022062604/5f762a85775e9d39dd061cb6/html5/thumbnails/65.jpg)
65
J-consistency for Among
Projection of onto x1,…,xn1 is
where
( 1) , 1 if
( , ) ,min{ , 1} if
( 1) ,min{ , 1} otherwise
n
n
t u D V
t u t u n D V
t u n
1among ( , , ), , ,nx x V t u
1
2
3
4
5
,
, ,
,d
,
D a b
D a b c
D a
D c d
D d
Example
1 1among ( , , ), , ,nx x V t u
1 2 3 4 5among ( , , , , ),{ , }, ,x x x x x c d t u
1 2 3 4among ( , , , ),{ , },( 1) , 1x x x x c d t u
1 2 3among ( , , ),{ , },( 2) , 2x x x c d t u
1 2among ( , ),{ , },( 3) ,min{ 2,2}x x c d t u
1among ( ),{ , },( 4) ,min{ 2,1}x c d t u
![Page 66: Projection, Consistency, and George Boolepublic.tepper.cmu.edu/jnh/booleConsistencyCP.pdf · Projection as a Unifying Concept • Projection underlies both optimization and logical](https://reader036.vdocuments.site/reader036/viewer/2022062604/5f762a85775e9d39dd061cb6/html5/thumbnails/66.jpg)
66
J-consistency for Among
Projection of onto x1,…,xn1 is
where
( 1) , 1 if
( , ) ,min{ , 1} if
( 1) ,min{ , 1} otherwise
n
n
t u D V
t u t u n D V
t u n
1among ( , , ), , ,nx x V t u
1
2
3
4
5
,
, ,
,d
,
D a b
D a b c
D a
D c d
D d
Example
1 1among ( , , ), , ,nx x V t u
1 2 3 4 5among ( , , , , ),{ , }, ,x x x x x c d t u
1 2 3 4among ( , , , ),{ , },( 1) , 1x x x x c d t u
1 2 3among ( , , ),{ , },( 2) , 2x x x c d t u
1 2among ( , ),{ , },( 3) ,min{ 2,2}x x c d t u
1among ( ),{ , },( 4) ,min{ 2,1}x c d t u
among (),{ , },( 4) ,min{ 2,0}c d t u
![Page 67: Projection, Consistency, and George Boolepublic.tepper.cmu.edu/jnh/booleConsistencyCP.pdf · Projection as a Unifying Concept • Projection underlies both optimization and logical](https://reader036.vdocuments.site/reader036/viewer/2022062604/5f762a85775e9d39dd061cb6/html5/thumbnails/67.jpg)
67
J-consistency for Among
Projection of onto x1,…,xn1 is
where
( 1) , 1 if
( , ) ,min{ , 1} if
( 1) ,min{ , 1} otherwise
n
n
t u D V
t u t u n D V
t u n
1among ( , , ), , ,nx x V t u
1
2
3
4
5
,
, ,
,d
,
D a b
D a b c
D a
D c d
D d
Example
1 1among ( , , ), , ,nx x V t u
1 2 3 4 5among ( , , , , ),{ , }, ,x x x x x c d t u
1 2 3 4among ( , , , ),{ , },( 1) , 1x x x x c d t u
1 2 3among ( , , ),{ , },( 2) , 2x x x c d t u
1 2among ( , ),{ , },( 3) ,min{ 2,2}x x c d t u
1among ( ),{ , },( 4) ,min{ 2,1}x c d t u
among (),{ , },( 4) ,min{ 2,0}c d t u
Feasible if and only if ( 4) min 2,0t u
![Page 68: Projection, Consistency, and George Boolepublic.tepper.cmu.edu/jnh/booleConsistencyCP.pdf · Projection as a Unifying Concept • Projection underlies both optimization and logical](https://reader036.vdocuments.site/reader036/viewer/2022062604/5f762a85775e9d39dd061cb6/html5/thumbnails/68.jpg)
68
J-Consistency for Sequence
• Projection is based on an integrality property.
– The coefficient matrix of the inequality formulation has
consecutive ones property.
– So projection of the convex hull of the feasible set is an
integral polyhedron.
– Polyhedral projection therefore suffices.
– Straightforward (but tedious) application of Fourier
elimination yields the projection.
![Page 69: Projection, Consistency, and George Boolepublic.tepper.cmu.edu/jnh/booleConsistencyCP.pdf · Projection as a Unifying Concept • Projection underlies both optimization and logical](https://reader036.vdocuments.site/reader036/viewer/2022062604/5f762a85775e9d39dd061cb6/html5/thumbnails/69.jpg)
69
J-Consistency for Sequence
• Projection is based on an integrality property.
– The coefficient matrix of the inequality formulation has
consecutive ones property.
– So projection of the convex hull of the feasible set is an
integral polyhedron.
– Polyhedral projection therefore suffices.
– Straightforward (but tedious) application of Fourier
elimination yields the projection.
• Projection onto any subset of variables is a
generalized sequence constraint.
– Complexity of projecting out xk is O(kq), where
q = length of the overlapping sequences.
![Page 70: Projection, Consistency, and George Boolepublic.tepper.cmu.edu/jnh/booleConsistencyCP.pdf · Projection as a Unifying Concept • Projection underlies both optimization and logical](https://reader036.vdocuments.site/reader036/viewer/2022062604/5f762a85775e9d39dd061cb6/html5/thumbnails/70.jpg)
70
![Page 71: Projection, Consistency, and George Boolepublic.tepper.cmu.edu/jnh/booleConsistencyCP.pdf · Projection as a Unifying Concept • Projection underlies both optimization and logical](https://reader036.vdocuments.site/reader036/viewer/2022062604/5f762a85775e9d39dd061cb6/html5/thumbnails/71.jpg)
71
J-Consistency for Sequence
Example 3among ( , , ),{1},2,2 , 4,5,6t tx x t
To project out x6, add constraint
3 4 5among ( , , ),{1},1,1x x x
1 3 4 6 2 5, , , 0,1 , , 1x x x x x x
![Page 72: Projection, Consistency, and George Boolepublic.tepper.cmu.edu/jnh/booleConsistencyCP.pdf · Projection as a Unifying Concept • Projection underlies both optimization and logical](https://reader036.vdocuments.site/reader036/viewer/2022062604/5f762a85775e9d39dd061cb6/html5/thumbnails/72.jpg)
72
J-Consistency for Sequence
Example 3among ( , , ),{1},2,2 , 4,5,6t tx x t
To project out x6, add constraint
3 4 5among ( , , ),{1},1,1x x x
To project out x5, add constraints
2 3 4 3 4among ( , , ),{1},1,1 among ( , ),{1},0,0x x x x x
1 3 4 6 2 5, , , 0,1 , , 1x x x x x x
![Page 73: Projection, Consistency, and George Boolepublic.tepper.cmu.edu/jnh/booleConsistencyCP.pdf · Projection as a Unifying Concept • Projection underlies both optimization and logical](https://reader036.vdocuments.site/reader036/viewer/2022062604/5f762a85775e9d39dd061cb6/html5/thumbnails/73.jpg)
73
J-Consistency for Sequence
Example 3among ( , , ),{1},2,2 , 4,5,6t tx x t
To project out x6, add constraint
3 4 5among ( , , ),{1},1,1x x x
To project out x5, add constraints
2 3 4 3 4among ( , , ),{1},1,1 among ( , ),{1},0,0x x x x x
To project out x4, add constraints
1 1 2 3
2 3 3
among ( ),{1},1,1 among (x , , ),{1},1,2
among ( ,x ),{1},0,1 among ( ),{1},0,0
x x x
x x
1 3 4 6 2 5, , , 0,1 , , 1x x x x x x
![Page 74: Projection, Consistency, and George Boolepublic.tepper.cmu.edu/jnh/booleConsistencyCP.pdf · Projection as a Unifying Concept • Projection underlies both optimization and logical](https://reader036.vdocuments.site/reader036/viewer/2022062604/5f762a85775e9d39dd061cb6/html5/thumbnails/74.jpg)
74
J-Consistency for Sequence
Example 3among ( , , ),{1},2,2 , 4,5,6t tx x t
To project out x6, add constraint
3 4 5among ( , , ),{1},1,1x x x
To project out x5, add constraints
2 3 4 3 4among ( , , ),{1},1,1 among ( , ),{1},0,0x x x x x
To project out x4, add constraints
1 1 2 3
2 3 3
among ( ),{1},1,1 among (x , , ),{1},1,2
among ( ,x ),{1},0,1 among ( ),{1},0,0
x x x
x x
To project out x3, fix (x1,x2) = (1,1)
1 3 4 6 2 5, , , 0,1 , , 1x x x x x x
![Page 75: Projection, Consistency, and George Boolepublic.tepper.cmu.edu/jnh/booleConsistencyCP.pdf · Projection as a Unifying Concept • Projection underlies both optimization and logical](https://reader036.vdocuments.site/reader036/viewer/2022062604/5f762a85775e9d39dd061cb6/html5/thumbnails/75.jpg)
75
J-Consistency for Regular Constraint
• Projection can be read from state transition graph.
– Complexity of projecting onto x1, …, xk for all k is O(nm2),
where n = number of variables, m = max number of
states per stage.
![Page 76: Projection, Consistency, and George Boolepublic.tepper.cmu.edu/jnh/booleConsistencyCP.pdf · Projection as a Unifying Concept • Projection underlies both optimization and logical](https://reader036.vdocuments.site/reader036/viewer/2022062604/5f762a85775e9d39dd061cb6/html5/thumbnails/76.jpg)
76
J-Consistency for Regular Constraint
• Projection can be read from state transition graph.
– Complexity of projecting onto x1, …, xk for all k is O(nm2),
where n = number of variables, m = max number of
states per stage.
• Shift scheduling example
– Assign each worker to shift xi {a,b,c} on each day
i = 1,…,7.
– Must work any given shift 2 or 3 days in a row.
– No direct transition between shifts a and c.
– Variable domains: D1 = D5 = {a,c}, D2 = {a,b,c},
D3 = D6 = D7 = {a,b}, D4 = {b,c}
![Page 77: Projection, Consistency, and George Boolepublic.tepper.cmu.edu/jnh/booleConsistencyCP.pdf · Projection as a Unifying Concept • Projection underlies both optimization and logical](https://reader036.vdocuments.site/reader036/viewer/2022062604/5f762a85775e9d39dd061cb6/html5/thumbnails/77.jpg)
77
Deterministic
finite automaton
for this problem
instance:
= absorbing
state
Regular language expression:
(((aa|aaa)(bb|bbb))*|((cc|ccc)(bb|bbb))*)*(c|(aa|aaa)|(cc|ccc))
J-Consistency for Regular Constraint
![Page 78: Projection, Consistency, and George Boolepublic.tepper.cmu.edu/jnh/booleConsistencyCP.pdf · Projection as a Unifying Concept • Projection underlies both optimization and logical](https://reader036.vdocuments.site/reader036/viewer/2022062604/5f762a85775e9d39dd061cb6/html5/thumbnails/78.jpg)
78
J-Consistency for Regular Constraint
State transition graph for 7 stages
Dashed lines lead to unreachable states.
![Page 79: Projection, Consistency, and George Boolepublic.tepper.cmu.edu/jnh/booleConsistencyCP.pdf · Projection as a Unifying Concept • Projection underlies both optimization and logical](https://reader036.vdocuments.site/reader036/viewer/2022062604/5f762a85775e9d39dd061cb6/html5/thumbnails/79.jpg)
79
J-Consistency for Regular Constraint
State transition graph for 7 stages
Dashed lines lead to unreachable states.
Filtered domains
![Page 80: Projection, Consistency, and George Boolepublic.tepper.cmu.edu/jnh/booleConsistencyCP.pdf · Projection as a Unifying Concept • Projection underlies both optimization and logical](https://reader036.vdocuments.site/reader036/viewer/2022062604/5f762a85775e9d39dd061cb6/html5/thumbnails/80.jpg)
80
J-Consistency for Regular Constraint
To project onto x1, x2, x3, truncate the graph at stage 4.
![Page 81: Projection, Consistency, and George Boolepublic.tepper.cmu.edu/jnh/booleConsistencyCP.pdf · Projection as a Unifying Concept • Projection underlies both optimization and logical](https://reader036.vdocuments.site/reader036/viewer/2022062604/5f762a85775e9d39dd061cb6/html5/thumbnails/81.jpg)
81
J-Consistency for Regular Constraint
To project onto x1, x2, x3, truncate the graph at stage 4.
![Page 82: Projection, Consistency, and George Boolepublic.tepper.cmu.edu/jnh/booleConsistencyCP.pdf · Projection as a Unifying Concept • Projection underlies both optimization and logical](https://reader036.vdocuments.site/reader036/viewer/2022062604/5f762a85775e9d39dd061cb6/html5/thumbnails/82.jpg)
82
J-Consistency for Regular Constraint
To project onto x1, x2, x3, truncate the graph at stage 4.
Resulting graph can be
viewed as a constraint that
describes the projection.
Constraint is easily
propagated through a
relaxed decision diagram.
![Page 83: Projection, Consistency, and George Boolepublic.tepper.cmu.edu/jnh/booleConsistencyCP.pdf · Projection as a Unifying Concept • Projection underlies both optimization and logical](https://reader036.vdocuments.site/reader036/viewer/2022062604/5f762a85775e9d39dd061cb6/html5/thumbnails/83.jpg)
83
J-Consistency for Alldiff Constraint
• Projection is inherently complicated.
– But it can simplify for small domains.
• The result is a disjunction of constraint sets,
– …each of which contains an alldiff constraint and some
atmost constraints.
![Page 84: Projection, Consistency, and George Boolepublic.tepper.cmu.edu/jnh/booleConsistencyCP.pdf · Projection as a Unifying Concept • Projection underlies both optimization and logical](https://reader036.vdocuments.site/reader036/viewer/2022062604/5f762a85775e9d39dd061cb6/html5/thumbnails/84.jpg)
84
J-Consistency for Alldiff Constraint
Example 1 2 3 4 5alldiff , , , ,x x x x x
1 2 3 4 5, , , , , , , , , , , , , ,D a b c D c d e D d e f D e f g D a f g
![Page 85: Projection, Consistency, and George Boolepublic.tepper.cmu.edu/jnh/booleConsistencyCP.pdf · Projection as a Unifying Concept • Projection underlies both optimization and logical](https://reader036.vdocuments.site/reader036/viewer/2022062604/5f762a85775e9d39dd061cb6/html5/thumbnails/85.jpg)
J-Consistency for Alldiff Constraint
Example 1 2 3 4 5alldiff , , , ,x x x x x
Projecting out x5, we get
1 2 3 4 1 2 3 4alldiff , , , , atmost ( , , , ),{ , , },2x x x x x x x x a f g
because x5 must take one of the values in {a,f,g}, …
85
1 2 3 4 5, , , , , , , , , , , , , ,D a b c D c d e D d e f D e f g D a f g
![Page 86: Projection, Consistency, and George Boolepublic.tepper.cmu.edu/jnh/booleConsistencyCP.pdf · Projection as a Unifying Concept • Projection underlies both optimization and logical](https://reader036.vdocuments.site/reader036/viewer/2022062604/5f762a85775e9d39dd061cb6/html5/thumbnails/86.jpg)
J-Consistency for Alldiff Constraint
Example 1 2 3 4 5alldiff , , , ,x x x x x
Projecting out x5, we get
1 2 3 4 1 2 3 4alldiff , , , , atmost ( , , , ),{ , , },2x x x x x x x x a f g
because x5 must take one of the values in {a,f,g}, leaving 2 for other xi s.
86
1 2 3 4 5, , , , , , , , , , , , , ,D a b c D c d e D d e f D e f g D a f g
![Page 87: Projection, Consistency, and George Boolepublic.tepper.cmu.edu/jnh/booleConsistencyCP.pdf · Projection as a Unifying Concept • Projection underlies both optimization and logical](https://reader036.vdocuments.site/reader036/viewer/2022062604/5f762a85775e9d39dd061cb6/html5/thumbnails/87.jpg)
87
J-Consistency for Alldiff Constraint
Example 1 2 3 4 5alldiff , , , ,x x x x x
Projecting out x5, we get
1 2 3 4 1 2 3 4alldiff , , , , atmost ( , , , ),{ , , },2x x x x x x x x a f g
because x5 must take one of the values in {a,f,g}, leaving 2 for other xi s.
Projecting out x4, we note that x4 {a,f,g} or x4 {a,f,g}.
1 2 3 4 5, , , , , , , , , , , , , ,D a b c D c d e D d e f D e f g D a f g
![Page 88: Projection, Consistency, and George Boolepublic.tepper.cmu.edu/jnh/booleConsistencyCP.pdf · Projection as a Unifying Concept • Projection underlies both optimization and logical](https://reader036.vdocuments.site/reader036/viewer/2022062604/5f762a85775e9d39dd061cb6/html5/thumbnails/88.jpg)
88
J-Consistency for Alldiff Constraint
Example 1 2 3 4 5alldiff , , , ,x x x x x
Projecting out x5, we get
1 2 3 4 1 2 3 4alldiff , , , , atmost ( , , , ),{ , , },2x x x x x x x x a f g
because x5 must take one of the values in {a,f,g}, leaving 2 for other xi s.
Projecting out x4, we note that x4 {a,f,g} or x4 {a,f,g}.
If x4 {a,f,g}, we get
1 2 3 1 2 3alldiff , , , atmost ( , , ),{ , , },1x x x x x x a f g
1 2 3 4 5, , , , , , , , , , , , , ,D a b c D c d e D d e f D e f g D a f g
![Page 89: Projection, Consistency, and George Boolepublic.tepper.cmu.edu/jnh/booleConsistencyCP.pdf · Projection as a Unifying Concept • Projection underlies both optimization and logical](https://reader036.vdocuments.site/reader036/viewer/2022062604/5f762a85775e9d39dd061cb6/html5/thumbnails/89.jpg)
89
J-Consistency for Alldiff Constraint
Example 1 2 3 4 5alldiff , , , ,x x x x x
Projecting out x5, we get
1 2 3 4 1 2 3 4alldiff , , , , atmost ( , , , ),{ , , },2x x x x x x x x a f g
because x5 must take one of the values in {a,f,g}, leaving 2 for other xi s.
Projecting out x4, we note that x4 {a,f,g} or x4 {a,f,g}.
If x4 {a,f,g}, we get
1 2 3 1 2 3alldiff , , , atmost ( , , ),{ , , },1x x x x x x a f g
If x4 {a,f,g}, we get x4 = e, and we remove e from other domains.
1 2 3 4 5, , , , , , , , , , , , , ,D a b c D c d e D d e f D e f g D a f g
![Page 90: Projection, Consistency, and George Boolepublic.tepper.cmu.edu/jnh/booleConsistencyCP.pdf · Projection as a Unifying Concept • Projection underlies both optimization and logical](https://reader036.vdocuments.site/reader036/viewer/2022062604/5f762a85775e9d39dd061cb6/html5/thumbnails/90.jpg)
90
J-Consistency for Alldiff Constraint
Example 1 2 3 4 5alldiff , , , ,x x x x x
Projecting out x5, we get
1 2 3 4 1 2 3 4alldiff , , , , atmost ( , , , ),{ , , },2x x x x x x x x a f g
because x5 must take one of the values in {a,f,g}, leaving 2 for other xi s.
Projecting out x4, we note that x4 {a,f,g} or x4 {a,f,g}.
If x4 {a,f,g}, we get
1 2 3 1 2 3alldiff , , , atmost ( , , ),{ , , },1x x x x x x a f g
If x4 {a,f,g}, we get x4 = e, and we remove e from other domains.
So the projection is
1
1 2 3
2
1 2 3
3
, ,alldiff , ,
,atmost ( , , ),{ , , },1
,
D a b cx x x
D c dx x x a f g
D d f
1 2 3 4 5, , , , , , , , , , , , , ,D a b c D c d e D d e f D e f g D a f g
![Page 91: Projection, Consistency, and George Boolepublic.tepper.cmu.edu/jnh/booleConsistencyCP.pdf · Projection as a Unifying Concept • Projection underlies both optimization and logical](https://reader036.vdocuments.site/reader036/viewer/2022062604/5f762a85775e9d39dd061cb6/html5/thumbnails/91.jpg)
91
J-Consistency for Alldiff Constraint
Example 1 2 3 4 5alldiff , , , ,x x x x x
Projecting out x3, we get simply
1 2alldiff ,x x
Projecting out x2, we get the original domain for x1
1 , ,D a b c
1 2 3 4 5, , , , , , , , , , , , , ,D a b c D c d e D d e f D e f g D a f g
![Page 92: Projection, Consistency, and George Boolepublic.tepper.cmu.edu/jnh/booleConsistencyCP.pdf · Projection as a Unifying Concept • Projection underlies both optimization and logical](https://reader036.vdocuments.site/reader036/viewer/2022062604/5f762a85775e9d39dd061cb6/html5/thumbnails/92.jpg)
92
![Page 93: Projection, Consistency, and George Boolepublic.tepper.cmu.edu/jnh/booleConsistencyCP.pdf · Projection as a Unifying Concept • Projection underlies both optimization and logical](https://reader036.vdocuments.site/reader036/viewer/2022062604/5f762a85775e9d39dd061cb6/html5/thumbnails/93.jpg)
93
Bounds Consistency as Projection
• Bounds consistency
– Most naturally defined when domains can be embedded
in the real numbers.
– Then we achieve bounds consistency by projecting
the convex hull of the feasible set onto each xj.
– Continuous J-consistency is achieved by projecting
the convex hull onto xJ.
![Page 94: Projection, Consistency, and George Boolepublic.tepper.cmu.edu/jnh/booleConsistencyCP.pdf · Projection as a Unifying Concept • Projection underlies both optimization and logical](https://reader036.vdocuments.site/reader036/viewer/2022062604/5f762a85775e9d39dd061cb6/html5/thumbnails/94.jpg)
94
Bounds Consistency as Projection
• Cutting planes
– Projection onto xJ is defined by cutting planes that
contain variables in xJ.
– Close relationship to integer programming..
![Page 95: Projection, Consistency, and George Boolepublic.tepper.cmu.edu/jnh/booleConsistencyCP.pdf · Projection as a Unifying Concept • Projection underlies both optimization and logical](https://reader036.vdocuments.site/reader036/viewer/2022062604/5f762a85775e9d39dd061cb6/html5/thumbnails/95.jpg)
95
Bounds Consistency as Projection
• Usefulness of cutting planes
– They can be propagated through LP relaxation.
– This can help bound the objective function as well as
achieve consistency.
– They can reduce backtracking
– Even when LP relaxation is not used.
– This has never been studied in integer programming!