computing with oracles · 2017. 5. 21. · computing with oracles from np to beyond np and back...

178
Computing with Oracles From NP to Beyond NP and Back Again Joao Marques-Silva University of Lisbon, Portugal Beyond NP Meeting Paris, France 10 May 2017 1 / 73

Upload: others

Post on 22-Jan-2021

4 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Computing with Oracles · 2017. 5. 21. · Computing with Oracles From NP to Beyond NP and Back Again Joao Marques-Silva ... SAT engines Boolean QBF MaxSAT PBO #SAT... FOL SMT Model

Computing with Oracles

From NP to Beyond NP and Back Again

Joao Marques-Silva

University of Lisbon, Portugal

Beyond NP Meeting

Paris, France

10 May 2017

1 / 73

Page 2: Computing with Oracles · 2017. 5. 21. · Computing with Oracles From NP to Beyond NP and Back Again Joao Marques-Silva ... SAT engines Boolean QBF MaxSAT PBO #SAT... FOL SMT Model

The SAT disruption

• SAT is NP-complete [Cook’71]

– But, CDCL SAT solving is a success story of Computer Science– Hundreds (thousands?) of practical applications

2 / 73

Page 3: Computing with Oracles · 2017. 5. 21. · Computing with Oracles From NP to Beyond NP and Back Again Joao Marques-Silva ... SAT engines Boolean QBF MaxSAT PBO #SAT... FOL SMT Model

The SAT disruption

• SAT is NP-complete [Cook’71]

– But, CDCL SAT solving is a success story of Computer Science

– Hundreds (thousands?) of practical applications

2 / 73

Page 4: Computing with Oracles · 2017. 5. 21. · Computing with Oracles From NP to Beyond NP and Back Again Joao Marques-Silva ... SAT engines Boolean QBF MaxSAT PBO #SAT... FOL SMT Model

The SAT disruption

• SAT is NP-complete [Cook’71]

– But, CDCL SAT solving is a success story of Computer Science– Hundreds (thousands?) of practical applications

2 / 73

Page 5: Computing with Oracles · 2017. 5. 21. · Computing with Oracles From NP to Beyond NP and Back Again Joao Marques-Silva ... SAT engines Boolean QBF MaxSAT PBO #SAT... FOL SMT Model

SAT solver improvement I[Source: Le Berre 2013]

3 / 73

Page 6: Computing with Oracles · 2017. 5. 21. · Computing with Oracles From NP to Beyond NP and Back Again Joao Marques-Silva ... SAT engines Boolean QBF MaxSAT PBO #SAT... FOL SMT Model

SAT solver improvement II[Source: Simon 2015]

��

����

�����

�����

�����

�����

��� ��� ��� ���� ���� ���� ���� ���� ���� ����

���������������

����

�����������

���������������������������������������������������������

��������������������������������

�����������������������������������

�����������������������������

����������������������������������

�������������������������������������������������

4 / 73

Page 7: Computing with Oracles · 2017. 5. 21. · Computing with Oracles From NP to Beyond NP and Back Again Joao Marques-Silva ... SAT engines Boolean QBF MaxSAT PBO #SAT... FOL SMT Model

SAT is the engines’ engine

Engines usingSAT engines

Boolean

QBF

MaxSAT

PBO

#SAT

...

FOL SMT

Modelfinding

Theoremproving

...

Other

ASP

LCG

CSP

...

5 / 73

Page 8: Computing with Oracles · 2017. 5. 21. · Computing with Oracles From NP to Beyond NP and Back Again Joao Marques-Silva ... SAT engines Boolean QBF MaxSAT PBO #SAT... FOL SMT Model

SAT is ubiquitous in problem solving

Problem solvingwith SAT

Embeddings

PBOB&B

Search

Enumeration

OPT SAT

Lazy SMT

LCG

Oracles

MaxSAT

MCS

MUS

Min. Mod-els

Backbones

Enumeration

CEGARSMT

CEGARQBF

MC: ic3

Encodings

MBD

Eager SMT

Planning

BMC

6 / 73

Page 9: Computing with Oracles · 2017. 5. 21. · Computing with Oracles From NP to Beyond NP and Back Again Joao Marques-Silva ... SAT engines Boolean QBF MaxSAT PBO #SAT... FOL SMT Model

SAT can make the difference – propositional abduction

10−3 10−2 10−1 100 101 102 103 104

Hyper?

10−3

10−2

10−1

100

101

102

103

104

AbH

S+

1800 sec. timeout

1800

sec.

timeo

ut

• Topic(s): quantified optimization [ECAI’16]

• Instances: KR16 propositional abduction

7 / 73

Page 10: Computing with Oracles · 2017. 5. 21. · Computing with Oracles From NP to Beyond NP and Back Again Joao Marques-Silva ... SAT engines Boolean QBF MaxSAT PBO #SAT... FOL SMT Model

SAT can make the difference – axiom pinpointing

10−2 10−1 100 101 102 103 104

EL2MUS

10−2

10−1

100

101

102

103

104

EL

+SA

T

3600 sec. timeout

3600

sec.

timeo

ut

• Topic(s): MUS enumeration; MCSes; implicit hitting sets [SAT’15]

• Instances: EL+ medical ontologies

8 / 73

Page 11: Computing with Oracles · 2017. 5. 21. · Computing with Oracles From NP to Beyond NP and Back Again Joao Marques-Silva ... SAT engines Boolean QBF MaxSAT PBO #SAT... FOL SMT Model

Part I

From NP to Beyond NP

9 / 73

Page 12: Computing with Oracles · 2017. 5. 21. · Computing with Oracles From NP to Beyond NP and Back Again Joao Marques-Silva ... SAT engines Boolean QBF MaxSAT PBO #SAT... FOL SMT Model

Outline – part A

Background

MaxSAT Solving

2QBF Solving

10 / 73

Page 13: Computing with Oracles · 2017. 5. 21. · Computing with Oracles From NP to Beyond NP and Back Again Joao Marques-Silva ... SAT engines Boolean QBF MaxSAT PBO #SAT... FOL SMT Model

Outline

Background

MaxSAT Solving

2QBF Solving

11 / 73

Page 14: Computing with Oracles · 2017. 5. 21. · Computing with Oracles From NP to Beyond NP and Back Again Joao Marques-Silva ... SAT engines Boolean QBF MaxSAT PBO #SAT... FOL SMT Model

Beyond decision problems

Answer Problem Type

Yes/No Decision Problems

Some solution Function Problems

All solutions Enumeration Problems

12 / 73

Page 15: Computing with Oracles · 2017. 5. 21. · Computing with Oracles From NP to Beyond NP and Back Again Joao Marques-Silva ... SAT engines Boolean QBF MaxSAT PBO #SAT... FOL SMT Model

Beyond decision problems

Answer Problem Type

Yes/No Decision Problems

Some solution Function Problems

All solutions Enumeration Problems

12 / 73

Page 16: Computing with Oracles · 2017. 5. 21. · Computing with Oracles From NP to Beyond NP and Back Again Joao Marques-Silva ... SAT engines Boolean QBF MaxSAT PBO #SAT... FOL SMT Model

Beyond decision problems

Answer Problem Type

Yes/No Decision Problems

Some solution

Function Problems

All solutions Enumeration Problems

12 / 73

Page 17: Computing with Oracles · 2017. 5. 21. · Computing with Oracles From NP to Beyond NP and Back Again Joao Marques-Silva ... SAT engines Boolean QBF MaxSAT PBO #SAT... FOL SMT Model

Beyond decision problems

Answer Problem Type

Yes/No Decision Problems

Some solution Function Problems

All solutions Enumeration Problems

12 / 73

Page 18: Computing with Oracles · 2017. 5. 21. · Computing with Oracles From NP to Beyond NP and Back Again Joao Marques-Silva ... SAT engines Boolean QBF MaxSAT PBO #SAT... FOL SMT Model

Beyond decision problems

Answer Problem Type

Yes/No Decision Problems

Some solution Function Problems

All solutions

Enumeration Problems

12 / 73

Page 19: Computing with Oracles · 2017. 5. 21. · Computing with Oracles From NP to Beyond NP and Back Again Joao Marques-Silva ... SAT engines Boolean QBF MaxSAT PBO #SAT... FOL SMT Model

Beyond decision problems

Answer Problem Type

Yes/No Decision Problems

Some solution Function Problems

All solutions Enumeration Problems

12 / 73

Page 20: Computing with Oracles · 2017. 5. 21. · Computing with Oracles From NP to Beyond NP and Back Again Joao Marques-Silva ... SAT engines Boolean QBF MaxSAT PBO #SAT... FOL SMT Model

... and beyond NP – decision and function problems

∆p0 = Σp

0 = P = Πp0 = ∆p

1

NP = Σp1 Πp

1 = coNP

PNP = ∆p2

Σp2 Πp

2

∆p3

Σp3 Πp

3

...

F∆p0 = FΣp

0 = FP = FΠp0 = F∆p

1

FNP = FΣp1 FΠp

1 = coFNP

FPNP = F∆p2

FΣp2 FΠp

2

F∆p3

FΣp3 FΠp

3

...

13 / 73

Page 21: Computing with Oracles · 2017. 5. 21. · Computing with Oracles From NP to Beyond NP and Back Again Joao Marques-Silva ... SAT engines Boolean QBF MaxSAT PBO #SAT... FOL SMT Model

Oracle-based problem solving – ideal scenario

Decision Procedure

Poly-timeAlgorithm

Yes/No +Witness

SAT, SMT, CSP, ...Solver / Oracle

Bounded # ofcalls / queries

14 / 73

Page 22: Computing with Oracles · 2017. 5. 21. · Computing with Oracles From NP to Beyond NP and Back Again Joao Marques-Silva ... SAT engines Boolean QBF MaxSAT PBO #SAT... FOL SMT Model

Oracle-based problem solving – in some settings

Decision Procedure

Poly-timeAlgorithm

Yes/No +Witness

SAT, SMT, CSP, ...Solver / Oracle

Bounded # ofcalls / queries

15 / 73

Page 23: Computing with Oracles · 2017. 5. 21. · Computing with Oracles From NP to Beyond NP and Back Again Joao Marques-Silva ... SAT engines Boolean QBF MaxSAT PBO #SAT... FOL SMT Model

Many problems to solve – within FPNP

Answer Problem Type

Yes/No Decision Problems

Some solution Function Problems

All solutions Enumeration Problems

16 / 73

Page 24: Computing with Oracles · 2017. 5. 21. · Computing with Oracles From NP to Beyond NP and Back Again Joao Marques-Silva ... SAT engines Boolean QBF MaxSAT PBO #SAT... FOL SMT Model

Many problems to solve – within FPNP

Answer Problem Type

Yes/No Decision Problems

Some solution Function Problems

All solutions Enumeration Problems

Function Problems on Propositional Formulas

MaxSATPBO

MinSAT

Autarkies

Backbones

Prime Implicants

MCSesMUSes Indep. Vars

WBO

MESes

MSSesMNSes

MDSes Implicant Ext.MFSes

MCFSes

Minimal Models

Prime ImplicatesMaximal Models

Implicate Ext.

...

...

16 / 73

Page 25: Computing with Oracles · 2017. 5. 21. · Computing with Oracles From NP to Beyond NP and Back Again Joao Marques-Silva ... SAT engines Boolean QBF MaxSAT PBO #SAT... FOL SMT Model

Many problems to solve – within FPNP

Answer Problem Type

Yes/No Decision Problems

Some solution Function Problems

All solutions Enumeration Problems

Function Problems on Propositional Formulas

Optimization Problems

Minimal Sets

MaxSATPBO

MinSAT

Autarkies

Backbones

Prime Implicants

MCSesMUSes Indep. Vars

WBO

MESes

MSSesMNSes

MDSes Implicant Ext.MFSes

MCFSes

Minimal Models

Prime ImplicatesMaximal Models

Implicate Ext.

...

...

16 / 73

Page 26: Computing with Oracles · 2017. 5. 21. · Computing with Oracles From NP to Beyond NP and Back Again Joao Marques-Silva ... SAT engines Boolean QBF MaxSAT PBO #SAT... FOL SMT Model

Selection of topics

Problem solvingwith SAT

Embeddings

PBOB&B

Search

Enumeration

OPT SAT

Lazy SMT

LCG

Oracles

MaxSAT

MCS

MUS

Min. Mod-els

Backbones

Enumeration

CEGARSMT

CEGARQBF

MC: ic3

Encodings

MBD

Eager SMT

Planning

BMC

MaxSAT solving2QBF solving

17 / 73

Page 27: Computing with Oracles · 2017. 5. 21. · Computing with Oracles From NP to Beyond NP and Back Again Joao Marques-Silva ... SAT engines Boolean QBF MaxSAT PBO #SAT... FOL SMT Model

Outline

Background

MaxSAT Solving

2QBF Solving

18 / 73

Page 28: Computing with Oracles · 2017. 5. 21. · Computing with Oracles From NP to Beyond NP and Back Again Joao Marques-Silva ... SAT engines Boolean QBF MaxSAT PBO #SAT... FOL SMT Model

Recap MaxSAT

x6 ∨ x2 ¬x6 ∨ x2 ¬x2 ∨ x1 ¬x1

¬x6 ∨ x8 x6 ∨ ¬x8 x2 ∨ x4 ¬x4 ∨ x5

x7 ∨ x5 ¬x7 ∨ x5 ¬x5 ∨ x3 ¬x3

• Given unsatisfiable formula, find largest subset of clauses that issatisfiable

• A Minimal Correction Subset (MCS) is an irreducible relaxation ofthe formula

• The MaxSAT solution is one of the smallest cost MCSes

– Note: Clauses can have weights & there can be hard clauses

• Many practical applications

19 / 73

Page 29: Computing with Oracles · 2017. 5. 21. · Computing with Oracles From NP to Beyond NP and Back Again Joao Marques-Silva ... SAT engines Boolean QBF MaxSAT PBO #SAT... FOL SMT Model

Recap MaxSAT

x6 ∨ x2 ¬x6 ∨ x2 ¬x2 ∨ x1 ¬x1

¬x6 ∨ x8 x6 ∨ ¬x8 x2 ∨ x4 ¬x4 ∨ x5

x7 ∨ x5 ¬x7 ∨ x5 ¬x5 ∨ x3 ¬x3

• Given unsatisfiable formula, find largest subset of clauses that issatisfiable

• A Minimal Correction Subset (MCS) is an irreducible relaxation ofthe formula

• The MaxSAT solution is one of the smallest cost MCSes

– Note: Clauses can have weights & there can be hard clauses

• Many practical applications

19 / 73

Page 30: Computing with Oracles · 2017. 5. 21. · Computing with Oracles From NP to Beyond NP and Back Again Joao Marques-Silva ... SAT engines Boolean QBF MaxSAT PBO #SAT... FOL SMT Model

Recap MaxSAT

x6 ∨ x2 ¬x6 ∨ x2 ¬x2 ∨ x1 ¬x1

¬x6 ∨ x8 x6 ∨ ¬x8 x2 ∨ x4 ¬x4 ∨ x5

x7 ∨ x5 ¬x7 ∨ x5 ¬x5 ∨ x3 ¬x3

• Given unsatisfiable formula, find largest subset of clauses that issatisfiable

• A Minimal Correction Subset (MCS) is an irreducible relaxation ofthe formula

• The MaxSAT solution is one of the smallest MCSes

– Note: Clauses can have weights & there can be hard clauses

• Many practical applications

19 / 73

Page 31: Computing with Oracles · 2017. 5. 21. · Computing with Oracles From NP to Beyond NP and Back Again Joao Marques-Silva ... SAT engines Boolean QBF MaxSAT PBO #SAT... FOL SMT Model

Recap MaxSAT

x6 ∨ x2 ¬x6 ∨ x2 ¬x2 ∨ x1 ¬x1

¬x6 ∨ x8 x6 ∨ ¬x8 x2 ∨ x4 ¬x4 ∨ x5

x7 ∨ x5 ¬x7 ∨ x5 ¬x5 ∨ x3 ¬x3

• Given unsatisfiable formula, find largest subset of clauses that issatisfiable

• A Minimal Correction Subset (MCS) is an irreducible relaxation ofthe formula

• The MaxSAT solution is one of the smallest MCSes

– Note: Clauses can have weights & there can be hard clauses

• Many practical applications

19 / 73

Page 32: Computing with Oracles · 2017. 5. 21. · Computing with Oracles From NP to Beyond NP and Back Again Joao Marques-Silva ... SAT engines Boolean QBF MaxSAT PBO #SAT... FOL SMT Model

