95
Projection, Consistency, and George Boole John Hooker Carnegie Mellon University CP 2015, Cork, Ireland

Projection, Consistency, and George Boolepublic.tepper.cmu.edu/jnh/booleConsistencyCP.pdf · Projection as a Unifying Concept • Projection underlies both optimization and logical

  • Upload
    others

  • View
    4

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Projection, Consistency, and George Boolepublic.tepper.cmu.edu/jnh/booleConsistencyCP.pdf · Projection as a Unifying Concept • Projection underlies both optimization and logical

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

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

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

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

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

• 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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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!