Effective Bounding Techniques For Solving Unate … Bounding Techniques For Solving Unate ......

19
10/17/07 1 Franc Brglez Raleigh, NC, USA Matthias F. Stallmann Raleigh, NC, USA Effective Bounding Techniques For Solving Unate and Binate Covering Problems Xiao Yu Li Seattle, WA, USA 2 Unate (Set) Cover Problem (UCP) Related Work Binate Cover Problem (BCP) 1987: espresso, Rudell et al 1993: espresso-signature, McGeer at al …. 1996: scherzo, Coudert 2002: bsolo, Manquinho et al

Transcript of Effective Bounding Techniques For Solving Unate … Bounding Techniques For Solving Unate ......

Page 1: Effective Bounding Techniques For Solving Unate … Bounding Techniques For Solving Unate ... MinCostSat is a special case of 0-1 integer linear programming ... (1 $ x1) + x2 + (1

10/17/07 1

Franc Brglez

Raleigh, NC, USA

Matthias F. Stallmann

Raleigh, NC, USA

Effective Bounding

Techniques For Solving Unate

and Binate Covering Problems

Xiao Yu Li

Seattle, WA, USA

2

• Unate (Set) Cover Problem (UCP)

Related Work

• Binate Cover Problem (BCP)

1987: espresso, Rudell et al

1993: espresso-signature, McGeer at al

….

1996: scherzo, Coudert

2002: bsolo, Manquinho et al

Page 2: Effective Bounding Techniques For Solving Unate … Bounding Techniques For Solving Unate ... MinCostSat is a special case of 0-1 integer linear programming ... (1 $ x1) + x2 + (1

3

MinCostSat

Covering Non-Covering

Unate

CoveringBinate Covering

Logic Minimization

Crew Scheduling

Vehicle Routing

Technology Mapping

FSM Minimization

Boolean Relations

Native MinCostSat Problems

Minimum-Length

Plan

ATPG

4

1. Background

2. Our UCP/BCP Solver

3. Experimental Results

4. Conclusions

Outline

Page 3: Effective Bounding Techniques For Solving Unate … Bounding Techniques For Solving Unate ... MinCostSat is a special case of 0-1 integer linear programming ... (1 $ x1) + x2 + (1

5

111Center

11Forward

11Guard

YaoStocktonMalone Francis Duncan

Three backup positions to fill.

Five players to choose from.

Want to minimize the number of players.

Unate (Set) Covering

6

• Conjunctive Normal Form

Guard F ! S

Forward D ! M

Center D ! M ! Y

Min-cost solutions: F =1, D =1, S = M = Y = 0

M =1, S =1, D = F = Y = 0

• Goal: minimize F + S + D + M + Y

Unate Covering as CNF Sat

Page 4: Effective Bounding Techniques For Solving Unate … Bounding Techniques For Solving Unate ... MinCostSat is a special case of 0-1 integer linear programming ... (1 $ x1) + x2 + (1

7

Additional constraint 1:Malone and Stockton are together ( M " S)

D ! S

M ! S

M ! S

Binate Covering Problem

Additional constraint 2:Duncan and Stockton can’t be signed together ( D # S )

8

constraints covering matrix

YSMFD

11

11

111

-1-1

-11

1-1

F ! S

D ! M

D ! M ! Y

M ! S

M ! S

D ! S

Binate Covering Problem (cont.)

Page 5: Effective Bounding Techniques For Solving Unate … Bounding Techniques For Solving Unate ... MinCostSat is a special case of 0-1 integer linear programming ... (1 $ x1) + x2 + (1

9

Most rows have no $1’s Covering Matrix

MinCostSat Problems Revisited

MinCostSat

Covering Non-Covering

Unate Binate

Logic Minimization

Crew Scheduling

Vehicle Routing

Technology Mapping

FSM Minimization

Boolean Relations

Minimum-Length

Plan

ATPG

No $1’s

Most rows haveboth 1’s and $1’s

10

MinCostSat is a special case of 0-1

integer linear programming

Solve MinCostSat as ILP

x1 ! x2 ! x3 ! x4

$!"# !$ !"% !$!"& !$ !"' !%!$#

For each constraint in the MinCostSat instance...

...replace xi with (1 $!"() *

(1 $ x1) + x2 + (1 $ x3) + x4 % 1

Page 6: Effective Bounding Techniques For Solving Unate … Bounding Techniques For Solving Unate ... MinCostSat is a special case of 0-1 integer linear programming ... (1 $ x1) + x2 + (1

11

MinCostSat as ILP: an example

MinCostSat ILP

$x1 + x2 $ x3 + x4 % $1

$x1 $ x2 + x4 % $2

x1 + x2 + x3 % 1

Assume unit cost, minimize: x1 + x2 + x3 + x4

x1 v x2 v x3 v x4

x1 v x2 v x4

x1 v x2 v x3

12

Technology Mapping

Cover A m1 ! m4 ! m5

Cover B m2 ! m4

Cover C m3 ! m5

m2 & m1 m2 ! m1

m3 & m1 m3 ! m1

Page 7: Effective Bounding Techniques For Solving Unate … Bounding Techniques For Solving Unate ... MinCostSat is a special case of 0-1 integer linear programming ... (1 $ x1) + x2 + (1

13

1. Upper/lower bound calculation

(for a unate example)

2. Branching (variable assignment)

3. One iteration of the main algorithm

4. Effect of better (global) upper bounds

and (local) lower bounds.

Our UCP/BCP Solver

Classical branch and bound

14

An Example (Steiner 9)

111

111

111

111

111

111

111

111

111

111

111

111

X9X8X7X6X5X4X3X2X1

LB = 3

UB = 6

based on

max. ind. set

(MIS)

find “cover”

to get UB

Page 8: Effective Bounding Techniques For Solving Unate … Bounding Techniques For Solving Unate ... MinCostSat is a special case of 0-1 integer linear programming ... (1 $ x1) + x2 + (1

15

After assignment of a variable

LB = 2 (+ 1 = 3)

111

111

111

111

111

111

111

111

X9X8X7X6X5X4X3X2X1 = 1

st09

X1 = 0

UB = 4 (+ 1 = 5)

16

The algorithm: one iteration

2. select a variable

x

x=1x=0UB=6LB=3

3. create twonew nodes

UB=5LB=3

UB=5LB=4

4. do reduction and compute bounds

5. enqueue both new nodes

1. dequeue “best” node in priority queue

UB=5LB=4

UB=5LB=3

Page 9: Effective Bounding Techniques For Solving Unate … Bounding Techniques For Solving Unate ... MinCostSat is a special case of 0-1 integer linear programming ... (1 $ x1) + x2 + (1

17

Lower and Upper Bounds

5/4

7/3

7/56/4

7/6

x9=1

x5=0 x5=1

x9=0

UB= 765

dead end

dead end

UB/LB

legend

on queue

18

The algorithm

Branch-and-bound solver: eclipse

Initialize root; Q.enqueue(root); globalUB=UB(root)

while ( Q is not empty ) { node = Q.dequeue();

if ( LB(node) < globalUB ) {

select branching variable x_i

for ( b = 0 to 1 ) {

n_b = (node for x_i = b)

do reduction and bounds for n_b

if ( LB(n_b) < globalUB ) { Q.enqueue( n_b) }

if ( UB(n_b) < globalUB ) { globalUB = UB(n_b) }

}}}

Page 10: Effective Bounding Techniques For Solving Unate … Bounding Techniques For Solving Unate ... MinCostSat is a special case of 0-1 integer linear programming ... (1 $ x1) + x2 + (1

19

• Seven Performance Factors

1. Lower Bounding (ILP techniques)

2. Upper Bounding (stochastic search)

3. Search-Tree Exploration Strategies

4. Branching Variable Selection

5. Search Pruning

6. Reductions

7. Data Structures

Eclipse Performance Factors

20

Three lower-bounding strategies:

• Maximum Independent Set (MIS)

• Linear Programming Relaxation (LPR)

• Cutting Planes (CP)

Factor 1: Lower Bounding

Page 11: Effective Bounding Techniques For Solving Unate … Bounding Techniques For Solving Unate ... MinCostSat is a special case of 0-1 integer linear programming ... (1 $ x1) + x2 + (1

21

Lower Bounding: MIS

• MIS - maximum independent set of rows

• Row 1, 2 form an independent set ' LB = 2

• Row 1, 3, 4 form an independent set ' LB = 3

row5

row4

row3

row2

row1

11

-1

1

x5

11

x6x4x3x2x1

11

11

1-1

22

Lower Bounding: LP Relaxation

x2

x1

(0.5, 0.5)

(1, 1)

Feasible

region

Relax integer constraints (LPR):

LP cost = 1.0

Integeroptimum = 2

LP optimum is a lower bound on integer optimum

Page 12: Effective Bounding Techniques For Solving Unate … Bounding Techniques For Solving Unate ... MinCostSat is a special case of 0-1 integer linear programming ... (1 $ x1) + x2 + (1

23

Lower Bounding: Cutting Planes (CP)

Feasible region

x2

x1(0.5, 0.5) Cut

CP cuts off fractional solution but not integer solutions

(0.7, 1.1)

24

Lower Bound Methods (rot.b)

QuickTimeェ and aGraphics decompressorare needed to see this picture.

90

95

100

105

110

115

0 1 2 3 4 5

MIS MIS2 LPR CP

Most effective by far: CP

OPT

(MIS2 is MIS with extra tricks)

Page 13: Effective Bounding Techniques For Solving Unate … Bounding Techniques For Solving Unate ... MinCostSat is a special case of 0-1 integer linear programming ... (1 $ x1) + x2 + (1

25

Lower Bound Methods (apex4.a)

MIS MIS2 LPR CP

Most effective: CP

OPT

800

750

700

650

600

550

500

26

Lower Bound Methods (c1908_F)

MIS MIS2 LPR CP

no bounding method appears effective here …

(not a case of covering problem instance)

OPT

12

10

8

6

4

2

0

Page 14: Effective Bounding Techniques For Solving Unate … Bounding Techniques For Solving Unate ... MinCostSat is a special case of 0-1 integer linear programming ... (1 $ x1) + x2 + (1

27

1. Lower Bounding (ILP techniques)

2. Upper Bounding (stochastic search)

3. Search-Tree Exploration Strategies

4. Branching Variable Selection

5. Search Pruning

6. Reductions

7. Data Structures

Next Performance Factor:

28

Factor 2: Upper Bounding

• Stochastic local search for optimal solution:

1. Apply at the root only or at each node

2. Initialization – solution based on linear

programming for lower bound

• For comparison purposes we initialize the

global UB to the cost of the optimal solution

(oracle)

Page 15: Effective Bounding Techniques For Solving Unate … Bounding Techniques For Solving Unate ... MinCostSat is a special case of 0-1 integer linear programming ... (1 $ x1) + x2 + (1

29

Upper Bound Methods (max1024)

we report average cpu-seconds to solve the

instance with different UB strategies using the

same LB (the best possible, i.e. CP)

none root node oracle

240

200

160

120

80

40

0

30

Local Search Initialization

15.116.3ex5

5.420.8exam.pi

27.5143.9max1024

… random initialization of local search is not effective,

see the table of runtimes (in cpu-seconds):

roundedLP solutionrandombenchmark

4.7300**bench1.pi

**timeout value

Page 16: Effective Bounding Techniques For Solving Unate … Bounding Techniques For Solving Unate ... MinCostSat is a special case of 0-1 integer linear programming ... (1 $ x1) + x2 + (1

31

Factor 3: Tree-Exploration Strategy

5.47.0exam.pi

4.77.9bench1.pi

15.116.2ex5

… search using priority queue performs better than depth-first search (recursion - the usual method):

priority*depth-firstbenchmark

27.574.1max1024

* smallest lower bound first (to try to reduce UB quickly)

(runtimes in cpu-seconds)

32

Experimental Results

• The solvers

1. Scherzo [Coudert, DAC1996]

2. Cplex (State of the art IP/ILP Solver)

3. Eclipse-lpr (LP Relaxation)

4. Eclipse-cp (Cutting Planes)

• The benchmarks

– Logic minimization (unate covering)

– FSM minimization (binate covering)

Page 17: Effective Bounding Techniques For Solving Unate … Bounding Techniques For Solving Unate ... MinCostSat is a special case of 0-1 integer linear programming ... (1 $ x1) + x2 + (1

33

1

10

100

1000

10000

100000

1000000N

um

be

r o

f N

od

es

prom2

max1024

exam.pi

ex5

Unate Benchmarks

scherzo

cplex

eclipse-lpr

eclipse-cp

Unate Results (nodes visited)

(timed out)

“harder”

34

1

10

100

1000

10000

CP

U s

eco

nd

s

prom2

max1024

exam.pi

ex5

Unate benchmarks

scherzo

cplex

eclipse-lpr

eclipse-cp

Typical Results: Unate (runtime)

timeout

Page 18: Effective Bounding Techniques For Solving Unate … Bounding Techniques For Solving Unate ... MinCostSat is a special case of 0-1 integer linear programming ... (1 $ x1) + x2 + (1

35

Typical Results: small binate

Small binate benchmarks (nodes)

1

10

100

1000

10000

f51m.b jac3

nu

mb

er

of

no

des

scherzo

cplex

eclipse-lpr

eclipse-cp

Small bin. benchmarks (runtime)

0

2

4

6

8

10

f51m.b jac3

CP

U s

eco

nd

s

scherzo

cplex

eclipse-lpr

eclipse-cp

eclipse-cp spends a lot

of time with cuts at each

node (cplex visits more

nodes and does cuts

less frequently)

36

Large binate benchmarks

Large binate benchmarks (nodes)

1

10

100

1000

10000

100000

apex4.a rot.b

no

des v

isit

ed

scherzo

cplex

eclipse-lpr

eclipse-cp

... but spend more time

We visit fewer nodes...

CPLEX only does

cuts at some nodes.

We do cuts everywhere

-- could be more judicious

Large bin. benchmarks (runtime)

1

10

100

1000

10000

apex4.a rot.b

CP

U s

eco

nd

s scherzo

cplex

eclipse-lpr

eclipse-cp

Page 19: Effective Bounding Techniques For Solving Unate … Bounding Techniques For Solving Unate ... MinCostSat is a special case of 0-1 integer linear programming ... (1 $ x1) + x2 + (1

37

latte = espresso $ mincov + eclipse-cp

139.2129.512**---ex5

totalcovertotalcoverbenchmark

espresso (hours) latte (secs)

329.5329.112**---max1024

14.712.912**---prom2

**timeout

6574256ex5

2592741024max1024

prod-latteprod-heurprod-origbenchmark

287287287prom2

38

The Last Words …

Acknowledgments:

• for the benchmarks

• for the solvers (aura, bsolo, espresso, scherzo)

• for constructive reviews

Under construction:

• code tune-ups before the release of eclipse

• additional experiments

-- for the journal submission

-- for comprehensive web-posting of results