Recap MaxSAT

x6 ∨ x2 ¬x6 ∨ x2 ¬x2 ∨ x1 ¬x1

¬x6 ∨ x8 x6 ∨ ¬x8 x2 ∨ x4 ¬x4 ∨ x5

x7 ∨ x5 ¬x7 ∨ x5 ¬x5 ∨ x3 ¬x3

• Given unsatisfiable formula, find largest subset of clauses that issatisfiable

• A Minimal Correction Subset (MCS) is an irreducible relaxation ofthe formula

• The MaxSAT solution is one of the smallest cost MCSes

– Note: Clauses can have weights & there can be hard clauses

• Many practical applications

19 / 73

Page 33: Computing with Oracles · 2017. 5. 21. · Computing with Oracles From NP to Beyond NP and Back Again Joao Marques-Silva ... SAT engines Boolean QBF MaxSAT PBO #SAT... FOL SMT Model

Recap MaxSAT

x6 ∨ x2 ¬x6 ∨ x2 ¬x2 ∨ x1 ¬x1

¬x6 ∨ x8 x6 ∨ ¬x8 x2 ∨ x4 ¬x4 ∨ x5

x7 ∨ x5 ¬x7 ∨ x5 ¬x5 ∨ x3 ¬x3

• Given unsatisfiable formula, find largest subset of clauses that issatisfiable

• A Minimal Correction Subset (MCS) is an irreducible relaxation ofthe formula

• The MaxSAT solution is one of the smallest cost MCSes

– Note: Clauses can have weights & there can be hard clauses

• Many practical applications

19 / 73

Page 34: Computing with Oracles · 2017. 5. 21. · Computing with Oracles From NP to Beyond NP and Back Again Joao Marques-Silva ... SAT engines Boolean QBF MaxSAT PBO #SAT... FOL SMT Model

The MaxSAT (r)evolution – plain industrial instances

0

50

100

150

200

250

300

0 5 10 15 20 25 30 35 40

CP

U tim

e in s

econds

Number of instances

Number x of instances solved in y seconds

Open-WBO-Inpmifumax-13

WPM1-11wbo-1.4a-10

wbo1.6-cnf-12

Source: [MaxSAT 2014 organizers]

48.1% more

instances solved!

20 / 73

Page 35: Computing with Oracles · 2017. 5. 21. · Computing with Oracles From NP to Beyond NP and Back Again Joao Marques-Silva ... SAT engines Boolean QBF MaxSAT PBO #SAT... FOL SMT Model

The MaxSAT (r)evolution – plain industrial instances

0

50

100

150

200

250

300

0 5 10 15 20 25 30 35 40

CP

U tim

e in s

econds

Number of instances

Number x of instances solved in y seconds

Open-WBO-Inpmifumax-13

WPM1-11wbo-1.4a-10

wbo1.6-cnf-12

Source: [MaxSAT 2014 organizers]

48.1% more

instances solved!20 / 73

Page 36: Computing with Oracles · 2017. 5. 21. · Computing with Oracles From NP to Beyond NP and Back Again Joao Marques-Silva ... SAT engines Boolean QBF MaxSAT PBO #SAT... FOL SMT Model

The MaxSAT (r)evolution – partial

0

50

100

150

200

250

300

0 50 100 150 200 250 300 350 400

CP

U tim

e in s

econds

Number of instances

Number x of instances solved in y seconds

Open-WBO-InQMaxSAT2-mt-13

QMaxSat-g2-12QMaxSat0.4-11

QMaxSat-10

Source: [MaxSAT 2014 organizers]

71.5% more

instances solved!

21 / 73

Page 37: Computing with Oracles · 2017. 5. 21. · Computing with Oracles From NP to Beyond NP and Back Again Joao Marques-Silva ... SAT engines Boolean QBF MaxSAT PBO #SAT... FOL SMT Model

The MaxSAT (r)evolution – partial

0

50

100

150

200

250

300

0 50 100 150 200 250 300 350 400

CP

U tim

e in s

econds

Number of instances

Number x of instances solved in y seconds

Open-WBO-InQMaxSAT2-mt-13

QMaxSat-g2-12QMaxSat0.4-11

QMaxSat-10

Source: [MaxSAT 2014 organizers]

71.5% more

instances solved!21 / 73

Page 38: Computing with Oracles · 2017. 5. 21. · Computing with Oracles From NP to Beyond NP and Back Again Joao Marques-Silva ... SAT engines Boolean QBF MaxSAT PBO #SAT... FOL SMT Model

The MaxSAT (r)evolution – weighted partial

0

50

100

150

200

250

300

0 50 100 150 200 250 300 350

CP

U tim

e in s

econds

Number of instances

Number x of instances solved in y seconds

Eva500aWPM1-2013

WPM1-11pwbo2.1-12

wbo-1.4a-wcnf-10

Source: [MaxSAT 2014 organizers]

51.5% more

instances solved!

22 / 73

Page 39: Computing with Oracles · 2017. 5. 21. · Computing with Oracles From NP to Beyond NP and Back Again Joao Marques-Silva ... SAT engines Boolean QBF MaxSAT PBO #SAT... FOL SMT Model

The MaxSAT (r)evolution – weighted partial

0

50

100

150

200

250

300

0 50 100 150 200 250 300 350

CP

U tim

e in s

econds

Number of instances

Number x of instances solved in y seconds

Eva500aWPM1-2013

WPM1-11pwbo2.1-12

wbo-1.4a-wcnf-10

Source: [MaxSAT 2014 organizers]

51.5% more

instances solved!22 / 73

Page 40: Computing with Oracles · 2017. 5. 21. · Computing with Oracles From NP to Beyond NP and Back Again Joao Marques-Silva ... SAT engines Boolean QBF MaxSAT PBO #SAT... FOL SMT Model

Many MaxSAT approaches

MaxSATAlgorithms

Branch& Bound

Iterative

CoreGuided

IterativeMHS

ModelGuided

No unit prop;No cl. learning

All cls relaxed

Relax cls givenunsat cores

IterativeMHS & SAT

Relax cls givenmodels

• For practical (industrial) instances: core-guided approaches arethe most effective [MaxSAT14]

23 / 73

Page 41: Computing with Oracles · 2017. 5. 21. · Computing with Oracles From NP to Beyond NP and Back Again Joao Marques-Silva ... SAT engines Boolean QBF MaxSAT PBO #SAT... FOL SMT Model

Many MaxSAT approaches

MaxSATAlgorithms

Branch& Bound

Iterative

CoreGuided

IterativeMHS

ModelGuided

No unit prop;No cl. learning

All cls relaxed

Relax cls givenunsat cores

IterativeMHS & SAT

Relax cls givenmodels

• For practical (industrial) instances: core-guided approaches arethe most effective [MaxSAT14]

23 / 73

Page 42: Computing with Oracles · 2017. 5. 21. · Computing with Oracles From NP to Beyond NP and Back Again Joao Marques-Silva ... SAT engines Boolean QBF MaxSAT PBO #SAT... FOL SMT Model

Outline

Background

MaxSAT SolvingIterative SAT SolvingCore-Guided AlgorithmsMinimum Hitting Sets

2QBF Solving

24 / 73

Page 43: Computing with Oracles · 2017. 5. 21. · Computing with Oracles From NP to Beyond NP and Back Again Joao Marques-Silva ... SAT engines Boolean QBF MaxSAT PBO #SAT... FOL SMT Model

Basic MaxSAT with iterative SAT solving

x6 ∨ x2∨r1 ¬x6 ∨ x2∨r2 ¬x2 ∨ x1∨r3 ¬x1∨r4

¬x6 ∨ x8∨r5 x6 ∨ ¬x8∨r6 x2 ∨ x4∨r7 ¬x4 ∨ x5∨r8

x7 ∨ x5∨r9 ¬x7 ∨ x5∨r10 ¬x5 ∨ x3∨r11 ¬x3∨r12∑12i=1 ri ≤ 12

Example CNF formula

AtMostk/PB constraints

over all relaxation variables

All (possibly many)

soft clauses relaxed

25 / 73

Page 44: Computing with Oracles · 2017. 5. 21. · Computing with Oracles From NP to Beyond NP and Back Again Joao Marques-Silva ... SAT engines Boolean QBF MaxSAT PBO #SAT... FOL SMT Model

Basic MaxSAT with iterative SAT solving

x6 ∨ x2∨r1 ¬x6 ∨ x2∨r2 ¬x2 ∨ x1∨r3 ¬x1∨r4

¬x6 ∨ x8∨r5 x6 ∨ ¬x8∨r6 x2 ∨ x4∨r7 ¬x4 ∨ x5∨r8

x7 ∨ x5∨r9 ¬x7 ∨ x5∨r10 ¬x5 ∨ x3∨r11 ¬x3∨r12∑12i=1 ri ≤ 12

Relax all clauses; Set UB = 12 + 1

AtMostk/PB constraints

over all relaxation variables

All (possibly many)

soft clauses relaxed

25 / 73

Page 45: Computing with Oracles · 2017. 5. 21. · Computing with Oracles From NP to Beyond NP and Back Again Joao Marques-Silva ... SAT engines Boolean QBF MaxSAT PBO #SAT... FOL SMT Model

Basic MaxSAT with iterative SAT solving

x6 ∨ x2∨r1 ¬x6 ∨ x2∨r2 ¬x2 ∨ x1∨r3 ¬x1∨r4

¬x6 ∨ x8∨r5 x6 ∨ ¬x8∨r6 x2 ∨ x4∨r7 ¬x4 ∨ x5∨r8

x7 ∨ x5∨r9 ¬x7 ∨ x5∨r10 ¬x5 ∨ x3∨r11 ¬x3∨r12∑12i=1 ri ≤ 12

Formula is SAT; E.g. all xi = 0 and r1 = r7 = r9 = 1 (i.e. cost = 3)

AtMostk/PB constraints

over all relaxation variables

All (possibly many)

soft clauses relaxed

25 / 73

Page 46: Computing with Oracles · 2017. 5. 21. · Computing with Oracles From NP to Beyond NP and Back Again Joao Marques-Silva ... SAT engines Boolean QBF MaxSAT PBO #SAT... FOL SMT Model

Basic MaxSAT with iterative SAT solving

x6 ∨ x2∨r1 ¬x6 ∨ x2∨r2 ¬x2 ∨ x1∨r3 ¬x1∨r4

¬x6 ∨ x8∨r5 x6 ∨ ¬x8∨r6 x2 ∨ x4∨r7 ¬x4 ∨ x5∨r8

x7 ∨ x5∨r9 ¬x7 ∨ x5∨r10 ¬x5 ∨ x3∨r11 ¬x3∨r12∑12i=1 ri ≤ 2

Refine UB = 3

AtMostk/PB constraints

over all relaxation variables

All (possibly many)

soft clauses relaxed

25 / 73

Page 47: Computing with Oracles · 2017. 5. 21. · Computing with Oracles From NP to Beyond NP and Back Again Joao Marques-Silva ... SAT engines Boolean QBF MaxSAT PBO #SAT... FOL SMT Model

Basic MaxSAT with iterative SAT solving

x6 ∨ x2∨r1 ¬x6 ∨ x2∨r2 ¬x2 ∨ x1∨r3 ¬x1∨r4

¬x6 ∨ x8∨r5 x6 ∨ ¬x8∨r6 x2 ∨ x4∨r7 ¬x4 ∨ x5∨r8

x7 ∨ x5∨r9 ¬x7 ∨ x5∨r10 ¬x5 ∨ x3∨r11 ¬x3∨r12∑12i=1 ri ≤ 2

Formula is SAT; E.g. x1 = x2 = 1; x3 = ... = x8 = 0 and r4 = r9 = 1(i.e. cost = 2)

AtMostk/PB constraints

over all relaxation variables

All (possibly many)

soft clauses relaxed

25 / 73

Page 48: Computing with Oracles · 2017. 5. 21. · Computing with Oracles From NP to Beyond NP and Back Again Joao Marques-Silva ... SAT engines Boolean QBF MaxSAT PBO #SAT... FOL SMT Model

Basic MaxSAT with iterative SAT solving

x6 ∨ x2∨r1 ¬x6 ∨ x2∨r2 ¬x2 ∨ x1∨r3 ¬x1∨r4

¬x6 ∨ x8∨r5 x6 ∨ ¬x8∨r6 x2 ∨ x4∨r7 ¬x4 ∨ x5∨r8

x7 ∨ x5∨r9 ¬x7 ∨ x5∨r10 ¬x5 ∨ x3∨r11 ¬x3∨r12∑12i=1 ri ≤ 1

Refine UB = 2

AtMostk/PB constraints

over all relaxation variables

All (possibly many)

soft clauses relaxed

25 / 73

Page 49: Computing with Oracles · 2017. 5. 21. · Computing with Oracles From NP to Beyond NP and Back Again Joao Marques-Silva ... SAT engines Boolean QBF MaxSAT PBO #SAT... FOL SMT Model

Basic MaxSAT with iterative SAT solving

x6 ∨ x2∨r1 ¬x6 ∨ x2∨r2 ¬x2 ∨ x1∨r3 ¬x1∨r4

¬x6 ∨ x8∨r5 x6 ∨ ¬x8∨r6 x2 ∨ x4∨r7 ¬x4 ∨ x5∨r8

x7 ∨ x5∨r9 ¬x7 ∨ x5∨r10 ¬x5 ∨ x3∨r11 ¬x3∨r12∑12i=1 ri ≤ 1

Formula is UNSAT; terminate

AtMostk/PB constraints

over all relaxation variables

All (possibly many)

soft clauses relaxed

25 / 73

Page 50: Computing with Oracles · 2017. 5. 21. · Computing with Oracles From NP to Beyond NP and Back Again Joao Marques-Silva ... SAT engines Boolean QBF MaxSAT PBO #SAT... FOL SMT Model

Basic MaxSAT with iterative SAT solving

x6 ∨ x2∨r1 ¬x6 ∨ x2∨r2 ¬x2 ∨ x1∨r3 ¬x1∨r4

¬x6 ∨ x8∨r5 x6 ∨ ¬x8∨r6 x2 ∨ x4∨r7 ¬x4 ∨ x5∨r8

x7 ∨ x5∨r9 ¬x7 ∨ x5∨r10 ¬x5 ∨ x3∨r11 ¬x3∨r12∑12i=1 ri ≤ 1

MaxSAT solution is last satisfied UB: UB = 2

AtMostk/PB constraints

over all relaxation variables

All (possibly many)

soft clauses relaxed

25 / 73

Page 51: Computing with Oracles · 2017. 5. 21. · Computing with Oracles From NP to Beyond NP and Back Again Joao Marques-Silva ... SAT engines Boolean QBF MaxSAT PBO #SAT... FOL SMT Model

Basic MaxSAT with iterative SAT solving

x6 ∨ x2∨r1 ¬x6 ∨ x2∨r2 ¬x2 ∨ x1∨r3 ¬x1∨r4

¬x6 ∨ x8∨r5 x6 ∨ ¬x8∨r6 x2 ∨ x4∨r7 ¬x4 ∨ x5∨r8

x7 ∨ x5∨r9 ¬x7 ∨ x5∨r10 ¬x5 ∨ x3∨r11 ¬x3∨r12∑12i=1 ri ≤ 1

MaxSAT solution is last satisfied UB: UB = 2

AtMostk/PB constraints

over all relaxation variables

All (possibly many)

soft clauses relaxed

25 / 73

Page 52: Computing with Oracles · 2017. 5. 21. · Computing with Oracles From NP to Beyond NP and Back Again Joao Marques-Silva ... SAT engines Boolean QBF MaxSAT PBO #SAT... FOL SMT Model

Outline

Background

MaxSAT SolvingIterative SAT SolvingCore-Guided AlgorithmsMinimum Hitting Sets

2QBF Solving

26 / 73

Page 53: Computing with Oracles · 2017. 5. 21. · Computing with Oracles From NP to Beyond NP and Back Again Joao Marques-Silva ... SAT engines Boolean QBF MaxSAT PBO #SAT... FOL SMT Model

MSU3 core-guided algorithm

x6 ∨ x2 ¬x6 ∨ x2 ¬x2 ∨ x1 ¬x1

¬x6 ∨ x8 x6 ∨ ¬x8 x2 ∨ x4 ¬x4 ∨ x5

x7 ∨ x5 ¬x7 ∨ x5 ¬x5 ∨ x3 ¬x3

Example CNF formula

AtMostk/PB

constraints used

