74
Solving Optimization Problems via Maximum Satisfiability: Encodings and Re-Encodings Lectio Praecursoria Jeremias Berg J. Berg Lectio praecursoria 1 / 22

Solving Optimization Problems via Maximum Satisfiability ... · Lectio Praecursoria Jeremias Berg J. Berg Lectio praecursoria 1 / 22. Thesis research Contributions to exact declarative

  • Upload
    others

  • View
    13

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Solving Optimization Problems via Maximum Satisfiability ... · Lectio Praecursoria Jeremias Berg J. Berg Lectio praecursoria 1 / 22. Thesis research Contributions to exact declarative

Solving Optimization Problems viaMaximum Satisfiability:

Encodings and Re-Encodings

Lectio PraecursoriaJeremias Berg

J. Berg Lectio praecursoria 1 / 22

Page 2: Solving Optimization Problems via Maximum Satisfiability ... · Lectio Praecursoria Jeremias Berg J. Berg Lectio praecursoria 1 / 22. Thesis research Contributions to exact declarative

Thesis research

Contributions to exact declarative solution methods to NP-hardcombinatorial optimization problems

More specificallySolver independent preprocessing for Maximum Satisfiability(MaxSAT)New MaxSAT encodings of NP-hard data analysis problems

Correlation ClusteringBounded Treewidth Bayesian Network Structure Learning

J. Berg Lectio praecursoria 2 / 22

Page 3: Solving Optimization Problems via Maximum Satisfiability ... · Lectio Praecursoria Jeremias Berg J. Berg Lectio praecursoria 1 / 22. Thesis research Contributions to exact declarative

Thesis research

Contributions to exact declarative solution methods to NP-hardcombinatorial optimization problems

More specificallySolver independent preprocessing for Maximum Satisfiability(MaxSAT)New MaxSAT encodings of NP-hard data analysis problems

Correlation ClusteringBounded Treewidth Bayesian Network Structure Learning

J. Berg Lectio praecursoria 2 / 22

Page 4: Solving Optimization Problems via Maximum Satisfiability ... · Lectio Praecursoria Jeremias Berg J. Berg Lectio praecursoria 1 / 22. Thesis research Contributions to exact declarative

Combinatorial Optimization

Find a solution from a finite set of feasible solutions that minimizesa given cost function.

4

32

17

86

3

4

17

8

3

32

6

2

7

6

3

1

4

3

8

The Travelling Salesperson Problem:

Instance:Set of locations & pairwise distancesFeasible Solutions:Routes that visit all locationsCost of Solutions:Length of route

Cost:

J. Berg Lectio praecursoria 3 / 22

Page 5: Solving Optimization Problems via Maximum Satisfiability ... · Lectio Praecursoria Jeremias Berg J. Berg Lectio praecursoria 1 / 22. Thesis research Contributions to exact declarative

Combinatorial Optimization

Find a solution from a finite set of feasible solutions that minimizesa given cost function.

4

32

17

86

3

4

17

8

3

32

6

2

7

6

3

1

4

3

8

The Travelling Salesperson Problem:

Instance:Set of locations & pairwise distancesFeasible Solutions:Routes that visit all locationsCost of Solutions:Length of route

Cost:

J. Berg Lectio praecursoria 3 / 22

Page 6: Solving Optimization Problems via Maximum Satisfiability ... · Lectio Praecursoria Jeremias Berg J. Berg Lectio praecursoria 1 / 22. Thesis research Contributions to exact declarative

Combinatorial Optimization

Find a solution from a finite set of feasible solutions that minimizesa given cost function.

4

32

17

86

3

4

17

8

3

32

6

2

7

6

3

1

4

3

8

The Travelling Salesperson Problem:

Instance:Set of locations & pairwise distances

Feasible Solutions:Routes that visit all locationsCost of Solutions:Length of route

Cost:

J. Berg Lectio praecursoria 3 / 22

Page 7: Solving Optimization Problems via Maximum Satisfiability ... · Lectio Praecursoria Jeremias Berg J. Berg Lectio praecursoria 1 / 22. Thesis research Contributions to exact declarative

Combinatorial Optimization

Find a solution from a finite set of feasible solutions that minimizesa given cost function.

1

25

63

4

4

32

17

86

3

4

17

8

3

32

6

2

7

6

3

1

4

3

8

The Travelling Salesperson Problem:

Instance:Set of locations & pairwise distancesFeasible Solutions:Routes that visit all locations

Cost of Solutions:Length of route

Cost:

J. Berg Lectio praecursoria 3 / 22

Page 8: Solving Optimization Problems via Maximum Satisfiability ... · Lectio Praecursoria Jeremias Berg J. Berg Lectio praecursoria 1 / 22. Thesis research Contributions to exact declarative

Combinatorial Optimization

Find a solution from a finite set of feasible solutions that minimizesa given cost function.

1

25

63

4

4

32

17

86

3

4

17

8

3

32

6

2

7

6

3

1

4

3

8

The Travelling Salesperson Problem:

Instance:Set of locations & pairwise distancesFeasible Solutions:Routes that visit all locationsCost of Solutions:Length of route

Cost: 23

J. Berg Lectio praecursoria 3 / 22

Page 9: Solving Optimization Problems via Maximum Satisfiability ... · Lectio Praecursoria Jeremias Berg J. Berg Lectio praecursoria 1 / 22. Thesis research Contributions to exact declarative

Combinatorial Optimization

Find a solution from a finite set of feasible solutions that minimizesa given cost function.

1

62

35

4

4

32

17

86

3

4

17

8

3

32

6

2

7

6

3

1

4

3

8

The Travelling Salesperson Problem:

Instance:Set of locations & pairwise distancesFeasible Solutions:Routes that visit all locationsCost of Solutions:Length of route

Cost: 19

J. Berg Lectio praecursoria 3 / 22

Page 10: Solving Optimization Problems via Maximum Satisfiability ... · Lectio Praecursoria Jeremias Berg J. Berg Lectio praecursoria 1 / 22. Thesis research Contributions to exact declarative

Combinatorial Optimization Problems are common

Route Plannning:Find the shortest route that visits all of a given set of locations

Packing:Pack wares in a manner that wastes the least amount of space

Scheduling:Design timetables that waste the least amount of time

Machine Learning / Data Analysis / Artificial Intelligence:itemset mining, clustering, classification, probabilistic modelling,data visualization etc.

NP-hardnessMost interesting problems are difficult to solve!

J. Berg Lectio praecursoria 4 / 22

Page 11: Solving Optimization Problems via Maximum Satisfiability ... · Lectio Praecursoria Jeremias Berg J. Berg Lectio praecursoria 1 / 22. Thesis research Contributions to exact declarative

Combinatorial Optimization Problems are common

Route Plannning:Find the shortest route that visits all of a given set of locations

Packing:Pack wares in a manner that wastes the least amount of space

Scheduling:Design timetables that waste the least amount of time

Machine Learning / Data Analysis / Artificial Intelligence:itemset mining, clustering, classification, probabilistic modelling,data visualization etc.

NP-hardnessMost interesting problems are difficult to solve!

J. Berg Lectio praecursoria 4 / 22

Page 12: Solving Optimization Problems via Maximum Satisfiability ... · Lectio Praecursoria Jeremias Berg J. Berg Lectio praecursoria 1 / 22. Thesis research Contributions to exact declarative

Solving difficult combinatorial optimization problems

Roughly four different approachesApproximation algorithms:Local search algorithms:Problem specific exact solution algorithms:Exact declarative methods:

J. Berg Lectio praecursoria 5 / 22

Page 13: Solving Optimization Problems via Maximum Satisfiability ... · Lectio Praecursoria Jeremias Berg J. Berg Lectio praecursoria 1 / 22. Thesis research Contributions to exact declarative

Solving difficult combinatorial optimization problems

Roughly four different approachesApproximation algorithms:

scalable (fast) algorithmsnot guaranteed to return the optimal solutionmathematically provable guarantees on the quality of the obtainedsolution

Local search algorithms:Problem specific exact solution algorithms:Exact declarative methods:

