1 Consistencies for Ultra-Weak Solutions in Minimax Weighted CSPs Using the Duality Principle Arnaud...

Post on 16-Dec-2015

218 views 0 download

transcript

1

Consistencies for Ultra-Weak Solutions inMinimax Weighted CSPs Using the Duality Principle

Arnaud Lallouet1, Jimmy H.M. Lee2, and Terrence W.K. Mak2

1Université de Caen, GREYC, Caen, FranceArnaud.Lallouet@unicaen.fr

2The Chinese University of Hong Kong, Shatin, N.T., Hong Kong{jlee,wkmak}@cse.cuhk.edu.hk

2

IntroductionIntroduction• Motivation

• Minimax Weighted CSPs– Ultra-weakly solved, weakly solved, and strongly solved

• Consistency Techniques1. Lower Bound formulations2. Upper Bounds using duality principle3. Strengthening lower and upper bounds by adopting

WCSP consistencies

• Performance Evaluations

• Conclusion & Future Work

3

Radio Link Frequency Assignment ProblemsRadio 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

CELAR Problem: http://www.inra.fr/mia/T/schiex/Doc/CELAR.shtml

4

Radio Link Frequency Assignment ProblemsRadio Link Frequency Assignment Problems

A

B C

D

Communication from A to B

Communication from B to A

5

Radio Link Frequency Assignment ProblemsRadio Link Frequency Assignment Problems

A

B C

D

Technological constraints|fAB - fBA| = constant

fAB

fBA

between two sites

6

Radio Link Frequency Assignment ProblemsRadio Link Frequency Assignment Problems

A

B C

D

Constraints to prevent interferences:e.g. |fAB - fBC| > threshold

fAB

fBC

between links close to each otherfBA

fCB

Sometimes the problem is unfeasible…

7

Radio Link Frequency Assignment ProblemsRadio Link Frequency Assignment Problems

A

B C

D

Soft constraints to minimize interferences:e.g. max(0, threshold - |fAB - fBC|)

fAB

fBC

between links close to each otherfBA

fCB

8

Radio Link Frequency Assignment ProblemsRadio Link Frequency Assignment Problems

A

B C

DfBD

fDB

insecure regionSubject to

control by adversaries

Minimize interferences?

Minimize interferences?

9

• 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

Radio Link Frequency Assignment ProblemsRadio Link Frequency Assignment Problems

10

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

Stronger

Radio Link Frequency Assignment ProblemsRadio Link Frequency Assignment Problems

Our work

11

Radio Link Frequency Assignment ProblemsRadio Link Frequency Assignment Problems

A

B C

DfBD

fDB

insecure region

Minimize interferences a

priori?

Minimize interferences a

priori?

Assume worst case adversary

Finding frequency assignments for the worst possible case!

Minimize interferences a

posteriori?

Minimize interferences a

posteriori?

12

Soft Constraints

Minimax Weighted CSPsMinimax Weighted CSPs

Minimax Weighted CSPs

Weighted CSPs Quantified CSPs+

=

CSPs+Min/MaxQuantifiers

+

To avoid multiple sub-problems, we propose:

13

Minimax Weighted CSPsMinimax Weighted CSPs

• Minimax Weighted CSP [Lee et al., 2011]

– 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

a 4

b 0

c 0

x2 Cost

a 0

b 2

x2 x3 Cost

a a 1

a b 1

a c 0

b a 0

b b 2

b c 0

Soft constraintsx3 Cost

a 5

b 0

c 0

x1 x2 Cost

a a 0

a b 0

b a 1

b b 0

c a 0

c b 1

Unary constraint

Binary constraint

14

max x1

10 5 4 11 8 6 7 2 1 7 4 2 6 1 0 8 5 3

a b

c a b c a b c a b ca b c a b

b

c

b c

a b

a b a

a

min x2

max x3

A-Cost for Sub-problemsA-Cost for Sub-problemsx1 Cost

a 4

b 0

c 0

x2 Cost

a 0

b 2

x2 x3 Cost

a a 1

a b 1

a c 0

b a 0

b b 2

b c 0

x3 Cost

a 5

b 0

c 0

x1 x2 Cost

a a 0

a b 0

b a 1

b b 0

c a 0

c b 1

4 0 5 1 0 = ⊕ ⊕ ⊕ ⊕ 10

15

max(10,5,4) = 10 11 7 7 6 8

min(10,11) = 10 7 6

max(10,7,6)=10

max x1

10 5 4 11 8 6 7 2 1 7 4 2 6 1 0 8 5 3

a b

c a b c a b c a b ca b c a b

b

c

b c

a b

a b a

a

min x2

max x3

16

max x1

10 5 4 11 8 6 7 2 1 7 4 2 6 1 0 8 5 3

a b