Relaxed soft clauses

become hard

Some clauses

not relaxed

27 / 73

Page 54: Computing with Oracles · 2017. 5. 21. · Computing with Oracles From NP to Beyond NP and Back Again Joao Marques-Silva ... SAT engines Boolean QBF MaxSAT PBO #SAT... FOL SMT Model

MSU3 core-guided algorithm

x6 ∨ x2 ¬x6 ∨ x2 ¬x2 ∨ x1 ¬x1

¬x6 ∨ x8 x6 ∨ ¬x8 x2 ∨ x4 ¬x4 ∨ x5

x7 ∨ x5 ¬x7 ∨ x5 ¬x5 ∨ x3 ¬x3

Formula is UNSAT; OPT ≤ |ϕ| − 1; Get unsat core

AtMostk/PB

constraints used

Relaxed soft clauses

become hard

Some clauses

not relaxed

27 / 73

Page 55: Computing with Oracles · 2017. 5. 21. · Computing with Oracles From NP to Beyond NP and Back Again Joao Marques-Silva ... SAT engines Boolean QBF MaxSAT PBO #SAT... FOL SMT Model

MSU3 core-guided algorithm

x6 ∨ x2 ¬x6 ∨ x2 ¬x2 ∨ x1∨r1 ¬x1∨r2

¬x6 ∨ x8 x6 ∨ ¬x8 x2 ∨ x4∨r3 ¬x4 ∨ x5∨r4

x7 ∨ x5 ¬x7 ∨ x5 ¬x5 ∨ x3∨r5 ¬x3∨r6∑6i=1 ri ≤ 1

Add relaxation variables and AtMostk , k = 1, constraint

AtMostk/PB

constraints used

Relaxed soft clauses

become hard

Some clauses

not relaxed

27 / 73

Page 56: Computing with Oracles · 2017. 5. 21. · Computing with Oracles From NP to Beyond NP and Back Again Joao Marques-Silva ... SAT engines Boolean QBF MaxSAT PBO #SAT... FOL SMT Model

MSU3 core-guided algorithm

x6 ∨ x2 ¬x6 ∨ x2 ¬x2 ∨ x1∨r1 ¬x1∨r2

¬x6 ∨ x8 x6 ∨ ¬x8 x2 ∨ x4∨r3 ¬x4 ∨ x5∨r4

x7 ∨ x5 ¬x7 ∨ x5 ¬x5 ∨ x3∨r5 ¬x3∨r6∑6i=1 ri ≤ 1

Formula is (again) UNSAT; OPT ≤ |ϕ| − 2; Get unsat core

AtMostk/PB

constraints used

Relaxed soft clauses

become hard

Some clauses

not relaxed

27 / 73

Page 57: Computing with Oracles · 2017. 5. 21. · Computing with Oracles From NP to Beyond NP and Back Again Joao Marques-Silva ... SAT engines Boolean QBF MaxSAT PBO #SAT... FOL SMT Model

MSU3 core-guided algorithm

x6 ∨ x2∨r7 ¬x6 ∨ x2∨r8 ¬x2 ∨ x1∨r1 ¬x1∨r2

¬x6 ∨ x8 x6 ∨ ¬x8 x2 ∨ x4∨r3 ¬x4 ∨ x5∨r4

x7 ∨ x5∨r9 ¬x7 ∨ x5∨r10 ¬x5 ∨ x3∨r5 ¬x3∨r6∑10i=1 ri ≤ 2

Add new relaxation variables and update AtMostk , k=2, constraint

AtMostk/PB

constraints used

Relaxed soft clauses

become hard

Some clauses

not relaxed

27 / 73

Page 58: Computing with Oracles · 2017. 5. 21. · Computing with Oracles From NP to Beyond NP and Back Again Joao Marques-Silva ... SAT engines Boolean QBF MaxSAT PBO #SAT... FOL SMT Model

MSU3 core-guided algorithm

x6 ∨ x2∨r7 ¬x6 ∨ x2∨r8 ¬x2 ∨ x1∨r1 ¬x1∨r2

¬x6 ∨ x8 x6 ∨ ¬x8 x2 ∨ x4∨r3 ¬x4 ∨ x5∨r4

x7 ∨ x5∨r9 ¬x7 ∨ x5∨r10 ¬x5 ∨ x3∨r5 ¬x3∨r6∑10i=1 ri ≤ 2

Instance is now SAT

AtMostk/PB

constraints used

Relaxed soft clauses

become hard

Some clauses

not relaxed

27 / 73

Page 59: Computing with Oracles · 2017. 5. 21. · Computing with Oracles From NP to Beyond NP and Back Again Joao Marques-Silva ... SAT engines Boolean QBF MaxSAT PBO #SAT... FOL SMT Model

MSU3 core-guided algorithm

x6 ∨ x2∨r7 ¬x6 ∨ x2∨r8 ¬x2 ∨ x1∨r1 ¬x1∨r2

¬x6 ∨ x8 x6 ∨ ¬x8 x2 ∨ x4∨r3 ¬x4 ∨ x5∨r4

x7 ∨ x5∨r9 ¬x7 ∨ x5∨r10 ¬x5 ∨ x3∨r5 ¬x3∨r6∑10i=1 ri ≤ 2

MaxSAT solution is |ϕ| − I = 12− 2 = 10

AtMostk/PB

constraints used

Relaxed soft clauses

become hard

Some clauses

not relaxed

27 / 73

Page 60: Computing with Oracles · 2017. 5. 21. · Computing with Oracles From NP to Beyond NP and Back Again Joao Marques-Silva ... SAT engines Boolean QBF MaxSAT PBO #SAT... FOL SMT Model

MSU3 core-guided algorithm

x6 ∨ x2∨r7 ¬x6 ∨ x2∨r8 ¬x2 ∨ x1∨r1 ¬x1∨r2

¬x6 ∨ x8 x6 ∨ ¬x8 x2 ∨ x4∨r3 ¬x4 ∨ x5∨r4

x7 ∨ x5∨r9 ¬x7 ∨ x5∨r10 ¬x5 ∨ x3∨r5 ¬x3∨r6∑10i=1 ri ≤ 2

MaxSAT solution is |ϕ| − I = 12− 2 = 10

AtMostk/PB

constraints used

Relaxed soft clauses

become hard

Some clauses

not relaxed

27 / 73

Page 61: Computing with Oracles · 2017. 5. 21. · Computing with Oracles From NP to Beyond NP and Back Again Joao Marques-Silva ... SAT engines Boolean QBF MaxSAT PBO #SAT... FOL SMT Model

MSU3 core-guided algorithm

x6 ∨ x2∨r7 ¬x6 ∨ x2∨r8 ¬x2 ∨ x1∨r1 ¬x1∨r2

¬x6 ∨ x8 x6 ∨ ¬x8 x2 ∨ x4∨r3 ¬x4 ∨ x5∨r4

x7 ∨ x5∨r9 ¬x7 ∨ x5∨r10 ¬x5 ∨ x3∨r5 ¬x3∨r6∑10i=1 ri ≤ 2

MaxSAT solution is |ϕ| − I = 12− 2 = 10

AtMostk/PB

constraints used

Relaxed soft clauses

become hard

Some clauses

not relaxed

27 / 73

Page 62: Computing with Oracles · 2017. 5. 21. · Computing with Oracles From NP to Beyond NP and Back Again Joao Marques-Silva ... SAT engines Boolean QBF MaxSAT PBO #SAT... FOL SMT Model

Outline

Background

MaxSAT SolvingIterative SAT SolvingCore-Guided AlgorithmsMinimum Hitting Sets

2QBF Solving

28 / 73

Page 63: Computing with Oracles · 2017. 5. 21. · Computing with Oracles From NP to Beyond NP and Back Again Joao Marques-Silva ... SAT engines Boolean QBF MaxSAT PBO #SAT... FOL SMT Model

MHS approach for MaxSAT

c1 = x6 ∨ x2 c2 = ¬x6 ∨ x2 c3 = ¬x2 ∨ x1 c4 = ¬x1

c5 = ¬x6 ∨ x8 c6 = x6 ∨ ¬x8 c7 = x2 ∨ x4 c8 = ¬x4 ∨ x5

c9 = x7 ∨ x5 c10 = ¬x7 ∨ x5 c11 = ¬x5 ∨ x3 c12 = ¬x3

K = ∅

• Find MHS of K:

• SAT(F \ ∅)?

• Core of F : {c1, c2, c3, c4}

29 / 73

Page 64: Computing with Oracles · 2017. 5. 21. · Computing with Oracles From NP to Beyond NP and Back Again Joao Marques-Silva ... SAT engines Boolean QBF MaxSAT PBO #SAT... FOL SMT Model

MHS approach for MaxSAT

c1 = x6 ∨ x2 c2 = ¬x6 ∨ x2 c3 = ¬x2 ∨ x1 c4 = ¬x1

c5 = ¬x6 ∨ x8 c6 = x6 ∨ ¬x8 c7 = x2 ∨ x4 c8 = ¬x4 ∨ x5

c9 = x7 ∨ x5 c10 = ¬x7 ∨ x5 c11 = ¬x5 ∨ x3 c12 = ¬x3

K = ∅

• Find MHS of K: ∅

• SAT(F \ ∅)?

• Core of F : {c1, c2, c3, c4}

29 / 73

Page 65: Computing with Oracles · 2017. 5. 21. · Computing with Oracles From NP to Beyond NP and Back Again Joao Marques-Silva ... SAT engines Boolean QBF MaxSAT PBO #SAT... FOL SMT Model

MHS approach for MaxSAT

c1 = x6 ∨ x2 c2 = ¬x6 ∨ x2 c3 = ¬x2 ∨ x1 c4 = ¬x1

c5 = ¬x6 ∨ x8 c6 = x6 ∨ ¬x8 c7 = x2 ∨ x4 c8 = ¬x4 ∨ x5

c9 = x7 ∨ x5 c10 = ¬x7 ∨ x5 c11 = ¬x5 ∨ x3 c12 = ¬x3

K = ∅

• Find MHS of K: ∅• SAT(F \ ∅)?

• Core of F : {c1, c2, c3, c4}

29 / 73

Page 66: Computing with Oracles · 2017. 5. 21. · Computing with Oracles From NP to Beyond NP and Back Again Joao Marques-Silva ... SAT engines Boolean QBF MaxSAT PBO #SAT... FOL SMT Model

MHS approach for MaxSAT

c1 = x6 ∨ x2 c2 = ¬x6 ∨ x2 c3 = ¬x2 ∨ x1 c4 = ¬x1

c5 = ¬x6 ∨ x8 c6 = x6 ∨ ¬x8 c7 = x2 ∨ x4 c8 = ¬x4 ∨ x5

c9 = x7 ∨ x5 c10 = ¬x7 ∨ x5 c11 = ¬x5 ∨ x3 c12 = ¬x3

K = ∅

• Find MHS of K: ∅• SAT(F \ ∅)? No

• Core of F : {c1, c2, c3, c4}

29 / 73

Page 67: Computing with Oracles · 2017. 5. 21. · Computing with Oracles From NP to Beyond NP and Back Again Joao Marques-Silva ... SAT engines Boolean QBF MaxSAT PBO #SAT... FOL SMT Model

MHS approach for MaxSAT

c1 = x6 ∨ x2 c2 = ¬x6 ∨ x2 c3 = ¬x2 ∨ x1 c4 = ¬x1

c5 = ¬x6 ∨ x8 c6 = x6 ∨ ¬x8 c7 = x2 ∨ x4 c8 = ¬x4 ∨ x5

c9 = x7 ∨ x5 c10 = ¬x7 ∨ x5 c11 = ¬x5 ∨ x3 c12 = ¬x3

K = ∅

• Find MHS of K: ∅• SAT(F \ ∅)? No

• Core of F : {c1, c2, c3, c4}

29 / 73

Page 68: Computing with Oracles · 2017. 5. 21. · Computing with Oracles From NP to Beyond NP and Back Again Joao Marques-Silva ... SAT engines Boolean QBF MaxSAT PBO #SAT... FOL SMT Model

MHS approach for MaxSAT

c1 = x6 ∨ x2 c2 = ¬x6 ∨ x2 c3 = ¬x2 ∨ x1 c4 = ¬x1

c5 = ¬x6 ∨ x8 c6 = x6 ∨ ¬x8 c7 = x2 ∨ x4 c8 = ¬x4 ∨ x5

c9 = x7 ∨ x5 c10 = ¬x7 ∨ x5 c11 = ¬x5 ∨ x3 c12 = ¬x3

K = {{c1, c2, c3, c4}}

• Find MHS of K: ∅• SAT(F \ ∅)? No

• Core of F : {c1, c2, c3, c4}. Update K

29 / 73

Page 69: Computing with Oracles · 2017. 5. 21. · Computing with Oracles From NP to Beyond NP and Back Again Joao Marques-Silva ... SAT engines Boolean QBF MaxSAT PBO #SAT... FOL SMT Model

MHS approach for MaxSAT

c1 = x6 ∨ x2 c2 = ¬x6 ∨ x2 c3 = ¬x2 ∨ x1 c4 = ¬x1

c5 = ¬x6 ∨ x8 c6 = x6 ∨ ¬x8 c7 = x2 ∨ x4 c8 = ¬x4 ∨ x5

c9 = x7 ∨ x5 c10 = ¬x7 ∨ x5 c11 = ¬x5 ∨ x3 c12 = ¬x3

K = {{c1, c2, c3, c4}}

• Find MHS of K:

• SAT(F \ {c1})?

• Core of F : {c9, c10, c11, c12}

29 / 73

Page 70: Computing with Oracles · 2017. 5. 21. · Computing with Oracles From NP to Beyond NP and Back Again Joao Marques-Silva ... SAT engines Boolean QBF MaxSAT PBO #SAT... FOL SMT Model

MHS approach for MaxSAT

c1 = x6 ∨ x2 c2 = ¬x6 ∨ x2 c3 = ¬x2 ∨ x1 c4 = ¬x1

c5 = ¬x6 ∨ x8 c6 = x6 ∨ ¬x8 c7 = x2 ∨ x4 c8 = ¬x4 ∨ x5

c9 = x7 ∨ x5 c10 = ¬x7 ∨ x5 c11 = ¬x5 ∨ x3 c12 = ¬x3

K = {{c1, c2, c3, c4}}

• Find MHS of K: E.g. {c1}

• SAT(F \ {c1})?

• Core of F : {c9, c10, c11, c12}

29 / 73

Page 71: Computing with Oracles · 2017. 5. 21. · Computing with Oracles From NP to Beyond NP and Back Again Joao Marques-Silva ... SAT engines Boolean QBF MaxSAT PBO #SAT... FOL SMT Model

MHS approach for MaxSAT

c1 = x6 ∨ x2 c2 = ¬x6 ∨ x2 c3 = ¬x2 ∨ x1 c4 = ¬x1

c5 = ¬x6 ∨ x8 c6 = x6 ∨ ¬x8 c7 = x2 ∨ x4 c8 = ¬x4 ∨ x5

c9 = x7 ∨ x5 c10 = ¬x7 ∨ x5 c11 = ¬x5 ∨ x3 c12 = ¬x3

K = {{c1, c2, c3, c4}}

• Find MHS of K: E.g. {c1}• SAT(F \ {c1})?

• Core of F : {c9, c10, c11, c12}

29 / 73

Page 72: Computing with Oracles · 2017. 5. 21. · Computing with Oracles From NP to Beyond NP and Back Again Joao Marques-Silva ... SAT engines Boolean QBF MaxSAT PBO #SAT... FOL SMT Model

MHS approach for MaxSAT

c1 = x6 ∨ x2 c2 = ¬x6 ∨ x2 c3 = ¬x2 ∨ x1 c4 = ¬x1

c5 = ¬x6 ∨ x8 c6 = x6 ∨ ¬x8 c7 = x2 ∨ x4 c8 = ¬x4 ∨ x5

c9 = x7 ∨ x5 c10 = ¬x7 ∨ x5 c11 = ¬x5 ∨ x3 c12 = ¬x3

K = {{c1, c2, c3, c4}}

• Find MHS of K: E.g. {c1}• SAT(F \ {c1})? No

• Core of F : {c9, c10, c11, c12}

29 / 73

Page 73: Computing with Oracles · 2017. 5. 21. · Computing with Oracles From NP to Beyond NP and Back Again Joao Marques-Silva ... SAT engines Boolean QBF MaxSAT PBO #SAT... FOL SMT Model

MHS approach for MaxSAT

