improving maximum satisfiability solving with preprocessing

63
Improving Maximum Satisfiability solving with preprocessing Data61 Decision Sciences Seminar Jeremias Berg University of Helsinki October 26, 2018 J. Berg (University of Helsinki) MaxSAT preprocessing October 26, 2018 1 / 24

Upload: others

Post on 01-Jul-2022

3 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Improving Maximum Satisfiability solving with preprocessing

Improving Maximum Satisfiability solving withpreprocessing

Data61 Decision Sciences SeminarJeremias Berg

University of Helsinki

October 26, 2018

J. Berg (University of Helsinki) MaxSAT preprocessing October 26, 2018 1 / 24

Page 2: Improving Maximum Satisfiability solving with preprocessing

Who am I?

29-year old postdoc from Finland.Here to meet new people and work onnew problems.

Graduated with distinction from theUniversity of Helsinki in June 2018.

Supervisor: Prof Matti Jarvisalo.

MSc, in mathematics 2014In Melbourne until Christmas, bestchance to find me in Monash on aThursday.www.jeremiasberg.com

J. Berg (University of Helsinki) MaxSAT preprocessing October 26, 2018 2 / 24

Page 3: Improving Maximum Satisfiability solving with preprocessing

Take Home Messages

Preprocessing, a currently underused approach to MaxSATsolving.In contrast to SAT solving, a naive integration of preprocessing inMaxSAT can hurt solvers.Smarter integration changes conceptualisation of MaxSAT.Talk is mainly based on: Jeremias Berg, Paul Saikko, and MattiJarvisalo. 2015. Improving the effectiveness of SAT-basedpreprocessing for MaxSAT. In Proc IJCAI’15, AAAI Press 239-245.

J. Berg (University of Helsinki) MaxSAT preprocessing October 26, 2018 3 / 24

Page 4: Improving Maximum Satisfiability solving with preprocessing

Outline

Combinatorial optimization problemsMaximum SatisfiabilitySolving Combinatorial optimization problems with MaxSAT.Preprocessing in SAT and MaxSAT solvingIntegrating MaxSAT preprocessing and solving”New” conceptualisation of MaxSAT

J. Berg (University of Helsinki) MaxSAT preprocessing October 26, 2018 4 / 24

Page 5: Improving Maximum Satisfiability solving with preprocessing

Combinatorial Optimization

Find a solution that minimizes a given cost function from a finite setof feasible solutions.

Encountered in many domains, including:Route PlanningPackingSchedulingMachine Learning / Data Analysis / Artificial Intelligence:

itemset mining, clustering, classification, probabilistic modelling,data visualization etc.

NP-hardnessMost interesting problems are difficult to solve!

J. Berg (University of Helsinki) MaxSAT preprocessing October 26, 2018 5 / 24

Page 6: Improving Maximum Satisfiability solving with preprocessing

Combinatorial Optimization

Find a solution that minimizes a given cost function from a finite setof feasible solutions.

Encountered in many domains, including:Route PlanningPackingSchedulingMachine Learning / Data Analysis / Artificial Intelligence:

itemset mining, clustering, classification, probabilistic modelling,data visualization etc.

NP-hardnessMost interesting problems are difficult to solve!

J. Berg (University of Helsinki) MaxSAT preprocessing October 26, 2018 5 / 24

Page 7: Improving Maximum Satisfiability solving with preprocessing

Solving Difficult Combinatorial Optimization Problems

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

J. Berg (University of Helsinki) MaxSAT preprocessing October 26, 2018 6 / 24

Page 8: Improving Maximum Satisfiability solving with preprocessing

Solving Difficult Combinatorial Optimization Problems

Roughly four different approachesApproximation algorithms:

scalable (fast) algorithms,not guaranteed to return the optimal solution,mathematically provable guarantees on the quality of the obtainedsolution.

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

J. Berg (University of Helsinki) MaxSAT preprocessing October 26, 2018 6 / 24

Page 9: Improving Maximum Satisfiability solving with preprocessing

Solving Difficult Combinatorial Optimization Problems

Roughly four different approachesApproximation algorithms:Local search algorithms:

very scalable algorithms,traverse the search space moving from solution to solution,no guarantees on the quality of solution obtained.

Problem specific exact solution algorithms:Exact declarative methods:

J. Berg (University of Helsinki) MaxSAT preprocessing October 26, 2018 6 / 24

Page 10: Improving Maximum Satisfiability solving with preprocessing

Solving Difficult Combinatorial Optimization Problems

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

less scalable,guaranteed to find the optimal solution,designed for the specific problem at hand.

Exact declarative methods:

J. Berg (University of Helsinki) MaxSAT preprocessing October 26, 2018 6 / 24

Page 11: Improving Maximum Satisfiability solving with preprocessing

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 constraints,solve the constraint instance instead.in this talk: Maximum Satisfiability

J. Berg (University of Helsinki) MaxSAT preprocessing October 26, 2018 6 / 24

Page 12: Improving Maximum Satisfiability solving with preprocessing

(Weighted Partial) Maximum Satisfiability (MaxSAT)

x ¬x

Boolean variables and negations (literals):

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 =Boolean Satisfiability (SAT):

Decide the existence of an assign-ment that satisfies all clauses.

In this case UNSAT

(Weighted Partial) Maximum Satis-fiability (MaxSAT):Find an assignment that satisfies allhard clauses and a maximum sum ofweights of soft clauses.

Cost of solution: 5

J. Berg (University of Helsinki) MaxSAT preprocessing October 26, 2018 7 / 24

Page 13: Improving Maximum Satisfiability solving with preprocessing

