Arnaud Lallouet, Jimmy H.M. Lee and Terrence W.K. Mak

advertisement
Consistencies for Ultra-Weak Solutions in
Minimax Weighted CSPs Using the Duality Principle
Arnaud Lallouet1, Jimmy H.M. Lee2, and Terrence W.K. Mak2
1Université
de Caen, GREYC, Caen, France
Arnaud.Lallouet@unicaen.fr
2The Chinese University of Hong Kong, Shatin, N.T., Hong Kong
{jlee,wkmak}@cse.cuhk.edu.hk
1
Introduction
• Motivation
• Minimax Weighted CSPs
– Ultra-weakly solved, weakly solved, and strongly solved
• Consistency Techniques
1. Lower Bound formulations
2. Upper Bounds using duality principle
3. Strengthening lower and upper bounds by adopting
WCSP consistencies
• Performance Evaluations
• Conclusion & Future Work
2
Radio Link Frequency Assignment Problems
• Soft Constrained Problems
– Model: Weighted CSPs/COPs
• CELAR Problem [Cabon et al., 1999]:
– Given a set S of radio links located
between pairs of sites
– Assign frequencies to S:
• Prevent/Minimize interferences
– Involves two types of constraints
3
CELAR Problem: http://www.inra.fr/mia/T/schiex/Doc/CELAR.shtml
Radio Link Frequency Assignment Problems
D
Communication
from A to B
A
B
Communication
from B to A
C
4
Radio Link Frequency Assignment Problems
D
Technological constraints
|fAB - fBA| = constant
B
C
fAB
fBA
A
between
two sites
5
Radio Link Frequency Assignment Problems
D
B
fAB
fBA
fBC
fCB
C
between links close to
each other
A
Constraints to prevent interferences:
e.g. |fAB - fBC| > threshold
6
Sometimes the problem is unfeasible…
Radio Link Frequency Assignment Problems
D
B
fAB
fBA
fBC
fCB
C
between links close to
each other
A
Soft constraints to minimize interferences:
e.g. max(0, threshold - |fAB - fBC|)
7
Radio Link Frequency Assignment Problems
insecure
region
Subject to
control by
adversaries
fBD
D
fDB
Minimize
interferences?
B
C
Minimize
interferences?
A
8
Radio Link Frequency Assignment Problems
• Nature of the problem:
– Optimization: Minimizing interferences
– Adversaries: Controlling parts of the links
• We can solve:
1. Many COPs/WCSPs
• Each perform optimization on one combination
of adversary’s frequency adjustment
2. Multiple QCSPs
• Reducing into a decision problem
9
Radio Link Frequency Assignment Problems
• Viewing in game theory:
– Two-person zero-sum turn-based game
• Allis [1994] proposes three solving levels:
– Ultra-weakly solved
• Best-worst case for a player
– Weakly solved
Stronger
• Strategies for a player to achieve his/her best against
all possible moves by his/her opponent
– Strongly solved
• Strategies for a player to achieve his/her best against
all legal moves
10
Radio Link Frequency Assignment Problems
insecure
region
Assume worst
case adversary
fBD
fDB
Minimize
interferences a
priori?
Minimize
interferences a
posteriori?
A
D
B
Minimize
interferences a
posteriori?
C
Minimize
interferences a
priori?
Finding frequency assignments for the
worst possible case!
11
Minimax Weighted CSPs
To avoid multiple sub-problems, we propose:
Minimax Weighted CSPs
=
Min/Max
+ Soft Constraints + CSPs
Quantifiers
≈
Weighted CSPs + Quantified CSPs
12
Minimax Weighted CSPs
• Minimax Weighted CSP
[Lee et al., 2011]
Soft constraints
– Variables:
• x1, x2, x3
– Domains:
• D1=D3 ={a,b,c}, D2 = {a,b}
– Soft Constraints:
– Global Upper Bound k: 11
– Valuation structure:
• ([0..k] , ⊕, ≤ )
– Quantifier Sequence:
• Q1 = max,
• Q2 = min,
• Q3 = max
x1
Cost
x2
Cost
x3
Cost
a
4
a
0
a
5
b
0
b
2
b
0
c
0
c
0
Unary constraint
x2
x3
Cost
x1
x2
Cost
a
a
1
a
a
0
a
b
1
a
b
0
a
c
0
b
a
1
b
a
0
b
b
0
b
b
2
c
a
0
b
c
0
c
b
1
Binary constraint
13
A-Cost for Sub-problems
max x1
min x2
max x3
a
a
x1
Cost
x2
Cost
x3
Cost
a
4
a
0
a
5
b
0
b
2
b
0
c
0
c
0
b
a
b
x3
Cost
x1
x2
Cost
a
1
a
a
0
a
b
1
a
b
0
a
c
0
b
a
1
b
a
0
b
b
0
b
b
2
c
a
0
b
c
0
c
b
1
x2
ba
a b
c
a b c
10 5 4 11 8 6
7 2
4 ⊕ 0 ⊕ 5 ⊕ 1 ⊕ 0 = 10
1
7
a b c a b c
c
4
2
a
a b
6
1
c
0
b
a b c
8
5
3
14
max(10,7,6)=10
max x1
a
min(10,11) = 10
a
min x2
max x3
7
a
b
max(10,5,4) = 10
11
4
11 8
6
a
7
6
a b
c
a b c
7
1
7
2
6
b
7
a b c a b c
10 5
c
b
4
a b
2
6
1
b
8
c
0
a b c
8
5
3
15
A-Cost for Sub-problems
max(10,7,6)=10
max x1
a
min(10,11) = 10
min x2
a
max x3
7
a
b
max(10,5,4) = 10
11
a b c a b c
c
b
7
a b
6
a
b
7
c
a b c
b
8
6
a b
c
a b c
10 5 4 11 8 6
7 2 1 7 4 2 6 1 0
8
Best-worst case (ultra-weak solution): {x1 = a, x2 = a, x3 = a}
A-cost for the problem: 10
5
3
16
Algorithms for Ultra-Weak Sol.
Previous Work [Lee et al., 2011]:
1. Alpha-beta prunings
–
Maintains two bounds
•
•
Alpha lb: Best costs for max players
Beta ub: Best costs for min players
2. Suggest Two sufficient conditions to
perform prunings and backtracks
Computing the
exact A-cost is hard!
Theorem:
(NP-hard)
For the set S of sub-problems P ’, where vi is
assigned to xi:
∀P ’ ∈ S, A-cost(P ’) ≥ ub (Condition 1), or
∀P ’ ∈ S, A-cost(P ’) ≤ lb (Condition 2)
We can prune or backtrack according to the
table:
A-cost(P ’)
≥ ub
≤ lb
Qi = min
prune vi
backtrack
Qi = max
backtrack prune vi
17
Sufficient Conditions for Prunings
How to compute efficiently?
Corollary:
For the set of sub-problems P ’ obtained from P, where vi is assigned to xi:
A-cost(P ’) ≥ lbaf(P,xi = vi) ≥ ub (Condition 1), or
A-cost(P ’) ≤ ubaf(P,xi = vi) ≤ lb (Condition 2)
We can prune or backtrack according to the table below:
lbaf(P,xi = vi) ≥ ub
Qi = min prune vi
Qi = max backtrack
ubaf(P,xi = vi) ≤ lb
backtrack
prune vi
18
Consistencies
• Local consistency enforcement
– Make implicit costs information explicit
• E.g. bounds, prunings/backtracks
• Consistencies composes of 3 parts:
1. Lower bound estimation: lbaf(P,xi = vi)
– NC & AC version
2. Upper bound estimation: ubaf(P,xi = vi)
– Two dualities: DC & DQ
3. Strengthening lower & upper estimation by
projections/extensions
– Adopt WCSP consistencies: NC*, AC*, FDAC*
– Naming convention:
– DC-NC[proj-NC*], DQ-AC[proj-FDAC*]
19
Lower Bound Estimation
• Lower bound estimation: lbaf(P,xi = vi)
• Consider a simplified problem:
– Only unary constraints, i.e. no binary
Lemma:
The A-cost of an MWCSP P with only unary constraints is equal to:
Q1C1 ⊕ Q2C2 ⊕ … ⊕ QnCn
x1
Cost
x2
Cost
a
4
a
8
b
1
b
6
c
2
c
1
Q1 = max
⊕
Q2 = min
⊕
x3
Cost
a
1
b
3
Q3 = max
=8
20
Lower Bound Estimation
• Lower bound (NC version): nclb(P,xi = vi)
CØ ⊕ (⊕j<i min Cj ) ⊕ Ci(vi) ⊕ (⊕i<j QjCj )
• Example:
– nclb(P,x1 = b)
x1
Cost
x2
Cost
a
4
a
8
b
1
b
6
c
2
c
1
Q1 = max
– nclb(P,x2 = a)
For all sub-problems
where x2 = a
Q2 = min
x1
Cost
x2
Cost
a
4
a
8
b
1
b
6
c
2
c
1
Q1 = max
Q2 = min
x3
Cost
a
1
b
3
Q3 = max
x3
Cost
a
1
b
3
Q3 = max
21
Lower Bound Estimation
• Lower bound (AC version): aclb[Cij](P,xi = vi)
– nclb(P,xi = vi) + a binary constraint Cij
• Example:
– aclb(P,x1 = b)
x1
x2
Cost
a
a
17
5
a
b
13
3
b
a
11
2
b
b
16
9
x3
Cost
x1
Cost
x2
Cost
a
4
a
4
a
8
b
1
b
1
b
6
c
2
Q1 = max
Q2 = min
Q3 = max
22
Upper Bound Estimation
• Upper bound ubaf(): Duality of Constraints
Definition of Dual Problem:
Given an MWCSP P = (X,D,C,Q,k).
The dual problem of P is PΤ = (X,D,CΤ,QΤ,k) where:
1. Quantifier: Qi = max → QΤi= min & Qi = min → QΤi= max
2. Cost: For a complete assignment l, cost(l) = -1*costΤ(l)
Construction
Method:
Q1 = max
Q1 = min
x1
Cost
a
4
b
1
Q2 = min
Q2 = max
-1
x1
Cost
a
-4
b
-1
x1
x2
Cost
a
a
-7
a
b
-3
1
b
a
-1
6
b
b
-6
x1
x2
Cost
a
a
7
a
b
3
b
a
b
b
-1
23
Upper Bound Estimation
• Upper bound: Duality of Constraints (DC)
– Corollary:
A lbaf(PΤ,xi = vi) on the dual multiply by -1 is an
ubaf(P,xi = vi) for the original problem
2
max x1
Upper bound ub : 10
Lower bound lb : 1
-2
c
b
min x1
1
2
b
a
min x2
2
max x3
10
a b
c
0
1
2
a b c
0
10 10
1
0
max x2
11
a b c
1
0
a b c
0
11 10
2 = b) ≤ -11
-2
Τ,x = b) ≥-1 11
lbaf(P
2
b
b
a
a
-2
min x3
c
bΤ
lbaf(P ,x
→ -1 *
b
a
Upper bound ub : -1
Lower bound lb : -10
a b
c
0
-1
-2
-1
-10
a b c
0
-10 -10
-11
a b c
0
-1
0
a b c
0
24 10
-11
Upper Bound Estimation
• Following the corollary:
• We implement ubaf(P,xi = vi) by:
– NC version: nclb(PΤ,xi = vi)
– AC version :aclb[Cij](PΤ,xi = vi)
• Advantage for Duality of Constraints (DC)
– Reuse the same lbaf()
– New lbaf() can be used as ubaf()
25
Upper Bound Estimation
• Upper bound: Duality of Quantifiers (DQ)
• Creating/Writing new ubaf() via:
• Flipping quantifiers of existing lbaf()
• Example:
– nclb(P,x2 = a)
For all sub-problems
where x2 = a,
guarantee a lower bound
– ncub(P,x2 = a)
For all sub-problems
where x2 = a,
guarantee an upper bound
x1
Cost
x2
Cost
a
4
a
8
b
1
b
6
c
2
c
1
Q1 = max
Q2 = min
x1
Cost
x2
Cost
a
4
a
8
b
1
b
6
c
2
c
1
Q1 = max
Q2 = min
x3
Cost
a
1
b
3
Q3 = max
x3
Cost
a
1
b
3
Q3 = max
26
Upper Bound Estimation
• Upper bound: Duality of Quantifiers (DQ)
• Creating/Writing new ubaf() via:
• Flipping quantifiers of existing lbaf()
• Immediate attempt:
CØ ⊕ (⊕j<i min Cj ) ⊕ Ci(vi) ⊕ (⊕i<j QjCj )
min to max
CØ ⊕ (⊕j<i max Cj ) ⊕ Ci(vi) ⊕ (⊕i<j QjCj )
• Problem: Binary constraints add costs!
27
Upper Bound Estimation
• Upper bound: Duality of Quantifiers (DQ)
• Creating/Writing new ubaf() via:
•
Flipping quantifiers of existing lbaf()
• To fix:
CØ ⊕ (⊕j<i max Cj ) ⊕ Ci(vi) ⊕ (⊕i<j QjCj )
• Further add maximum costs for constraints
which are not covered in the function
• For implementation:
1. We pre-compute and add these maximum costs
before search
2. We maintain the added sum during search
28
Consistencies
• We have methods to compute:
– lbaf(): NC & AC version
• Standard approximation analysis
– ubaf(): Two dualities
• Inspired from QCSP consistencies and
algorithms
• [Bordeaux and Monfroy, 2002]
• [Gent et al., 2005]
29
Consistencies
• Can we further strengthen both estimation
functions?
• Utilize projections & extensions conditions
– WCSP consistencies: NC*, AC*, and FDAC*
[Cooper et al., 2010]
• For Duality of Constraints (DC) consistencies
– Conditions are enforced in both the original and
dual problem
30
Performance Evaluation
• Compare and study different consistency notions
– DQ-NC[proj-NC*], DQ-AC[proj-AC*], DQ-AC[proj-FDAC*]
– DC-NC[proj-NC*], DC-AC[proj-AC*], DC-AC[proj-FDAC*]
• Benchmarks:
1. Randomly Generated Problems
2. Graph Coloring Game
3. Generalized Radio Link Frequency Assignment Problem
• Each set of parameters:
– 20 instances & taking average result
– If there are unsolved instances, we state the #solved
besides runtime
• Compare our results against:
– Alpha-beta pruning
– QeCode: A solver for solving QCOP+
31
Performance Evaluation
Randomly Generated Problems [Lee et al.,2011]
– (n,d,p): (# of vars, domain size, constraint density)
– Integer costs of a binary constraint
• Generated uniformly in [0…30] for each tuple of assignments
– Probability
of 50%: a min (max resp.) quantifier
Duality of Constraints
Extracts
costs
from900s
two different
– Time
limit:
copies of constraints (original and
dual) and resolve the issue
Stronger projection/extension
We may:
•Strengthening lbaf() (ubaf() resp.)
•Weakening ubaf() (lbaf() resp.)
32
Conclusion
• Define and implement various
consistency notions for MWCSPs
1. Lower bound by costs estimations
2. Upper bound by duality principle
3. Strengthening lower & upper bound
estimation functions:
• Adopting projection/extension conditions in
WCSP consistencies
• Discussions on our solving techniques
on the two other stronger solutions 33
Related Work
• Related CSP frameworks tackling
adversaries:
– Stochastic CSPs [Walsh, 2002]
– Adversarial CSPs [Brown et al., 2004]
– QCSP+/QCOP+ [Benedetti et al., 2007]
[Benedetti et. al, 2008]
• Other related frameworks:
– Bi-level Programming
– Plausibility-Feasibility-Utility framework
[Pralet et al., 2009]
34
Future Work
• Consistency algorithms:
– High-arity Soft Table Constraints, and
– Global Soft Constraints
• Theoretical comparisons on different
consistency notions
• Algorithms tackling stronger solutions
• Online & Distributed Algorithms
• Value ordering heuristics
– ICTAI 2012
35
Q&A
36
Performance Evaluation
Graph Coloring Game [Lee et al.,2011]
– Two player zero-sum games
• Writing numbers of nodes
– (v,c,d): (# of vertices, # allowed numbers, edge density)
– Turns:
Similar results
• Odd/Even numbered turns - Player 1/Player 2
→ A series of alternating quantifiers
– Time limit: 900s
37
Performance Evaluation
Generalized Radio Link Frequency Assignment
– Designed according to two CELAR sub-instances
– Minimize interference beforehand
– (i,n,d,r): (CELAR sub-instance index, # of links, #
of allowed frequencies, ratio of adversary links)
– Time limit: 7200s
Projection/extension in FDAC*
• Slightly improves the search only
• Quantifier info. not considered
38
Algorithms for Stronger Sol.
• Solution Size
– Ultra-weak: O(n)
– Weak: O((n - m)dm)
– Strong: O(dn)
• Where:
– # of variables: n
– # of adversary variables: m
– Maximum domain size: d
• Ultra-weak solutions are linear
39
Algorithms for Stronger Sol.
•
Pruning Conditions
–
•
A sound pruning condition when solving a
weaker solution may not hold in stronger
ones
Invalid:
•When finding weak solutions
•Adversary max player
Reason:
–
Theorem:
Removal of the assumption of optimal/perfect
plays
Invalid:
•When finding weak solutions
•Adversary min player
For the set S of sub-problems P ’, where vi is
assigned to xi:
∀P ’ ∈ S, A-cost(P ’) ≥ ub (Condition 1), or
∀P ’ ∈ S, A-cost(P ’) ≤ lb (Condition 2)
We can prune or backtrack according to the
table:
A-cost(P ’)
≥ ub
≤ lb
Qi = min
prune vi
backtrack
Qi = max
backtrack prune vi
40
Relations with complexity classes
• Weighted CSPs:
– NP-hard
Assumption: P ≠ PSPACE
• Quantified CSPs:
– PSPACE-complete
Theorem:
– Finding the truthfulness of
QCSPs can be reduced (by
Karp reduction) to finding
the A-Cost of MWCSPs
→MWCSPs:
– PSPACE-hard
41
Transforming MWCSP to QCOP
• Theorem:
– An MWCSP P can be transformed into a
QCOP P ’. The A-cost of P can be found
by solving the optimal strategy of P ’.
• Proof (Sketch):
– Using ‘Soft As Hard’ approach [Petit et.
al, 2001]
• Transform soft constraints into hard
constraints
42
Graph Coloring Game (GCG)
Owned by B
Maximize
costs
Owned by A
Owned by A
Owned by B
Player A
Minimize
costs
Player B
Owned by B
Owned by A
Owned by A
Owned by B
How do they play the game?
43
Graph Coloring Game
5/B
Write number
3 on node 1
Player A
6/A
Write number
6 on node 2
2/B
1/A
Player B
6
3
8/A
7/B
3/A
4/B
Game Cost: |3 - 6| = 3
44
Graph Coloring Game
5/B
6/A
2/B
1/A
Maximize
costs
6
3
Place 0
Gain a cost of 3
Place 3
No cost gain
Player A
What
should I do?
7/B
3/A
4/B
8/A
so on…
45
Graph Coloring Game
5/B
When the game
terminates…
6/A
5
2
1/A
2/B
3
6
What we want
to study…
9
1
7/B
5
3/A
8/A
0
4/B
Final Game Cost: 55
46
5/B
Approach 1:
6/A
1/A
2/B
8/A
7/B
3/A
4/B
so on…
6/A
0
0
1/A
0
Modeled and solved by
COP/ Weighted CSP
1/A
0
Modeled and solved by
COP/ Weighted CSP
0
3/A
0
Modeled and solved by
COP/ Weighted CSP
1
1
0
0
6/A
1/A
6/A
8/A
0
3/A
8/A
3/A
1
8/A
47
Approach 2:
Modeling GCG
5/B
6/A
1/A
2/B
7/B
8/A
3/A
4/B
1. Guess a threshold: 56
2. Generate a Quantified CSP [Bordeaux and Monfroy,
2002] which asks:
– Can player A finds numbers against player B’s moves
– s.t. Player A gets costs < 56?
48
Modeling GCG
• Approach 1:
– Number of COPs/ Weighted CSPs
constructed is exponential to the
possible numbers player B can write
• Approach 2:
– Generate Quantified CSPs based on the
objective function
49
x1
x2
Cost
a
a
5
a
b
3
b
a
10
b
b
9
x2
Cost
a
a
5
a
b
3
b
a
10
b
b
9
x3
Cost
x1
Cost
x2
Cost
a
4
a
4
a
8
b
1
b
1
b
6
c
2
Q1 = max
x1
NC
Q2 = min
Q3 = max
AC
Merge
x1
Cost
x2
Cost
a
4
a
8
b
1
b
6
x1
x2
Cost
x3
Cost
a
a
17
a
4
a
b
13
b
1
b
a
19
c
2
b
b
16
Q3 = max
Q1 = max Q2 = min
50
Original Problem
x1
Cost
a
4
b
1
x1
x2
Cost
a
a
7
a
b
3
b
a
1
b
b
6
Q1 = maxQ2 = min
Dual Problem
DC
x1
Cost
a
-4
b
-1
x1
x2
Cost
a
a
-7
a
b
-3
b
a
-1
b
b
-6
Q1 = min Q2 = max
51
Download