c1 = x6 ∨ x2 c2 = ¬x6 ∨ x2 c3 = ¬x2 ∨ x1 c4 = ¬x1

c5 = ¬x6 ∨ x8 c6 = x6 ∨ ¬x8 c7 = x2 ∨ x4 c8 = ¬x4 ∨ x5

c9 = x7 ∨ x5 c10 = ¬x7 ∨ x5 c11 = ¬x5 ∨ x3 c12 = ¬x3

K = {{c1, c2, c3, c4}}

• Find MHS of K: E.g. {c1}• SAT(F \ {c1})? No

• Core of F : {c9, c10, c11, c12}

29 / 73

Page 74: Computing with Oracles · 2017. 5. 21. · Computing with Oracles From NP to Beyond NP and Back Again Joao Marques-Silva ... SAT engines Boolean QBF MaxSAT PBO #SAT... FOL SMT Model

MHS approach for MaxSAT

c1 = x6 ∨ x2 c2 = ¬x6 ∨ x2 c3 = ¬x2 ∨ x1 c4 = ¬x1

c5 = ¬x6 ∨ x8 c6 = x6 ∨ ¬x8 c7 = x2 ∨ x4 c8 = ¬x4 ∨ x5

c9 = x7 ∨ x5 c10 = ¬x7 ∨ x5 c11 = ¬x5 ∨ x3 c12 = ¬x3

K = {{c1, c2, c3, c4}, {c9, c10, c11, c12}}

• Find MHS of K: E.g. {c1}• SAT(F \ {c1})? No

• Core of F : {c9, c10, c11, c12}. Update K

29 / 73

Page 75: Computing with Oracles · 2017. 5. 21. · Computing with Oracles From NP to Beyond NP and Back Again Joao Marques-Silva ... SAT engines Boolean QBF MaxSAT PBO #SAT... FOL SMT Model

MHS approach for MaxSAT

c1 = x6 ∨ x2 c2 = ¬x6 ∨ x2 c3 = ¬x2 ∨ x1 c4 = ¬x1

c5 = ¬x6 ∨ x8 c6 = x6 ∨ ¬x8 c7 = x2 ∨ x4 c8 = ¬x4 ∨ x5

c9 = x7 ∨ x5 c10 = ¬x7 ∨ x5 c11 = ¬x5 ∨ x3 c12 = ¬x3

K = {{c1, c2, c3, c4}, {c9, c10, c11, c12}}

• Find MHS of K:

• SAT(F \ {c1, c9})?

• Core of F : {c3, c4, c7, c8, c11, c12}

29 / 73

Page 76: Computing with Oracles · 2017. 5. 21. · Computing with Oracles From NP to Beyond NP and Back Again Joao Marques-Silva ... SAT engines Boolean QBF MaxSAT PBO #SAT... FOL SMT Model

MHS approach for MaxSAT

c1 = x6 ∨ x2 c2 = ¬x6 ∨ x2 c3 = ¬x2 ∨ x1 c4 = ¬x1

c5 = ¬x6 ∨ x8 c6 = x6 ∨ ¬x8 c7 = x2 ∨ x4 c8 = ¬x4 ∨ x5

c9 = x7 ∨ x5 c10 = ¬x7 ∨ x5 c11 = ¬x5 ∨ x3 c12 = ¬x3

K = {{c1, c2, c3, c4}, {c9, c10, c11, c12}}

• Find MHS of K: E.g. {c1, c9}

• SAT(F \ {c1, c9})?

• Core of F : {c3, c4, c7, c8, c11, c12}

29 / 73

Page 77: Computing with Oracles · 2017. 5. 21. · Computing with Oracles From NP to Beyond NP and Back Again Joao Marques-Silva ... SAT engines Boolean QBF MaxSAT PBO #SAT... FOL SMT Model

MHS approach for MaxSAT

c1 = x6 ∨ x2 c2 = ¬x6 ∨ x2 c3 = ¬x2 ∨ x1 c4 = ¬x1

c5 = ¬x6 ∨ x8 c6 = x6 ∨ ¬x8 c7 = x2 ∨ x4 c8 = ¬x4 ∨ x5

c9 = x7 ∨ x5 c10 = ¬x7 ∨ x5 c11 = ¬x5 ∨ x3 c12 = ¬x3

K = {{c1, c2, c3, c4}, {c9, c10, c11, c12}}

• Find MHS of K: E.g. {c1, c9}• SAT(F \ {c1, c9})?

• Core of F : {c3, c4, c7, c8, c11, c12}

29 / 73

Page 78: Computing with Oracles · 2017. 5. 21. · Computing with Oracles From NP to Beyond NP and Back Again Joao Marques-Silva ... SAT engines Boolean QBF MaxSAT PBO #SAT... FOL SMT Model

MHS approach for MaxSAT

c1 = x6 ∨ x2 c2 = ¬x6 ∨ x2 c3 = ¬x2 ∨ x1 c4 = ¬x1

c5 = ¬x6 ∨ x8 c6 = x6 ∨ ¬x8 c7 = x2 ∨ x4 c8 = ¬x4 ∨ x5

c9 = x7 ∨ x5 c10 = ¬x7 ∨ x5 c11 = ¬x5 ∨ x3 c12 = ¬x3

K = {{c1, c2, c3, c4}, {c9, c10, c11, c12}}

• Find MHS of K: E.g. {c1, c9}• SAT(F \ {c1, c9})? No

• Core of F : {c3, c4, c7, c8, c11, c12}

29 / 73

Page 79: Computing with Oracles · 2017. 5. 21. · Computing with Oracles From NP to Beyond NP and Back Again Joao Marques-Silva ... SAT engines Boolean QBF MaxSAT PBO #SAT... FOL SMT Model

MHS approach for MaxSAT

c1 = x6 ∨ x2 c2 = ¬x6 ∨ x2 c3 = ¬x2 ∨ x1 c4 = ¬x1

c5 = ¬x6 ∨ x8 c6 = x6 ∨ ¬x8 c7 = x2 ∨ x4 c8 = ¬x4 ∨ x5

c9 = x7 ∨ x5 c10 = ¬x7 ∨ x5 c11 = ¬x5 ∨ x3 c12 = ¬x3

K = {{c1, c2, c3, c4}, {c9, c10, c11, c12}}

• Find MHS of K: E.g. {c1, c9}• SAT(F \ {c1, c9})? No

• Core of F : {c3, c4, c7, c8, c11, c12}

29 / 73

Page 80: Computing with Oracles · 2017. 5. 21. · Computing with Oracles From NP to Beyond NP and Back Again Joao Marques-Silva ... SAT engines Boolean QBF MaxSAT PBO #SAT... FOL SMT Model

MHS approach for MaxSAT

c1 = x6 ∨ x2 c2 = ¬x6 ∨ x2 c3 = ¬x2 ∨ x1 c4 = ¬x1

c5 = ¬x6 ∨ x8 c6 = x6 ∨ ¬x8 c7 = x2 ∨ x4 c8 = ¬x4 ∨ x5

c9 = x7 ∨ x5 c10 = ¬x7 ∨ x5 c11 = ¬x5 ∨ x3 c12 = ¬x3

K = {{c1, c2, c3, c4}, {c9, c10, c11, c12}, {c3, c4, c7, c8, c11, c12}}

• Find MHS of K: E.g. {c1, c9}• SAT(F \ {c1, c9})? No

• Core of F : {c3, c4, c7, c8, c11, c12}. Update K

29 / 73

Page 81: Computing with Oracles · 2017. 5. 21. · Computing with Oracles From NP to Beyond NP and Back Again Joao Marques-Silva ... SAT engines Boolean QBF MaxSAT PBO #SAT... FOL SMT Model

MHS approach for MaxSAT

c1 = x6 ∨ x2 c2 = ¬x6 ∨ x2 c3 = ¬x2 ∨ x1 c4 = ¬x1

c5 = ¬x6 ∨ x8 c6 = x6 ∨ ¬x8 c7 = x2 ∨ x4 c8 = ¬x4 ∨ x5

c9 = x7 ∨ x5 c10 = ¬x7 ∨ x5 c11 = ¬x5 ∨ x3 c12 = ¬x3

K = {{c1, c2, c3, c4}, {c9, c10, c11, c12}, {c3, c4, c7, c8, c11, c12}}

• Find MHS of K:

• SAT(F \ {c4, c9})?

• Terminate & return 2

29 / 73

Page 82: Computing with Oracles · 2017. 5. 21. · Computing with Oracles From NP to Beyond NP and Back Again Joao Marques-Silva ... SAT engines Boolean QBF MaxSAT PBO #SAT... FOL SMT Model

MHS approach for MaxSAT

c1 = x6 ∨ x2 c2 = ¬x6 ∨ x2 c3 = ¬x2 ∨ x1 c4 = ¬x1

c5 = ¬x6 ∨ x8 c6 = x6 ∨ ¬x8 c7 = x2 ∨ x4 c8 = ¬x4 ∨ x5

c9 = x7 ∨ x5 c10 = ¬x7 ∨ x5 c11 = ¬x5 ∨ x3 c12 = ¬x3

K = {{c1, c2, c3, c4}, {c9, c10, c11, c12}, {c3, c4, c7, c8, c11, c12}}

• Find MHS of K: E.g. {c4, c9}

• SAT(F \ {c4, c9})?

• Terminate & return 2

29 / 73

Page 83: Computing with Oracles · 2017. 5. 21. · Computing with Oracles From NP to Beyond NP and Back Again Joao Marques-Silva ... SAT engines Boolean QBF MaxSAT PBO #SAT... FOL SMT Model

MHS approach for MaxSAT

c1 = x6 ∨ x2 c2 = ¬x6 ∨ x2 c3 = ¬x2 ∨ x1 c4 = ¬x1

c5 = ¬x6 ∨ x8 c6 = x6 ∨ ¬x8 c7 = x2 ∨ x4 c8 = ¬x4 ∨ x5

c9 = x7 ∨ x5 c10 = ¬x7 ∨ x5 c11 = ¬x5 ∨ x3 c12 = ¬x3

K = {{c1, c2, c3, c4}, {c9, c10, c11, c12}, {c3, c4, c7, c8, c11, c12}}

• Find MHS of K: E.g. {c4, c9}• SAT(F \ {c4, c9})?

• Terminate & return 2

29 / 73

Page 84: Computing with Oracles · 2017. 5. 21. · Computing with Oracles From NP to Beyond NP and Back Again Joao Marques-Silva ... SAT engines Boolean QBF MaxSAT PBO #SAT... FOL SMT Model

MHS approach for MaxSAT

c1 = x6 ∨ x2 c2 = ¬x6 ∨ x2 c3 = ¬x2 ∨ x1 c4 = ¬x1

c5 = ¬x6 ∨ x8 c6 = x6 ∨ ¬x8 c7 = x2 ∨ x4 c8 = ¬x4 ∨ x5

c9 = x7 ∨ x5 c10 = ¬x7 ∨ x5 c11 = ¬x5 ∨ x3 c12 = ¬x3

K = {{c1, c2, c3, c4}, {c9, c10, c11, c12}, {c3, c4, c7, c8, c11, c12}}

• Find MHS of K: E.g. {c4, c9}• SAT(F \ {c4, c9})? Yes

• Terminate & return 2

29 / 73

Page 85: Computing with Oracles · 2017. 5. 21. · Computing with Oracles From NP to Beyond NP and Back Again Joao Marques-Silva ... SAT engines Boolean QBF MaxSAT PBO #SAT... FOL SMT Model

MHS approach for MaxSAT

c1 = x6 ∨ x2 c2 = ¬x6 ∨ x2 c3 = ¬x2 ∨ x1 c4 = ¬x1

c5 = ¬x6 ∨ x8 c6 = x6 ∨ ¬x8 c7 = x2 ∨ x4 c8 = ¬x4 ∨ x5

c9 = x7 ∨ x5 c10 = ¬x7 ∨ x5 c11 = ¬x5 ∨ x3 c12 = ¬x3

K = {{c1, c2, c3, c4}, {c9, c10, c11, c12}, {c3, c4, c7, c8, c11, c12}}

• Find MHS of K: E.g. {c4, c9}• SAT(F \ {c4, c9})? Yes

• Terminate & return 2

29 / 73

Page 86: Computing with Oracles · 2017. 5. 21. · Computing with Oracles From NP to Beyond NP and Back Again Joao Marques-Silva ... SAT engines Boolean QBF MaxSAT PBO #SAT... FOL SMT Model

MaxSAT solving with SAT oracles

• A sample of recent algorithms:

Algorithm # Oracle Queries Reference

Linear search SU Exponential*** [e.g. LBP10]

Binary search Linear* [e.g. FM06]

FM/WMSU1/WPM1 Exponential** [FM06,MSM08,MMSP09,ABL09a,ABGL12]

WPM2 Exponential** [ABL10,ABGL13]

Bin-Core-Dis Linear [HMMS11,MHMS12]

Iterative MHS Exponential [DB11,DB13a,DB13b]

* O(logm) queries with SAT oracle, for (partial) unweighted MaxSAT

** Weighted case; depends on computed cores*** On # bits of problem instance (due to weights)

• But also additional recent work:– Progression– Soft cardinality constraints (OLL)– MaxSAT resolution– ...

30 / 73

Page 87: Computing with Oracles · 2017. 5. 21. · Computing with Oracles From NP to Beyond NP and Back Again Joao Marques-Silva ... SAT engines Boolean QBF MaxSAT PBO #SAT... FOL SMT Model

Outline

Background

MaxSAT Solving

2QBF Solving

31 / 73

Page 88: Computing with Oracles · 2017. 5. 21. · Computing with Oracles From NP to Beyond NP and Back Again Joao Marques-Silva ... SAT engines Boolean QBF MaxSAT PBO #SAT... FOL SMT Model

Abstraction refinement for QBF

• Many approaches proposed for solving QBF [...]

• Abstraction-refinement proposed for 2QBF in 2011 [JMS11]

• Extended to QBF in 2012 [JKMSC12]

• Significant impact in QBF competitions

• Influenced research in QBF solvers

– E.g. see conference papers in 2015/2016

• Ack: Slides adapted from M. Janota SAT’11 talk

32 / 73

Page 89: Computing with Oracles · 2017. 5. 21. · Computing with Oracles From NP to Beyond NP and Back Again Joao Marques-Silva ... SAT engines Boolean QBF MaxSAT PBO #SAT... FOL SMT Model

Problem definition

Given: ∃X∀Y .φ, where φ is a propositional formula

Question: Is there assignment ν to X variables such that ∀Y .φ[X/ν]?

Example

∃x1, x2 ∀y1, y2. (x1 → y1) ∧ (x2→y2)

solution: x1 = 0, x2 = 0

A simple algorithm

• While true– Pick fresh assignment ν to X variables– Check with SAT solver whether ∀Y .φ[X/ν] holds

I How? Check SAT(¬φ[X/ν]) is unsat

33 / 73

Page 90: Computing with Oracles · 2017. 5. 21. · Computing with Oracles From NP to Beyond NP and Back Again Joao Marques-Silva ... SAT engines Boolean QBF MaxSAT PBO #SAT... FOL SMT Model

Problem definition

Given: ∃X∀Y .φ, where φ is a propositional formula

Question: Is there assignment ν to X variables such that ∀Y .φ[X/ν]?

Example

∃x1, x2 ∀y1, y2. (x1 → y1) ∧ (x2→y2)

solution: x1 = 0, x2 = 0

A simple algorithm

• While true– Pick fresh assignment ν to X variables– Check with SAT solver whether ∀Y .φ[X/ν] holds

I How? Check SAT(¬φ[X/ν]) is unsat

33 / 73

Page 91: Computing with Oracles · 2017. 5. 21. · Computing with Oracles From NP to Beyond NP and Back Again Joao Marques-Silva ... SAT engines Boolean QBF MaxSAT PBO #SAT... FOL SMT Model

Problem definition

Given: ∃X∀Y .φ, where φ is a propositional formula

Question: Is there assignment ν to X variables such that ∀Y .φ[X/ν]?

Example

∃x1, x2 ∀y1, y2. (x1 → y1) ∧ (x2→y2)

solution: x1 = 0, x2 = 0

A simple algorithm

• While true– Pick fresh assignment ν to X variables– Check with SAT solver whether ∀Y .φ[X/ν] holds

I How? Check SAT(¬φ[X/ν]) is unsat

33 / 73

Page 92: Computing with Oracles · 2017. 5. 21. · Computing with Oracles From NP to Beyond NP and Back Again Joao Marques-Silva ... SAT engines Boolean QBF MaxSAT PBO #SAT... FOL SMT Model

