Download presentation
Presentation is loading. Please wait.
1
Directional consistency Chapter 4
Roberto Posenato November 2018
2
background November 2018
3
Ordered graphs and Induced-Width
d1= F,E,D,C,B,A d2= A,B,C,D,E,F November 2018
4
Ordered graphs and Induced-Width
Ordering d1= F,E,D,C,B,A d2= A,B,C,D,E,F d3= F,D,C,B,A,E Ordered graph w.r.t. a d = node in line from the last (top) to the first (bottom) Parents of v = {adjacent nodes preceding v in the ordering} Width of a node in an order = #Parents in an ordering Width of an ordering d = w(d) = max width over all nodes Width of a graph = min width over all orderings November 2018
5
Ordered graphs and Induced-Width
Induced Graph (G*,d) of an ordered one (G,d) From top to bottom, all parents of a node are connected. (dashed edges) Induced width w*(d) The width in the ordered induced graph Induced-width w* min induced-width over all orderings November 2018
6
Ordered graphs and Induced-Width
Interesting properties A graph is a tree iff has induced width of 1 A greedy algorithm determines the min width of a graph in time O(n2) Finding the minimum induced width of a graph is NP-hard (decision version is NP-complete (Arnborg, 1985)) Check the book for two greedy algorithms! November 2018
7
Backtrack-free search
Previously, we have seen that a globally consistent network guarantees backtrack-free search Globally consistency is based bounding the number of variables that participate in an inference An orthogonal approach is to restrict inference relative to a given ordering of the variables (used also for the search of solutions) November 2018
8
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 We want to determine solutions considering order (x1, x2, x3, x4) After DAC: D1= {white}, D2={green, white, black}, D3={white, blue}, D4={white, blue, black} November 2018
9
Directional arc-consistency: another restriction on propagation
D1= {white}, D2= {green, white, black}, D3= {white, blue}, D4= {white, blue, black} is (x1, x2, x3, x4) directional arc-consistent but it is not arc-consistent! (Check R31!) November 2018
10
Algorithm for directional arc-consistency (DAC)
<= From last variable! Main advantage: each constraint is processed exactly one time! Complexity: O(e k2) (same as full arc-consistency) November 2018
11
Directional arc-consistency may not be enough Directional path-consistency
4 variables, common domain D = {red, blue} Rij = {(ai, aj) | ai ≠ aj } We want to determine solutions considering order d = (x1, x2, x3, x4) The network is already full arc-consistent By definition, it is also d-directional arc-consistent It is sufficient to guarantee a backtrack-free search for a consistent solution? NO! Try to find an assignment for x3! Higher levels of consistency may be necessary! November 2018
12
Algorithm directional path consistency (DPC)
The complexity is equal to the full path consistency problem November 2018
13
Directional path-consistency for graph-coloring
4 variables, common domain D = {red, blue} Rij = {(ai, aj) | ai ≠ aj } limited to R1,2, R2,3,, R3,4, and R1,4 We want to determine solutions considering order d = (x1, x2, x3, x4) Enforcing full path-consistency requires adding constraint R1,3 = {x1 = x3} and R2,4 = {x2 = x4} Directional path-consistency relative to d requires constraint R1,3 = {x1 = x3} This allow a solution to be assembled along d without encountering dead-ends. November 2018
14
Example of DPC Try it yourself: November 2018
15
Directional i-consistency
Till now directional consistency was defined considering binary network Directional i–consistency must account for constraints with larger scopes November 2018
16
Algorithm directional i-consistency
November 2018
17
Graphs Aspects of Directional Consistency
During DPC, a variable x only affects the constraints between a pair of earlier variables A new constraint (and a new arc) may be added to the graph DPC recursively connects the parents of every two nodes in the ordered constraint network The induced graph (G*,d) contains the graph generated by DPC along d, and the graph generated by directional i-consistency along d November 2018
18
Refined Complexity using induced-width
Consequently we wish to have ordering with minimal induced-width… but Finding min induced-width ordering is NP-complete November 2018
19
Greedy algorithms for induced-width
Min-induced-width ordering Max-cardinality ordering Min-fill ordering Chordal graphs November 2018
20
Min-induced-width November 2018
21
Width vs local consistency
We have seen examples where DPC changes a network so that a solution can be found in a backtrack-free manner… but there are also many examples in which even the full path-consistency is not sufficient for finding solutions in a backtrack-free manner November 2018
22
Width vs local consistency
It would be nice to have a criterion that could say, in advance, the level of consistency sufficient for finding solutions in a backtrack-free manner! Well, such criterion exists and it is based on induced width of the network graph Here we consider only two simple cases November 2018
23
Width vs local consistency: induced width 1
A constraint graph has width 1 iff is a tree Let d an ordering having width 1. This means that the value of a variable may depend on the value of only one previous variable in d. November 2018
24
Tree-solving algorithm
November 2018
25
Width vs local consistency: induced width 2
It is possible to find a solution in a backtrack free way also for graph having width 2 It is necessary to use both DAC and DPC Let d an ordering having width 2. This means that the value of a variable may depend on the values of two previous variables in d. November 2018
26
Width vs local consistency: induced width 2
BE CAREFUL! If a graph has width 2 BUT it is not directional path-consistent, then DPC may make it adding arcs! Adding arcs may increase the width! So, for having a backtrack free searching it is necessary that the induced width must be 2! Theorem 4.6 A binary constraint network having an induced width of 2 can be solved in O(n k3) Modifying algorithm MIN-INDUCED-WIDTH, it is possible to say if a graph has induced width of 2 in linear time! November 2018
27
Width vs directional consistency (Freuder 82)
November 2018
28
Width vs directional consistency
DAC and width-1 DPC and width-2 DIC_i and with-(i-1) backtrack-free representation November 2018
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.