J. Berg Lectio praecursoria 5 / 22

Page 14: Solving Optimization Problems via Maximum Satisfiability ... · Lectio Praecursoria Jeremias Berg J. Berg Lectio praecursoria 1 / 22. Thesis research Contributions to exact declarative

Solving difficult combinatorial optimization problems

Roughly four different approachesApproximation algorithms:Local search algorithms:

very scalable algorithmstraverse the search space moving from solution to solutionno guarantees on the quality of solution obtained

Problem specific exact solution algorithms:Exact declarative methods:

J. Berg Lectio praecursoria 5 / 22

Page 15: Solving Optimization Problems via Maximum Satisfiability ... · Lectio Praecursoria Jeremias Berg J. Berg Lectio praecursoria 1 / 22. Thesis research Contributions to exact declarative

Solving difficult combinatorial optimization problems

Roughly four different approachesApproximation algorithms:Local search algorithms:Problem specific exact solution algorithms:

less scalableguaranteed to find the optimal solutiondesigned for the specific problem at hand

Exact declarative methods:

J. Berg Lectio praecursoria 5 / 22

Page 16: Solving Optimization Problems via Maximum Satisfiability ... · Lectio Praecursoria Jeremias Berg J. Berg Lectio praecursoria 1 / 22. Thesis research Contributions to exact declarative

Solving difficult combinatorial optimization problems

Roughly four different approachesApproximation algorithms:Local search algorithms:Problem specific exact solution algorithms:Exact declarative methods:

model the problem instance with mathematical constraintssolve the constraint instance instead

J. Berg Lectio praecursoria 5 / 22

Page 17: Solving Optimization Problems via Maximum Satisfiability ... · Lectio Praecursoria Jeremias Berg J. Berg Lectio praecursoria 1 / 22. Thesis research Contributions to exact declarative

Constraint optimizationPropositional Logic

x

Boolean variable:

x1 ∨ x2

y1 ∨ y2

z1 ∨ z2

¬x1 ∨ ¬y1

¬x1 ∨ ¬z1

¬y1 ∨ ¬z1

¬x2 ∨ ¬y2

¬x2 ∨ ¬z2

¬y2 ∨ ¬z2

x1 ∨ x2

y1 ∨ y2

z1 ∨ z2(¬x1 ∨ ¬y1,3)(¬x1 ∨ ¬z1,2)(¬y1 ∨ ¬z1,7)(¬x2 ∨ ¬y2,1)(¬x2 ∨ ¬z2,2)(¬y2 ∨ ¬z2,5)

Har

dS

oft

x1 ∨ x2

y1 ∨ y2

z1 ∨ z2(¬x1 ∨ ¬y1,3)(¬x1 ∨ ¬z1,2)(¬y1 ∨ ¬z1,7)(¬x2 ∨ ¬y2,1)(¬x2 ∨ ¬z2,2)(¬y2 ∨ ¬z2,5)

Har

dS

oft

x =

x =y =Truez =Falset =

Maximum Satisfiability (MaxSAT):Find an assignment that satisfies allhard clauses and a maximum sum ofweights of soft clauses.

Cost of solution:

J. Berg Lectio praecursoria 6 / 22

Page 18: Solving Optimization Problems via Maximum Satisfiability ... · Lectio Praecursoria Jeremias Berg J. Berg Lectio praecursoria 1 / 22. Thesis research Contributions to exact declarative

Constraint optimizationPropositional Logic

x

Boolean variable:

x1 ∨ x2

y1 ∨ y2

z1 ∨ z2

¬x1 ∨ ¬y1

¬x1 ∨ ¬z1

¬y1 ∨ ¬z1

¬x2 ∨ ¬y2

¬x2 ∨ ¬z2

¬y2 ∨ ¬z2

x1 ∨ x2

y1 ∨ y2

z1 ∨ z2(¬x1 ∨ ¬y1,3)(¬x1 ∨ ¬z1,2)(¬y1 ∨ ¬z1,7)(¬x2 ∨ ¬y2,1)(¬x2 ∨ ¬z2,2)(¬y2 ∨ ¬z2,5)

Har

dS

oft

x1 ∨ x2

y1 ∨ y2

z1 ∨ z2(¬x1 ∨ ¬y1,3)(¬x1 ∨ ¬z1,2)(¬y1 ∨ ¬z1,7)(¬x2 ∨ ¬y2,1)(¬x2 ∨ ¬z2,2)(¬y2 ∨ ¬z2,5)

Har

dS

oft

x =True

x =y =Truez =Falset =

Maximum Satisfiability (MaxSAT):Find an assignment that satisfies allhard clauses and a maximum sum ofweights of soft clauses.

Cost of solution:

J. Berg Lectio praecursoria 6 / 22

Page 19: Solving Optimization Problems via Maximum Satisfiability ... · Lectio Praecursoria Jeremias Berg J. Berg Lectio praecursoria 1 / 22. Thesis research Contributions to exact declarative

Constraint optimizationPropositional Logic

x

Boolean variable:

x1 ∨ x2

y1 ∨ y2

z1 ∨ z2

¬x1 ∨ ¬y1

¬x1 ∨ ¬z1

¬y1 ∨ ¬z1

¬x2 ∨ ¬y2

¬x2 ∨ ¬z2

¬y2 ∨ ¬z2

x1 ∨ x2

y1 ∨ y2

z1 ∨ z2(¬x1 ∨ ¬y1,3)(¬x1 ∨ ¬z1,2)(¬y1 ∨ ¬z1,7)(¬x2 ∨ ¬y2,1)(¬x2 ∨ ¬z2,2)(¬y2 ∨ ¬z2,5)

Har

dS

oft

x1 ∨ x2

y1 ∨ y2

z1 ∨ z2(¬x1 ∨ ¬y1,3)(¬x1 ∨ ¬z1,2)(¬y1 ∨ ¬z1,7)(¬x2 ∨ ¬y2,1)(¬x2 ∨ ¬z2,2)(¬y2 ∨ ¬z2,5)

Har

dS

oft

x =False

x =y =Truez =Falset =

Maximum Satisfiability (MaxSAT):Find an assignment that satisfies allhard clauses and a maximum sum ofweights of soft clauses.

Cost of solution:

J. Berg Lectio praecursoria 6 / 22

Page 20: Solving Optimization Problems via Maximum Satisfiability ... · Lectio Praecursoria Jeremias Berg J. Berg Lectio praecursoria 1 / 22. Thesis research Contributions to exact declarative

Constraint optimizationPropositional Logic

x ¬x

Literal:

x1 ∨ x2

y1 ∨ y2

z1 ∨ z2

¬x1 ∨ ¬y1

¬x1 ∨ ¬z1

¬y1 ∨ ¬z1

¬x2 ∨ ¬y2

¬x2 ∨ ¬z2

¬y2 ∨ ¬z2

x1 ∨ x2

y1 ∨ y2

z1 ∨ z2(¬x1 ∨ ¬y1,3)(¬x1 ∨ ¬z1,2)(¬y1 ∨ ¬z1,7)(¬x2 ∨ ¬y2,1)(¬x2 ∨ ¬z2,2)(¬y2 ∨ ¬z2,5)

Har

dS

oft

x1 ∨ x2

y1 ∨ y2

z1 ∨ z2(¬x1 ∨ ¬y1,3)(¬x1 ∨ ¬z1,2)(¬y1 ∨ ¬z1,7)(¬x2 ∨ ¬y2,1)(¬x2 ∨ ¬z2,2)(¬y2 ∨ ¬z2,5)

Har

dS

oft

x =

x =y =Truez =Falset =

Maximum Satisfiability (MaxSAT):Find an assignment that satisfies allhard clauses and a maximum sum ofweights of soft clauses.

Cost of solution:

J. Berg Lectio praecursoria 6 / 22

Page 21: Solving Optimization Problems via Maximum Satisfiability ... · Lectio Praecursoria Jeremias Berg J. Berg Lectio praecursoria 1 / 22. Thesis research Contributions to exact declarative

Constraint optimizationPropositional Logic

x ¬x

Literal:

x1 ∨ x2