Problem definition

Given: ∃X∀Y .φ, where φ is a propositional formula

Question: Is there assignment ν to X variables such that ∀Y .φ[X/ν]?

Example

∃x1, x2 ∀y1, y2. (x1 → y1) ∧ (x2→y2)

solution: x1 = 0, x2 = 0

A simple algorithm

• While true– Pick fresh assignment ν to X variables– Check with SAT solver whether ∀Y .φ[X/ν] holds

I How?

Check SAT(¬φ[X/ν]) is unsat

33 / 73

Page 93: Computing with Oracles · 2017. 5. 21. · Computing with Oracles From NP to Beyond NP and Back Again Joao Marques-Silva ... SAT engines Boolean QBF MaxSAT PBO #SAT... FOL SMT Model

Problem definition

Given: ∃X∀Y .φ, where φ is a propositional formula

Question: Is there assignment ν to X variables such that ∀Y .φ[X/ν]?

Example

∃x1, x2 ∀y1, y2. (x1 → y1) ∧ (x2→y2)

solution: x1 = 0, x2 = 0

A simple algorithm

• While true– Pick fresh assignment ν to X variables– Check with SAT solver whether ∀Y .φ[X/ν] holds

I How? Check SAT(¬φ[X/ν]) is unsat

33 / 73

Page 94: Computing with Oracles · 2017. 5. 21. · Computing with Oracles From NP to Beyond NP and Back Again Joao Marques-Silva ... SAT engines Boolean QBF MaxSAT PBO #SAT... FOL SMT Model

Looking at assignments

Y

X

ξ

µ

34 / 73

Page 95: Computing with Oracles · 2017. 5. 21. · Computing with Oracles From NP to Beyond NP and Back Again Joao Marques-Silva ... SAT engines Boolean QBF MaxSAT PBO #SAT... FOL SMT Model

Looking at assignments

Y

X

ξ

µ

1

34 / 73

Page 96: Computing with Oracles · 2017. 5. 21. · Computing with Oracles From NP to Beyond NP and Back Again Joao Marques-Silva ... SAT engines Boolean QBF MaxSAT PBO #SAT... FOL SMT Model

Looking at assignments

Y

X

ξ

µ

11 0 . . .

. . .0 . . .

. . .1

34 / 73

Page 97: Computing with Oracles · 2017. 5. 21. · Computing with Oracles From NP to Beyond NP and Back Again Joao Marques-Silva ... SAT engines Boolean QBF MaxSAT PBO #SAT... FOL SMT Model

Looking at assignments

Y

X

ξ

µ

11 0 . . .

. . .0 . . .

. . .1

ν 1 1 . . . 1 1 . . . 1

34 / 73

Page 98: Computing with Oracles · 2017. 5. 21. · Computing with Oracles From NP to Beyond NP and Back Again Joao Marques-Silva ... SAT engines Boolean QBF MaxSAT PBO #SAT... FOL SMT Model

Looking at assignments

Y

X

ξ

µ

φ[Y /µ]

11 0 . . .

. . .0 . . .

. . .1

ν 1 1 . . . 1 1 . . . 1

34 / 73

Page 99: Computing with Oracles · 2017. 5. 21. · Computing with Oracles From NP to Beyond NP and Back Again Joao Marques-Silva ... SAT engines Boolean QBF MaxSAT PBO #SAT... FOL SMT Model

Expanding into SAT

∃X∀Y . φ =⇒ SAT

∧µ∈B|Y |

φ[Y /µ]

Example

∃x1, x2 ∀y1, y2. (x1 → y1) ∧ (x2→y2)

(x1 → 0) ∧ (x2 → 0)∧ (x1 → 0) ∧ (x2 → 1)∧ (x1 → 1) ∧ (x2 → 0)∧ (x1 → 1) ∧ (x2 → 1)

35 / 73

Page 100: Computing with Oracles · 2017. 5. 21. · Computing with Oracles From NP to Beyond NP and Back Again Joao Marques-Silva ... SAT engines Boolean QBF MaxSAT PBO #SAT... FOL SMT Model

Expanding into SAT

∃X∀Y . φ =⇒ SAT

∧µ∈B|Y |

φ[Y /µ]

Example

∃x1, x2 ∀y1, y2. (x1 → y1) ∧ (x2→y2)

(x1 → 0) ∧ (x2 → 0)∧ (x1 → 0) ∧ (x2 → 1)∧ (x1 → 1) ∧ (x2 → 0)∧ (x1 → 1) ∧ (x2 → 1)

35 / 73

Page 101: Computing with Oracles · 2017. 5. 21. · Computing with Oracles From NP to Beyond NP and Back Again Joao Marques-Silva ... SAT engines Boolean QBF MaxSAT PBO #SAT... FOL SMT Model

Abstraction

• Consider only some set of assignments W ⊆ B|Y |∧µ∈W

φ[Y /µ]

• A solution to the original problem is also a solution to theabstraction ∧

µ∈B|Y |φ[Y /µ] ⇒

∧µ∈W

φ[Y /µ]

• But converse not true

– A solution to an abstraction is not necessarily a solution to theoriginal problem

36 / 73

Page 102: Computing with Oracles · 2017. 5. 21. · Computing with Oracles From NP to Beyond NP and Back Again Joao Marques-Silva ... SAT engines Boolean QBF MaxSAT PBO #SAT... FOL SMT Model

Abstraction

• Consider only some set of assignments W ⊆ B|Y |∧µ∈W

φ[Y /µ]

• A solution to the original problem is also a solution to theabstraction ∧

µ∈B|Y |φ[Y /µ] ⇒

∧µ∈W

φ[Y /µ]

• But converse not true

– A solution to an abstraction is not necessarily a solution to theoriginal problem

36 / 73

Page 103: Computing with Oracles · 2017. 5. 21. · Computing with Oracles From NP to Beyond NP and Back Again Joao Marques-Silva ... SAT engines Boolean QBF MaxSAT PBO #SAT... FOL SMT Model

Abstraction

• Consider only some set of assignments W ⊆ B|Y |∧µ∈W

φ[Y /µ]

• A solution to the original problem is also a solution to theabstraction ∧

µ∈B|Y |φ[Y /µ] ⇒

∧µ∈W

φ[Y /µ]

• But converse not true

– A solution to an abstraction is not necessarily a solution to theoriginal problem

36 / 73

Page 104: Computing with Oracles · 2017. 5. 21. · Computing with Oracles From NP to Beyond NP and Back Again Joao Marques-Silva ... SAT engines Boolean QBF MaxSAT PBO #SAT... FOL SMT Model

CEGAR loop

input : ∃X∀Y .φoutput: (true, ν) if there exists ν s.t. ∀Yφ[X/ν],

(false, –) otherwise

W ← ∅while true do

(outc1, ν)← SAT(∧

µ∈W φ[Y /µ]) // find a candidate

if outc1 = false thenreturn (false,–) // no candidate found

endif ν is a solution // solution checkthen

return (true, ν)else

Grow W // refinement

endend

37 / 73

Page 105: Computing with Oracles · 2017. 5. 21. · Computing with Oracles From NP to Beyond NP and Back Again Joao Marques-Silva ... SAT engines Boolean QBF MaxSAT PBO #SAT... FOL SMT Model

CEGAR loop

input : ∃X∀Y .φoutput: (true, ν) if there exists ν s.t. ∀Yφ[X/ν],

(false, –) otherwise

W ← ∅while true do

(outc1, ν)← SAT(∧

µ∈W φ[Y /µ]) // find a candidate

if outc1 = false thenreturn (false,–) // no candidate found

endif ν is a solution // solution checkthen

return (true, ν)else

Grow W // refinement

endend

37 / 73

Page 106: Computing with Oracles · 2017. 5. 21. · Computing with Oracles From NP to Beyond NP and Back Again Joao Marques-Silva ... SAT engines Boolean QBF MaxSAT PBO #SAT... FOL SMT Model

Checking for a solution

An assignment ν is a solution to ∃X∀Y .φ iff

∀Y .φ[X/ν] iff UNSAT(¬φ[X/ν])

If SAT(¬φ[X/ν]) for some µ, then µ is a counterexample to ν

Example

∃x1, x2 ∀y1, y2. (x1 → y1) ∧ (x2→y2)

• candidate: x1 = 1, x2 = 1

• ¬φ[X/ν] , ¬y1 ∨ ¬y2

• counterexamples: y1 = 0, y2 = 0y1 = 0, y2 = 1y1 = 1, y2 = 0

38 / 73

Page 107: Computing with Oracles · 2017. 5. 21. · Computing with Oracles From NP to Beyond NP and Back Again Joao Marques-Silva ... SAT engines Boolean QBF MaxSAT PBO #SAT... FOL SMT Model

Checking for a solution

An assignment ν is a solution to ∃X∀Y .φ iff

∀Y .φ[X/ν] iff UNSAT(¬φ[X/ν])

If SAT(¬φ[X/ν]) for some µ, then µ is a counterexample to ν

Example

∃x1, x2 ∀y1, y2. (x1 → y1) ∧ (x2→y2)

• candidate: x1 = 1, x2 = 1

• ¬φ[X/ν] , ¬y1 ∨ ¬y2

• counterexamples: y1 = 0, y2 = 0y1 = 0, y2 = 1y1 = 1, y2 = 0

38 / 73

Page 108: Computing with Oracles · 2017. 5. 21. · Computing with Oracles From NP to Beyond NP and Back Again Joao Marques-Silva ... SAT engines Boolean QBF MaxSAT PBO #SAT... FOL SMT Model

Checking for a solution

An assignment ν is a solution to ∃X∀Y .φ iff

∀Y .φ[X/ν] iff UNSAT(¬φ[X/ν])

If SAT(¬φ[X/ν]) for some µ, then µ is a counterexample to ν

Example

∃x1, x2 ∀y1, y2. (x1 → y1) ∧ (x2→y2)

• candidate: x1 = 1, x2 = 1

• ¬φ[X/ν] , ¬y1 ∨ ¬y2

• counterexamples: y1 = 0, y2 = 0y1 = 0, y2 = 1y1 = 1, y2 = 0

38 / 73

Page 109: Computing with Oracles · 2017. 5. 21. · Computing with Oracles From NP to Beyond NP and Back Again Joao Marques-Silva ... SAT engines Boolean QBF MaxSAT PBO #SAT... FOL SMT Model

Refinement

YX

ν 1 1 1 1. . . . . .

39 / 73

Page 110: Computing with Oracles · 2017. 5. 21. · Computing with Oracles From NP to Beyond NP and Back Again Joao Marques-Silva ... SAT engines Boolean QBF MaxSAT PBO #SAT... FOL SMT Model

Refinement

YX

ν

µ

1 1 1 0. . . . . .

W

39 / 73

Page 111: Computing with Oracles · 2017. 5. 21. · Computing with Oracles From NP to Beyond NP and Back Again Joao Marques-Silva ... SAT engines Boolean QBF MaxSAT PBO #SAT... FOL SMT Model

Refinement

YX

ν

µ

1 1 1 0. . . . . .

W

W ′

39 / 73

Page 112: Computing with Oracles · 2017. 5. 21. · Computing with Oracles From NP to Beyond NP and Back Again Joao Marques-Silva ... SAT engines Boolean QBF MaxSAT PBO #SAT... FOL SMT Model

2QBF algorithm

input : ∃X∀Y .φoutput: (true, ν) if there exists ν s.t. ∀Yφ[X/ν],

(false, –) otherwise

ω ← 1while true do

(outc1, ν)← SAT(ω) // find a candidate solution

if outc1 = false thenreturn (false,–) // no candidate found

end

(outc2, µ)← SAT (¬φ[X/ν]) // find a counterexample

if outc2 = false thenreturn (true, ν) // candidate is a solution

endω ← ω ∧ φ[Y /µ] // refine

end

40 / 73

Page 113: Computing with Oracles · 2017. 5. 21. · Computing with Oracles From NP to Beyond NP and Back Again Joao Marques-Silva ... SAT engines Boolean QBF MaxSAT PBO #SAT... FOL SMT Model

Properties of refinement

Y

X

ν

µ

1 1 1

ν1 1 1 1 0

ν2 1 1 1 0

0. . . . . .

W

41 / 73

Page 114: Computing with Oracles · 2017. 5. 21. · Computing with Oracles From NP to Beyond NP and Back Again Joao Marques-Silva ... SAT engines Boolean QBF MaxSAT PBO #SAT... FOL SMT Model

Properties of refinement

Y

X

νν

µ

1 1 1

ν1 1 1 1 0

ν2 1 1 1 0

0. . . . . .

W

W ′

41 / 73

Page 115: Computing with Oracles · 2017. 5. 21. · Computing with Oracles From NP to Beyond NP and Back Again Joao Marques-Silva ... SAT engines Boolean QBF MaxSAT PBO #SAT... FOL SMT Model

Properties of refinement

Y

X

νν

µ

1 1 1

ν1ν1 1 1 1 00

ν2ν2 1 1 1 00

0. . . . . .

W

W ′

41 / 73

Page 116: Computing with Oracles · 2017. 5. 21. · Computing with Oracles From NP to Beyond NP and Back Again Joao Marques-Silva ... SAT engines Boolean QBF MaxSAT PBO #SAT... FOL SMT Model

About refinement step

• No candidate for counterexample appears more than once

• Thus, upper bound on the number of iterations is:

min{

2|X |, 2|Y |}

• Heuristic: look for such counterexamples that are alsocounterexamples to many other candidates, look for µ s.t.

¬φ[X/ν] ∧max(|{ν ′ | ¬φ[X/ν ′,Y /µ]}|

)

42 / 73

Page 117: Computing with Oracles · 2017. 5. 21. · Computing with Oracles From NP to Beyond NP and Back Again Joao Marques-Silva ... SAT engines Boolean QBF MaxSAT PBO #SAT... FOL SMT Model

About refinement step

• No candidate for counterexample appears more than once

• Thus, upper bound on the number of iterations is:

min{

2|X |, 2|Y |}

• Heuristic: look for such counterexamples that are alsocounterexamples to many other candidates, look for µ s.t.

¬φ[X/ν] ∧max(|{ν ′ | ¬φ[X/ν ′,Y /µ]}|

)

42 / 73

Page 118: Computing with Oracles · 2017. 5. 21. · Computing with Oracles From NP to Beyond NP and Back Again Joao Marques-Silva ... SAT engines Boolean QBF MaxSAT PBO #SAT... FOL SMT Model

Part II

Back Again (to NP)

43 / 73

Page 119: Computing with Oracles · 2017. 5. 21. · Computing with Oracles From NP to Beyond NP and Back Again Joao Marques-Silva ... SAT engines Boolean QBF MaxSAT PBO #SAT... FOL SMT Model

Why back again to NP?

• Fact: There are many hard examples for resolution and CDCL

– One example are pigeonhole formulas (PHP) (more later)

• What we have been looking at?

– Reduce problems to one concrete problem, i.e. Horn MaxSAT– Develop fast algorithms for Horn MaxSAT

I Use IHSes, MHSes, MUSes, etc.

• What we found out?

– Reductions are remarkably effective for PHP in practice

– There exist polynomial time proofs that PHP is unsatisfiable !

I Using core-guided algorithms; andI Using MaxSAT resolution

– But, core-guided algorithms also use CDCL !– Also, MHS MaxSAT algorithms are effective on hard problems

44 / 73

Page 120: Computing with Oracles · 2017. 5. 21. · Computing with Oracles From NP to Beyond NP and Back Again Joao Marques-Silva ... SAT engines Boolean QBF MaxSAT PBO #SAT... FOL SMT Model

Why back again to NP?

• Fact: There are many hard examples for resolution and CDCL

– One example are pigeonhole formulas (PHP) (more later)

• What we have been looking at?

– Reduce problems to one concrete problem, i.e. Horn MaxSAT– Develop fast algorithms for Horn MaxSAT

I Use IHSes, MHSes, MUSes, etc.

• What we found out?

– Reductions are remarkably effective for PHP in practice

– There exist polynomial time proofs that PHP is unsatisfiable !

I Using core-guided algorithms; andI Using MaxSAT resolution

– But, core-guided algorithms also use CDCL !– Also, MHS MaxSAT algorithms are effective on hard problems

44 / 73

Page 121: Computing with Oracles · 2017. 5. 21. · Computing with Oracles From NP to Beyond NP and Back Again Joao Marques-Silva ... SAT engines Boolean QBF MaxSAT PBO #SAT... FOL SMT Model