(Weighted Partial) Maximum Satisfiability (MaxSAT)

x ¬x

Boolean variables and negations (literals):

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 =Boolean Satisfiability (SAT):

Decide the existence of an assign-ment that satisfies all clauses.

In this case UNSAT

(Weighted Partial) Maximum Satis-fiability (MaxSAT):Find an assignment that satisfies allhard clauses and a maximum sum ofweights of soft clauses.

Cost of solution: 5

J. Berg (University of Helsinki) MaxSAT preprocessing October 26, 2018 7 / 24

Page 14: Improving Maximum Satisfiability solving with preprocessing

(Weighted Partial) Maximum Satisfiability (MaxSAT)

x ¬x

Boolean variables and negations (literals):

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 =Boolean Satisfiability (SAT):

Decide the existence of an assign-ment that satisfies all clauses.

In this case UNSAT

(Weighted Partial) Maximum Satis-fiability (MaxSAT):Find an assignment that satisfies allhard clauses and a maximum sum ofweights of soft clauses.

Cost of solution: 5

J. Berg (University of Helsinki) MaxSAT preprocessing October 26, 2018 7 / 24

Page 15: Improving Maximum Satisfiability solving with preprocessing

(Weighted Partial) Maximum Satisfiability (MaxSAT)

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 =Boolean Satisfiability (SAT):

Decide the existence of an assign-ment that satisfies all clauses.

In this case UNSAT

(Weighted Partial) Maximum Satis-fiability (MaxSAT):Find an assignment that satisfies allhard clauses and a maximum sum ofweights of soft clauses.

Cost of solution: 5

J. Berg (University of Helsinki) MaxSAT preprocessing October 26, 2018 7 / 24

Page 16: Improving Maximum Satisfiability solving with preprocessing

(Weighted Partial) Maximum Satisfiability (MaxSAT)

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

Boolean Satisfiability (SAT):Decide the existence of an assign-ment that satisfies all clauses.

In this case UNSAT

(Weighted Partial) Maximum Satis-fiability (MaxSAT):Find an assignment that satisfies allhard clauses and a maximum sum ofweights of soft clauses.

Cost of solution: 5

J. Berg (University of Helsinki) MaxSAT preprocessing October 26, 2018 7 / 24

Page 17: Improving Maximum Satisfiability solving with preprocessing

(Weighted Partial) Maximum Satisfiability (MaxSAT)

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

Boolean Satisfiability (SAT):Decide the existence of an assign-ment that satisfies all clauses.

In this case UNSAT

(Weighted Partial) Maximum Satis-fiability (MaxSAT):Find an assignment that satisfies allhard clauses and a maximum sum ofweights of soft clauses.

Cost of solution: 5

J. Berg (University of Helsinki) MaxSAT preprocessing October 26, 2018 7 / 24

Page 18: Improving Maximum Satisfiability solving with preprocessing

(Weighted Partial) Maximum Satisfiability (MaxSAT)

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 =Boolean Satisfiability (SAT):

Decide the existence of an assign-ment that satisfies all clauses.

In this case UNSAT

(Weighted Partial) Maximum Satis-fiability (MaxSAT):Find an assignment that satisfies allhard clauses and a maximum sum ofweights of soft clauses.

Cost of solution: 5

J. Berg (University of Helsinki) MaxSAT preprocessing October 26, 2018 7 / 24

Page 19: Improving Maximum Satisfiability solving with preprocessing

(Weighted Partial) Maximum Satisfiability (MaxSAT)

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 =

Boolean Satisfiability (SAT):Decide the existence of an assign-ment that satisfies all clauses.

In this case UNSAT

(Weighted Partial) Maximum Satis-fiability (MaxSAT):Find an assignment that satisfies allhard clauses and a maximum sum ofweights of soft clauses.

Cost of solution: 5

J. Berg (University of Helsinki) MaxSAT preprocessing October 26, 2018 7 / 24

Page 20: Improving Maximum Satisfiability solving with preprocessing

(Weighted Partial) Maximum Satisfiability (MaxSAT)

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 =Boolean Satisfiability (SAT):

Decide the existence of an assign-ment that satisfies all clauses.

In this case UNSAT

(Weighted Partial) Maximum Satis-fiability (MaxSAT):Find an assignment that satisfies allhard clauses and a maximum sum ofweights of soft clauses.

Cost of solution: 5

J. Berg (University of Helsinki) MaxSAT preprocessing October 26, 2018 7 / 24

Page 21: Improving Maximum Satisfiability solving with preprocessing

(Weighted Partial) Maximum Satisfiability (MaxSAT)

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 =Boolean Satisfiability (SAT):

Decide the existence of an assign-ment that satisfies all clauses.

In this case UNSAT

(Weighted Partial) Maximum Satis-fiability (MaxSAT):Find an assignment that satisfies allhard clauses and a maximum sum ofweights of soft clauses.

Cost of solution: 5

J. Berg (University of Helsinki) MaxSAT preprocessing October 26, 2018 7 / 24

Page 22: Improving Maximum Satisfiability solving with preprocessing

Combinatorial Optimization with MaxSAT

Instance p of P MaxSAT instance F(p)

Solution τ to F(p)Solution to p

MaxSAT encoding

MaxSAT solver

Reconstruction

J. Berg (University of Helsinki) MaxSAT preprocessing October 26, 2018 8 / 24

Page 23: Improving Maximum Satisfiability solving with preprocessing

Why MaxSAT?

J. Berg (University of Helsinki) MaxSAT preprocessing October 26, 2018 9 / 24

Page 24: Improving Maximum Satisfiability solving with preprocessing

