Chapter 4 ICS-275 Fall 2010 Fall 2010 ICS 275 - Constraint - - PowerPoint PPT Presentation

chapter 4
SMART_READER_LITE
LIVE PREVIEW

Chapter 4 ICS-275 Fall 2010 Fall 2010 ICS 275 - Constraint - - PowerPoint PPT Presentation

Directional consistency Chapter 4 ICS-275 Fall 2010 Fall 2010 ICS 275 - Constraint Networks 1 Tractable Tractable classes classes Fall 2010 2 Backtrack-free search: or What level of consistency will guarantee global- consistency


slide-1
SLIDE 1

1

Directional consistency Chapter 4

ICS-275 Fall 2010

Fall 2010 ICS 275 - Constraint Networks

slide-2
SLIDE 2

Fall 2010 2

Tractable Tractable classes classes

slide-3
SLIDE 3

Fall 2010 ICS 275 - Constraint Networks 3

Backtrack-free search: or

What level of consistency will guarantee global- consistency

Backtrack free and queries: Consistency, All solutions Counting

  • ptimization
slide-4
SLIDE 4

Fall 2010 ICS 275 - Constraint Networks 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

slide-5
SLIDE 5

Fall 2010 ICS 275 - Constraint Networks 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 After DAC:

D1= {white},

D2={green,white,black},

D3={white,blue},

D4={white,blue,black}

slide-6
SLIDE 6

Fall 2010 ICS 275 - Constraint Networks 6