Why back again to NP?

• Fact: There are many hard examples for resolution and CDCL

– One example are pigeonhole formulas (PHP) (more later)

• What we have been looking at?

– Reduce problems to one concrete problem, i.e. Horn MaxSAT– Develop fast algorithms for Horn MaxSAT

I Use IHSes, MHSes, MUSes, etc.

• What we found out?

– Reductions are remarkably effective for PHP in practice

– There exist polynomial time proofs that PHP is unsatisfiable !

I Using core-guided algorithms; andI Using MaxSAT resolution

– But, core-guided algorithms also use CDCL !– Also, MHS MaxSAT algorithms are effective on hard problems

44 / 73

Page 122: Computing with Oracles · 2017. 5. 21. · Computing with Oracles From NP to Beyond NP and Back Again Joao Marques-Silva ... SAT engines Boolean QBF MaxSAT PBO #SAT... FOL SMT Model

Why back again to NP?

• Fact: There are many hard examples for resolution and CDCL

– One example are pigeonhole formulas (PHP) (more later)

• What we have been looking at?

– Reduce problems to one concrete problem, i.e. Horn MaxSAT– Develop fast algorithms for Horn MaxSAT

I Use IHSes, MHSes, MUSes, etc.

• What we found out?

– Reductions are remarkably effective for PHP in practice– There exist polynomial time proofs that PHP is unsatisfiable !

I Using core-guided algorithms; andI Using MaxSAT resolution

– But, core-guided algorithms also use CDCL !– Also, MHS MaxSAT algorithms are effective on hard problems

44 / 73

Page 123: Computing with Oracles · 2017. 5. 21. · Computing with Oracles From NP to Beyond NP and Back Again Joao Marques-Silva ... SAT engines Boolean QBF MaxSAT PBO #SAT... FOL SMT Model

Why back again to NP?

• Fact: There are many hard examples for resolution and CDCL

– One example are pigeonhole formulas (PHP) (more later)

• What we have been looking at?

– Reduce problems to one concrete problem, i.e. Horn MaxSAT– Develop fast algorithms for Horn MaxSAT

I Use IHSes, MHSes, MUSes, etc.

• What we found out?

– Reductions are remarkably effective for PHP in practice– There exist polynomial time proofs that PHP is unsatisfiable !

I Using core-guided algorithms; andI Using MaxSAT resolution

– But, core-guided algorithms also use CDCL !– Also, MHS MaxSAT algorithms are effective on hard problems

44 / 73

Page 124: Computing with Oracles · 2017. 5. 21. · Computing with Oracles From NP to Beyond NP and Back Again Joao Marques-Silva ... SAT engines Boolean QBF MaxSAT PBO #SAT... FOL SMT Model

Why back again to NP?

• Fact: There are many hard examples for resolution and CDCL

– One example are pigeonhole formulas (PHP) (more later)

• What we have been looking at?

– Reduce problems to one concrete problem, i.e. Horn MaxSAT– Develop fast algorithms for Horn MaxSAT

I Use IHSes, MHSes, MUSes, etc.

• What we found out?

– Reductions are remarkably effective for PHP in practice– There exist polynomial time proofs that PHP is unsatisfiable !

I Using core-guided algorithms; andI Using MaxSAT resolution

– But, core-guided algorithms also use CDCL !– Also, MHS MaxSAT algorithms are effective on hard problems

44 / 73

Page 125: Computing with Oracles · 2017. 5. 21. · Computing with Oracles From NP to Beyond NP and Back Again Joao Marques-Silva ... SAT engines Boolean QBF MaxSAT PBO #SAT... FOL SMT Model

Plan for part B

1. Recap PHP

2. Reduce SAT to Horn MaxSAT

– Also, what happens to PHP?

3. Develop polynomial time proofs of the unsatisfiability of PHP

– Using an MSU3-like MaxSAT algorithm– Using MaxSAT resolution

4. Experimental results

– PHP, Urquhart, and combinations thereof

5. Detailed description available from:https://arxiv.org/abs/1705.01477

45 / 73

Page 126: Computing with Oracles · 2017. 5. 21. · Computing with Oracles From NP to Beyond NP and Back Again Joao Marques-Silva ... SAT engines Boolean QBF MaxSAT PBO #SAT... FOL SMT Model

Outline

Pigeonhole Formulas

Reduction: SAT to Horn MaxSAT

Polynomial Time Proofs

Experimental Results

46 / 73

Page 127: Computing with Oracles · 2017. 5. 21. · Computing with Oracles From NP to Beyond NP and Back Again Joao Marques-Silva ... SAT engines Boolean QBF MaxSAT PBO #SAT... FOL SMT Model

Pigeonhole formulas I

• Pigeonhole principle:

– Typical: if m + 1 pigeons are distributed by m holes, then at leastone hole contains more than one pigeon

– Alternative: there exists no injective function mapping from{1, 2, ...,m + 1} to {1, 2, ...,m}, for m ≥ 1

• Propositional formulation:

Does there exist assignment such that the m + 1 pigeons canbe placed into m holes?

• Encoding: xij variables

47 / 73

Page 128: Computing with Oracles · 2017. 5. 21. · Computing with Oracles From NP to Beyond NP and Back Again Joao Marques-Silva ... SAT engines Boolean QBF MaxSAT PBO #SAT... FOL SMT Model

Pigeonhole formulas I

• Pigeonhole principle:

– Typical: if m + 1 pigeons are distributed by m holes, then at leastone hole contains more than one pigeon

– Alternative: there exists no injective function mapping from{1, 2, ...,m + 1} to {1, 2, ...,m}, for m ≥ 1

• Propositional formulation:

Does there exist assignment such that the m + 1 pigeons canbe placed into m holes?

• Encoding: xij variables

47 / 73

Page 129: Computing with Oracles · 2017. 5. 21. · Computing with Oracles From NP to Beyond NP and Back Again Joao Marques-Silva ... SAT engines Boolean QBF MaxSAT PBO #SAT... FOL SMT Model

Pigeonhole formulas I

• Pigeonhole principle:

– Typical: if m + 1 pigeons are distributed by m holes, then at leastone hole contains more than one pigeon

– Alternative: there exists no injective function mapping from{1, 2, ...,m + 1} to {1, 2, ...,m}, for m ≥ 1

• Propositional formulation:

Does there exist assignment such that the m + 1 pigeons canbe placed into m holes?

• Encoding: xij variables

1

1

pigeons

holes

m + 1i

j m

47 / 73

Page 130: Computing with Oracles · 2017. 5. 21. · Computing with Oracles From NP to Beyond NP and Back Again Joao Marques-Silva ... SAT engines Boolean QBF MaxSAT PBO #SAT... FOL SMT Model

Pigeonhole formulas II – propositional encoding PHPm+1m

• Variables:

– xij = 1 iff the i th pigeon is placed in the j th hole, 1 ≤ i ≤ m + 1,1 ≤ j ≤ m

• Constraints:

– Each pigeon must be placed in at least one hole, and each holemust not have more than one pigeon∧m+1

i=1 AtLeast1(xi1, . . . , xim) ∧∧mj=1 AtMost1(x1j , . . . , xm+1 j)

• Example encoding, with pairwise encoding for AtMost1 constraint:

Constraint Clause(s)

∧m+1i=1 AtLeast1(xi1, . . . , xim) (xi1 ∨ . . . ∨ xim)

∧mj=1AtMost1(x1j , . . . , xm+1 j) ∧m+1

r=2 ∧r−1s=1 (¬xrj ∨ ¬xsj)

48 / 73

Page 131: Computing with Oracles · 2017. 5. 21. · Computing with Oracles From NP to Beyond NP and Back Again Joao Marques-Silva ... SAT engines Boolean QBF MaxSAT PBO #SAT... FOL SMT Model

Pigeonhole formulas II – propositional encoding PHPm+1m

• Variables:

– xij = 1 iff the i th pigeon is placed in the j th hole, 1 ≤ i ≤ m + 1,1 ≤ j ≤ m

• Constraints:

– Each pigeon must be placed in at least one hole, and each holemust not have more than one pigeon∧m+1

i=1 AtLeast1(xi1, . . . , xim) ∧∧mj=1 AtMost1(x1j , . . . , xm+1 j)

• Example encoding, with pairwise encoding for AtMost1 constraint:

Constraint Clause(s)

∧m+1i=1 AtLeast1(xi1, . . . , xim) (xi1 ∨ . . . ∨ xim)

∧mj=1AtMost1(x1j , . . . , xm+1 j) ∧m+1

r=2 ∧r−1s=1 (¬xrj ∨ ¬xsj)

48 / 73

Page 132: Computing with Oracles · 2017. 5. 21. · Computing with Oracles From NP to Beyond NP and Back Again Joao Marques-Silva ... SAT engines Boolean QBF MaxSAT PBO #SAT... FOL SMT Model

Pigeonhole formulas II – propositional encoding PHPm+1m

• Variables:

– xij = 1 iff the i th pigeon is placed in the j th hole, 1 ≤ i ≤ m + 1,1 ≤ j ≤ m

• Constraints:

– Each pigeon must be placed in at least one hole, and each holemust not have more than one pigeon∧m+1

i=1 AtLeast1(xi1, . . . , xim) ∧∧mj=1 AtMost1(x1j , . . . , xm+1 j)

• Example encoding, with pairwise encoding for AtMost1 constraint:

Constraint Clause(s)

∧m+1i=1 AtLeast1(xi1, . . . , xim) (xi1 ∨ . . . ∨ xim)

∧mj=1AtMost1(x1j , . . . , xm+1 j) ∧m+1

r=2 ∧r−1s=1 (¬xrj ∨ ¬xsj)

48 / 73

Page 133: Computing with Oracles · 2017. 5. 21. · Computing with Oracles From NP to Beyond NP and Back Again Joao Marques-Silva ... SAT engines Boolean QBF MaxSAT PBO #SAT... FOL SMT Model

Outline

Pigeonhole Formulas

Reduction: SAT to Horn MaxSAT

Polynomial Time Proofs

Experimental Results

49 / 73

Page 134: Computing with Oracles · 2017. 5. 21. · Computing with Oracles From NP to Beyond NP and Back Again Joao Marques-Silva ... SAT engines Boolean QBF MaxSAT PBO #SAT... FOL SMT Model

Reducing SAT to Horn MaxSAT

• Formula F with variables X = {x1, . . . , xt}

• Replace each original variable xi ∈ X by ni and pi , s.t.– ni = 1 iff xi = 0– pi = 1 iff xi = 1– Add (hard Horn) constraint (¬ni ∨ ¬pi ) ⇐ set of clauses P

• Translate each clause cr ∈ F into (hard Horn) clause c ′r ∈ FH :– Literal xi converted to ¬ni– Literal ¬xi converted to ¬pi– Resulting clause is goal clause ⇐ (can do better)

• Soft clauses: S = {(n1), . . . , (nt), (p1), . . . , (pt)}• Horn MaxSAT formula: 〈FH ∪ P,S〉• Claim:

F is SAT iff Horn MaxSAT formula has solution with cost ≤ t– There exists assignment that satisfies hard clauses FH and at least t

soft clauses from S, i.e. cost ≤ t– Due to P clauses, cost ≥ t; thus F is SAT iff cost = t

50 / 73

Page 135: Computing with Oracles · 2017. 5. 21. · Computing with Oracles From NP to Beyond NP and Back Again Joao Marques-Silva ... SAT engines Boolean QBF MaxSAT PBO #SAT... FOL SMT Model

Reducing SAT to Horn MaxSAT

• Formula F with variables X = {x1, . . . , xt}• Replace each original variable xi ∈ X by ni and pi , s.t.

– ni = 1 iff xi = 0– pi = 1 iff xi = 1– Add (hard Horn) constraint (¬ni ∨ ¬pi ) ⇐ set of clauses P

• Translate each clause cr ∈ F into (hard Horn) clause c ′r ∈ FH :– Literal xi converted to ¬ni– Literal ¬xi converted to ¬pi– Resulting clause is goal clause ⇐ (can do better)

• Soft clauses: S = {(n1), . . . , (nt), (p1), . . . , (pt)}• Horn MaxSAT formula: 〈FH ∪ P,S〉• Claim:

F is SAT iff Horn MaxSAT formula has solution with cost ≤ t– There exists assignment that satisfies hard clauses FH and at least t

soft clauses from S, i.e. cost ≤ t– Due to P clauses, cost ≥ t; thus F is SAT iff cost = t

50 / 73

Page 136: Computing with Oracles · 2017. 5. 21. · Computing with Oracles From NP to Beyond NP and Back Again Joao Marques-Silva ... SAT engines Boolean QBF MaxSAT PBO #SAT... FOL SMT Model

Reducing SAT to Horn MaxSAT

• Formula F with variables X = {x1, . . . , xt}• Replace each original variable xi ∈ X by ni and pi , s.t.

– ni = 1 iff xi = 0– pi = 1 iff xi = 1– Add (hard Horn) constraint (¬ni ∨ ¬pi ) ⇐ set of clauses P

• Translate each clause cr ∈ F into (hard Horn) clause c ′r ∈ FH :– Literal xi converted to ¬ni– Literal ¬xi converted to ¬pi– Resulting clause is goal clause ⇐ (can do better)

• Soft clauses: S = {(n1), . . . , (nt), (p1), . . . , (pt)}• Horn MaxSAT formula: 〈FH ∪ P,S〉• Claim:

F is SAT iff Horn MaxSAT formula has solution with cost ≤ t– There exists assignment that satisfies hard clauses FH and at least t

soft clauses from S, i.e. cost ≤ t– Due to P clauses, cost ≥ t; thus F is SAT iff cost = t

50 / 73

Page 137: Computing with Oracles · 2017. 5. 21. · Computing with Oracles From NP to Beyond NP and Back Again Joao Marques-Silva ... SAT engines Boolean QBF MaxSAT PBO #SAT... FOL SMT Model

Reducing SAT to Horn MaxSAT

• Formula F with variables X = {x1, . . . , xt}• Replace each original variable xi ∈ X by ni and pi , s.t.

– ni = 1 iff xi = 0– pi = 1 iff xi = 1– Add (hard Horn) constraint (¬ni ∨ ¬pi ) ⇐ set of clauses P

• Translate each clause cr ∈ F into (hard Horn) clause c ′r ∈ FH :– Literal xi converted to ¬ni– Literal ¬xi converted to ¬pi– Resulting clause is goal clause ⇐ (can do better)

• Soft clauses: S = {(n1), . . . , (nt), (p1), . . . , (pt)}• Horn MaxSAT formula: 〈FH ∪ P,S〉

• Claim:

F is SAT iff Horn MaxSAT formula has solution with cost ≤ t– There exists assignment that satisfies hard clauses FH and at least t

soft clauses from S, i.e. cost ≤ t– Due to P clauses, cost ≥ t; thus F is SAT iff cost = t

50 / 73

Page 138: Computing with Oracles · 2017. 5. 21. · Computing with Oracles From NP to Beyond NP and Back Again Joao Marques-Silva ... SAT engines Boolean QBF MaxSAT PBO #SAT... FOL SMT Model

Reducing SAT to Horn MaxSAT

• Formula F with variables X = {x1, . . . , xt}• Replace each original variable xi ∈ X by ni and pi , s.t.

– ni = 1 iff xi = 0– pi = 1 iff xi = 1– Add (hard Horn) constraint (¬ni ∨ ¬pi ) ⇐ set of clauses P

• Translate each clause cr ∈ F into (hard Horn) clause c ′r ∈ FH :– Literal xi converted to ¬ni– Literal ¬xi converted to ¬pi– Resulting clause is goal clause ⇐ (can do better)

• Soft clauses: S = {(n1), . . . , (nt), (p1), . . . , (pt)}• Horn MaxSAT formula: 〈FH ∪ P,S〉• Claim:

F is SAT iff Horn MaxSAT formula has solution with cost ≤ t– There exists assignment that satisfies hard clauses FH and at least t

soft clauses from S, i.e. cost ≤ t– Due to P clauses, cost ≥ t; thus F is SAT iff cost = t

50 / 73

Page 139: Computing with Oracles · 2017. 5. 21. · Computing with Oracles From NP to Beyond NP and Back Again Joao Marques-Silva ... SAT engines Boolean QBF MaxSAT PBO #SAT... FOL SMT Model

An example

• CNF formula:

F = (x1 ∨ ¬x2 ∨ x3) ∧ (x2 ∨ x3) ∧ (¬x1 ∨ ¬x3)