Combinatorial Optimization with MaxSAT andpreprocessing

Instance p of P MaxSAT instance F(p)

Preprocessed MaxSAT instance pre(F(p))

Solution τp to pre(F(p))

Solution to p

Solution τ to F(p)

MaxSAT encoding

MaxSAT preprocessing

MaxSAT solverMaxSATReconstruction

Reconstruction

J. Berg (University of Helsinki) MaxSAT preprocessing October 26, 2018 10 / 24

Page 25: Improving Maximum Satisfiability solving with preprocessing

Preprocessing in SAT solving

(a)(a ∨ ¬b ∨ ¬c)

(¬a ∨ b)(¬a ∨ c)

(c ∨ ¬d ∨ ¬e)(¬c ∨ d)(¬c ∨ e)(¬d ∨ ¬e)

(a)(a ∨ ¬b ∨ ¬c)

(¬a ∨ b)(¬a ∨ c)

(¬c ∨ d)(¬c ∨ e)(¬d ∨ ¬e)

(a)

(¬a ∨ b)

(¬d ∨ ¬e)

(a)

((((((((a ∨ ¬b ∨ ¬a)

(¬a ∨ b)

(¬a ∨ d)(¬a ∨ e)

(¬d ∨ ¬e)

(¬a ∨ b)(¬a ∨ d)(¬a ∨ e)(¬d ∨ ¬e) ()

Simple: Removal of subsumed clausesMore involved: Elimination of variables by resolvingFrom now on: SAT-based preprocessing rules

J. Berg (University of Helsinki) MaxSAT preprocessing October 26, 2018 11 / 24

Page 26: Improving Maximum Satisfiability solving with preprocessing

Preprocessing in SAT solving

(a)(a ∨ ¬b ∨ ¬c)

(¬a ∨ b)(¬a ∨ c)

((((((((c ∨ ¬d ∨ ¬e)

(¬c ∨ d)(¬c ∨ e)(¬d ∨ ¬e)

(a)(a ∨ ¬b ∨ ¬c)

(¬a ∨ b)(¬a ∨ c)

(¬c ∨ d)(¬c ∨ e)(¬d ∨ ¬e)

(a)

(¬a ∨ b)

(¬d ∨ ¬e)

(a)

((((((((a ∨ ¬b ∨ ¬a)

(¬a ∨ b)

(¬a ∨ d)(¬a ∨ e)

(¬d ∨ ¬e)

(¬a ∨ b)(¬a ∨ d)(¬a ∨ e)(¬d ∨ ¬e) ()

Simple: Removal of subsumed clauses

More involved: Elimination of variables by resolvingFrom now on: SAT-based preprocessing rules

J. Berg (University of Helsinki) MaxSAT preprocessing October 26, 2018 11 / 24

Page 27: Improving Maximum Satisfiability solving with preprocessing

Preprocessing in SAT solving

(a)(a ∨ ¬b ∨ ¬c)

(¬a ∨ b)(¬a ∨ c)

((((((((c ∨ ¬d ∨ ¬e)

(¬c ∨ d)(¬c ∨ e)(¬d ∨ ¬e)

(a)(a ∨ ¬b ∨ ¬c)

(¬a ∨ b)(¬a ∨ c)

(¬c ∨ d)(¬c ∨ e)(¬d ∨ ¬e)

(a)(a ∨ ¬b ∨ ¬c)

(¬a ∨ b)(¬a ∨ c)(¬c ∨ d)(¬c ∨ e)(¬d ∨ ¬e)

(a)

((((((((a ∨ ¬b ∨ ¬a)

(¬a ∨ b)

(¬a ∨ d)(¬a ∨ e)

(¬d ∨ ¬e)

(¬a ∨ b)(¬a ∨ d)(¬a ∨ e)(¬d ∨ ¬e) ()

Simple: Removal of subsumed clauses

More involved: Elimination of variables by resolvingFrom now on: SAT-based preprocessing rules

J. Berg (University of Helsinki) MaxSAT preprocessing October 26, 2018 11 / 24

Page 28: Improving Maximum Satisfiability solving with preprocessing

Preprocessing in SAT solving

(a)(a ∨ ¬b ∨ ¬c)

(¬a ∨ b)(¬a ∨ c)

((((((((c ∨ ¬d ∨ ¬e)

(¬c ∨ d)(¬c ∨ e)(¬d ∨ ¬e)

(a)(a ∨ ¬b ∨ ¬c)

(¬a ∨ b)(¬a ∨ c)

(¬c ∨ d)(¬c ∨ e)(¬d ∨ ¬e)

(a)(a ∨ ¬b ∨ ¬c)

(¬a ∨ b)(¬a ∨ c)(¬c ∨ d)(¬c ∨ e)(¬d ∨ ¬e)

(a)

((((((((a ∨ ¬b ∨ ¬a)

(¬a ∨ b)

(¬a ∨ d)(¬a ∨ e)

(¬d ∨ ¬e)

(¬a ∨ b)(¬a ∨ d)(¬a ∨ e)(¬d ∨ ¬e) ()

Simple: Removal of subsumed clausesMore involved: Elimination of variables by resolving

From now on: SAT-based preprocessing rules

J. Berg (University of Helsinki) MaxSAT preprocessing October 26, 2018 11 / 24

Page 29: Improving Maximum Satisfiability solving with preprocessing

Preprocessing in SAT solving

(a)(a ∨ ¬b ∨ ¬c)

(¬a ∨ b)(¬a ∨ c)

((((((((c ∨ ¬d ∨ ¬e)

(¬c ∨ d)(¬c ∨ e)(¬d ∨ ¬e)

(a)(a ∨ ¬b ∨ ¬c)

(¬a ∨ b)(¬a ∨ c)

(¬c ∨ d)(¬c ∨ e)(¬d ∨ ¬e)

(a)

(¬a ∨ b)

(¬d ∨ ¬e)

(a)

((((((((a ∨ ¬b ∨ ¬a)

(¬a ∨ b)

(¬a ∨ d)(¬a ∨ e)

(¬d ∨ ¬e)

(a)(¬a ∨ b)(¬a ∨ d)(¬a ∨ e)(¬d ∨ ¬e)

()

Simple: Removal of subsumed clausesMore involved: Elimination of variables by resolving

From now on: SAT-based preprocessing rules

J. Berg (University of Helsinki) MaxSAT preprocessing October 26, 2018 11 / 24

Page 30: Improving Maximum Satisfiability solving with preprocessing

Preprocessing in SAT solving

(a)(a ∨ ¬b ∨ ¬c)

(¬a ∨ b)(¬a ∨ c)

((((((((c ∨ ¬d ∨ ¬e)

(¬c ∨ d)(¬c ∨ e)(¬d ∨ ¬e)

(a)(a ∨ ¬b ∨ ¬c)

(¬a ∨ b)(¬a ∨ c)

(¬c ∨ d)(¬c ∨ e)(¬d ∨ ¬e)

(a)

(¬a ∨ b)

(¬d ∨ ¬e)

(a)

((((((((a ∨ ¬b ∨ ¬a)

(¬a ∨ b)

(¬a ∨ d)(¬a ∨ e)

(¬d ∨ ¬e)

(a)(¬a ∨ b)(¬a ∨ d)(¬a ∨ e)(¬d ∨ ¬e) ()

Simple: Removal of subsumed clausesMore involved: Elimination of variables by resolvingFrom now on: SAT-based preprocessing rules

J. Berg (University of Helsinki) MaxSAT preprocessing October 26, 2018 11 / 24

Page 31: Improving Maximum Satisfiability solving with preprocessing

SAT-based preprocessing in MaxSAT [Belov et al., 2013]

(x ∨ y)(¬y ∨ z)

(x ∨ z)SAT

(x ∨ ¬y)(x ∨ y)

(¬x)(x)

(¬x)(x)M

axS

AT Har

dS

oft

Directly applying SAT-based preprocessing rules does not work.Solution: Switch ”softness” from clauses to literals.

Satisfiability is Preserved

Solutions are not

J. Berg (University of Helsinki) MaxSAT preprocessing October 26, 2018 12 / 24

Page 32: Improving Maximum Satisfiability solving with preprocessing

SAT-Based preprocessing in MaxSAT

(a ∨ ¬b ∨ ¬c)(¬a ∨ b)(¬a ∨ c)

(c ∨ ¬d ∨ ¬e)(¬c ∨ d)(¬c ∨ e)

((a),3)((¬d ∨ ¬e),5)

Har

dS

oft

(a ∨ ¬b ∨ ¬c)(¬a ∨ b)(¬a ∨ c)

(c ∨ ¬d ∨ ¬e)(¬c ∨ d)(¬c ∨ e)(a ∨ s1)

(¬d ∨ ¬e ∨ s2)

(a ∨ ¬b ∨ ¬c)(¬a ∨ b)(¬a ∨ c)

(c ∨ ¬d ∨ ¬e)(¬c ∨ d)(¬c ∨ e)(a ∨ s1)

(¬d ∨ ¬e ∨ s2)

(s1 ∨ s2)(s1 ∨ s2)

(s1 ∨ s2)

((¬s1),3)((¬s2),5)

Har

dS

oft

1) Add soft literals to all soft clauses2) Run (restricted) SAT-based preprocessing on all clauses3) Add unit soft clauses for each soft literal

J. Berg (University of Helsinki) MaxSAT preprocessing October 26, 2018 13 / 24

Page 33: Improving Maximum Satisfiability solving with preprocessing

SAT-Based preprocessing in MaxSAT

(a ∨ ¬b ∨ ¬c)(¬a ∨ b)(¬a ∨ c)

(c ∨ ¬d ∨ ¬e)(¬c ∨ d)(¬c ∨ e)

((a),3)((¬d ∨ ¬e),5)

Har

dS

oft

(a ∨ ¬b ∨ ¬c)(¬a ∨ b)(¬a ∨ c)

(c ∨ ¬d ∨ ¬e)(¬c ∨ d)(¬c ∨ e)(a ∨ s1)

(¬d ∨ ¬e ∨ s2)

(a ∨ ¬b ∨ ¬c)(¬a ∨ b)(¬a ∨ c)

(c ∨ ¬d ∨ ¬e)(¬c ∨ d)(¬c ∨ e)(a ∨ s1)

(¬d ∨ ¬e ∨ s2)

(s1 ∨ s2)(s1 ∨ s2)

(s1 ∨ s2)

((¬s1),3)((¬s2),5)

Har

dS

oft

1) Add soft literals to all soft clauses

2) Run (restricted) SAT-based preprocessing on all clauses3) Add unit soft clauses for each soft literal

J. Berg (University of Helsinki) MaxSAT preprocessing October 26, 2018 13 / 24

Page 34: Improving Maximum Satisfiability solving with preprocessing

SAT-Based preprocessing in MaxSAT

(a ∨ ¬b ∨ ¬c)(¬a ∨ b)(¬a ∨ c)

(c ∨ ¬d ∨ ¬e)(¬c ∨ d)(¬c ∨ e)

((a),3)((¬d ∨ ¬e),5)

Har

dS

oft

(a ∨ ¬b ∨ ¬c)(¬a ∨ b)(¬a ∨ c)

(c ∨ ¬d ∨ ¬e)(¬c ∨ d)(¬c ∨ e)(a ∨ s1)

(¬d ∨ ¬e ∨ s2)

(a ∨ ¬b ∨ ¬c)(¬a ∨ b)(¬a ∨ c)

(c ∨ ¬d ∨ ¬e)(¬c ∨ d)(¬c ∨ e)(a ∨ s1)

(¬d ∨ ¬e ∨ s2)

(s1 ∨ s2)(s1 ∨ s2)

(s1 ∨ s2)

((¬s1),3)((¬s2),5)

Har

dS

oft

1) Add soft literals to all soft clauses

2) Run (restricted) SAT-based preprocessing on all clauses3) Add unit soft clauses for each soft literal

J. Berg (University of Helsinki) MaxSAT preprocessing October 26, 2018 13 / 24

Page 35: Improving Maximum Satisfiability solving with preprocessing

SAT-Based preprocessing in MaxSAT

(a ∨ ¬b ∨ ¬c)(¬a ∨ b)(¬a ∨ c)

(c ∨ ¬d ∨ ¬e)(¬c ∨ d)(¬c ∨ e)

((a),3)((¬d ∨ ¬e),5)

Har

dS

oft

(a ∨ ¬b ∨ ¬c)(¬a ∨ b)(¬a ∨ c)

(c ∨ ¬d ∨ ¬e)(¬c ∨ d)(¬c ∨ e)(a ∨ s1)

(¬d ∨ ¬e ∨ s2)

(a ∨ ¬b ∨ ¬c)(¬a ∨ b)(¬a ∨ c)

(c ∨ ¬d ∨ ¬e)(¬c ∨ d)(¬c ∨ e)(a ∨ s1)

(¬d ∨ ¬e ∨ s2)

(s1 ∨ s2)

(s1 ∨ s2)

(s1 ∨ s2)

((¬s1),3)((¬s2),5)

Har

dS

oft

1) Add soft literals to all soft clauses2) Run (restricted) SAT-based preprocessing on all clauses

3) Add unit soft clauses for each soft literal

J. Berg (University of Helsinki) MaxSAT preprocessing October 26, 2018 13 / 24

Page 36: Improving Maximum Satisfiability solving with preprocessing

SAT-Based preprocessing in MaxSAT

(a ∨ ¬b ∨ ¬c)(¬a ∨ b)(¬a ∨ c)

(c ∨ ¬d ∨ ¬e)(¬c ∨ d)(¬c ∨ e)

((a),3)((¬d ∨ ¬e),5)

Har

dS

oft

(a ∨ ¬b ∨ ¬c)(¬a ∨ b)(¬a ∨ c)

(c ∨ ¬d ∨ ¬e)(¬c ∨ d)(¬c ∨ e)(a ∨ s1)

(¬d ∨ ¬e ∨ s2)

(a ∨ ¬b ∨ ¬c)(¬a ∨ b)(¬a ∨ c)

(c ∨ ¬d ∨ ¬e)(¬c ∨ d)(¬c ∨ e)(a ∨ s1)

(¬d ∨ ¬e ∨ s2)

(s1 ∨ s2)

(s1 ∨ s2)

(s1 ∨ s2)

((¬s1),3)((¬s2),5)

Har

dS

oft

1) Add soft literals to all soft clauses2) Run (restricted) SAT-based preprocessing on all clauses

3) Add unit soft clauses for each soft literal

J. Berg (University of Helsinki) MaxSAT preprocessing October 26, 2018 13 / 24

Page 37: Improving Maximum Satisfiability solving with preprocessing

SAT-Based preprocessing in MaxSAT

(a ∨ ¬b ∨ ¬c)(¬a ∨ b)(¬a ∨ c)

(c ∨ ¬d ∨ ¬e)(¬c ∨ d)(¬c ∨ e)

((a),3)((¬d ∨ ¬e),5)

Har

dS

oft

(a ∨ ¬b ∨ ¬c)(¬a ∨ b)(¬a ∨ c)

(c ∨ ¬d ∨ ¬e)(¬c ∨ d)(¬c ∨ e)(a ∨ s1)

(¬d ∨ ¬e ∨ s2)

(a ∨ ¬b ∨ ¬c)(¬a ∨ b)(¬a ∨ c)

(c ∨ ¬d ∨ ¬e)(¬c ∨ d)(¬c ∨ e)(a ∨ s1)

(¬d ∨ ¬e ∨ s2)

(s1 ∨ s2)

(s1 ∨ s2)

(s1 ∨ s2)

((¬s1),3)((¬s2),5)

Har

dS

oft

1) Add soft literals to all soft clauses2) Run (restricted) SAT-based preprocessing on all clauses3) Add unit soft clauses for each soft literal

J. Berg (University of Helsinki) MaxSAT preprocessing October 26, 2018 13 / 24

Page 38: Improving Maximum Satisfiability solving with preprocessing

Effect of preprocessing

J. Berg (University of Helsinki) MaxSAT preprocessing October 26, 2018 14 / 24

Page 39: Improving Maximum Satisfiability solving with preprocessing

However...[Berg et al., 2015a]

J. Berg (University of Helsinki) MaxSAT preprocessing October 26, 2018 15 / 24

Page 40: Improving Maximum Satisfiability solving with preprocessing

Hypothesis for poor performance[Berg et al., 2015a]

SAT solving: Ineffective preprocessing does not hurt solver.MaxSAT solving: Ineffective preprocessing adds (unnecessary)extra clauses and variables.

Variables ClausesInstance Original Preprocess Original Preprocessmaxcut.wcnf 41 1681 = (41 + 1640) 1640 3280 = (2× 1640)

J. Berg (University of Helsinki) MaxSAT preprocessing October 26, 2018 16 / 24

Page 41: Improving Maximum Satisfiability solving with preprocessing

Hypothesis for poor performance[Berg et al., 2015a]

SAT solving: Ineffective preprocessing does not hurt solver.MaxSAT solving: Ineffective preprocessing adds (unnecessary)extra clauses and variables.

Variables ClausesInstance Original Preprocess Original Preprocessmaxcut.wcnf 41 1681 = (41 + 1640) 1640 3280 = (2× 1640)

J. Berg (University of Helsinki) MaxSAT preprocessing October 26, 2018 16 / 24

Page 42: Improving Maximum Satisfiability solving with preprocessing

Detour: SAT-based MaxSAT solving

Reduce MaxSAT solving to a sequence of satisfiability computations.

Linear Search: Iteratively strengthen anupper bound (UB) on the known optimal cost.

Core Guided: Iteratively strengthen anlower bound by extracting usatisfiable subsets (cores)of soft clauses.

Implicit hitting set: Iteratively extract coresand compute minimum costhitting sets over them.

Take Home Message:Most SAT-based solvers addassumption variablesto soft clauses

(s1 ∨ s2)

((¬s1),3)((¬s2),5)

Har

dS

oft

(s1 ∨ s2)

(¬s1 ∨ a1)

(¬s2 ∨ a2)

CNF(3a1 + 5a2 ≤ UB)

(s1 ∨ s2)

(¬s1 ∨ a1)

(¬s2 ∨ a2)

κ = {a1,a2}Increase LB by 3

(s1 ∨ s2)

(¬s1 ∨ a1)

(¬s2 ∨ a2)

κ = {a1,a2}MIN-HS = {a1}

J. Berg (University of Helsinki) MaxSAT preprocessing October 26, 2018 17 / 24

Page 43: Improving Maximum Satisfiability solving with preprocessing

Detour: SAT-based MaxSAT solving

Reduce MaxSAT solving to a sequence of satisfiability computations.

Linear Search: Iteratively strengthen anupper bound (UB) on the known optimal cost.

Core Guided: Iteratively strengthen anlower bound by extracting usatisfiable subsets (cores)of soft clauses.

Implicit hitting set: Iteratively extract coresand compute minimum costhitting sets over them.

Take Home Message:Most SAT-based solvers addassumption variablesto soft clauses

(s1 ∨ s2)

((¬s1),3)((¬s2),5)

Har

dS

oft

(s1 ∨ s2)

(¬s1 ∨ a1)

(¬s2 ∨ a2)

CNF(3a1 + 5a2 ≤ UB)

(s1 ∨ s2)

(¬s1 ∨ a1)

(¬s2 ∨ a2)

κ = {a1,a2}Increase LB by 3

(s1 ∨ s2)

(¬s1 ∨ a1)

(¬s2 ∨ a2)

κ = {a1,a2}MIN-HS = {a1}

J. Berg (University of Helsinki) MaxSAT preprocessing October 26, 2018 17 / 24

Page 44: Improving Maximum Satisfiability solving with preprocessing

Detour: SAT-based MaxSAT solving

Reduce MaxSAT solving to a sequence of satisfiability computations.

Linear Search: Iteratively strengthen anupper bound (UB) on the known optimal cost.

Core Guided: Iteratively strengthen anlower bound by extracting usatisfiable subsets (cores)of soft clauses.

Implicit hitting set: Iteratively extract coresand compute minimum costhitting sets over them.

Take Home Message:Most SAT-based solvers addassumption variablesto soft clauses

(s1 ∨ s2)

((¬s1),3)((¬s2),5)

Har

dS

oft

(s1 ∨ s2)

(¬s1 ∨ a1)

(¬s2 ∨ a2)

CNF(3a1 + 5a2 ≤ UB)

(s1 ∨ s2)

(¬s1 ∨ a1)

(¬s2 ∨ a2)

κ = {a1,a2}Increase LB by 3

(s1 ∨ s2)

(¬s1 ∨ a1)

(¬s2 ∨ a2)

κ = {a1,a2}MIN-HS = {a1}

J. Berg (University of Helsinki) MaxSAT preprocessing October 26, 2018 17 / 24

Page 45: Improving Maximum Satisfiability solving with preprocessing

Detour: SAT-based MaxSAT solving

Reduce MaxSAT solving to a sequence of satisfiability computations.

Linear Search: Iteratively strengthen anupper bound (UB) on the known optimal cost.

Core Guided: Iteratively strengthen anlower bound by extracting usatisfiable subsets (cores)of soft clauses.

Implicit hitting set: Iteratively extract coresand compute minimum costhitting sets over them.

Take Home Message:Most SAT-based solvers addassumption variablesto soft clauses

(s1 ∨ s2)

((¬s1),3)((¬s2),5)

Har

dS

oft

(s1 ∨ s2)

(¬s1 ∨ a1)

(¬s2 ∨ a2)

CNF(3a1 + 5a2 ≤ UB)

(s1 ∨ s2)

(¬s1 ∨ a1)

(¬s2 ∨ a2)

κ = {a1,a2}Increase LB by 3

(s1 ∨ s2)

(¬s1 ∨ a1)

(¬s2 ∨ a2)

κ = {a1,a2}MIN-HS = {a1}

J. Berg (University of Helsinki) MaxSAT preprocessing October 26, 2018 17 / 24

Page 46: Improving Maximum Satisfiability solving with preprocessing

Detour: SAT-based MaxSAT solving

Reduce MaxSAT solving to a sequence of satisfiability computations.

Linear Search: Iteratively strengthen anupper bound (UB) on the known optimal cost.

Core Guided: Iteratively strengthen anlower bound by extracting usatisfiable subsets (cores)of soft clauses.

Implicit hitting set: Iteratively extract coresand compute minimum costhitting sets over them.

Take Home Message:Most SAT-based solvers addassumption variablesto soft clauses

(s1 ∨ s2)

((¬s1),3)((¬s2),5)

Har

dS

oft

(s1 ∨ s2)

(¬s1 ∨ a1)

(¬s2 ∨ a2)

CNF(3a1 + 5a2 ≤ UB)

(s1 ∨ s2)

(¬s1 ∨ a1)

(¬s2 ∨ a2)

κ = {a1,a2}Increase LB by 3

(s1 ∨ s2)

(¬s1 ∨ a1)

(¬s2 ∨ a2)

κ = {a1,a2}MIN-HS = {a1}

J. Berg (University of Helsinki) MaxSAT preprocessing October 26, 2018 17 / 24

Page 47: Improving Maximum Satisfiability solving with preprocessing

Integrating MaxSAT preprocessing and solving[Berg et al., 2015a], IJCAI

Summary:Preprocessing adds:

A soft literal to each original soft clauseAn (explicit) soft clause for each soft literal

MaxSAT solver adds:An assumption variable to each soft clauseAn (implicit) soft clause for each assumption variable

Idea:Reuse soft literals as assumption variables.Soft clauses of the preprocessed instance not needed at all.

J. Berg (University of Helsinki) MaxSAT preprocessing October 26, 2018 18 / 24

Page 48: Improving Maximum Satisfiability solving with preprocessing

Integrating MaxSAT preprocessing and solving[Berg et al., 2015a], IJCAI

Summary:Preprocessing adds:

A soft literal to each original soft clauseAn (explicit) soft clause for each soft literal

MaxSAT solver adds:An assumption variable to each soft clauseAn (implicit) soft clause for each assumption variable

Idea:Reuse soft literals as assumption variables.Soft clauses of the preprocessed instance not needed at all.

J. Berg (University of Helsinki) MaxSAT preprocessing October 26, 2018 18 / 24

Page 49: Improving Maximum Satisfiability solving with preprocessing

MaxSAT solving Integrated with preprocessing

Linear Search: Iteratively strengthen anupper bound (UB) on the known optimal cost.

(s1 ∨ s2)

((¬s1),3)((¬s2),5)

Har

dS

oft

(s1 ∨ s2)

�����

�(¬s1 ∨ a1)

������(¬s2 ∨ a2)

(((((((

(((((

CNF(3a1 + 5a2 ≤ UB)

CNF(3s1 + 5s2 ≤ UB)

J. Berg (University of Helsinki) MaxSAT preprocessing October 26, 2018 19 / 24

Page 50: Improving Maximum Satisfiability solving with preprocessing

Results

J. Berg (University of Helsinki) MaxSAT preprocessing October 26, 2018 20 / 24

Page 51: Improving Maximum Satisfiability solving with preprocessing

Conceptual change to MaxSAT

Originally:one-to-one mapping be-tween assumption variablesand soft clauses

When reusing:Can have clauses withmany soft literalsSoft literals can be in manyclauses.

(s1 ∨ s2)

(¬s1 ∨ a1)

(¬s2 ∨ a2)

CNF(3a1 + 5a2 ≤ UB)

������(¬s1 ∨ a1)

������(¬s2 ∨ a2)

((((((((

((((CNF(3a1 + 5a2 ≤ UB)

CNF(3s1 + 5s2 ≤ UB)

J. Berg (University of Helsinki) MaxSAT preprocessing October 26, 2018 21 / 24

Page 52: Improving Maximum Satisfiability solving with preprocessing

Conceptual change to MaxSAT

Originally:one-to-one mapping be-tween assumption variablesand soft clauses

When reusing:Can have clauses withmany soft literalsSoft literals can be in manyclauses.

(s1 ∨ s2)

(¬s1 ∨ a1)

(¬s2 ∨ a2)

CNF(3a1 + 5a2 ≤ UB)

������(¬s1 ∨ a1)

������(¬s2 ∨ a2)

((((((((

((((CNF(3a1 + 5a2 ≤ UB)

CNF(3s1 + 5s2 ≤ UB)

J. Berg (University of Helsinki) MaxSAT preprocessing October 26, 2018 21 / 24

Page 53: Improving Maximum Satisfiability solving with preprocessing

Implications of the idea

”Better” definition of MaxSATINPUT: CNF-formula F , weight for all variables x of FOBJECTIVE: Find τ satisfying F and minimizing

∑x∈VAR(F ) w(x)τ(x).

J. Berg (University of Helsinki) MaxSAT preprocessing October 26, 2018 22 / 24

Page 54: Improving Maximum Satisfiability solving with preprocessing

Implications of the idea

”Better” definition of MaxSATINPUT: CNF-formula F , weight for all variables x of FOBJECTIVE: Find τ satisfying F and minimizing

∑x∈VAR(F ) w(x)τ(x).

Building on the definition:Identify reusable literals from the input instanceitself [Berg et al., 2015b].Decrease number of soft literals [Korhonen et al., 2017].MaxSAT specific preprocessing techniques [Berg et al., 2016]

J. Berg (University of Helsinki) MaxSAT preprocessing October 26, 2018 22 / 24

Page 55: Improving Maximum Satisfiability solving with preprocessing

Implications of the idea

”Better” definition of MaxSATINPUT: CNF-formula F , weight for all variables x of FOBJECTIVE: Find τ satisfying F and minimizing

∑x∈VAR(F ) w(x)τ(x).

0

10

20

30

40

50

60

70

80

90

100

0 10 20 30 40 50 60 70 80 90 100

Soft C

lauses R

eused (

%)

Instances (%)

IndustrialCrafted

J. Berg (University of Helsinki) MaxSAT preprocessing October 26, 2018 22 / 24

Page 56: Improving Maximum Satisfiability solving with preprocessing

Implications of the idea

”Better” definition of MaxSATINPUT: CNF-formula F , weight for all variables x of FOBJECTIVE: Find τ satisfying F and minimizing

∑x∈VAR(F ) w(x)τ(x).

Building on the definition:Identify reusable literals from the input instanceitself [Berg et al., 2015b].Decrease number of soft literals [Korhonen et al., 2017].MaxSAT specific preprocessing techniques [Berg et al., 2016]

C1 ∨ s1C2 ∨ s2

C1 ∨ s1C2 ∨ s1

If C1 ∨ C2 tautology andw(s1) = w(s2)

J. Berg (University of Helsinki) MaxSAT preprocessing October 26, 2018 22 / 24

Page 57: Improving Maximum Satisfiability solving with preprocessing

Implications of the idea

”Better” definition of MaxSATINPUT: CNF-formula F , weight for all variables x of FOBJECTIVE: Find τ satisfying F and minimizing

∑x∈VAR(F ) w(x)τ(x).

Building on the definition:Identify reusable literals from the input instanceitself [Berg et al., 2015b].Decrease number of soft literals [Korhonen et al., 2017].MaxSAT specific preprocessing techniques [Berg et al., 2016]

Fixes earlier problem instance:

Variables ClausesInstance Original Preprocess Preprocess+ Original Preprocess Preprocess+maxcut.wcnf 41 1681 861 1640 3280 2460

J. Berg (University of Helsinki) MaxSAT preprocessing October 26, 2018 22 / 24

Page 58: Improving Maximum Satisfiability solving with preprocessing

Implications of the idea

”Better” definition of MaxSATINPUT: CNF-formula F , weight for all variables x of FOBJECTIVE: Find τ satisfying F and minimizing

∑x∈VAR(F ) w(x)τ(x).

Building on the definition:Identify reusable literals from the input instanceitself [Berg et al., 2015b].Decrease number of soft literals [Korhonen et al., 2017].MaxSAT specific preprocessing techniques [Berg et al., 2016]

s1 ∨ s2 s1

If w(s1) ≤ w(s2)

J. Berg (University of Helsinki) MaxSAT preprocessing October 26, 2018 22 / 24

Page 59: Improving Maximum Satisfiability solving with preprocessing

Conclusions

MaxSAT for solving NP-hard optimization problemsPreprocessing underused in MaxSAT solving.Integrating preprocessing is difficult when optimizing clauses

Solution: optimize literals instead.Interesting insights to MaxSAT

J. Berg (University of Helsinki) MaxSAT preprocessing October 26, 2018 23 / 24

Page 60: Improving Maximum Satisfiability solving with preprocessing

Thank you!

Try MaxPre, our preprocessor at:https://www.cs.helsinki.fi/group/coreo/maxpre/

J. Berg (University of Helsinki) MaxSAT preprocessing October 26, 2018 24 / 24

Page 61: Improving Maximum Satisfiability solving with preprocessing

References I

Belov, A., Morgado, A., and Marques-Silva, J. (2013).SAT-based preprocessing for MaxSAT.In Proceedings of the 19th International Conference on Logic forProgramming, Artificial Intelligence, and Reasoning, volume 8312of Lecture Notes in Computer Science, pages 96–111. Springer.

Berg, J., Saikko, P., and Jarvisalo, M. (2015a).Improving the effectiveness of SAT-based preprocessing forMaxSAT.In Proceedings of the 24th International Joint Conference onArtificial Intelligence, pages 239–245. AAAI Press.

J. Berg (University of Helsinki) MaxSAT preprocessing October 26, 2018 25 / 24

Page 62: Improving Maximum Satisfiability solving with preprocessing

References II

Berg, J., Saikko, P., and Jarvisalo, M. (2015b).Re-using auxiliary variables for maxsat preprocessing.In 27th IEEE International Conference on Tools with ArtificialIntelligence, ICTAI 2015, Vietri sul Mare, Italy, November 9-11,2015, pages 813–820.

Berg, J., Saikko, P., Jarvisalo, M., et al. (2016).Subsumed label elimination for maximum satisfiability.In ECAI 2016 22nd European Conference on Artificial Intelligence,29 August–2 September 2016, The Hague, The Netherlands,Including Prestigious Applications of Artificial Intelligence (PAIS2016), Proceedings.

J. Berg (University of Helsinki) MaxSAT preprocessing October 26, 2018 26 / 24

Page 63: Improving Maximum Satisfiability solving with preprocessing

References III

Korhonen, T., Berg, J., Saikko, P., and Jarvisalo, M. (2017).MaxPre: An extended MaxSAT preprocessor.In Proceedings of the 20th International Conference on Theoryand Applications of Satisfiability Testing, volume 10491 of LectureNotes in Computer Science, pages 449–456. Springer.

J. Berg (University of Helsinki) MaxSAT preprocessing October 26, 2018 27 / 24