y1 ∨ y2

z1 ∨ z2

¬x1 ∨ ¬y1

¬x1 ∨ ¬z1

¬y1 ∨ ¬z1

¬x2 ∨ ¬y2

¬x2 ∨ ¬z2

¬y2 ∨ ¬z2

x1 ∨ x2

y1 ∨ y2

z1 ∨ z2(¬x1 ∨ ¬y1,3)(¬x1 ∨ ¬z1,2)(¬y1 ∨ ¬z1,7)(¬x2 ∨ ¬y2,1)(¬x2 ∨ ¬z2,2)(¬y2 ∨ ¬z2,5)

Har

dS

oft

x1 ∨ x2

y1 ∨ y2

z1 ∨ z2(¬x1 ∨ ¬y1,3)(¬x1 ∨ ¬z1,2)(¬y1 ∨ ¬z1,7)(¬x2 ∨ ¬y2,1)(¬x2 ∨ ¬z2,2)(¬y2 ∨ ¬z2,5)

Har

dS

oft

x =True

x =y =Truez =Falset =

Maximum Satisfiability (MaxSAT):Find an assignment that satisfies allhard clauses and a maximum sum ofweights of soft clauses.

Cost of solution:

J. Berg Lectio praecursoria 6 / 22

Page 22: Solving Optimization Problems via Maximum Satisfiability ... · Lectio Praecursoria Jeremias Berg J. Berg Lectio praecursoria 1 / 22. Thesis research Contributions to exact declarative

Constraint optimizationPropositional Logic

x ¬x

Literal:

x1 ∨ x2

y1 ∨ y2

z1 ∨ z2

¬x1 ∨ ¬y1

¬x1 ∨ ¬z1

¬y1 ∨ ¬z1

¬x2 ∨ ¬y2

¬x2 ∨ ¬z2

¬y2 ∨ ¬z2

x1 ∨ x2

y1 ∨ y2

z1 ∨ z2(¬x1 ∨ ¬y1,3)(¬x1 ∨ ¬z1,2)(¬y1 ∨ ¬z1,7)(¬x2 ∨ ¬y2,1)(¬x2 ∨ ¬z2,2)(¬y2 ∨ ¬z2,5)

Har

dS

oft

x1 ∨ x2

y1 ∨ y2

z1 ∨ z2(¬x1 ∨ ¬y1,3)(¬x1 ∨ ¬z1,2)(¬y1 ∨ ¬z1,7)(¬x2 ∨ ¬y2,1)(¬x2 ∨ ¬z2,2)(¬y2 ∨ ¬z2,5)

Har

dS

oft

x =False

x =y =Truez =Falset =

Maximum Satisfiability (MaxSAT):Find an assignment that satisfies allhard clauses and a maximum sum ofweights of soft clauses.

Cost of solution:

J. Berg Lectio praecursoria 6 / 22

Page 23: Solving Optimization Problems via Maximum Satisfiability ... · Lectio Praecursoria Jeremias Berg J. Berg Lectio praecursoria 1 / 22. Thesis research Contributions to exact declarative

Constraint optimizationPropositional Logic

x

Clause:

x ∨ ¬y ∨ z ∨ ¬t

x1 ∨ x2

y1 ∨ y2

z1 ∨ z2

¬x1 ∨ ¬y1

¬x1 ∨ ¬z1

¬y1 ∨ ¬z1

¬x2 ∨ ¬y2

¬x2 ∨ ¬z2

¬y2 ∨ ¬z2

x1 ∨ x2

y1 ∨ y2

z1 ∨ z2(¬x1 ∨ ¬y1,3)(¬x1 ∨ ¬z1,2)(¬y1 ∨ ¬z1,7)(¬x2 ∨ ¬y2,1)(¬x2 ∨ ¬z2,2)(¬y2 ∨ ¬z2,5)

Har

dS

oft

x1 ∨ x2

y1 ∨ y2

z1 ∨ z2(¬x1 ∨ ¬y1,3)(¬x1 ∨ ¬z1,2)(¬y1 ∨ ¬z1,7)(¬x2 ∨ ¬y2,1)(¬x2 ∨ ¬z2,2)(¬y2 ∨ ¬z2,5)

Har

dS

oft

x =

x =y =Truez =Falset =

Maximum Satisfiability (MaxSAT):Find an assignment that satisfies allhard clauses and a maximum sum ofweights of soft clauses.

Cost of solution:

J. Berg Lectio praecursoria 6 / 22

Page 24: Solving Optimization Problems via Maximum Satisfiability ... · Lectio Praecursoria Jeremias Berg J. Berg Lectio praecursoria 1 / 22. Thesis research Contributions to exact declarative

Constraint optimizationPropositional Logic

x

Clause:

Satisfied

x ∨ ¬y ∨ z ∨ ¬t

x1 ∨ x2

y1 ∨ y2

z1 ∨ z2

¬x1 ∨ ¬y1

¬x1 ∨ ¬z1

¬y1 ∨ ¬z1

¬x2 ∨ ¬y2

¬x2 ∨ ¬z2

¬y2 ∨ ¬z2

x1 ∨ x2

y1 ∨ y2

z1 ∨ z2(¬x1 ∨ ¬y1,3)(¬x1 ∨ ¬z1,2)(¬y1 ∨ ¬z1,7)(¬x2 ∨ ¬y2,1)(¬x2 ∨ ¬z2,2)(¬y2 ∨ ¬z2,5)

Har

dS

oft

x1 ∨ x2

y1 ∨ y2

z1 ∨ z2(¬x1 ∨ ¬y1,3)(¬x1 ∨ ¬z1,2)(¬y1 ∨ ¬z1,7)(¬x2 ∨ ¬y2,1)(¬x2 ∨ ¬z2,2)(¬y2 ∨ ¬z2,5)

Har

dS

oft

x =

x =Truey =Truez =Falset =False

Maximum Satisfiability (MaxSAT):Find an assignment that satisfies allhard clauses and a maximum sum ofweights of soft clauses.

Cost of solution:

J. Berg Lectio praecursoria 6 / 22

Page 25: Solving Optimization Problems via Maximum Satisfiability ... · Lectio Praecursoria Jeremias Berg J. Berg Lectio praecursoria 1 / 22. Thesis research Contributions to exact declarative

Constraint optimizationPropositional Logic

x

Clause:

Falsified

x ∨ ¬y ∨ z ∨ ¬t

x1 ∨ x2

y1 ∨ y2

z1 ∨ z2

¬x1 ∨ ¬y1

¬x1 ∨ ¬z1

¬y1 ∨ ¬z1

¬x2 ∨ ¬y2

¬x2 ∨ ¬z2

¬y2 ∨ ¬z2

x1 ∨ x2

y1 ∨ y2

z1 ∨ z2(¬x1 ∨ ¬y1,3)(¬x1 ∨ ¬z1,2)(¬y1 ∨ ¬z1,7)(¬x2 ∨ ¬y2,1)(¬x2 ∨ ¬z2,2)(¬y2 ∨ ¬z2,5)

Har

dS

oft

x1 ∨ x2

y1 ∨ y2

z1 ∨ z2(¬x1 ∨ ¬y1,3)(¬x1 ∨ ¬z1,2)(¬y1 ∨ ¬z1,7)(¬x2 ∨ ¬y2,1)(¬x2 ∨ ¬z2,2)(¬y2 ∨ ¬z2,5)

Har

dS

oft

x =

x =Falsey =Truez =Falset =True

Maximum Satisfiability (MaxSAT):Find an assignment that satisfies allhard clauses and a maximum sum ofweights of soft clauses.

Cost of solution:

J. Berg Lectio praecursoria 6 / 22

Page 26: Solving Optimization Problems via Maximum Satisfiability ... · Lectio Praecursoria Jeremias Berg J. Berg Lectio praecursoria 1 / 22. Thesis research Contributions to exact declarative

Constraint optimizationPropositional Logic

x

CNF-Formula:

x1 ∨ x2

y1 ∨ y2

z1 ∨ z2

¬x1 ∨ ¬y1

¬x1 ∨ ¬z1

