1
Directional consistency Chapter 4
ICS-275 Fall 2010
Fall 2010 ICS 275 - Constraint Networks
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
1
Fall 2010 ICS 275 - Constraint Networks
Fall 2010 2
Fall 2010 ICS 275 - Constraint Networks 3
Backtrack free and queries: Consistency, All solutions Counting
Fall 2010 ICS 275 - Constraint Networks 4
D4={white,blue,black} D3={red,white,blue} D2={green,white,black} D1={red,white,black} X1=x2, x1=x3,x3=x4
Fall 2010 ICS 275 - Constraint Networks 5
Fall 2010 ICS 275 - Constraint Networks 6
2
Complexity:
Fall 2010 ICS 275 - Constraint Networks 7
Directional arc-consistency may not be enough
Fall 2010 ICS 275 - Constraint Networks 8
Fall 2010 ICS 275 - Constraint Networks 9
} 2 , 1 { } 2 , 1 { } 2 , 1 { } 2 , 1 { } 3 , 2 , 1 {
Fall 2010 ICS 275 - Constraint Networks 10
Fall 2010 ICS 275 - Constraint Networks 11
Fall 2010 ICS 275 - Constraint Networks 12
DPC recursively connects parents in the ordered graph, yielding:
Width along ordering d, w(d):
Induced width w*(d):
induced graph
Finding w*
(Arnborg, 1985) but greedy heuristics (min-fill).
E D A C B
Fall 2010 ICS 275 - Constraint Networks 13
Fall 2010 ICS 275 - Constraint Networks 14
Fall 2010 ICS 275 - Constraint Networks 15
Consequently we wish to have ordering with minimal
Induced-width is equal to tree-width to be defined later. Finding min induced-width ordering is NP-complete
Fall 2010 ICS 275 - Constraint Networks 16
Fall 2010 ICS 275 - Constraint Networks 17
Fall 2010 ICS 275 - Constraint Networks 18
Fall 2010 ICS 275 - Constraint Networks 19
Fall 2010 ICS 275 - Constraint Networks 20
A graph is cordal if every cycle of length at
Finding w* over chordal graph is easy using
If G* is an induced graph it is chordal K-trees are special chordal graphs. Finding the max-clique in chordal graphs is
Fall 2010 ICS 275 - Constraint Networks 21
Fall 2010 ICS 275 - Constraint Networks 22
Fall 2010 ICS 275 - Constraint Networks 23
Fall 2010 ICS 275 - Constraint Networks 24
2
Fall 2010 ICS 275 - Constraint Networks 25
Fall 2010 ICS 275 - Constraint Networks 26
Fall 2010 ICS 275 - Constraint Networks 27
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
Adaptive-consistency: applies i-consistency
Fall 2010 ICS 275 - Constraint Networks 28
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
*
contradiction
=
D = C B = A
=
Fall 2010 ICS 275 - Constraint Networks 30
* *
} 2 , 1 { } 2 , 1 { } 2 , 1 { } 2 , 1 { } 3 , 2 , 1 {
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
Fall 2010 ICS 275 - Constraint Networks 31
EC DBC EB ED DBC
3 value assignment
D B C RDBC
eliminating E
Fall 2010 ICS 275 - Constraint Networks 32
3
Fall 2010 ICS 275 - Constraint Networks 33
Fall 2010 ICS 275 - Constraint Networks 34
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,
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
Fall 2010 ICS 275 - Constraint Networks 35
Finding minimum-w* ordering is NP-complete
Greedy ordering heuristics: min-width, min-degree,
Fall 2010 ICS 275 - Constraint Networks 36
(Mackworth and Freuder, 1985)
Fall 2010 ICS 275 - Constraint Networks 37
DCB
: A B A : B B C : C A D C, D : D B E C, E D, E : E
D B D C R
CB
D
C
D
Fall 2010 ICS 275 - Constraint Networks 38
Fall 2010 ICS 275 - Constraint Networks 39
Each row, column and major block must be alldifferent “Well posed” if it has unique solution: 27 constraints
2 3 4 6
{1,2,3,4,5,6,7,8,9}
Each row, column and major block must be alldifferent “Well posed” if it has unique solution