Assumption-based Pruning in Conditional CSP
description
Transcript of Assumption-based Pruning in Conditional CSP
IBM Labs in Haifa © 2005 IBM Corporation
Assumption-based Pruning in Conditional CSP
Felix Geller and Michael Veksler
2 © 2005 IBM Corporation
IBM Labs in Haifa
Outline
Conditional CSP (Mittal and Falkenhainer) Conditional CSP solution methods Activity CSP formulation MAC-based algorithm for ACSP Activity disjunction and implication Questions
3 © 2005 IBM Corporation
IBM Labs in Haifa
Describes CSP where not all variables are required to participate in a solution (V, VI, D,CC,CA)
Conditional CSP (Mittal and Falkenhainer)
The assigned variables are active variables A compatibility constraint is relevant if all its variables are active
vCincl
IVVv \Activity of a variable
is determined by activity constraint
sIs VVVV ,Given an assignment of values to
vCincl
An activity constraint: is relevant if C is relevant
An activity constraint is satisfied if v is active or C is not satisfied In a solution all relevant constraints have to be satisfied
Minimality requirement
4 © 2005 IBM Corporation
IBM Labs in Haifa
Existing approaches to solving Conditional CSPs
Reformulation Working directly on Conditional CSP representation
Main idea: maintain list of active variables and check/propagate constraints after their variables become active
[Mittal,Falkenhainer]: Backtrack search with conflicts recording [Gelle,Faltings]: At first determine variable activity status; for fixed
variable activity status CondCSP turns into CSP. [Sabin,Freuder,Wallace], [Gelle,Sabin]: invoke consistency techniques
(CondFC, CondMAC) directly on Conditional CSP representation Propagate constraints once their variables are active CondMAC proved to be superior over CondBT and CondFC
The limitation: constraint propagation has to wait until variables become active
5 © 2005 IBM Corporation
IBM Labs in Haifa
Activity CSP formulation (V, VI, VA,D,C,A)
Variable is active if either or is trueIVvv )(vA
Constraint is relevant if all its variables are active An assignment is a solution if all relevant constraints are
satisfied
AVvA )(IVVv \ A - activation conditions:
Each variable is dominated by some
IA VV Explicit activity variables
sIs VVVV ,Given an assignment of values to
6 © 2005 IBM Corporation
IBM Labs in Haifa
Early conflict detection: ey = true D(x)= D(y) = {0,…,4}ez = true D(x)= D(z) = {5,…,9}D(y) ∩ D(z) = Ø
ey ez = false Information flow from conditional variables to unconditional variables:
ey = true D(x)= D(y) = {0,…,4}ez = true D(x)= D(z) = {5,…,9}ey ez
D(X)= {0…9}
An ACSP problem
{true,false}
ey
{true,false}ez
{0,…,4}
y
{5,…,9}
z
{0,…,100}
x
= =
V
7 © 2005 IBM Corporation
IBM Labs in Haifa
Enabling early constraint propagation
Allow constraint propagation to modify variable domains before the constraint variables become active
ey ez
{0,…,4}
y
{5,…,9}
z
z[ey,ez]
{5,…,9}
Activity set
ezey
y[ey,ez]
{0,…,4}
Shadows
8 © 2005 IBM Corporation
IBM Labs in Haifa
Assumption-based decomposition
{0,…4} {5,…,9}
{true,false}
ey
{true,false}ez
y z
{0,…,100}
x
= =
x
{0,…,100}
ey ez
y
x[ey]
{0,…,4}
{0,…,100}
=
z
x[ez]
{5,…,9}
{0,…,100}
=
Collect assumptions (activity sets)
Create shadows
Group shadows and constraints into CSP sub-problems
9 © 2005 IBM Corporation
IBM Labs in Haifa
Shadow synchronization
y
x[ey]
z
x[ez]
{0,…,4} {5,…,9}
{0,…,100}
{0,…,100}
x
{0,…,100}
ey ez
{true,false} {true,false}
{0,…,4} {5,…,9}
ey ez = false
{3}
10 © 2005 IBM Corporation
IBM Labs in Haifa
Shadow synchronization
Two shadows of the same variable: x[AS1] and x[AS2]
If under the current partial solution, AS2 implies AS1 (AS1 is weaker than AS2 )
D(x[AS2]) D(x[AS2]) ∩ D(x[AS1]
If an empty domain results, some activity var in AS2 is false
If AS1 and AS2 are incomparable, but D(x[AS1]) ∩ D(x[AS2]) = Ø
Conclude that some var in AS1 U AS2 is false
11 © 2005 IBM Corporation
IBM Labs in Haifa
Preprocessing While there are unassigned variables
Select a variable and instantiate it Propagate constraints
While constraint queue is not empty Select and propagate a constraint Synchronize shadows Update constraint queue
Backtrack if failed
AMAC - Putting all things together
Compute constraints activity sets
Create shadows
Substitute constraints parameters with suitable shadows
Select an active variable
Activity inference Handle synchronization and
constraint propagation failures Combine activity deductions to
determine value of activity variables
12 © 2005 IBM Corporation
IBM Labs in Haifa
Experimental results - setting
Random Conditional CSP generator similar to the generator in [Sabin,Freuder,Wallace]
CSP over N variables with binary (compatibility) constraints Problem parameters:
))1|*(||/(|||*2 VVCdcCompatibility density
Compatibility satisfiability ||*||/# jic DDtupless
||/|\| VVVd Ia Activity density
||/|| iia DSs j
incl
ii vSv Activation satisfiability (for )
N=48, |VI|=12, sa=0.75, dc=0.15
13 © 2005 IBM Corporation
IBM Labs in Haifa
Experimental results – 1 activity cluster
14 © 2005 IBM Corporation
IBM Labs in Haifa
Experimental results – 4 activity clusters
15 © 2005 IBM Corporation
IBM Labs in Haifa
Experimental results – 36 independent activation conditions
16 © 2005 IBM Corporation
IBM Labs in Haifa
Experimental results – effect of clustering (sc=0.25)
17 © 2005 IBM Corporation
IBM Labs in Haifa
Activity disjunction
{0,…,100}
y
x[ey]
{0,…,4}
{0,…,4}
x
z
x[ez]
{5,…,9}
{5,…,9}
ey ez
V
{true,false} {true,false}
{12}{0,…,9}
18 © 2005 IBM Corporation
IBM Labs in Haifa
Activity implication
Implication constraints between activity variables induce equivalence between activity sets
ey ez {ey} ~ {ey, ez}
Equivalence allows to reduce the number of shadow variables
19 © 2005 IBM Corporation
IBM Labs in Haifa
Summary
Introduced Activity CSP – a variant of Conditional CSP formulation ACSP directly supports full constraint propagation
Activity MAC checks several activity assumptions in parallel Infers that an assumption is false if the constraint propagation fails
ACSP naturally captures clustering and activity disjunction Interpret activity disjunction and implication in terms of activity sets
and shadows operations Further improve propagation and information flow
AMAC substantially reduces number of backtracks and solution time on random benchmarks On easy problems adds overhead of shadow/assumption
manipulation
IBM Labs in Haifa © 2005 IBM Corporation
21 © 2005 IBM Corporation
IBM Labs in Haifa
Assumption-based decomposition Constraint Activity set
C1(x,ey)
C2(x,y)
C3(y,ez)
C4(x,z)
C5(y,z)
ey ez
y
zx
ey
ey
ez
ezey
x
ey ez
ez[ey]
x[ey]
y
zx[ez]
y[ey,ez]
z[ey,ez]