¬y1 ∨ ¬z1

¬x2 ∨ ¬y2

¬x2 ∨ ¬z2

¬y2 ∨ ¬z2

x1 ∨ x2

y1 ∨ y2

z1 ∨ z2(¬x1 ∨ ¬y1,3)(¬x1 ∨ ¬z1,2)(¬y1 ∨ ¬z1,7)(¬x2 ∨ ¬y2,1)(¬x2 ∨ ¬z2,2)(¬y2 ∨ ¬z2,5)

Har

dS

oft

x1 ∨ x2

y1 ∨ y2

z1 ∨ z2(¬x1 ∨ ¬y1,3)(¬x1 ∨ ¬z1,2)(¬y1 ∨ ¬z1,7)(¬x2 ∨ ¬y2,1)(¬x2 ∨ ¬z2,2)(¬y2 ∨ ¬z2,5)

Har

dS

oft

x =

x =y =Truez =Falset =

Maximum Satisfiability (MaxSAT):Find an assignment that satisfies allhard clauses and a maximum sum ofweights of soft clauses.

Cost of solution:

J. Berg Lectio praecursoria 6 / 22

Page 27: Solving Optimization Problems via Maximum Satisfiability ... · Lectio Praecursoria Jeremias Berg J. Berg Lectio praecursoria 1 / 22. Thesis research Contributions to exact declarative

Constraint optimizationMaximum Satisfiability (MaxSAT)

x

CNF-Formula:

x1 ∨ x2

y1 ∨ y2

z1 ∨ z2

¬x1 ∨ ¬y1

¬x1 ∨ ¬z1

¬y1 ∨ ¬z1

¬x2 ∨ ¬y2

¬x2 ∨ ¬z2

¬y2 ∨ ¬z2

x1 ∨ x2

y1 ∨ y2

z1 ∨ z2(¬x1 ∨ ¬y1,3)(¬x1 ∨ ¬z1,2)(¬y1 ∨ ¬z1,7)(¬x2 ∨ ¬y2,1)(¬x2 ∨ ¬z2,2)(¬y2 ∨ ¬z2,5)

Har

dS

oft

x1 ∨ x2

y1 ∨ y2

z1 ∨ z2(¬x1 ∨ ¬y1,3)(¬x1 ∨ ¬z1,2)(¬y1 ∨ ¬z1,7)(¬x2 ∨ ¬y2,1)(¬x2 ∨ ¬z2,2)(¬y2 ∨ ¬z2,5)

Har

dS

oft

x =

x =y =Truez =Falset =

Maximum Satisfiability (MaxSAT):Find an assignment that satisfies allhard clauses and a maximum sum ofweights of soft clauses.

Cost of solution:

J. Berg Lectio praecursoria 6 / 22

Page 28: Solving Optimization Problems via Maximum Satisfiability ... · Lectio Praecursoria Jeremias Berg J. Berg Lectio praecursoria 1 / 22. Thesis research Contributions to exact declarative

Constraint optimizationMaximum Satisfiability (MaxSAT)

x

CNF-Formula:

x1 ∨ x2

y1 ∨ y2

z1 ∨ z2

¬x1 ∨ ¬y1

¬x1 ∨ ¬z1

¬y1 ∨ ¬z1

¬x2 ∨ ¬y2

¬x2 ∨ ¬z2

¬y2 ∨ ¬z2

x1 ∨ x2

y1 ∨ y2

z1 ∨ z2(¬x1 ∨ ¬y1,3)(¬x1 ∨ ¬z1,2)(¬y1 ∨ ¬z1,7)(¬x2 ∨ ¬y2,1)(¬x2 ∨ ¬z2,2)(¬y2 ∨ ¬z2,5)

Har

dS

oft

x1 ∨ x2

y1 ∨ y2

z1 ∨ z2(¬x1 ∨ ¬y1,3)(¬x1 ∨ ¬z1,2)(¬y1 ∨ ¬z1,7)(¬x2 ∨ ¬y2,1)(¬x2 ∨ ¬z2,2)(¬y2 ∨ ¬z2,5)

Har

dS

oft

x =

x =y =Truez =Falset =

Maximum Satisfiability (MaxSAT):Find an assignment that satisfies allhard clauses and a maximum sum ofweights of soft clauses.

Cost of solution: 5

J. Berg Lectio praecursoria 6 / 22

Page 29: Solving Optimization Problems via Maximum Satisfiability ... · Lectio Praecursoria Jeremias Berg J. Berg Lectio praecursoria 1 / 22. Thesis research Contributions to exact declarative

Combinatorial Optimization with MaxSATExample Problem

A set of books and a bookshelf.Some books are similar others are not.

Want to place the books onto theshelves:

Similar books→ same shelf.Dissimilar book→ different shelves.Can have empty shelves.As many shelves as books.

J. Berg Lectio praecursoria 7 / 22

Page 30: Solving Optimization Problems via Maximum Satisfiability ... · Lectio Praecursoria Jeremias Berg J. Berg Lectio praecursoria 1 / 22. Thesis research Contributions to exact declarative

Combinatorial Optimization with MaxSATExample Problem

LOTR

b1b1b1

The Number Devil

The Northern Lights

b3b3b3

A Short history of Time

b4b4b4

Shelf 1Shelf 2Shelf 3Shelf 4

+ +

+

+

+

+

J. Berg Lectio praecursoria 7 / 22

Page 31: Solving Optimization Problems via Maximum Satisfiability ... · Lectio Praecursoria Jeremias Berg J. Berg Lectio praecursoria 1 / 22. Thesis research Contributions to exact declarative

Combinatorial Optimization with MaxSATExample Problem

b1

b1b1b1

b2

b3

b3b3b3

b4

b4b4b4

Shelf 1Shelf 2Shelf 3Shelf 4

+ +

+

+

+

+

J. Berg Lectio praecursoria 7 / 22

Page 32: Solving Optimization Problems via Maximum Satisfiability ... · Lectio Praecursoria Jeremias Berg J. Berg Lectio praecursoria 1 / 22. Thesis research Contributions to exact declarative

Combinatorial Optimization with MaxSATExample Problem

b1

b1b1b1

b2

b3

b3b3b3

b4

b4b4b4

Shelf 1Shelf 2Shelf 3Shelf 4

+ +

+

+

+

+

J. Berg Lectio praecursoria 7 / 22

Page 33: Solving Optimization Problems via Maximum Satisfiability ... · Lectio Praecursoria Jeremias Berg J. Berg Lectio praecursoria 1 / 22. Thesis research Contributions to exact declarative

Combinatorial Optimization with MaxSATExample Problem

b1b1

b1b1

b2

b3b3

b3b3

b4b4

b4b4

Shelf 1Shelf 2Shelf 3Shelf 4

+ +

+

−−

+

+

+

J. Berg Lectio praecursoria 7 / 22

Page 34: Solving Optimization Problems via Maximum Satisfiability ... · Lectio Praecursoria Jeremias Berg J. Berg Lectio praecursoria 1 / 22. Thesis research Contributions to exact declarative

Combinatorial Optimization with MaxSATExample Problem

b1

b1

b1

b1

b2

b3

b3

b3

b3

b4

b4

b4

b4

Shelf 1Shelf 2Shelf 3Shelf 4

+ +

+

+

+

+

J. Berg Lectio praecursoria 7 / 22

Page 35: Solving Optimization Problems via Maximum Satisfiability ... · Lectio Praecursoria Jeremias Berg J. Berg Lectio praecursoria 1 / 22. Thesis research Contributions to exact declarative

Combinatorial Optimization with MaxSATExample Problem

b1

b1b1

b1

b2

b3

b3b3

b3

b4

b4b4

b4

Shelf 1Shelf 2Shelf 3Shelf 4

+ +

+

+

+

+

J. Berg Lectio praecursoria 7 / 22

Page 36: Solving Optimization Problems via Maximum Satisfiability ... · Lectio Praecursoria Jeremias Berg J. Berg Lectio praecursoria 1 / 22. Thesis research Contributions to exact declarative

Grouping books using MaxSAT

b1

