1 Directional consistency Chapter 4 ICS-179 Spring 2010 ICS 179 - Graphical models.

36
1 Directional consistency Chapter 4 ICS-179 Spring 2010 Spring 2010 ICS 179 - Graphical models
  • date post

    19-Dec-2015
  • Category

    Documents

  • view

    220
  • download

    1

Transcript of 1 Directional consistency Chapter 4 ICS-179 Spring 2010 ICS 179 - Graphical models.

Page 1: 1 Directional consistency Chapter 4 ICS-179 Spring 2010 ICS 179 - Graphical models.

1

Directional consistencyChapter 4

ICS-179

Spring 2010

Spring 2010 ICS 179 - Graphical models

Page 2: 1 Directional consistency Chapter 4 ICS-179 Spring 2010 ICS 179 - Graphical models.

Spring 2010 ICS 179 - Graphical models 2

Backtrack-free search: orWhat level of consistency will guarantee global-consistency

Page 3: 1 Directional consistency Chapter 4 ICS-179 Spring 2010 ICS 179 - Graphical models.

Spring 2010 ICS 179 - Graphical models 4

Directional arc-consistency:another restriction on propagation

D4={white,blue,black} D3={red,white,blue} D2={green,white,black} D1={red,white,black} X1=x2, x1=x3, x3=x4

After DAC: D1= {white}, D2={green,white,black}, D3={white,blue}, D4={white,blue,black}

Page 4: 1 Directional consistency Chapter 4 ICS-179 Spring 2010 ICS 179 - Graphical models.

Spring 2010 ICS 179 - Graphical models 5

Directional arc-consistency:another restriction on propagation

D4={white,blue,black}D3={red,white,blue}D2={green,white,black}D1={red,white,black}X1=x2, x1=x3,x3=x4

Page 5: 1 Directional consistency Chapter 4 ICS-179 Spring 2010 ICS 179 - Graphical models.

Spring 2010 ICS 179 - Graphical models 6