• New variables: {n1, p1, n2, p2, n3, p3}

• Soft clauses: S = {(n1), (p1), (n2), (p2), (n3), (p3)}

• Clauses in P:

P , (¬n1 ∨ ¬p1) ∧ (¬n2 ∨ ¬p2) ∧ (¬n3 ∨ ¬p3)

• Original clauses converted to:

FH , (¬n1 ∨ ¬p2 ∨ ¬n3) ∧ (¬n2 ∨ ¬n3) ∧ (¬p1 ∨ ¬p3)

• Resulting formula: 〈FH ∪ P,S〉

• F is satisfiable iff Horn MaxSAT formula has a solution with cost 3

51 / 73

Page 140: Computing with Oracles · 2017. 5. 21. · Computing with Oracles From NP to Beyond NP and Back Again Joao Marques-Silva ... SAT engines Boolean QBF MaxSAT PBO #SAT... FOL SMT Model

An example

• CNF formula:

F = (x1 ∨ ¬x2 ∨ x3) ∧ (x2 ∨ x3) ∧ (¬x1 ∨ ¬x3)

• New variables: {n1, p1, n2, p2, n3, p3}

• Soft clauses: S = {(n1), (p1), (n2), (p2), (n3), (p3)}

• Clauses in P:

P , (¬n1 ∨ ¬p1) ∧ (¬n2 ∨ ¬p2) ∧ (¬n3 ∨ ¬p3)

• Original clauses converted to:

FH , (¬n1 ∨ ¬p2 ∨ ¬n3) ∧ (¬n2 ∨ ¬n3) ∧ (¬p1 ∨ ¬p3)

• Resulting formula: 〈FH ∪ P,S〉

• F is satisfiable iff Horn MaxSAT formula has a solution with cost 3

51 / 73

Page 141: Computing with Oracles · 2017. 5. 21. · Computing with Oracles From NP to Beyond NP and Back Again Joao Marques-Silva ... SAT engines Boolean QBF MaxSAT PBO #SAT... FOL SMT Model

An example

• CNF formula:

F = (x1 ∨ ¬x2 ∨ x3) ∧ (x2 ∨ x3) ∧ (¬x1 ∨ ¬x3)

• New variables: {n1, p1, n2, p2, n3, p3}

• Soft clauses: S = {(n1), (p1), (n2), (p2), (n3), (p3)}

• Clauses in P:

P , (¬n1 ∨ ¬p1) ∧ (¬n2 ∨ ¬p2) ∧ (¬n3 ∨ ¬p3)

• Original clauses converted to:

FH , (¬n1 ∨ ¬p2 ∨ ¬n3) ∧ (¬n2 ∨ ¬n3) ∧ (¬p1 ∨ ¬p3)

• Resulting formula: 〈FH ∪ P,S〉

• F is satisfiable iff Horn MaxSAT formula has a solution with cost 3

51 / 73

Page 142: Computing with Oracles · 2017. 5. 21. · Computing with Oracles From NP to Beyond NP and Back Again Joao Marques-Silva ... SAT engines Boolean QBF MaxSAT PBO #SAT... FOL SMT Model

An example

• CNF formula:

F = (x1 ∨ ¬x2 ∨ x3) ∧ (x2 ∨ x3) ∧ (¬x1 ∨ ¬x3)

• New variables: {n1, p1, n2, p2, n3, p3}

• Soft clauses: S = {(n1), (p1), (n2), (p2), (n3), (p3)}

• Clauses in P:

P , (¬n1 ∨ ¬p1) ∧ (¬n2 ∨ ¬p2) ∧ (¬n3 ∨ ¬p3)

• Original clauses converted to:

FH , (¬n1 ∨ ¬p2 ∨ ¬n3) ∧ (¬n2 ∨ ¬n3) ∧ (¬p1 ∨ ¬p3)

• Resulting formula: 〈FH ∪ P,S〉

• F is satisfiable iff Horn MaxSAT formula has a solution with cost 3

51 / 73

Page 143: Computing with Oracles · 2017. 5. 21. · Computing with Oracles From NP to Beyond NP and Back Again Joao Marques-Silva ... SAT engines Boolean QBF MaxSAT PBO #SAT... FOL SMT Model

An example

• CNF formula:

F = (x1 ∨ ¬x2 ∨ x3) ∧ (x2 ∨ x3) ∧ (¬x1 ∨ ¬x3)

• New variables: {n1, p1, n2, p2, n3, p3}

• Soft clauses: S = {(n1), (p1), (n2), (p2), (n3), (p3)}

• Clauses in P:

P , (¬n1 ∨ ¬p1) ∧ (¬n2 ∨ ¬p2) ∧ (¬n3 ∨ ¬p3)

• Original clauses converted to:

FH , (¬n1 ∨ ¬p2 ∨ ¬n3) ∧ (¬n2 ∨ ¬n3) ∧ (¬p1 ∨ ¬p3)

• Resulting formula: 〈FH ∪ P,S〉

• F is satisfiable iff Horn MaxSAT formula has a solution with cost 3

51 / 73

Page 144: Computing with Oracles · 2017. 5. 21. · Computing with Oracles From NP to Beyond NP and Back Again Joao Marques-Silva ... SAT engines Boolean QBF MaxSAT PBO #SAT... FOL SMT Model

PHP as Horn MaxSAT

• New variables nij and pij , for each xij , 1 ≤ i ≤ m + 1, 1 ≤ j ≤ m

• The soft clauses S, with |S| = 2m(m + 1), are given by

{ (n11), . . . , (n1m), . . . , (nm+1 1), . . . , (nm+1m),(p11), . . . , (p1m), . . . , (pm+1 1), . . . , (pm+1m) }

• Clauses in P: P = {(¬nij ∨ ¬pij) | 1 ≤ i ≤ m + 1, 1 ≤ j ≤ m}• AtLeast1 constraints encoded as Li , 1 ≤ i ≤ m + 1

• AtMost1 constraints encoded as Mj , 1 ≤ j ≤ m

• Full reduction of PHP to Horn MaxSAT

〈H,S〉 =⟨∧m+1i=1 Li ∧ ∧mj=1Mj ∧ P,S

⟩• No more than m(m + 1) clauses can be satisfied, due to P• PHPm+1

m is satisfiable iff there exists an assignment that satisfiesthe hard clauses H and m(m + 1) soft clauses from S

52 / 73

Page 145: Computing with Oracles · 2017. 5. 21. · Computing with Oracles From NP to Beyond NP and Back Again Joao Marques-Silva ... SAT engines Boolean QBF MaxSAT PBO #SAT... FOL SMT Model

PHP as Horn MaxSAT

• New variables nij and pij , for each xij , 1 ≤ i ≤ m + 1, 1 ≤ j ≤ m

• The soft clauses S, with |S| = 2m(m + 1), are given by

{ (n11), . . . , (n1m), . . . , (nm+1 1), . . . , (nm+1m),(p11), . . . , (p1m), . . . , (pm+1 1), . . . , (pm+1m) }

• Clauses in P: P = {(¬nij ∨ ¬pij) | 1 ≤ i ≤ m + 1, 1 ≤ j ≤ m}

• AtLeast1 constraints encoded as Li , 1 ≤ i ≤ m + 1

• AtMost1 constraints encoded as Mj , 1 ≤ j ≤ m

• Full reduction of PHP to Horn MaxSAT

〈H,S〉 =⟨∧m+1i=1 Li ∧ ∧mj=1Mj ∧ P,S

⟩• No more than m(m + 1) clauses can be satisfied, due to P• PHPm+1

m is satisfiable iff there exists an assignment that satisfiesthe hard clauses H and m(m + 1) soft clauses from S

52 / 73

Page 146: Computing with Oracles · 2017. 5. 21. · Computing with Oracles From NP to Beyond NP and Back Again Joao Marques-Silva ... SAT engines Boolean QBF MaxSAT PBO #SAT... FOL SMT Model

PHP as Horn MaxSAT

• New variables nij and pij , for each xij , 1 ≤ i ≤ m + 1, 1 ≤ j ≤ m

• The soft clauses S, with |S| = 2m(m + 1), are given by

{ (n11), . . . , (n1m), . . . , (nm+1 1), . . . , (nm+1m),(p11), . . . , (p1m), . . . , (pm+1 1), . . . , (pm+1m) }

• Clauses in P: P = {(¬nij ∨ ¬pij) | 1 ≤ i ≤ m + 1, 1 ≤ j ≤ m}• AtLeast1 constraints encoded as Li , 1 ≤ i ≤ m + 1

• AtMost1 constraints encoded as Mj , 1 ≤ j ≤ m

• Full reduction of PHP to Horn MaxSAT

〈H,S〉 =⟨∧m+1i=1 Li ∧ ∧mj=1Mj ∧ P,S

⟩• No more than m(m + 1) clauses can be satisfied, due to P• PHPm+1

m is satisfiable iff there exists an assignment that satisfiesthe hard clauses H and m(m + 1) soft clauses from S

52 / 73

Page 147: Computing with Oracles · 2017. 5. 21. · Computing with Oracles From NP to Beyond NP and Back Again Joao Marques-Silva ... SAT engines Boolean QBF MaxSAT PBO #SAT... FOL SMT Model

PHP as Horn MaxSAT

• New variables nij and pij , for each xij , 1 ≤ i ≤ m + 1, 1 ≤ j ≤ m

• The soft clauses S, with |S| = 2m(m + 1), are given by

{ (n11), . . . , (n1m), . . . , (nm+1 1), . . . , (nm+1m),(p11), . . . , (p1m), . . . , (pm+1 1), . . . , (pm+1m) }

• Clauses in P: P = {(¬nij ∨ ¬pij) | 1 ≤ i ≤ m + 1, 1 ≤ j ≤ m}• AtLeast1 constraints encoded as Li , 1 ≤ i ≤ m + 1

• AtMost1 constraints encoded as Mj , 1 ≤ j ≤ m

• Full reduction of PHP to Horn MaxSAT

〈H,S〉 =⟨∧m+1i=1 Li ∧ ∧mj=1Mj ∧ P,S

• No more than m(m + 1) clauses can be satisfied, due to P• PHPm+1

m is satisfiable iff there exists an assignment that satisfiesthe hard clauses H and m(m + 1) soft clauses from S

52 / 73

Page 148: Computing with Oracles · 2017. 5. 21. · Computing with Oracles From NP to Beyond NP and Back Again Joao Marques-Silva ... SAT engines Boolean QBF MaxSAT PBO #SAT... FOL SMT Model

PHP as Horn MaxSAT

• New variables nij and pij , for each xij , 1 ≤ i ≤ m + 1, 1 ≤ j ≤ m

• The soft clauses S, with |S| = 2m(m + 1), are given by

{ (n11), . . . , (n1m), . . . , (nm+1 1), . . . , (nm+1m),(p11), . . . , (p1m), . . . , (pm+1 1), . . . , (pm+1m) }

• Clauses in P: P = {(¬nij ∨ ¬pij) | 1 ≤ i ≤ m + 1, 1 ≤ j ≤ m}• AtLeast1 constraints encoded as Li , 1 ≤ i ≤ m + 1

• AtMost1 constraints encoded as Mj , 1 ≤ j ≤ m

• Full reduction of PHP to Horn MaxSAT

〈H,S〉 =⟨∧m+1i=1 Li ∧ ∧mj=1Mj ∧ P,S

⟩• No more than m(m + 1) clauses can be satisfied, due to P• PHPm+1

m is satisfiable iff there exists an assignment that satisfiesthe hard clauses H and m(m + 1) soft clauses from S

52 / 73

Page 149: Computing with Oracles · 2017. 5. 21. · Computing with Oracles From NP to Beyond NP and Back Again Joao Marques-Silva ... SAT engines Boolean QBF MaxSAT PBO #SAT... FOL SMT Model

PHP as Horn MaxSAT II

• Clauses in each Li and in each Mj , with pairwise encoding

Original Constraint Encoded To Clauses

∧m+1i=1 AtLeast1(xi1, . . . , xim) Li (¬ni1 ∨ . . . ∨ ¬nim)

∧mj=1AtMost1(x1j , . . . , xm+1,j) Mj ∧m+1

r=2 ∧r−1s=1 (¬prj ∨ ¬psj)

• Note: constraints with key structural properties:

– Variables in each Li disjoint from any other Lk and Mj , k 6= i– Variables in each Mj disjoint from any other Ml , l 6= j

53 / 73

Page 150: Computing with Oracles · 2017. 5. 21. · Computing with Oracles From NP to Beyond NP and Back Again Joao Marques-Silva ... SAT engines Boolean QBF MaxSAT PBO #SAT... FOL SMT Model

PHP as Horn MaxSAT II

• Clauses in each Li and in each Mj , with pairwise encoding

Original Constraint Encoded To Clauses

∧m+1i=1 AtLeast1(xi1, . . . , xim) Li (¬ni1 ∨ . . . ∨ ¬nim)

∧mj=1AtMost1(x1j , . . . , xm+1,j) Mj ∧m+1

r=2 ∧r−1s=1 (¬prj ∨ ¬psj)

• Note: constraints with key structural properties:

Constraint Variables

Li (¬ni1 ∨ . . . ∨ ¬nim)

Lk (¬nk1 ∨ . . . ∨ ¬nkm)

Mj ∧m+1r=2 ∧

r−1s=1 (¬pr j ∨ ¬psj)

Ml ∧m+1r=2 ∧

r−1s=1 (¬pr l ∨ ¬psl)

– Variables in each Li disjoint from any other Lk and Mj , k 6= i– Variables in each Mj disjoint from any other Ml , l 6= j

53 / 73

Page 151: Computing with Oracles · 2017. 5. 21. · Computing with Oracles From NP to Beyond NP and Back Again Joao Marques-Silva ... SAT engines Boolean QBF MaxSAT PBO #SAT... FOL SMT Model

Outline

Pigeonhole Formulas

Reduction: SAT to Horn MaxSAT

Polynomial Time Proofs

Experimental Results

54 / 73

Page 152: Computing with Oracles · 2017. 5. 21. · Computing with Oracles From NP to Beyond NP and Back Again Joao Marques-Silva ... SAT engines Boolean QBF MaxSAT PBO #SAT... FOL SMT Model

Main claims

Claim 1

Core-guided MaxSAT produces a lower bound on the number offalsified clauses of ≥m(m + 1) + 1 in polynomial time

55 / 73

Page 153: Computing with Oracles · 2017. 5. 21. · Computing with Oracles From NP to Beyond NP and Back Again Joao Marques-Silva ... SAT engines Boolean QBF MaxSAT PBO #SAT... FOL SMT Model

Main claims

Claim 1

Core-guided MaxSAT produces a lower bound on the number offalsified clauses of ≥m(m + 1) + 1 in polynomial time

Claim 2

MaxSAT resolution produces a lower bound on the number of falsifiedclauses of ≥m(m + 1) + 1 in polynomial time

55 / 73

Page 154: Computing with Oracles · 2017. 5. 21. · Computing with Oracles From NP to Beyond NP and Back Again Joao Marques-Silva ... SAT engines Boolean QBF MaxSAT PBO #SAT... FOL SMT Model

Main claims

Claim 1

Core-guided MaxSAT produces a lower bound on the number offalsified clauses of ≥m(m + 1) + 1 in polynomial time

Claim 2

MaxSAT resolution produces a lower bound on the number of falsifiedclauses of ≥m(m + 1) + 1 in polynomial time

Corollary

Horn MaxSAT encoding enables polynomial time proofs of theunsatisfiability of PHP instances, using CDCL SAT solvers

55 / 73

Page 155: Computing with Oracles · 2017. 5. 21. · Computing with Oracles From NP to Beyond NP and Back Again Joao Marques-Silva ... SAT engines Boolean QBF MaxSAT PBO #SAT... FOL SMT Model

Proof of claim 1 – outline

1. Assume MSU3 MaxSAT algorithm– Note: Suffices to analyze disjoint sets separately

2. Relate soft clauses with each Li and each Mj

– Each constraint disjoint from the others (but not from P)

3. Derive large enough lower bound on # of falsified clauses:

4. Each increase in the value of the lower bound obtained by unitpropagation (UP)

– In total: polynomial number of (linear time) UP runs

56 / 73

Page 156: Computing with Oracles · 2017. 5. 21. · Computing with Oracles From NP to Beyond NP and Back Again Joao Marques-Silva ... SAT engines Boolean QBF MaxSAT PBO #SAT... FOL SMT Model

Proof of claim 1 – outline