b1

b2

b2

b3

b3

b4

b4

+ +

+

MaxSAT-based solution:

Variables:s1

1, . . . , s41

s11 =True if b1 on shelf 1

Constraints:Full formula:

(s11 ∨ s2

1 ∨ s31 ∨ s4

1) ∧∧i 6=j

¬(si1 ∧ sj

1) ∧ (s12 ∨ s2

2 ∨ s32 ∨ s4

2) ∧∧i 6=j

¬(si2 ∧ sj

2) ∧ . . .

4∨k=1

(sk1 ∧ sk

3 ) ∧4∨

k=1

(sk1 ∧ sk

4 ) ∧4∨

k=1

(sk1 ∧ sk

2 ) ∧4∧

k=1

¬(sk3 ∧ sk

4 ) ∧ . . .

...

(s11 ∨ s2

1 ∨ s31 ∨ s4

1 ∨ s41) ∧

∧i 6=j

¬(si1 ∧ sj

1) ∧ (s12 ∨ s2

2 ∨ s32 ∨ s4

2 ∨ s42) ∧

∧i 6=j

¬(si2 ∧ sj

2) ∧ . . .

4∨k=1

(sk1 ∧ sk

3 ) ∧4∨

k=1

(sk1 ∧ sk

4 ) ∧4∨

k=1

(sk1 ∧ sk

2 ) ∧4∧

k=1

¬(sk3 ∧ sk

4 ) ∧ . . .

...

J. Berg Lectio praecursoria 8 / 22

Page 37: Solving Optimization Problems via Maximum Satisfiability ... · Lectio Praecursoria Jeremias Berg J. Berg Lectio praecursoria 1 / 22. Thesis research Contributions to exact declarative

Grouping books using MaxSAT

b1

b1

b2

b2

b3

b3

b4

b4

+ +

+

MaxSAT-based solution:1) Encode

Variables:s1

1, . . . , s41

s11 =True if b1 on shelf 1

Constraints:Full formula:

(s11 ∨ s2

1 ∨ s31 ∨ s4

1) ∧∧i 6=j

¬(si1 ∧ sj

1) ∧ (s12 ∨ s2

2 ∨ s32 ∨ s4

2) ∧∧i 6=j

¬(si2 ∧ sj

2) ∧ . . .

4∨k=1

(sk1 ∧ sk

3 ) ∧4∨

k=1

(sk1 ∧ sk

4 ) ∧4∨

k=1

(sk1 ∧ sk

2 ) ∧4∧

k=1

¬(sk3 ∧ sk

4 ) ∧ . . .

...

(s11 ∨ s2

1 ∨ s31 ∨ s4

1 ∨ s41) ∧

∧i 6=j

¬(si1 ∧ sj

1) ∧ (s12 ∨ s2

2 ∨ s32 ∨ s4

2 ∨ s42) ∧

∧i 6=j

¬(si2 ∧ sj

2) ∧ . . .

4∨k=1

(sk1 ∧ sk

3 ) ∧4∨

k=1

(sk1 ∧ sk

4 ) ∧4∨

k=1

(sk1 ∧ sk

2 ) ∧4∧

k=1

¬(sk3 ∧ sk

4 ) ∧ . . .

...

J. Berg Lectio praecursoria 8 / 22

Page 38: Solving Optimization Problems via Maximum Satisfiability ... · Lectio Praecursoria Jeremias Berg J. Berg Lectio praecursoria 1 / 22. Thesis research Contributions to exact declarative

Grouping books using MaxSAT

b1

b1

b2

b2

b3

b3

b4

b4

+ +

+

MaxSAT-based solution:1) Encode

Variables:s1

1, . . . , s41

s11 =True if b1 on shelf 1

Constraints:Full formula:

(s11 ∨ s2

1 ∨ s31 ∨ s4

1) ∧∧i 6=j

¬(si1 ∧ sj

1) ∧ (s12 ∨ s2

2 ∨ s32 ∨ s4

2) ∧∧i 6=j

¬(si2 ∧ sj

2) ∧ . . .

4∨k=1

(sk1 ∧ sk

3 ) ∧4∨

k=1

(sk1 ∧ sk

4 ) ∧4∨

k=1

(sk1 ∧ sk

2 ) ∧4∧

k=1

¬(sk3 ∧ sk

4 ) ∧ . . .

...

(s11 ∨ s2

1 ∨ s31 ∨ s4

1 ∨ s41) ∧

∧i 6=j

¬(si1 ∧ sj

1) ∧ (s12 ∨ s2

2 ∨ s32 ∨ s4

2 ∨ s42) ∧

∧i 6=j

¬(si2 ∧ sj

2) ∧ . . .

4∨k=1

(sk1 ∧ sk

3 ) ∧4∨

k=1

(sk1 ∧ sk

4 ) ∧4∨

k=1

(sk1 ∧ sk

2 ) ∧4∧

k=1

¬(sk3 ∧ sk

4 ) ∧ . . .

...

J. Berg Lectio praecursoria 8 / 22

Page 39: Solving Optimization Problems via Maximum Satisfiability ... · Lectio Praecursoria Jeremias Berg J. Berg Lectio praecursoria 1 / 22. Thesis research Contributions to exact declarative

Grouping books using MaxSAT

b1

b1

b2

b2

b3

b3

b4

b4

+ +

+

MaxSAT-based solution:1) Encode

Variables:s1

1, . . . , s41

s11 =True if b1 on shelf 1

Constraints:Hard: b1 put on exactly one shelf.

(s11 ∨ s2

1 ∨ s31 ∨ s4

1) ∧∧

i 6=j ¬(si1 ∧ sj

1)

Full formula:

(s11 ∨ s2

1 ∨ s31 ∨ s4

1) ∧∧i 6=j

¬(si1 ∧ sj

1) ∧ (s12 ∨ s2

2 ∨ s32 ∨ s4

2) ∧∧i 6=j

¬(si2 ∧ sj

2) ∧ . . .

4∨k=1

(sk1 ∧ sk

3 ) ∧4∨

k=1

(sk1 ∧ sk

4 ) ∧4∨

k=1

(sk1 ∧ sk

2 ) ∧4∧

k=1

¬(sk3 ∧ sk

4 ) ∧ . . .

...

(s11 ∨ s2

1 ∨ s31 ∨ s4

1 ∨ s41) ∧

∧i 6=j

¬(si1 ∧ sj

1) ∧ (s12 ∨ s2

2 ∨ s32 ∨ s4

2 ∨ s42) ∧

∧i 6=j

¬(si2 ∧ sj

2) ∧ . . .

4∨k=1

(sk1 ∧ sk

3 ) ∧4∨

k=1

(sk1 ∧ sk

4 ) ∧4∨

k=1

(sk1 ∧ sk

2 ) ∧4∧

k=1

¬(sk3 ∧ sk

4 ) ∧ . . .

...

J. Berg Lectio praecursoria 8 / 22

Page 40: Solving Optimization Problems via Maximum Satisfiability ... · Lectio Praecursoria Jeremias Berg J. Berg Lectio praecursoria 1 / 22. Thesis research Contributions to exact declarative

Grouping books using MaxSAT

b1

b1

b2

b2

b3

b3

b4

b4

+ +

+

MaxSAT-based solution:1) Encode

Variables:s1

1, . . . , s41

s11 =True if b1 on shelf 1

Constraints:Soft: prefer b1 and b3 on same shelf.∨4

k=1(sk1 ∧ sk

3)

Full formula:

(s11 ∨ s2

1 ∨ s31 ∨ s4

1) ∧∧i 6=j

¬(si1 ∧ sj

1) ∧ (s12 ∨ s2

2 ∨ s32 ∨ s4

2) ∧∧i 6=j

¬(si2 ∧ sj

2) ∧ . . .

4∨k=1

(sk1 ∧ sk

3 ) ∧4∨

k=1

(sk1 ∧ sk

4 ) ∧4∨

k=1

(sk1 ∧ sk

2 ) ∧4∧

k=1

¬(sk3 ∧ sk

4 ) ∧ . . .

...