Algorithm for directional arc- consistency (DAC)

) (

2

ek O

 Complexity:

slide-7
SLIDE 7

Fall 2010 ICS 275 - Constraint Networks 7

Directional arc-consistency may not be enough 

Directional path-consistency

slide-8
SLIDE 8

Fall 2010 ICS 275 - Constraint Networks 8

Algorithm directional path consistency (DPC)

slide-9
SLIDE 9

Fall 2010 ICS 275 - Constraint Networks 9

Example of DPC

     

E D A C B

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

slide-10
SLIDE 10

Fall 2010 ICS 275 - Constraint Networks 10

Directional i-consistency

slide-11
SLIDE 11

Fall 2010 ICS 275 - Constraint Networks 11

Algorithm directional i-consistency

slide-12
SLIDE 12

Fall 2010 ICS 275 - Constraint Networks 12

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
  • ver all orderings

Finding w*

  • NP-complete

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

E D A C B

slide-13
SLIDE 13

Fall 2010 ICS 275 - Constraint Networks 13

Induced-width

slide-14
SLIDE 14

Fall 2010 ICS 275 - Constraint Networks 14

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.

slide-15
SLIDE 15

Fall 2010 ICS 275 - Constraint Networks 15

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

slide-16
SLIDE 16

Fall 2010 ICS 275 - Constraint Networks 16

Greedy algorithms for induced-width

  • Min-width ordering
  • Max-cardinality ordering
  • Min-fill ordering
  • Chordal graphs
slide-17
SLIDE 17

Fall 2010 ICS 275 - Constraint Networks 17

Min-width ordering

slide-18
SLIDE 18

Fall 2010 ICS 275 - Constraint Networks 18

Min-induced-width

slide-19
SLIDE 19

Fall 2010 ICS 275 - Constraint Networks 19

Min-fill algorithm

 Prefers a node who adds the least

number of fill-in arcs.

 Empirically, fill-in is the best among the

greedy algorithms (MW,MIW,MF,MC)

slide-20
SLIDE 20

Fall 2010 ICS 275 - Constraint Networks 20

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

slide-21
SLIDE 21

Fall 2010 ICS 275 - Constraint Networks 21

Example

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

slide-22
SLIDE 22

Fall 2010 ICS 275 - Constraint Networks 22

Max-cardinality ordering

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

slide-23
SLIDE 23

Fall 2010 ICS 275 - Constraint Networks 23

Width vs local consistency: solving trees

slide-24
SLIDE 24

Fall 2010 ICS 275 - Constraint Networks 24

Tree-solving

) ( :

2

nk O complexity

slide-25
SLIDE 25

Fall 2010 ICS 275 - Constraint Networks 25

Width-2 and DPC

slide-26
SLIDE 26

Fall 2010 ICS 275 - Constraint Networks 26

Width vs directional consistency

(Freuder 82)

slide-27
SLIDE 27

Fall 2010 ICS 275 - Constraint Networks 27

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

slide-28
SLIDE 28

Fall 2010 ICS 275 - Constraint Networks 28

Adaptive-consistency

slide-29
SLIDE 29

Fall 2010 ICS 275 - Constraint Networks 29

Bucket E: E D, E  C Bucket D: D A Bucket C: C B Bucket B: B  A Bucket A: A C

width induced

  • *

*

w )) exp(w O(n : Complexity

contradiction

=

D = C B = A

Bucket Elimination

Adaptive Consistency (Dechter & Pearl, 1987)

=

slide-30
SLIDE 30

Fall 2010 ICS 275 - Constraint Networks 30

d

  • rdering

along width induced

  • (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 {

: ) ( A B : ) ( B C : ) ( A D : ) ( B E C, E D, E : ) ( A Bucket B Bucket C Bucket D Bucket E Bucket      

A E D C B

: ) ( E B : ) ( E C , B C : ) ( E D : ) ( B A D, A : ) ( E Bucket B Bucket C Bucket D Bucket A Bucket      

E A D C B

|| RD

BE ,

|| RE || RDB || RDCB || RACB || RAB RA RC

BE

Bucket Elimination

Adaptive Consistency (Dechter & Pearl, 1987)

slide-31
SLIDE 31

Fall 2010 ICS 275 - Constraint Networks 31

The Idea of Elimination

project and join E variable Eliminate   

EC DBC EB ED DBC

R R R R

3 value assignment

D B C RDBC

eliminating E

slide-32
SLIDE 32

Fall 2010 ICS 275 - Constraint Networks 32

Variable Elimination

Eliminate variables

  • ne by one:

“constraint propagation” Solution generation after elimination is backtrack-free

3

slide-33
SLIDE 33

Fall 2010 ICS 275 - Constraint Networks 33

Adaptive-consistency, bucket-elimination

slide-34
SLIDE 34

Fall 2010 ICS 275 - Constraint Networks 34

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,

  • r 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 * w 1 * w

(k) O (n ), (2 k) O (n

 

slide-35
SLIDE 35

Fall 2010 ICS 275 - Constraint Networks 35

Back to Induced width

 Finding minimum-w* ordering is NP-complete

(Arnborg, 1985)

 Greedy ordering heuristics: min-width, min-degree,

max-cardinality (Bertele and Briochi, 1972; Freuder 1982), Min-fill.

slide-36
SLIDE 36

Fall 2010 ICS 275 - Constraint Networks 36

Solving Trees

(Mackworth and Freuder, 1985)

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

slide-37
SLIDE 37

Fall 2010 ICS 275 - Constraint Networks 37

Summary: directional i-consistency

DCB

R

A E C D B

      

D C B E D C B E D C B E

: A B A : B B C : C A D C, D : D B E C, E D, E : E       

Adaptive d-arc d-path

D B D C R

R ,

CB

R

D

R

C

R

D

R

slide-38
SLIDE 38

Fall 2010 ICS 275 - Constraint Networks 38

Relational consistency (Chapter 8)

 Relational arc-consistency  Relational path-consistency  Relational m-consistency

 Relational consistency for

Boolean and linear constraints:

  • Unit-resolution is relational-arc-consistency
  • Pair-wise resolution is relational path-

consistency

slide-39
SLIDE 39

Fall 2010 ICS 275 - Constraint Networks 39

Sudoku’s propagation

 http://www.websudoku.com/  What kind of propagation we do?

slide-40
SLIDE 40

Sudoku

Each row, column and major block must be alldifferent “Well posed” if it has unique solution: 27 constraints

2 3 4 6

2

Constraint propagation

  • Variables: 81 slots
  • Domains =

{1,2,3,4,5,6,7,8,9}

  • Constraints:
  • 27 not-equal
slide-41
SLIDE 41

Sudoku

Each row, column and major block must be alldifferent “Well posed” if it has unique solution