1. Assume MSU3 MaxSAT algorithm– Note: Suffices to analyze disjoint sets separately

2. Relate soft clauses with each Li and each Mj

– Each constraint disjoint from the others (but not from P)

3. Derive large enough lower bound on # of falsified clauses:

Constr. type # falsified cls # constr In total

Li 1 i = 1, . . . ,m + 1 m + 1

Mj m j = 1, . . . ,m m ·m

m(m + 1) + 1

4. Each increase in the value of the lower bound obtained by unitpropagation (UP)

– In total: polynomial number of (linear time) UP runs

56 / 73

Page 157: Computing with Oracles · 2017. 5. 21. · Computing with Oracles From NP to Beyond NP and Back Again Joao Marques-Silva ... SAT engines Boolean QBF MaxSAT PBO #SAT... FOL SMT Model

Proof of claim 1 – outline

1. Assume MSU3 MaxSAT algorithm– Note: Suffices to analyze disjoint sets separately

2. Relate soft clauses with each Li and each Mj

– Each constraint disjoint from the others (but not from P)

3. Derive large enough lower bound on # of falsified clauses:

Constr. type # falsified cls # constr In total

Li 1 i = 1, . . . ,m + 1 m + 1

Mj m j = 1, . . . ,m m ·m

m(m + 1) + 1

4. Each increase in the value of the lower bound obtained by unitpropagation (UP)

– In total: polynomial number of (linear time) UP runs

56 / 73

Page 158: Computing with Oracles · 2017. 5. 21. · Computing with Oracles From NP to Beyond NP and Back Again Joao Marques-Silva ... SAT engines Boolean QBF MaxSAT PBO #SAT... FOL SMT Model

Proof of claim 1 – outline

1. Assume MSU3 MaxSAT algorithm– Note: Suffices to analyze disjoint sets separately

2. Relate soft clauses with each Li and each Mj

– Each constraint disjoint from the others (but not from P)

3. Derive large enough lower bound on # of falsified clauses:

Constr. type # falsified cls # constr In total

Li 1 i = 1, . . . ,m + 1 m + 1

Mj m j = 1, . . . ,m m ·m

m(m + 1) + 1

4. Each increase in the value of the lower bound obtained by unitpropagation (UP)

– In total: polynomial number of (linear time) UP runs

56 / 73

Page 159: Computing with Oracles · 2017. 5. 21. · Computing with Oracles From NP to Beyond NP and Back Again Joao Marques-Silva ... SAT engines Boolean QBF MaxSAT PBO #SAT... FOL SMT Model

Proof of claim 1 – unit propagation steps I

Constr Hard cls Soft cls Relaxed clausesUpdatedAtMostk

constr

LBincr

Li (¬ni1 ∨ . . . ∨ ¬nim) (ni1), . . . , (nim)(sil ∨ ni1),1 ≤ l ≤ m

∑ml=1 sil ≤ 1 1

Mj (¬p1j ∨ ¬p2j) (p1j), (p2j)(r1j ∨ p1j),(r2j ∨ p2j)

∑2l=1 rlj ≤ 1 1

Mj

(¬p1j ∨ ¬p3j),(¬p2j ∨ ¬p3j),

(r1j ∨ p1j),(r2j ∨ p2j),∑2l=1 rlj ≤ 1

(p3j) (r3j ∨ p3j)∑3

l=1 rlj ≤ 2 1

· · ·

Mj

(¬p1j∨¬pm+1j), . . .,(¬pmj ∨ ¬pm+1j),

(r1j ∨ p1j), . . .,(rmj ∨ pmj),∑ml=1 rlj ≤ m − 1

(pm+1j) (rm+1j ∨ pm+1j)∑m+1

l=1 rlj ≤ m 1

57 / 73

Page 160: Computing with Oracles · 2017. 5. 21. · Computing with Oracles From NP to Beyond NP and Back Again Joao Marques-Silva ... SAT engines Boolean QBF MaxSAT PBO #SAT... FOL SMT Model

Proof of claim 1 – unit propagation steps II

Clauses Unit Propagation

(pk+1 j) pk+1 j = 1

(¬p1j ∨¬pk+1 j), . . . , (¬pkj ∨¬pk+1 j) p1j = . . . = pkj = 0

(r1j ∨ p1j), . . . , (rkj ∨ pkj) r1j = . . . = rkj = 1∑kl=1 rlj ≤ k − 1

(∑kl=1 rlj ≤ k − 1

)`1⊥

• Key points:

– For each Li , UP raises LB by 1– For each Mj , UP raises LB by m– In total, UP raises LB by m(m + 1) + 1– PHPm+1

m is unsatisfiable

58 / 73

Page 161: Computing with Oracles · 2017. 5. 21. · Computing with Oracles From NP to Beyond NP and Back Again Joao Marques-Silva ... SAT engines Boolean QBF MaxSAT PBO #SAT... FOL SMT Model

Proof of claim 2 – recap MaxSAT resolution

• Clauses: (x ∨ A, u) and (¬x ∨ B,w)

• m , min(u,w)

• u w , (u ==>) ?> : u − w , with u ≥ w

• Example MaxSAT resolution steps:

Clause 1 Clause 2 Derived Clauses

(x ∨ A, u) (¬x ∨ B,w)(A ∨ B,m), (x ∨ A, u m), (¬x ∨ B,w m),

(x ∨ A ∨ ¬B,m), (¬x ∨ ¬A ∨ B,m)

(x ∨ A, 1) (¬x ,>) (A, 1), (¬x ,>), (¬x ∨ ¬A, 1)

59 / 73

Page 162: Computing with Oracles · 2017. 5. 21. · Computing with Oracles From NP to Beyond NP and Back Again Joao Marques-Silva ... SAT engines Boolean QBF MaxSAT PBO #SAT... FOL SMT Model

Proof of claim 2 – outline

• Follow ideas used in previous proof

• Mimic unit propagation steps as MaxSAT resolution steps

• Each increase in LB corresponds to deriving one empty clause

• In total: polynomial number of steps, each running in polynomialtime

60 / 73

Page 163: Computing with Oracles · 2017. 5. 21. · Computing with Oracles From NP to Beyond NP and Back Again Joao Marques-Silva ... SAT engines Boolean QBF MaxSAT PBO #SAT... FOL SMT Model

Proof of claim 2 – key steps I

Constraint Clauses Resulting clause(s)

Li(¬ni1 ∨ . . . ∨ ¬nim,>),

(ni1, 1)(¬ni2 ∨ . . . ∨ ¬nim, 1) , . . .

Li(¬ni2 ∨ . . . ∨ ¬nim, 1),

(ni2, 1)(¬ni3 ∨ . . . ∨ ¬nim, 1) , . . .

· · ·

Li(¬nim, 1),(nim, 1)

(⊥, 1) , . . .

Mj(¬p1j ∨ ¬p2j ,>),

(p1j , 1)(¬p2j , 1), (¬p1j ∨ ¬p2j ,>), (p1j ∨ p2j , 1)

Mj(¬p2j , 1),(p2j , 1)

(⊥, 1)

Mj(¬p1j ∨ ¬p3j ,>),

(p1j ∨ p2j , 1)

(p2j ∨ ¬p3j , 1) , (¬p1j ∨ ¬p3j ,>),

(¬p1j ∨¬p3j ∨¬p2j , 1), (p1j ∨ p2j ∨ p3j , 1)

Mj(¬p2j ∨ ¬p3j ,>),

(p2j ∨ ¬p3j , 1)(¬p3j , 1) , (¬p2j ∨ ¬p3j ,>)

Mj(¬p3j , 1),(p3j , 1)

(⊥, 1)

61 / 73

Page 164: Computing with Oracles · 2017. 5. 21. · Computing with Oracles From NP to Beyond NP and Back Again Joao Marques-Silva ... SAT engines Boolean QBF MaxSAT PBO #SAT... FOL SMT Model

Proof of claim 2 – key steps II

Constraint Clauses Resulting clause(s)

· · ·

Mj(¬p1j ∨ ¬pm+1j ,>),(p1j ∨ . . . ∨ pmj , 1)

(p2j . . . pmj ∨ ¬pm+1j , 1) , . . .

Mj

(¬p2j ∨ ¬pm+1j ,>),(p2j ∨ . . . ∨ pmj ∨¬pm+1j , 1)

(p3j . . . pmj ∨ ¬pm+1j , 1) , . . .

· · ·

Mj(¬pmj ∨ ¬pm+1j ,>),

(pmj ∨ ¬pm+1j , 1)¬pm+1j , 1) , . . .

Mj(pm+1j , 1),(¬pm+1j , 1)

(⊥, 1)

• Key points:

– For each Li , derive 1 empty clause– For each Mj , derive m empty clauses– In total, derive m(m + 1) + 1 empty clauses– PHPm+1

m is unsatisfiable62 / 73

Page 165: Computing with Oracles · 2017. 5. 21. · Computing with Oracles From NP to Beyond NP and Back Again Joao Marques-Silva ... SAT engines Boolean QBF MaxSAT PBO #SAT... FOL SMT Model

Outline

Pigeonhole Formulas

Reduction: SAT to Horn MaxSAT

Polynomial Time Proofs

Experimental Results

63 / 73

Page 166: Computing with Oracles · 2017. 5. 21. · Computing with Oracles From NP to Beyond NP and Back Again Joao Marques-Silva ... SAT engines Boolean QBF MaxSAT PBO #SAT... FOL SMT Model

Experimental setup

• Instances:

– PHP-pw (46), PHP-sc (46), Urquhart (84), Comb (96)

• Solvers:

SAT SAT+ IHS MaxSAT CG MaxSAT MRes MIP OPB BDD

minisat glucose lgl crypto maxhs lmhs mscg wbo wpm3 eva lp cc sat4j∗ zres

64 / 73

Page 167: Computing with Oracles · 2017. 5. 21. · Computing with Oracles From NP to Beyond NP and Back Again Joao Marques-Silva ... SAT engines Boolean QBF MaxSAT PBO #SAT... FOL SMT Model

Results on PHP instances: pw vs. sc

0 10 20 30 40 50 60instances

10−3

10−2

10−1

100

101

102

103

CPU

time

(s)

lp-cnflp-wcnfmaxhslmhsmscgevalgllmhs-neszresglucoselgl-nocardcc-cnfcc-opb

0 10 20 30 40 50instances

10−3

10−2

10−1

100

101

102

103

CPU

time

(s)

lp-cnflp-wcnfmaxhslmhsmscglmhs-neseva

glucoselgl-nocardlglzrescc-cnfcc-opb

65 / 73

Page 168: Computing with Oracles · 2017. 5. 21. · Computing with Oracles From NP to Beyond NP and Back Again Joao Marques-Silva ... SAT engines Boolean QBF MaxSAT PBO #SAT... FOL SMT Model

Effect of P clauses

0 20 40 60 80 100instances

10−3

10−2

10−1

100

101

102

103

CPU

time

(s)

mscg (no P)maxhslmhswbo (no P)mscgeva (no P)evalmhs-nes (no P)lmhs-neswbo

66 / 73

Page 169: Computing with Oracles · 2017. 5. 21. · Computing with Oracles From NP to Beyond NP and Back Again Joao Marques-Silva ... SAT engines Boolean QBF MaxSAT PBO #SAT... FOL SMT Model

Effect of P clauses on mscg and wbo

10−3 10−2 10−1 100 101 102 103 104

PHP-nop

10−3

10−2

10−1

100

101

102

103

104

PHP

1800 sec. timeout

1800

sec.

timeo

ut

10−3 10−2 10−1 100 101 102 103 104

PHP-nop

10−3

10−2

10−1

100

101

102

103

104

PHP

1800 sec. timeout

1800

sec.

timeo

ut

67 / 73

Page 170: Computing with Oracles · 2017. 5. 21. · Computing with Oracles From NP to Beyond NP and Back Again Joao Marques-Silva ... SAT engines Boolean QBF MaxSAT PBO #SAT... FOL SMT Model

Results on Urquhart & combined instances

0 10 20 30 40 50 60 70 80 90instances

10−2

10−1

100

101

102

103

CPU

time

(s)

zresmaxhslmhslmhs-neslgllp-wcnf

mscglgl-nogaussglucoseevacc-cnf

0 20 40 60 80 100instances

10−1

100

101

102

103

CPU

time

(s)

lmhslmhs-nesmaxhslgl-nocard

zreslgllp-wcnfglucose

mscgevacc-cnf

68 / 73

Page 171: Computing with Oracles · 2017. 5. 21. · Computing with Oracles From NP to Beyond NP and Back Again Joao Marques-Silva ... SAT engines Boolean QBF MaxSAT PBO #SAT... FOL SMT Model

More detail in arXiv report

“On Tackling the Limits of Resolution in SAT Solving”

A. Ignatiev, A. Morgado, and J. Marques-Silva

https://arxiv.org/abs/1705.01477

69 / 73

Page 172: Computing with Oracles · 2017. 5. 21. · Computing with Oracles From NP to Beyond NP and Back Again Joao Marques-Silva ... SAT engines Boolean QBF MaxSAT PBO #SAT... FOL SMT Model

Part III

Wrap Up

70 / 73

Page 173: Computing with Oracles · 2017. 5. 21. · Computing with Oracles From NP to Beyond NP and Back Again Joao Marques-Silva ... SAT engines Boolean QBF MaxSAT PBO #SAT... FOL SMT Model

Conclusions

• Covered some examples of problem solving using SAT oracles– MaxSAT solving– 2QBF solving

• But, many more examples:– MUS & MCS extraction– MUS & MCS enumeration– Prime compilation– Implicit hitting sets– Quantification: decision, QMaxSAT, abduction, ...– Smallest MUSes– Approximate model counting– Also: backbones; autarkies/lean kernels, ...– Also: (many) practical applications

• (Horn) MaxSAT solvers can solve (in polynomial time) hardinstances for resolution

– If equipped with the right reduction

71 / 73

Page 174: Computing with Oracles · 2017. 5. 21. · Computing with Oracles From NP to Beyond NP and Back Again Joao Marques-Silva ... SAT engines Boolean QBF MaxSAT PBO #SAT... FOL SMT Model

Conclusions

• Covered some examples of problem solving using SAT oracles– MaxSAT solving– 2QBF solving

• But, many more examples:– MUS & MCS extraction– MUS & MCS enumeration– Prime compilation– Implicit hitting sets– Quantification: decision, QMaxSAT, abduction, ...– Smallest MUSes– Approximate model counting– Also: backbones; autarkies/lean kernels, ...– Also: (many) practical applications

• (Horn) MaxSAT solvers can solve (in polynomial time) hardinstances for resolution

– If equipped with the right reduction

71 / 73

Page 175: Computing with Oracles · 2017. 5. 21. · Computing with Oracles From NP to Beyond NP and Back Again Joao Marques-Silva ... SAT engines Boolean QBF MaxSAT PBO #SAT... FOL SMT Model

Some research topics

• Beyond NP:– Query complexity– Enumeration– Quantification– Implicit hitting sets & duality– ...

• Applications:– Diagnosis– Axiom pinpointing– Planning– Reachability– Synthesis– Networking– Configuration– Argumentation– ...

• Also, where to go with Horn MaxSAT?

72 / 73

Page 176: Computing with Oracles · 2017. 5. 21. · Computing with Oracles From NP to Beyond NP and Back Again Joao Marques-Silva ... SAT engines Boolean QBF MaxSAT PBO #SAT... FOL SMT Model

Some research topics

• Beyond NP:– Query complexity– Enumeration– Quantification– Implicit hitting sets & duality– ...

• Applications:– Diagnosis– Axiom pinpointing– Planning– Reachability– Synthesis– Networking– Configuration– Argumentation– ...

• Also, where to go with Horn MaxSAT?

72 / 73

Page 177: Computing with Oracles · 2017. 5. 21. · Computing with Oracles From NP to Beyond NP and Back Again Joao Marques-Silva ... SAT engines Boolean QBF MaxSAT PBO #SAT... FOL SMT Model

Some research topics

• Beyond NP:– Query complexity– Enumeration– Quantification– Implicit hitting sets & duality– ...

• Applications:– Diagnosis– Axiom pinpointing– Planning– Reachability– Synthesis– Networking– Configuration– Argumentation– ...

• Also, where to go with Horn MaxSAT?

72 / 73

Page 178: Computing with Oracles · 2017. 5. 21. · Computing with Oracles From NP to Beyond NP and Back Again Joao Marques-Silva ... SAT engines Boolean QBF MaxSAT PBO #SAT... FOL SMT Model

Thank You

73 / 73