(s11 ∨ s2

1 ∨ s31 ∨ s4

1 ∨ s41) ∧

∧i 6=j

¬(si1 ∧ sj

1) ∧ (s12 ∨ s2

2 ∨ s32 ∨ s4

2 ∨ s42) ∧

∧i 6=j

¬(si2 ∧ sj

2) ∧ . . .

4∨k=1

(sk1 ∧ sk

3 ) ∧4∨

k=1

(sk1 ∧ sk

4 ) ∧4∨

k=1

(sk1 ∧ sk

2 ) ∧4∧

k=1

¬(sk3 ∧ sk

4 ) ∧ . . .

...

J. Berg Lectio praecursoria 8 / 22

Page 41: Solving Optimization Problems via Maximum Satisfiability ... · Lectio Praecursoria Jeremias Berg J. Berg Lectio praecursoria 1 / 22. Thesis research Contributions to exact declarative

Grouping books using MaxSAT

b1

b1

b2

b2

b3

b3

b4

b4

+ +

+

MaxSAT-based solution:1) Encode

Variables:s1

1, . . . , s41

s11 =True if b1 on shelf 1

Constraints:

Full formula:(s1

1 ∨ s21 ∨ s3

1 ∨ s41) ∧

∧i 6=j

¬(si1 ∧ sj

1) ∧ (s12 ∨ s2

2 ∨ s32 ∨ s4

2) ∧∧i 6=j

¬(si2 ∧ sj

2) ∧ . . .

4∨k=1

(sk1 ∧ sk

3 ) ∧4∨

k=1

(sk1 ∧ sk

4 ) ∧4∨

k=1

(sk1 ∧ sk

2 ) ∧4∧

k=1

¬(sk3 ∧ sk

4 ) ∧ . . .

...

(s11 ∨ s2

1 ∨ s31 ∨ s4

1 ∨ s41) ∧

∧i 6=j

¬(si1 ∧ sj

1) ∧ (s12 ∨ s2

2 ∨ s32 ∨ s4

2 ∨ s42) ∧

∧i 6=j

¬(si2 ∧ sj

2) ∧ . . .

4∨k=1

(sk1 ∧ sk

3 ) ∧4∨

k=1

(sk1 ∧ sk

4 ) ∧4∨

k=1

(sk1 ∧ sk

2 ) ∧4∧

k=1

¬(sk3 ∧ sk

4 ) ∧ . . .

...

J. Berg Lectio praecursoria 8 / 22

Page 42: Solving Optimization Problems via Maximum Satisfiability ... · Lectio Praecursoria Jeremias Berg J. Berg Lectio praecursoria 1 / 22. Thesis research Contributions to exact declarative

Grouping books using MaxSAT

b1

b1

b2

b2

b3

b3

b4

b4

+ +

+

MaxSAT-based solution:1) Encode2) Solve

Variables:s1

1, . . . , s41

s11 =True if b1 on shelf 1

Constraints:

Full formula:

(s11 ∨ s2

1 ∨ s31 ∨ s4

1) ∧∧i 6=j

¬(si1 ∧ sj

1) ∧ (s12 ∨ s2

2 ∨ s32 ∨ s4

2) ∧∧i 6=j

¬(si2 ∧ sj

2) ∧ . . .

4∨k=1

(sk1 ∧ sk

3 ) ∧4∨

k=1

(sk1 ∧ sk

4 ) ∧4∨

k=1

(sk1 ∧ sk

2 ) ∧4∧

k=1

¬(sk3 ∧ sk

4 ) ∧ . . .

...

(s11 ∨ s2

1 ∨ s31 ∨ s4

1 ∨ s41) ∧

∧i 6=j

¬(si1 ∧ sj

1) ∧ (s12 ∨ s2

2 ∨ s32 ∨ s4

2 ∨ s42) ∧

∧i 6=j

¬(si2 ∧ sj

2) ∧ . . .

4∨k=1

(sk1 ∧ sk

3 ) ∧4∨

k=1

(sk1 ∧ sk

4 ) ∧4∨

k=1

(sk1 ∧ sk

2 ) ∧4∧

k=1

¬(sk3 ∧ sk

4 ) ∧ . . .

...

J. Berg Lectio praecursoria 8 / 22

Page 43: Solving Optimization Problems via Maximum Satisfiability ... · Lectio Praecursoria Jeremias Berg J. Berg Lectio praecursoria 1 / 22. Thesis research Contributions to exact declarative

Grouping books using MaxSAT

b1b1

b2b2

b3b3

b4b4

+ +

+

MaxSAT-based solution:1) Encode2) Solve3) Reconstruct

Variables:s1

1, . . . , s41

s11 =True if b1 on shelf 1

Constraints:

Full formula:

(s11 ∨ s2

1 ∨ s31 ∨ s4

1) ∧∧i 6=j

¬(si1 ∧ sj

1) ∧ (s12 ∨ s2

2 ∨ s32 ∨ s4

2) ∧∧i 6=j

¬(si2 ∧ sj

2) ∧ . . .

4∨k=1

(sk1 ∧ sk

3 ) ∧4∨

k=1

(sk1 ∧ sk

4 ) ∧4∨

k=1

(sk1 ∧ sk

2 ) ∧4∧

k=1

¬(sk3 ∧ sk

4 ) ∧ . . .

...

(s11 ∨ s2

1 ∨ s31 ∨ s4

1 ∨ s41) ∧

∧i 6=j

¬(si1 ∧ sj

1) ∧ (s12 ∨ s2

2 ∨ s32 ∨ s4

2 ∨ s42) ∧

∧i 6=j

¬(si2 ∧ sj

2) ∧ . . .

4∨k=1

(sk1 ∧ sk

3 ) ∧4∨

k=1

(sk1 ∧ sk

4 ) ∧4∨

k=1

(sk1 ∧ sk

2 ) ∧4∧

k=1

¬(sk3 ∧ sk

4 ) ∧ . . .

...

J. Berg Lectio praecursoria 8 / 22

Page 44: Solving Optimization Problems via Maximum Satisfiability ... · Lectio Praecursoria Jeremias Berg J. Berg Lectio praecursoria 1 / 22. Thesis research Contributions to exact declarative

Declarative Approach to Combinatorial OptimizationMore generally

Instance p of P MaxSAT instance F(p)

Solution τ to F(p)Solution to p

MaxSAT encoding

MaxSAT solver

Reconstruction

Benefits of the declarative approachGeneralFlexibleCompetitive with specialized algorithms

J. Berg Lectio praecursoria 9 / 22

Page 45: Solving Optimization Problems via Maximum Satisfiability ... · Lectio Praecursoria Jeremias Berg J. Berg Lectio praecursoria 1 / 22. Thesis research Contributions to exact declarative

Declarative Approach to Combinatorial OptimizationMore generally

Instance p of P MaxSAT instance F(p)

Solution τ to F(p)Solution to p

MaxSAT encoding

MaxSAT solver

Reconstruction

Benefits of the declarative approachGeneralFlexibleCompetitive with specialized algorithms

J. Berg Lectio praecursoria 9 / 22

Page 46: Solving Optimization Problems via Maximum Satisfiability ... · Lectio Praecursoria Jeremias Berg J. Berg Lectio praecursoria 1 / 22. Thesis research Contributions to exact declarative

Declarative Approach to Combinatorial OptimizationMore generally

Instance p of P MaxSAT instance F(p)

Solution τ to F(p)Solution to p

MaxSAT encoding

MaxSAT solver

Reconstruction

Benefits of the declarative approachGeneralFlexibleCompetitive with specialized algorithms

J. Berg Lectio praecursoria 9 / 22

Page 47: Solving Optimization Problems via Maximum Satisfiability ... · Lectio Praecursoria Jeremias Berg J. Berg Lectio praecursoria 1 / 22. Thesis research Contributions to exact declarative

Declarative Approach to Combinatorial OptimizationMore generally

Instance p of P MaxSAT instance F(p)

Solution τ to F(p)Solution to p

MaxSAT encoding

MaxSAT solver

Reconstruction

Benefits of the declarative approachGeneralFlexibleCompetitive with specialized algorithms