Algorithm for directional arc-consistency (DAC)

)( 2ekO Complexity:

Page 6: 1 Directional consistency Chapter 4 ICS-179 Spring 2010 ICS 179 - Graphical models.

Spring 2010 ICS 179 - Graphical models 7

Directional arc-consistency may not be enough Directional path-consistency

Page 7: 1 Directional consistency Chapter 4 ICS-179 Spring 2010 ICS 179 - Graphical models.

Spring 2010 ICS 179 - Graphical models 8

Algorithm directional path consistency (DPC)

Page 8: 1 Directional consistency Chapter 4 ICS-179 Spring 2010 ICS 179 - Graphical models.

Spring 2010 ICS 179 - Graphical models 9

Example of DPC

Try it yourself:

E

D

A

C

B

}2,1{

}2,1{}2,1{

}2,1{ }3,2,1{

Page 9: 1 Directional consistency Chapter 4 ICS-179 Spring 2010 ICS 179 - Graphical models.

Spring 2010 ICS 179 - Graphical models 10

Directional i-consistency

Page 10: 1 Directional consistency Chapter 4 ICS-179 Spring 2010 ICS 179 - Graphical models.

Spring 2010 ICS 179 - Graphical models 12

Induced-widthcaptures the changes to the constraint graph:

d1= F,E,D,C,B,Ad2=A,B,C,D,E,F

Page 11: 1 Directional consistency Chapter 4 ICS-179 Spring 2010 ICS 179 - Graphical models.

Spring 2010 ICS 179 - Graphical models 13

Induced-widthcaptures the changes to the constraint graph:

d1= F,E,D,C,B,Ad2=A,B,C,D,E,F

Page 12: 1 Directional consistency Chapter 4 ICS-179 Spring 2010 ICS 179 - Graphical models.

Spring 2010 ICS 179 - Graphical models 14

The induced-width DPC recursively connects parents in the ordered graph, yielding:

Width along ordering d, w(d): • max # of previous parents

Induced width w*(d):• The width in the ordered

induced graph Induced-width w*:

• Smallest induced-width over all orderings

Finding w*

• NP-complete (Arnborg, 1985) but greedy heuristics (min-fill).

E

D

A

C

B

Page 13: 1 Directional consistency Chapter 4 ICS-179 Spring 2010 ICS 179 - Graphical models.

Spring 2010 ICS 179 - Graphical models 15

The induced-width DPC recursively connects parents in the ordered graph, yielding:

Width along ordering d, w(d): • max # of previous parents

Induced width w*(d):• The width in the ordered

induced graph Induced-width w*:

• Smallest induced-width over all orderings

Finding w*

• NP-complete (Arnborg, 1985) but greedy heuristics (min-fill).

E

D

A

C

B

Page 14: 1 Directional consistency Chapter 4 ICS-179 Spring 2010 ICS 179 - Graphical models.

Spring 2010 ICS 179 - Graphical models 16

Induced-width and DPC

The induced graph of (G,d) is denoted (G*,d)

The induced graph (G*,d) contains the graph generated by DPC along d, and the graph generated by directional i-consistency along d

Page 15: 1 Directional consistency Chapter 4 ICS-179 Spring 2010 ICS 179 - Graphical models.

Spring 2010 ICS 179 - Graphical models 17

Refined Complexity using induced-width

Consequently we wish to have ordering with minimal induced-width

Induced-width is equal to tree-width to be defined later. Finding min induced-width ordering is NP-complete

Page 16: 1 Directional consistency Chapter 4 ICS-179 Spring 2010 ICS 179 - Graphical models.

Spring 2010 ICS 179 - Graphical models 18

Greedy algorithms for iduced-width

• Min-width ordering• Min-induced-width ordering• Max-cardinality ordering• Min-fill ordering• Chordal graphs

Page 17: 1 Directional consistency Chapter 4 ICS-179 Spring 2010 ICS 179 - Graphical models.

Spring 2010 ICS 179 - Graphical models 19

Min-width ordering

Page 18: 1 Directional consistency Chapter 4 ICS-179 Spring 2010 ICS 179 - Graphical models.

Spring 2010 ICS 179 - Graphical models 20

Min-induced-width

Page 19: 1 Directional consistency Chapter 4 ICS-179 Spring 2010 ICS 179 - Graphical models.

Spring 2010 ICS 179 - Graphical models 21

Min-fill algorithm

Prefers a node who add the least number of fill-in arcs.

Empirically, fill-in is the best among the greedy algorithms (MW,MIW,MF,MC)

Page 20: 1 Directional consistency Chapter 4 ICS-179 Spring 2010 ICS 179 - Graphical models.

Spring 2010 ICS 179 - Graphical models 22

Cordal graphs and Max-cardinality ordering

A graph is cordal if every cycle of length at least 4 has a chord

Finding w* over chordal graph is easy using the max-cardinality ordering

If G* is an induced graph it is chordal K-trees are special chordal graphs. Finding the max-clique in chordal graphs is

easy (just enumerate all cliques in a max-cardinality ordering

Page 21: 1 Directional consistency Chapter 4 ICS-179 Spring 2010 ICS 179 - Graphical models.

Spring 2010 ICS 179 - Graphical models 23

Example

We see again that G in the Figure (a) is not chordal since the parents of A are not connected in the max-cardinality ordering in Figure (d). If we connect B and C, the resulting induced graph is chordal.

Page 22: 1 Directional consistency Chapter 4 ICS-179 Spring 2010 ICS 179 - Graphical models.

Spring 2010 ICS 179 - Graphical models 24

Max-cardinality ordering

Figure 4.5 The max-cardinality (MC) ordering procedure.

Page 23: 1 Directional consistency Chapter 4 ICS-179 Spring 2010 ICS 179 - Graphical models.

Spring 2010 ICS 179 - Graphical models 25

Width vs local consistency:solving trees

Page 24: 1 Directional consistency Chapter 4 ICS-179 Spring 2010 ICS 179 - Graphical models.

Spring 2010 ICS 179 - Graphical models 26

Tree-solving

)(: 2nkOcomplexity

Page 25: 1 Directional consistency Chapter 4 ICS-179 Spring 2010 ICS 179 - Graphical models.

Spring 2010 ICS 179 - Graphical models 27

Width-2 and DPC

Page 26: 1 Directional consistency Chapter 4 ICS-179 Spring 2010 ICS 179 - Graphical models.

Spring 2010 ICS 179 - Graphical models 28

Width vs directional consistency(Freuder 82)

Page 27: 1 Directional consistency Chapter 4 ICS-179 Spring 2010 ICS 179 - Graphical models.

Spring 2010 ICS 179 - Graphical models 29

Width vs i-consistency

DAC and width-1 DPC and width-2 DIC_i and with-(i-1) backtrack-free representation

If a problem has width 2, will DPC make it backtrack-free?

Adaptive-consistency: applies i-consistency when i is adapted to the number of parents

Page 28: 1 Directional consistency Chapter 4 ICS-179 Spring 2010 ICS 179 - Graphical models.

Spring 2010 ICS 179 - Graphical models 31

Adaptive-consistency

Page 29: 1 Directional consistency Chapter 4 ICS-179 Spring 2010 ICS 179 - Graphical models.

Spring 2010 ICS 179 - Graphical models 32

Bucket E: E ¹ D, E ¹ C

Bucket D: D ¹ A

Bucket C: C ¹ B

Bucket B: B ¹ A

Bucket A:

A ¹ C

contradiction

=

D = C

B = A

Bucket EliminationAdaptive Consistency (Dechter & Pearl, 1987)

=

¹

Page 30: 1 Directional consistency Chapter 4 ICS-179 Spring 2010 ICS 179 - Graphical models.

Spring 2010 ICS 179 - Graphical models 33

dordering along widthinduced -(d)

, *

*

w

(d)))exp(w O(n :space and Time

E

D

A

C

B

}2,1{

}2,1{}2,1{

}2,1{ }3,2,1{

:)(AB :)(BC :)(AD :)(

BE C,E D,E :)(

ABucketBBucketCBucketDBucketEBucket

A

E

D

C

B

:)(EB :)(

EC , BC :)(ED :)(

BA D,A :)(

EBucketBBucketCBucketDBucketABucket

E

A

D

C

B

|| RDBE ,

|| RE

|| RDB

|| RDCB

|| RACB

|| RAB

RA

RCBE

Bucket EliminationAdaptive Consistency (Dechter & Pearl, 1987)

Page 31: 1 Directional consistency Chapter 4 ICS-179 Spring 2010 ICS 179 - Graphical models.

Spring 2010 ICS 179 - Graphical models 34

The Idea of Elimination

project and join E variableEliminate

ECDBC EBEDDBC RRRR

3

value assignment

D

B

C

RDBC

eliminating E

Page 32: 1 Directional consistency Chapter 4 ICS-179 Spring 2010 ICS 179 - Graphical models.

Spring 2010 ICS 179 - Graphical models 35

Adaptive-consistency, bucket-elimination

Page 33: 1 Directional consistency Chapter 4 ICS-179 Spring 2010 ICS 179 - Graphical models.

Spring 2010 ICS 179 - Graphical models 36

Properties of bucket-elimination(adaptive consistency)

Adaptive consistency generates a constraint network that is backtrack-free (can be solved without dead-ends).

The time and space complexity of adaptive consistency along ordering d is respectively, or O(r k^(w*+1)) when r is the number of constraints.

Therefore, problems having bounded induced width are tractable (solved in polynomial time)

Special cases: trees ( w*=1 ), series-parallel networks (w*=2 ), and in general k-trees ( w*=k ).

1*w1*w (k) O(n),(2k) O(n

Page 34: 1 Directional consistency Chapter 4 ICS-179 Spring 2010 ICS 179 - Graphical models.

Spring 2010 ICS 179 - Graphical models 37

Solving Trees (Mackworth and Freuder, 1985)

Adaptive consistency is linear for trees andequivalent to enforcing directional arc-consistency (recording only unary constraints)

Page 35: 1 Directional consistency Chapter 4 ICS-179 Spring 2010 ICS 179 - Graphical models.

Spring 2010 ICS 179 - Graphical models 38

Summary: directional i-consistency

DCBR

A

E

CD

B

D

CB

E

D

CB

E

DC

B

E

:A

B A:B

BC :C

AD C,D :D

BE C,E D,E :E

Adaptive d-arcd-path

DBDC RR ,CBR

DRCRDR

Page 36: 1 Directional consistency Chapter 4 ICS-179 Spring 2010 ICS 179 - Graphical models.

Spring 2010 ICS 179 - Graphical models 39

Variable Elimination

Eliminate variablesone by one:“constraintpropagation”

Solution generation after elimination is backtrack-free

3