c a b c a b c a b ca b c a b

b

c

b c

a b

a b a

a

min x2

max x3

max(10,5,4) = 10 11 7 7 6 8

min(10,11) = 10 7 6

max(10,7,6)=10

A-Cost for Sub-problemsA-Cost for Sub-problems

Best-worst case (ultra-weak solution): {x1 = a, x2 = a, x3 = a}

A-cost for the problem: 10

17

Algorithms for Ultra-Weak Sol.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

Theorem:

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 ≤ lbQi = min prune vi backtrac

k

Qi = max backtrack

prune vi

Computing the exact A-cost is hard! (NP-hard)

18

Sufficient Conditions for PruningsSufficient Conditions for Prunings

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 ubaf(P ,xi = vi) ≤ lb

Qi = min prune vi backtrack

Qi = max backtrack prune vi

How to compute efficiently?

19

ConsistenciesConsistencies• 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*]

20

Lower Bound EstimationLower 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

a 4

b 1

c 2

x2 Cost

a 8

b 6

c 1

x3 Cost

a 1

b 3

Q1 = max Q2 = min Q3 = max

⊕ ⊕ = 8

21

• Lower bound (NC version): nclb(P ,xi = vi)

• Example:– nclb(P ,x1 = b)

– nclb(P ,x2 = a)

Lower Bound EstimationLower Bound Estimation

x1 Cost

a 4

b 1

c 2

x2 Cost

a 8

b 6

c 1

x3 Cost

a 1

b 3

Q1 = max Q2 = min Q3 = max

x1 Cost

a 4

b 1

c 2

x2 Cost

a 8

b 6

c 1

x3 Cost

a 1

b 3

Q1 = max Q2 = min Q3 = maxFor all sub-problems

where x2 = a

CØ ⊕ (⊕j<i min Cj ) ⊕ Ci(vi) ⊕ (⊕i<j Qj Cj )

22

Lower Bound EstimationLower 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 Cost

a 4

b 1

x2 Cost

a 8

b 6

Q1 = max Q2 = min Q3 = max

x3 Cost

a 4

b 1

c 2

x1 x2 Cost

a a 5

a b 3

b a 2

b b 9

x1 x2 Cost

a a 17

a b 13

b a 11

b b 16

23

Upper Bound EstimationUpper 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:

x1 Cost

a 4

b 1x1 x2 Cost

a a -7

a b -3

b a -1

b b -6x1 Cost

a -4

b -1

x1 x2 Cost

a a 7

a b 3

b a 1

b b 6

-1-1

Q1 = max Q2 = min

Q2 = maxQ1 = min

24

Upper Bound EstimationUpper 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

max x1

c a b c a b c a b ca b

b

cb

a b a

2

min x2

max x3

2 1

2 10 1 11

0 1 0 0 11 100 2 1 0 10 10

Upper bound ub : 10Lower bound lb : 1

min x1

c a b c a b c a b ca b

b

cb

a b a

-2

max x2

min x3

-2 -1

-2 -10 -1 -11

0 -1 0 0 -11 100 -2 -1 0 -10 -10

Upper bound ub : -1Lower bound lb : -10

lbaf(P Τ,x2 = b) ≤ -11→ -1 * lbaf(P Τ,x2 = b) ≥ 11

25

Upper Bound EstimationUpper 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()

26

• Upper bound: Duality of Quantifiers (DQ)

• Creating/Writing new ubaf() via:• Flipping quantifiers of existing lbaf()

• Example:– nclb(P ,x2 = a)

– ncub(P ,x2 = a)

Upper Bound EstimationUpper Bound Estimation

x1 Cost

a 4

b 1

c 2

x2 Cost

a 8

b 6

c 1

x3 Cost

a 1

b 3

Q1 = max Q2 = min Q3 = max

x1 Cost

a 4

b 1

c 2

x2 Cost

a 8

b 6

c 1

x3 Cost

a 1

b 3

Q1 = max Q2 = min Q3 = max

For all sub-problems where x2 = a,

guarantee a lower bound

For all sub-problems where x2 = a,

guarantee an upper bound

27

• Upper bound: Duality of Quantifiers (DQ)• Creating/Writing new ubaf() via:

• Flipping quantifiers of existing lbaf()

• Immediate attempt:

• Problem: Binary constraints add costs!

Upper Bound EstimationUpper Bound Estimation

CØ ⊕ (⊕j<i min Cj ) ⊕ Ci(vi) ⊕ (⊕i<j Qj Cj )

min to max

CØ ⊕ (⊕j<i max Cj ) ⊕ Ci(vi) ⊕ (⊕i<j Qj Cj )

28

• Upper bound: Duality of Quantifiers (DQ)• Creating/Writing new ubaf() via:

• Flipping quantifiers of existing lbaf()

• To fix:

• 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 search2. We maintain the added sum during search

Upper Bound EstimationUpper Bound Estimation

CØ ⊕ (⊕j<i max Cj ) ⊕ Ci(vi) ⊕ (⊕i<j Qj Cj )

29

ConsistenciesConsistencies

• 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]

30

ConsistenciesConsistencies• 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

31

Performance EvaluationPerformance 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 Problems2. Graph Coloring Game3. 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+

32

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– Time limit: 900s

Performance EvaluationPerformance Evaluation

Stronger projection/extensionWe may:•Strengthening lbaf() (ubaf() resp.)•Weakening ubaf() (lbaf() resp.)

Duality of ConstraintsExtracts costs from two different copies of constraints (original and dual) and resolve the issue

33

ConclusionConclusion

• Define and implement various consistency notions for MWCSPs1. Lower bound by costs estimations2. Upper bound by duality principle3. Strengthening lower & upper bound

estimation functions: • Adopting projection/extension conditions in

WCSP consistencies

• Discussions on our solving techniques on the two other stronger solutions

34

Related WorkRelated 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]

35

Future WorkFuture 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

36

Q & AQ & A

37

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:

• Odd/Even numbered turns - Player 1/Player 2 → A series of alternating quantifiers

– Time limit: 900s

Performance EvaluationPerformance Evaluation

Similar results

38

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

Performance EvaluationPerformance Evaluation

Projection/extension in FDAC*• Slightly improves the search only

• Quantifier info. not considered

39

Algorithms for Stronger Sol.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

40

Algorithms for Stronger Sol.Algorithms for Stronger Sol.• Pruning Conditions

– A sound pruning condition when solving a weaker solution may not hold in stronger ones

• Reason:– Removal of the assumption of optimal/perfect

plays

Theorem:

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 ≤ lbQi = min prune vi backtrac

k

Qi = max backtrack

prune vi

Invalid:•When finding weak solutions•Adversary min player

Invalid:•When finding weak solutions•Adversary max player

41

Relations with complexity classesRelations with complexity classes

• Weighted CSPs:– NP-hard

• 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

Assumption: P ≠ PSPACE

42

Transforming MWCSP to QCOPTransforming 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

43

Graph Coloring Graph Coloring GameGame (GC (GCGG))

Maximize costs

Player A Player B

Minimize costs

Owned by A

Owned by A

Owned by A

Owned by A

Owned by B

Owned by B

Owned by B

Owned by B

How do they play the game?

44

Graph Coloring Graph Coloring GameGame

1/A 2/B

3/A 4/B

5/B 6/A

7/B

8/A

Player A Player B

Write number 3 on node 1

Write number 6 on node 2

3 6

Game Cost: |3 - 6| = 3

45

Graph Coloring Graph Coloring GameGame

1/A 2/B

3/A 4/B

5/B 6/A

7/B

8/APlayer A

3 6

so on…

Maximize costs

What should I

do?

Place 0

Gain a cost of 3Place 3

No cost gain

46

Graph Coloring Graph Coloring GameGame

1/A2/B

3/A 4/B

5/B 6/A

7/B8/A

3 6

5

Final Game Cost: 55

9

0

1

5 2When the game terminates…

What we want to study…

47

1/A 2/B

3/A 4/B

5/B 6/A

7/B8/A

1/A

3/A

6/A

8/A1

0

0

0

1/A

3/A

6/A

8/A1

0

0

1

so on…

Modeled and solved by COP/ Weighted CSP

Modeled and solved by COP/ Weighted CSP

1/A

3/A

6/A

8/A

0

0

0

0

Modeled and solved by COP/ Weighted CSP

Approach 1:

48

Modeling GCGModeling GCG

1/A 2/B

3/A 4/B

5/B 6/A

7/B 8/A

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?

Approach 2:

49

Modeling GCGModeling 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

50

x1 Cost

a 4

b 1

Q1 = max

x2 Cost

a 8

b 6

Q2 = min

Q3 = max

x3 Cost

a 4

b 1

c 2

x1 x2 Cost

a a 5

a b 3

b a 10

b b 9

x1 x2 Cost

a a 17

a b 13

b a 19

b b 16

Q1 = max Q2 = min Q3 = max

x3 Cost

a 4

b 1

c 2

NC

AC

x1 Cost

a 4

b 1

x2 Cost

a 8

b 6

x1 x2 Cost

a a 5

a b 3

b a 10

b b 9 Merge

51

x1 Cost

a 4

b 1

x1 x2 Cost

a a 7

a b 3

b a 1

b b 6

DC

Original Problem Dual Problem

Q1 = max Q2 = min Q2 = maxQ1 = min

x1 Cost

a -4

b -1

x1 x2 Cost

a a -7

a b -3

b a -1

b b -6