J. Berg Lectio praecursoria 9 / 22

Page 48: Solving Optimization Problems via Maximum Satisfiability ... · Lectio Praecursoria Jeremias Berg J. Berg Lectio praecursoria 1 / 22. Thesis research Contributions to exact declarative

Thesis researchIn more detail

Instance p of P MaxSAT instance F(p)

Solution τ to F(p)Solution to p

MaxSAT encoding

MaxSAT solver

Reconstruction

Six peer reviewed publications aiming to improve MaxSAT-basedsolution methods to combinatorial optimization problems.

Part 1: MaxSAT solving techniques, specifically preprocessing(Papers I - IV)Part 2: MaxSAT encodings of other data analysis problems(Papers V - VI)

J. Berg Lectio praecursoria 10 / 22

Page 49: Solving Optimization Problems via Maximum Satisfiability ... · Lectio Praecursoria Jeremias Berg J. Berg Lectio praecursoria 1 / 22. Thesis research Contributions to exact declarative

Thesis researchIn more detail

Instance p of P MaxSAT instance F(p)

Solution τ to F(p)Solution to p

MaxSAT encoding

MaxSAT solver

Reconstruction

Six peer reviewed publications aiming to improve MaxSAT-basedsolution methods to combinatorial optimization problems.

Part 1: MaxSAT solving techniques, specifically preprocessing(Papers I - IV)Part 2: MaxSAT encodings of other data analysis problems(Papers V - VI)

J. Berg Lectio praecursoria 10 / 22

Page 50: Solving Optimization Problems via Maximum Satisfiability ... · Lectio Praecursoria Jeremias Berg J. Berg Lectio praecursoria 1 / 22. Thesis research Contributions to exact declarative

Thesis researchIn more detail

Instance p of P MaxSAT instance F(p)

Solution τ to F(p)Solution to p

MaxSAT encoding

MaxSAT solver

Reconstruction

Six peer reviewed publications aiming to improve MaxSAT-basedsolution methods to combinatorial optimization problems.

Part 1: MaxSAT solving techniques, specifically preprocessing(Papers I - IV)Part 2: MaxSAT encodings of other data analysis problems(Papers V - VI)

J. Berg Lectio praecursoria 10 / 22

Page 51: Solving Optimization Problems via Maximum Satisfiability ... · Lectio Praecursoria Jeremias Berg J. Berg Lectio praecursoria 1 / 22. Thesis research Contributions to exact declarative

Part 1: Preprocessing

Instance p of P Instance F(p)

Preprocessed (Re-encoded)instance pre(F(p))

Solution τto pre(F(p))

Solution to p

Encoding

Preprocessor

Solver

Reconstruction+

Simplification rules that re-encode MaxSAT instances.Decrease overall solving time

In practice, beneficial on several instances.

J. Berg Lectio praecursoria 11 / 22

Page 52: Solving Optimization Problems via Maximum Satisfiability ... · Lectio Praecursoria Jeremias Berg J. Berg Lectio praecursoria 1 / 22. Thesis research Contributions to exact declarative

Contributions to MaxSAT Preprocessing

1 Efficient integration of preprocessing to modern core-guidedMaxSAT solving (Papers I & II)

Improving empirical performance of especially the implicit hitting setbased solvers

2 Theoretical analysis on the effects of preprocessing oncore-guided MaxSAT solving (Paper III)

Preprocessing has limited effect on the number of iterationsrequired by core-guided solvers.

3 A new preprocessing rule for MaxSAT (Paper IV)Subsumed Label Elimination

J. Berg Lectio praecursoria 12 / 22

Page 53: Solving Optimization Problems via Maximum Satisfiability ... · Lectio Praecursoria Jeremias Berg J. Berg Lectio praecursoria 1 / 22. Thesis research Contributions to exact declarative

Example:

b1

b1

b2

b3

b3

b4

b4b4

+ +

+

+ −

Subsumed Label Elimination (SLE):

–Enforce b1 and b4 onto the same shelf during preprocessing.–SLE captures a subset of such simplifications on the MaxSAT level.

J. Berg Lectio praecursoria 13 / 22

Page 54: Solving Optimization Problems via Maximum Satisfiability ... · Lectio Praecursoria Jeremias Berg J. Berg Lectio praecursoria 1 / 22. Thesis research Contributions to exact declarative

Example:

b1b1

b2

b3b3

b4b4

b4

+ +

+

−+

Subsumed Label Elimination (SLE):–Enforce b1 and b4 onto the same shelf during preprocessing.

–SLE captures a subset of such simplifications on the MaxSAT level.

J. Berg Lectio praecursoria 13 / 22

Page 55: Solving Optimization Problems via Maximum Satisfiability ... · Lectio Praecursoria Jeremias Berg J. Berg Lectio praecursoria 1 / 22. Thesis research Contributions to exact declarative

Example:

b1b1

b2

b3b3

b4

b4

b4

+ +

+

+

Subsumed Label Elimination (SLE):–Enforce b1 and b4 onto the same shelf during preprocessing.

–SLE captures a subset of such simplifications on the MaxSAT level.

J. Berg Lectio praecursoria 13 / 22

Page 56: Solving Optimization Problems via Maximum Satisfiability ... · Lectio Praecursoria Jeremias Berg J. Berg Lectio praecursoria 1 / 22. Thesis research Contributions to exact declarative

Example:

b1b1

b2

b3b3

b4

b4

b4

+ +

+

+ −

Subsumed Label Elimination (SLE):–Enforce b1 and b4 onto the same shelf during preprocessing.–SLE captures a subset of such simplifications on the MaxSAT level.

J. Berg Lectio praecursoria 13 / 22

Page 57: Solving Optimization Problems via Maximum Satisfiability ... · Lectio Praecursoria Jeremias Berg J. Berg Lectio praecursoria 1 / 22. Thesis research Contributions to exact declarative

Part 2: MaxSAT encodings of other problems

Contributions:1 Propose new MaxSAT encodings of two data analysis problems

Correlation Clustering (Paper V)Bounded Treewidth Bayesian Network Structure Learning(Paper VI)

2 Experimental evaluation comparing MaxSAT based solutionmethods with previously proposed solution algorithms.

J. Berg Lectio praecursoria 14 / 22

Page 58: Solving Optimization Problems via Maximum Satisfiability ... · Lectio Praecursoria Jeremias Berg J. Berg Lectio praecursoria 1 / 22. Thesis research Contributions to exact declarative

Correlation Clustering

Generalization of ”the book placing problem”.Cluster a set of datapoints based on pairwise similarityinformation.Dual natured objective function:

Maximize sum of weights of positive edges assigned to the samecluster.Minimize sum of weights of negative edges assigned to the samecluster.

Applications in: biosciences, social network analysis, informationretrieval, bioinformatics and microarray data analysis . . . .

J. Berg Lectio praecursoria 15 / 22

Page 59: Solving Optimization Problems via Maximum Satisfiability ... · Lectio Praecursoria Jeremias Berg J. Berg Lectio praecursoria 1 / 22. Thesis research Contributions to exact declarative

Correlation ClusteringExperiments on sparse data

x1

x2

x3

x4

x5

Make sparse instances bykeeping p ∗ 100% of the edges

p = 1.0

Compute cost w.r.t to full instance

+

+

− +

+

+−

J. Berg Lectio praecursoria 16 / 22

Page 60: Solving Optimization Problems via Maximum Satisfiability ... · Lectio Praecursoria Jeremias Berg J. Berg Lectio praecursoria 1 / 22. Thesis research Contributions to exact declarative

Correlation ClusteringExperiments on sparse data

x1

x2

x3

x4

x5

Make sparse instances bykeeping p ∗ 100% of the edges

p = 0.7

Compute cost w.r.t to full instance

+

+

+

J. Berg Lectio praecursoria 16 / 22

Page 61: Solving Optimization Problems via Maximum Satisfiability ... · Lectio Praecursoria Jeremias Berg J. Berg Lectio praecursoria 1 / 22. Thesis research Contributions to exact declarative

Correlation ClusteringExperiments on sparse data

x1

x2

x3

x4

x5

Make sparse instances bykeeping p ∗ 100% of the edges

p = 0.4

Compute cost w.r.t to full instance

+

+

−−

J. Berg Lectio praecursoria 16 / 22

Page 62: Solving Optimization Problems via Maximum Satisfiability ... · Lectio Praecursoria Jeremias Berg J. Berg Lectio praecursoria 1 / 22. Thesis research Contributions to exact declarative

Correlation ClusteringExperiments on sparse data

x1

x2

x3

x4

x5

Make sparse instances bykeeping p ∗ 100% of the edges

p = 0.1

Compute cost w.r.t to full instance

+

J. Berg Lectio praecursoria 16 / 22

Page 63: Solving Optimization Problems via Maximum Satisfiability ... · Lectio Praecursoria Jeremias Berg J. Berg Lectio praecursoria 1 / 22. Thesis research Contributions to exact declarative

Experiments on Sparse DataResults

600

700

800

900 1000

1200

1500

2100

2700

3500

4500

0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1

Co

st

of

Clu

ste

rin

g

p

SDPCKC

SCPSCCA

MaxSAT-Binary

J. Berg Lectio praecursoria 17 / 22

Page 64: Solving Optimization Problems via Maximum Satisfiability ... · Lectio Praecursoria Jeremias Berg J. Berg Lectio praecursoria 1 / 22. Thesis research Contributions to exact declarative

Bayesian Networks

J. Berg Lectio praecursoria 18 / 22

Page 65: Solving Optimization Problems via Maximum Satisfiability ... · Lectio Praecursoria Jeremias Berg J. Berg Lectio praecursoria 1 / 22. Thesis research Contributions to exact declarative

Bounded Treewidth Bayesian Network StructureLearning (BTBNSL)

BNSL: Learn a network structure which ”explains” a set ofobservations (data) as well as possible.Do probabilistic inference over the network

Both are NP-hard in general

BTBNSL: Learn a network over which inference is effective.

A S T L B T&L X D0 1 0 1 0 1 1 10 0 1 1 0 1 0 11 1 0 1 1 0 0 11 0 0 1 1 1 1 11 1 1 1 1 1 0 11 1 1 1 0 0 1 0...

......

......

......

...

P(S | T , L,B) =?

P(X | D,A,B) =?

P(A | T , L,B) =?...

J. Berg Lectio praecursoria 19 / 22

Page 66: Solving Optimization Problems via Maximum Satisfiability ... · Lectio Praecursoria Jeremias Berg J. Berg Lectio praecursoria 1 / 22. Thesis research Contributions to exact declarative

Bounded Treewidth Bayesian Network StructureLearning (BTBNSL)

BNSL: Learn a network structure which ”explains” a set ofobservations (data) as well as possible.Do probabilistic inference over the network

Both are NP-hard in general

BTBNSL: Learn a network over which inference is effective.

A S T L B T&L X D0 1 0 1 0 1 1 10 0 1 1 0 1 0 11 1 0 1 1 0 0 11 0 0 1 1 1 1 11 1 1 1 1 1 0 11 1 1 1 0 0 1 0...

......

......

......

...

P(S | T , L,B) =?

P(X | D,A,B) =?

P(A | T , L,B) =?...

J. Berg Lectio praecursoria 19 / 22

Page 67: Solving Optimization Problems via Maximum Satisfiability ... · Lectio Praecursoria Jeremias Berg J. Berg Lectio praecursoria 1 / 22. Thesis research Contributions to exact declarative

Treewidth

x1

x2

x3

x4

x5

Treewidth: 1

x1

x2

x3

x4

x5

Treewidth: 2

x1

x2

x3

x4

x5

Treewidth: 4

Treewidth of a graph measures its distance from being a treeBayesian inference is effective over structures with boundedtreewidth

J. Berg Lectio praecursoria 20 / 22

Page 68: Solving Optimization Problems via Maximum Satisfiability ... · Lectio Praecursoria Jeremias Berg J. Berg Lectio praecursoria 1 / 22. Thesis research Contributions to exact declarative

BTBNSLComparison of exact approaches

0

5000

10000

15000

20000

25000

10 20 30 40 50 60

Tim

eout (s

)

Instances solved

MaxSATDPILP

J. Berg Lectio praecursoria 21 / 22

Page 69: Solving Optimization Problems via Maximum Satisfiability ... · Lectio Praecursoria Jeremias Berg J. Berg Lectio praecursoria 1 / 22. Thesis research Contributions to exact declarative

Conclusions

In this thesis we:Propose and evaluate a method of integrating preprocessing intocore-guided MaxSAT solving.Analyze the effect of preprocessing on core-guided MaxSATsolving.Propose and evaluate a new preprocessing rule for MaxSAT.Propose and evaluate MaxSAT encodings of two data analysisproblems.

Improve the organization of bookshelves everywhere (hopefully).

J. Berg Lectio praecursoria 22 / 22

Page 70: Solving Optimization Problems via Maximum Satisfiability ... · Lectio Praecursoria Jeremias Berg J. Berg Lectio praecursoria 1 / 22. Thesis research Contributions to exact declarative

Conclusions

In this thesis we:Propose and evaluate a method of integrating preprocessing intocore-guided MaxSAT solving.Analyze the effect of preprocessing on core-guided MaxSATsolving.Propose and evaluate a new preprocessing rule for MaxSAT.Propose and evaluate MaxSAT encodings of two data analysisproblems.

Improve the organization of bookshelves everywhere (hopefully).

J. Berg Lectio praecursoria 22 / 22

Page 71: Solving Optimization Problems via Maximum Satisfiability ... · Lectio Praecursoria Jeremias Berg J. Berg Lectio praecursoria 1 / 22. Thesis research Contributions to exact declarative

Conclusions

In this thesis we:Propose and evaluate a method of integrating preprocessing intocore-guided MaxSAT solving.Analyze the effect of preprocessing on core-guided MaxSATsolving.Propose and evaluate a new preprocessing rule for MaxSAT.Propose and evaluate MaxSAT encodings of two data analysisproblems.

Improve the organization of bookshelves everywhere (hopefully).

J. Berg Lectio praecursoria 22 / 22

Page 72: Solving Optimization Problems via Maximum Satisfiability ... · Lectio Praecursoria Jeremias Berg J. Berg Lectio praecursoria 1 / 22. Thesis research Contributions to exact declarative

Conclusions

In this thesis we:Propose and evaluate a method of integrating preprocessing intocore-guided MaxSAT solving.Analyze the effect of preprocessing on core-guided MaxSATsolving.Propose and evaluate a new preprocessing rule for MaxSAT.Propose and evaluate MaxSAT encodings of two data analysisproblems.

Improve the organization of bookshelves everywhere (hopefully).

J. Berg Lectio praecursoria 22 / 22

Page 73: Solving Optimization Problems via Maximum Satisfiability ... · Lectio Praecursoria Jeremias Berg J. Berg Lectio praecursoria 1 / 22. Thesis research Contributions to exact declarative

Conclusions

In this thesis we:Propose and evaluate a method of integrating preprocessing intocore-guided MaxSAT solving.Analyze the effect of preprocessing on core-guided MaxSATsolving.Propose and evaluate a new preprocessing rule for MaxSAT.Propose and evaluate MaxSAT encodings of two data analysisproblems.

Improve the organization of bookshelves everywhere (hopefully).

J. Berg Lectio praecursoria 22 / 22

Page 74: Solving Optimization Problems via Maximum Satisfiability ... · Lectio Praecursoria Jeremias Berg J. Berg Lectio praecursoria 1 / 22. Thesis research Contributions to exact declarative

Conclusions

In this thesis we:Propose and evaluate a method of integrating preprocessing intocore-guided MaxSAT solving.Analyze the effect of preprocessing on core-guided MaxSATsolving.Propose and evaluate a new preprocessing rule for MaxSAT.Propose and evaluate MaxSAT encodings of two data analysisproblems.Improve the organization of bookshelves everywhere (hopefully).

J. Berg Lectio praecursoria 22 / 22