Maximum Satisfiability Ruben Martins - - PowerPoint PPT Presentation

maximum satisfiability
SMART_READER_LITE
LIVE PREVIEW

Maximum Satisfiability Ruben Martins - - PowerPoint PPT Presentation

Maximum Satisfiability Ruben Martins http://www.cs.cmu.edu/~mheule/15816-f19/ Automated Reasoning and Satisfiability, October 1, 2019 1/41 What is Boolean Satisfiability? Fundamental problem in Computer Science The first problem to be


slide-1
SLIDE 1

1/41

Maximum Satisfiability

Ruben Martins http://www.cs.cmu.edu/~mheule/15816-f19/ Automated Reasoning and Satisfiability, October 1, 2019

slide-2
SLIDE 2

2/41

What is Boolean Satisfiability?

◮ Fundamental problem in Computer Science

◮ The first problem to be proven NP-Complete ◮ Has a wide range of applications

◮ Formula:

◮ ϕ = (¬x2 ∨ ¬x1) ∧ (x2 ∨ ¬x3) ∧ (x1) ∧ (x3)

◮ Boolean Satisfiability (SAT):

◮ Is there an assignment of true or false values to variables

such that ϕ evaluates to true?

slide-3
SLIDE 3

3/41

Software Package Upgradeability Problem

slide-4
SLIDE 4

3/41

Software Package Upgradeability Problem

slide-5
SLIDE 5

3/41

Software Package Upgradeability Problem

slide-6
SLIDE 6

4/41

Software Package Upgradeability Problem

Package Dependencies Conflicts p1 {p2 ∨ p3} {p4} p2 {p3} {} p3 {p2} {p4} p4 {p2 ∧ p3} {}

◮ Set of packages we want to install: {p1, p2, p3, p4} ◮ Each package pi has a set of dependencies:

◮ Packages that must be installed for pi to be installed

◮ Each package pi has a set of conflicts:

◮ Packages that cannot be installed for pi to be installed

slide-7
SLIDE 7

5/41

NP Completeness

slide-8
SLIDE 8

5/41

NP Completeness

◮ Giving up?

◮ The problem is NP-hard, so let’s develop heuristics or

approximation algorithms.

slide-9
SLIDE 9

5/41

NP Completeness

◮ Giving up?

◮ The problem is NP-hard, so let’s develop heuristics or

approximation algorithms.

◮ No! Current tools can find solutions for very large

problems!

slide-10
SLIDE 10

6/41

Software Package Upgradeability Problem as SAT

Package Dependencies Conflicts p1 {p2 ∨ p3} {p4} p2 {p3} {} p3 {p2} {p4} p4 {p2 ∧ p3} {} How can we encode this problem to Boolean Satisfiability?

slide-11
SLIDE 11

6/41

Software Package Upgradeability Problem as SAT

Package Dependencies Conflicts p1 {p2 ∨ p3} {p4} p2 {p3} {} p3 {p2} {p4} p4 {p2 ∧ p3} {} How can we encode this problem to Boolean Satisfiability? (Hint) Encode dependencies, conflicts, and installing all packages

slide-12
SLIDE 12

6/41

Software Package Upgradeability Problem as SAT

Package Dependencies Conflicts p1 {p2 ∨ p3} {p4} p2 {p3} {} p3 {p2} {p4} p4 {p2 ∧ p3} {} How can we encode this problem to Boolean Satisfiability?

◮ Encoding dependencies:

◮ p1 ⇒ (p2 ∨ p3) ≡ (¬p1 ∨ p2 ∨ p3) ◮ p2 ⇒ p3 ≡ (¬p2 ∨ p3) ◮ p3 ⇒ p2 ≡ (¬p3 ∨ p2) ◮ p4 ⇒ (p2 ∧ p3) ≡ (¬p4 ∨ p2) ∧ (¬p4 ∨ p3)

slide-13
SLIDE 13

6/41

Software Package Upgradeability Problem as SAT

Package Dependencies Conflicts p1 {p2 ∨ p3} {p4} p2 {p3} {} p3 {p2} {p4} p4 {p2 ∧ p3} {} How can we encode this problem to Boolean Satisfiability?

◮ Encoding conflicts:

◮ p1 ⇒ ¬p4 ≡ (¬p1 ∨ ¬p4) ◮ p3 ⇒ ¬p4 ≡ (¬p3 ∨ ¬p4)

slide-14
SLIDE 14

6/41

Software Package Upgradeability Problem as SAT

Package Dependencies Conflicts p1 {p2 ∨ p3} {p4} p2 {p3} {} p3 {p2} {p4} p4 {p2 ∧ p3} {} How can we encode this problem to Boolean Satisfiability?

◮ Encoding installing all packages:

◮ (p1) ∧ (p2) ∧ (p3) ∧ (p4)

slide-15
SLIDE 15

7/41

Software Package Upgradeability Problem as SAT

Formula ϕ:

Dependencies

¬p1 ∨ p2 ∨ p3 ¬p2 ∨ p3 ¬p3 ∨ p2

slide-16
SLIDE 16

7/41

Software Package Upgradeability Problem as SAT

Formula ϕ:

Dependencies

¬p1 ∨ p2 ∨ p3 ¬p2 ∨ p3 ¬p3 ∨ p2

Conflicts

¬p4 ∨ p2 ¬p4 ∨ p3 ¬p1 ∨ ¬p4 ¬p3 ∨ ¬p4

slide-17
SLIDE 17

7/41

Software Package Upgradeability Problem as SAT

Formula ϕ:

Dependencies

¬p1 ∨ p2 ∨ p3 ¬p2 ∨ p3 ¬p3 ∨ p2

Conflicts

¬p4 ∨ p2 ¬p4 ∨ p3 ¬p1 ∨ ¬p4 ¬p3 ∨ ¬p4

Packages

p1 p2 p3 p4

slide-18
SLIDE 18

7/41

Software Package Upgradeability Problem as SAT

Formula ϕ:

Dependencies

¬p1 ∨ p2 ∨ p3 ¬p2 ∨ p3 ¬p3 ∨ p2

Conflicts

¬p4 ∨ p2 ¬p4 ∨ p3 ¬p1 ∨ ¬p4 ¬p3 ∨ ¬p4

Packages

p1 p2 p3 p4

◮ ϕ = (¬p1 ∨p2 ∨p3)∧(¬p2 ∨p3)∧(¬p3 ∨p2)∧(¬p4 ∨p2)∧

(¬p4∨p3)∧(¬p1∨¬p4)∧(¬p3∨¬p4)∧(p1)∧(p2)∧(p3)∧(p4)

slide-19
SLIDE 19

7/41

Software Package Upgradeability Problem as SAT

Formula ϕ:

Dependencies

¬p1 ∨ p2 ∨ p3 ¬p2 ∨ p3 ¬p3 ∨ p2

Conflicts

¬p4 ∨ p2 ¬p4 ∨ p3 ¬p1 ∨ ¬p4 ¬p3 ∨ ¬p4

Packages

p1 p2 p3 p4

◮ Formula is unsatisfiable ◮ Can you find an unsatisfiable subformula?

(Hint) There are several with 3 clauses!

slide-20
SLIDE 20

7/41

Software Package Upgradeability Problem as SAT

Formula ϕ:

Dependencies

¬p1 ∨ p2 ∨ p3 ¬p2 ∨ p3 ¬p3 ∨ p2

Conflicts

¬p4 ∨ p2 ¬p4 ∨ p3 ¬p1 ∨ ¬p4 ¬p3 ∨ ¬p4

Packages

p1 p2 p3 p4

◮ Formula is unsatisfiable ◮ We cannot install all packages ◮ How many packages can we install?

slide-21
SLIDE 21

8/41

What is Maximum Satisfiability?

◮ Maximum Satisfiability (MaxSAT):

◮ Clauses in the formula are either soft or hard ◮ Hard clauses: must be satisfied

(e.g. conflicts, dependencies)

◮ Soft clauses: desirable to be satisfied

(e.g. package installation)

◮ Goal: Maximize number of satisfied soft clauses

slide-22
SLIDE 22

9/41

How to encode Software Package Upgradeability?

Software Package Upgradeability problem as MaxSAT:

◮ What are the hard constraints?

◮ (Hint) Dependencies, conflicts or installation packages?

◮ What are the soft constraints?

◮ (Hint) Dependencies, conflicts or installation packages?

slide-23
SLIDE 23

10/41

How to encode Software Package Upgradeability?

Software Package Upgradeability problem as MaxSAT:

◮ What are the hard constraints?

◮ Dependencies and conflicts

◮ What are the soft constraints?

◮ Installation of packages

slide-24
SLIDE 24

11/41

Software Package Upgradeability Problem as MaxSAT

MaxSAT Formula: ϕh (Hard): ¬p1 ∨ p2 ∨ p3 ¬p2 ∨ p3 ¬p3 ∨ p2 ¬p4 ∨ p2 ¬p4 ∨ p3 ¬p1 ∨ ¬p4 ¬p3 ∨ ¬p4 ϕs (Soft): p1 p2 p3 p4

◮ Dependencies and conflicts are encoded as hard clauses ◮ Installation of packages are encoded as soft clauses ◮ Goal: maximize the number of installed packages

slide-25
SLIDE 25

11/41

Software Package Upgradeability Problem as MaxSAT

MaxSAT Formula: ϕh (Hard): ¬p1 ∨ p2 ∨ p3 ¬p2 ∨ p3 ¬p3 ∨ p2 ¬p4 ∨ p2 ¬p4 ∨ p3 ¬p1 ∨ ¬p4 ¬p3 ∨ ¬p4 ϕs (Soft): p1 p2 p3 p4

◮ Dependencies and conflicts are encoded as hard clauses ◮ Installation of packages are encoded as soft clauses ◮ Optimal solution (3 out 4 packages are installed)

slide-26
SLIDE 26

12/41

Why is MaxSAT Important?

◮ Many real-world applications can be encoded to MaxSAT:

◮ Software package upgradeability ◮ Error localization in C code ◮ Haplotyping with pedigrees ◮ . . .

◮ MaxSAT algorithms are very effective for solving

real-word problems

slide-27
SLIDE 27

13/41

The MaxSAT (r)evolution – Unweighted MaxSAT

200 400 600 800 1000 1200 1400 1600 1800 200 400 600 800 1000 1200 seconds instances Open-WBO (2015) MaxHS (2016) MSCG (2015) Eva (2014) Open-WBO (2014) Z3 (Microsoft 2016) QMaxSAT (2013) WPM2 (2013) PM2 (2010) QMaxSAT (2011-12) QMaxSAT (2010) CPLEX (IBM 2013) SAT4J (2009-10) IncWMaxSatz (2008)

◮ Best solver can solve 3× more benchmarks than in 2008! ◮ Better than tools like CPLEX (IBM) and Z3 (Microsoft)!

slide-28
SLIDE 28

14/41

The MaxSAT (r)evolution – Weighted MaxSAT

200 400 600 800 1000 1200 1400 1600 1800 100 200 300 400 500 600 700 800 seconds instances MaxHS (2016) LHMS (2015-16) MSCG (2015) MaxHS (2013) Eva (2014) QMaxSAT (2014) Z3 (Microsoft) CPLEX (IBM) WPM2 (2013) WPM1 (2011-12) WBO (2010) IncWMaxSatz (2008) SAT4J (2009-10)

◮ Best solver can solve 2.5× more benchmarks than in

2008!

◮ Better than tools like CPLEX (IBM) and Z3 (Microsoft)!

slide-29
SLIDE 29

15/41

Outline

◮ MaxSAT Algorithms:

◮ Upper bound search on the number of unsatisfied soft

clauses

◮ Lower bound search on the number of unsatisfied soft

clauses

◮ Partitioning in MaxSAT:

◮ Use the structure of the problem to guide the search

◮ Using MaxSAT solvers

slide-30
SLIDE 30

16/41

SAT Solvers

Formula SAT Solver Satisfying assignment Unsatisfiable subformula SAT UNSAT

slide-31
SLIDE 31

17/41

Satisfying assignment

Formula: x1 x2 ∨ ¬x1 ¬x3 ∨ x1 ¬x3 ∨ ¬x1 x2 ∨ ¬x3

◮ Satisfying assignment:

◮ Assignment to the variables that evaluates the formula

to true

slide-32
SLIDE 32

17/41

Satisfying assignment

Formula: x1 x2 ∨ ¬x1 ¬x3 ∨ x1 ¬x3 ∨ ¬x1 x2 ∨ ¬x3

◮ Satisfying assignment:

◮ Assignment to the variables that evaluates the formula

to true

◮ µ = {x1 = 1, x2 = 1, x3 = 0}

slide-33
SLIDE 33

18/41

Unsatisfiable subformula

Formula: x1 x3 x2 ∨ ¬x1 ¬x3 ∨ x1 ¬x2 ∨ ¬x1 x2 ∨ ¬x3

◮ Formula is unsatisfiable

slide-34
SLIDE 34

18/41

Unsatisfiable subformula

Formula: x1 x3 x2 ∨ ¬x1 ¬x3 ∨ x1 ¬x2 ∨ ¬x1 x2 ∨ ¬x3

◮ Formula is unsatisfiable ◮ Unsatisfiable subformula (core):

◮ ϕ′ ⊆ ϕ, such that ϕ′ is unsatisfiable

slide-35
SLIDE 35

19/41

MaxSAT Algorithms

◮ MaxSAT algorithms build on SAT solver technology ◮ MaxSAT algorithms use constraints not defined in causal

form:

◮ AtMost1 constraints, n

j=1 xj ≤ 1

◮ General cardinality constraints, n

j=1 xj ≤ k

◮ Pseudo-Boolean constraints, n

j=1 ajxj ≤ k ◮ Efficient encodings to CNF

◮ Sinz, Totalizer, . . .

slide-36
SLIDE 36

20/41

Upper Bound Search for MaxSAT

ϕ

Find upper bound k for #unsatisfied soft clauses SAT Solver Unsatisfiable subformula Satisfying assignment Refinement Optimal Solution UNSAT SAT

slide-37
SLIDE 37

20/41

Upper Bound Search for MaxSAT

ϕ

Can we unsatisfy less than k clauses? SAT Solver Unsatisfiable subformula Satisfying assignment Refinement Optimal Solution UNSAT SAT

ϕ ϕ′

slide-38
SLIDE 38

20/41

Upper Bound Search for MaxSAT

ϕ′

Can we unsatisfy less than j (< k) clauses? SAT Solver Unsatisfiable subformula Satisfying assignment Refinement Optimal Solution UNSAT SAT

slide-39
SLIDE 39

20/41

Upper Bound Search for MaxSAT

ϕ′′

Can we unsatisfy less than j (< k) clauses? SAT Solver Unsatisfiable subformula Satisfying assignment Refinement Optimal Solution UNSAT SAT

slide-40
SLIDE 40

21/41

Linear Search Algorithms SAT-UNSAT

Partial MaxSAT Formula: ϕh (Hard): ¬x2 ∨ ¬x1 x2 ∨ ¬x3 ϕs (Soft): x1 x3 x2 ∨ ¬x1 ¬x3 ∨ x1

slide-41
SLIDE 41

21/41

Linear Search Algorithms SAT-UNSAT

Partial MaxSAT Formula: ϕh : ¬x2 ∨ ¬x1 x2 ∨ ¬x3 ϕs : x1 ∨ r1 x3 ∨ r2 x2 ∨ ¬x1 ∨ r3 ¬x3 ∨ x1 ∨ r4

◮ Relax all soft clauses ◮ Relaxation variables:

◮ VR = {r1, r2, r3, r4} ◮ If a soft clause ωi is unsatisfied, then ri = 1 ◮ If a soft clause ωi is satisfied, then ri = 0

slide-42
SLIDE 42

21/41

Linear Search Algorithms SAT-UNSAT

Partial MaxSAT Formula: ϕh : ¬x2 ∨ ¬x1 x2 ∨ ¬x3 ϕs : x1 ∨ r1 x3 ∨ r2 x2 ∨ ¬x1 ∨ r3 ¬x3 ∨ x1 ∨ r4 VR = {r1, r2, r3, r4}

◮ Formula is satisfiable

◮ ν = {x1 = 1, x2 = 0, x3 = 0, r1 = 0, r2 = 1, r3 = 1, r4 = 0}

◮ Goal: Minimize number of relaxation variables assigned

to 1

slide-43
SLIDE 43

21/41

Can we unsatisfy less than 2 soft clauses?

Partial MaxSAT Formula: ϕh : ¬x2 ∨ ¬x1 x2 ∨ ¬x3 ϕs : x1 ∨ r1 x3 ∨ r2 x2 ∨ ¬x1 ∨ r3 ¬x3 ∨ x1 ∨ r4 µ = 2 VR = {r1, r2, r3, r4}

◮ r2 and r3 were assigned truth value 1:

◮ Current solution unsatisfies 2 soft clauses

◮ Can less than 2 soft clauses be unsatisfied?

slide-44
SLIDE 44

21/41

Can we unsatisfy less than 2 soft clauses?

Partial MaxSAT Formula: ϕh : ¬x2 ∨ ¬x1 x2 ∨ ¬x3 CNF(

ri∈VR ri ≤ 1)

ϕs : x1 ∨ r1 x3 ∨ r2 x2 ∨ ¬x1 ∨ r3 ¬x3 ∨ x1 ∨ r4 µ = 2 VR = {r1, r2, r3, r4}

◮ Add cardinality constraint that excludes solutions that

unsatisfies 2 or more soft clauses:

◮ CNF(r1 + r2 + r3 + r4 ≤ 1)

slide-45
SLIDE 45

21/41

Can we unsatisfy less than 2 soft clauses? No!

Partial MaxSAT Formula: ϕh : ¬x2 ∨ ¬x1 x2 ∨ ¬x3 CNF(

ri∈VR ri ≤ 1)

ϕs : x1 ∨ r1 x3 ∨ r2 x2 ∨ ¬x1 ∨ r3 ¬x3 ∨ x1 ∨ r4 µ = 2 VR = {r1, r2, r3, r4}

◮ Formula is unsatisfiable:

◮ There are no solutions that unsatisfy 1 or less soft

clauses

slide-46
SLIDE 46

21/41

Can we unsatisfy less than 2 soft clauses? No!

Partial MaxSAT Formula: ϕh: ¬x2 ∨ ¬x1 x2 ∨ ¬x3 ϕs: x1 x3 x2 ∨ ¬x1 ¬x3 ∨ x1 µ = 2 VR = {r1, r2, r3, r4}

◮ Optimal solution: given by the last model and

corresponds to unsatisfying 2 soft clauses:

◮ ν = {x1 = 1, x2 = 0, x3 = 0}

slide-47
SLIDE 47

22/41

MaxSAT algorithms

◮ We have just seen a search on the upper bound ◮ What other kind of search can we do to find an optimal

solution?

slide-48
SLIDE 48

22/41

MaxSAT algorithms

◮ We have just seen a search on the upper bound ◮ What other kind of search can we do to find an optimal

solution?

◮ What if we start searching from the lower bound?

slide-49
SLIDE 49

23/41

Lower Bound Search for MaxSAT

ϕ

Can we satisfy all soft clauses? SAT Solver Satisfying assignment Unsatisfiable subformula Refinement Optimal Solution SAT UNSAT

slide-50
SLIDE 50

23/41

Lower Bound Search for MaxSAT

ϕ

Can we satisfy all soft clauses? SAT Solver Satisfying assignment Unsatisfiable subformula Refinement Optimal Solution SAT UNSAT

ϕ ϕ′

slide-51
SLIDE 51

23/41

Lower Bound Search for MaxSAT

ϕ′

Can we satisfy all soft clauses but 1? SAT Solver Satisfying assignment Unsatisfiable subformula Refinement Optimal Solution SAT UNSAT

slide-52
SLIDE 52

23/41

Lower Bound Search for MaxSAT

ϕ′

Can we satisfy all soft clauses but 1? SAT Solver Satisfying assignment Unsatisfiable subformula Refinement Optimal Solution SAT UNSAT

ϕ′ ϕ′′

slide-53
SLIDE 53

23/41

Lower Bound Search for MaxSAT

ϕ′′

Can we satisfy all soft clauses but 2? SAT Solver Satisfying assignment Unsatisfiable subformula Refinement Optimal Solution SAT UNSAT

slide-54
SLIDE 54

23/41

Lower Bound Search for MaxSAT

ϕ′′

Can we satisfy all soft clauses but 2? SAT Solver Satisfying assignment Unsatisfiable subformula Refinement Optimal Solution SAT UNSAT

slide-55
SLIDE 55

24/41

Linear Search Algorithms UNSAT-SAT

Partial MaxSAT Formula: ϕh : ¬x2 ∨ ¬x1 x2 ∨ ¬x3 ϕs : x1 ∨ r1 x3 ∨ r2 x2 ∨ ¬x1 ∨ r3 ¬x3 ∨ x1 ∨ r4

◮ Relax all soft clauses ◮ Relaxation variables:

◮ VR = {r1, r2, r3, r4} ◮ If a soft clause ωi is unsatisfied, then ri = 1 ◮ If a soft clause ωi is satisfied, then ri = 0

slide-56
SLIDE 56

24/41

Can we satisfy all soft clauses?

Partial MaxSAT Formula: ϕh : ¬x2 ∨ ¬x1 x2 ∨ ¬x3 CNF(

ri∈VR ri ≤ 0)

ϕs : x1 ∨ r1 x3 ∨ r2 x2 ∨ ¬x1 ∨ r3 ¬x3 ∨ x1 ∨ r4 µ = 2 VR = {r1, r2, r3, r4}

◮ Add cardinality constraint that excludes solutions that

unsatisfies 1 or more soft clauses:

◮ CNF(r1 + r2 + r3 + r4 ≤ 0)

slide-57
SLIDE 57

24/41

Can we satisfy all soft clauses but 1?

Partial MaxSAT Formula: ϕh : ¬x2 ∨ ¬x1 x2 ∨ ¬x3 CNF(

ri∈VR ri ≤ 0)

ϕs : x1 ∨ r1 x3 ∨ r2 x2 ∨ ¬x1 ∨ r3 ¬x3 ∨ x1 ∨ r4

◮ Formula is unsatisfiable:

◮ There are no solutions that unsatisfy 0 or less soft

clauses

◮ Add cardinality constraint that excludes solutions that

unsatisfies 2 or more soft clauses:

◮ CNF(r1 + r2 + r3 + r4 ≤ 1)

slide-58
SLIDE 58

24/41

Can we satisfy all soft clauses but 2?

Partial MaxSAT Formula: ϕh : ¬x2 ∨ ¬x1 x2 ∨ ¬x3 CNF(

ri∈VR ri ≤ 1)

ϕs : x1 ∨ r1 x3 ∨ r2 x2 ∨ ¬x1 ∨ r3 ¬x3 ∨ x1 ∨ r4

◮ Formula is unsatisfiable:

◮ There are no solutions that unsatisfy 1 or less soft

clauses

◮ Add cardinality constraint that excludes solutions that

unsatisfies 3 or more soft clauses:

◮ CNF(r1 + r2 + r3 + r4 ≤ 2)

slide-59
SLIDE 59

24/41

Can we satisfy all soft clauses but 2? Yes!

Partial MaxSAT Formula: ϕh : ¬x2 ∨ ¬x1 x2 ∨ ¬x3 CNF(

ri∈VR ri ≤ 2)

ϕs : x1 ∨ r1 x3 ∨ r2 x2 ∨ ¬x1 ∨ r3 ¬x3 ∨ x1 ∨ r4

◮ Formula is satisfiable:

◮ µ = {x1 = 1, x2 = 0, x3 = 0, r1 = 0, r2 = 1, r3 = 1, r4 =

0}

◮ Optimal solution unsatisfies 2 soft clauses

slide-60
SLIDE 60

25/41

Unsatisfiability-based Algorithms

◮ What are the problems of this algorithm?

(Hint) Number of relaxation variables? Size of the cardinality constraint? Other?

slide-61
SLIDE 61

25/41

Unsatisfiability-based Algorithms

◮ What are the problems of this algorithm?

(Hint) Number of relaxation variables? Size of the cardinality constraint? Other?

◮ We relax all soft clauses! ◮ The cardinality constraint contain as many literals as we

have soft clauses!

◮ Can we do better?

slide-62
SLIDE 62

26/41

Unsatisfiability-based Algorithms

Partial MaxSAT Formula: ϕh (Hard): ¬x2 ∨ ¬x1 x2 ∨ ¬x3 ϕs (Soft): x1 x3 x2 ∨ ¬x1 ¬x3 ∨ x1

slide-63
SLIDE 63

26/41

Unsatisfiability-based Algorithms

Partial MaxSAT Formula: ϕh: ¬x2 ∨ ¬x1 x2 ∨ ¬x3 ϕs: x1 x3 x2 ∨ ¬x1 ¬x3 ∨ x1

◮ Formula is unsatisfiable

slide-64
SLIDE 64

26/41

Unsatisfiability-based Algorithms

Partial MaxSAT Formula: ϕh: ¬x2 ∨ ¬x1 x2 ∨ ¬x3 ϕs: x1 x3 x2 ∨ ¬x1 ¬x3 ∨ x1

◮ Formula is unsatisfiable ◮ Identify an unsatisfiable core

slide-65
SLIDE 65

26/41

Unsatisfiability-based Algorithms

Partial MaxSAT Formula: ϕh: ¬x2 ∨ ¬x1 x2 ∨ ¬x3 CNF(r1 + r2 ≤ 1) ϕs: x1 ∨ r1 x3 ∨ r2 x2 ∨ ¬x1 ¬x3 ∨ x1

◮ Relax non-relaxed soft clauses in unsatisfiable core:

◮ Add cardinality constraint that excludes solutions that

unsatisfies 2 or more soft clauses:

◮ CNF(r1 + r2 ≤ 1) ◮ Relaxation on demand instead of relaxing all soft clauses

eagerly

slide-66
SLIDE 66

26/41

Unsatisfiability-based Algorithms

Partial MaxSAT Formula: ϕh: ¬x2 ∨ ¬x1 x2 ∨ ¬x3 CNF(r1 + r2 ≤ 1) ϕs: x1 ∨ r1 x3 ∨ r2 x2 ∨ ¬x1 ¬x3 ∨ x1

◮ Formula is unsatisfiable

slide-67
SLIDE 67

26/41

Unsatisfiability-based Algorithms

Partial MaxSAT Formula: ϕh: ¬x2 ∨ ¬x1 x2 ∨ ¬x3 CNF(r1 + r2 ≤ 1) ϕs: x1 ∨ r1 x3 ∨ r2 x2 ∨ ¬x1 ¬x3 ∨ x1

◮ Formula is unsatisfiable ◮ Identify an unsatisfiable core

slide-68
SLIDE 68

26/41

Unsatisfiability-based Algorithms

Partial MaxSAT Formula: ϕh: ¬x2 ∨ ¬x1 x2 ∨ ¬x3 CNF(r1 + . . . + r4 ≤ 2) ϕs: x1 ∨ r1 x3 ∨ r2 x2 ∨ ¬x1 ∨ r3 ¬x3 ∨ x1 ∨ r4

◮ Relax non-relaxed soft clauses in unsatisfiable core:

◮ Add cardinality constraint that excludes solutions that

unsatisfies 3 or more soft clauses:

◮ CNF(r1 + r2 + r3 + r4 ≤ 2) ◮ Relaxation on demand instead of relaxing all soft clauses

eagerly

slide-69
SLIDE 69

26/41

Unsatisfiability-based Algorithms

Partial MaxSAT Formula: ϕh : ¬x2 ∨ ¬x1 x2 ∨ ¬x3 CNF(r1 + . . . + r4 ≤ 2) ϕs : x1 ∨ r1 x3 ∨ r2 x2 ∨ ¬x1 ∨ r3 ¬x3 ∨ x1 ∨ r4

◮ Formula is satisfiable:

◮ µ = {x1 = 1, x2 = 0, x3 = 0, r1 = 0, r2 = 1, r3 = 1, r4 =

0}

◮ Optimal solution unsatisfies 2 soft clauses

slide-70
SLIDE 70

27/41

Unsatisfiability-based Algorithms

◮ What are the problems of this algorithm?

(Hint) Number of relaxation variables? Size of the cardinality constraint? Other?

slide-71
SLIDE 71

27/41

Unsatisfiability-based Algorithms

◮ What are the problems of this algorithm?

(Hint) Number of relaxation variables? Size of the cardinality constraint? Other?

◮ We must translate cardinality constraints into CNF! ◮ If the number of literals is large than we may generate a

very large formula!

◮ Can we do better?

slide-72
SLIDE 72

28/41

Unsatisfiability-based Algorithms

Partial MaxSAT Formula: ϕh (Hard): ¬x2 ∨ ¬x1 x2 ∨ ¬x3 ϕs (Soft): x1 x3 x2 ∨ ¬x1 ¬x3 ∨ x1

slide-73
SLIDE 73

28/41

Unsatisfiability-based Algorithms

Partial MaxSAT Formula: ϕh: ¬x2 ∨ ¬x1 x2 ∨ ¬x3 ϕs: x1 x3 x2 ∨ ¬x1 ¬x3 ∨ x1

◮ Formula is unsatisfiable

slide-74
SLIDE 74

28/41

Unsatisfiability-based Algorithms

Partial MaxSAT Formula: ϕh: ¬x2 ∨ ¬x1 x2 ∨ ¬x3 ϕs: x1 x3 x2 ∨ ¬x1 ¬x3 ∨ x1

◮ Formula is unsatisfiable ◮ Identify an unsatisfiable core

slide-75
SLIDE 75

28/41

Unsatisfiability-based Algorithms

Partial MaxSAT Formula: ϕh: ¬x2 ∨ ¬x1 x2 ∨ ¬x3 CNF(r1 + r2 ≤ 1) ϕs: x1 ∨ r1 x3 ∨ r2 x2 ∨ ¬x1 ¬x3 ∨ x1

◮ Relax unsatisfiable core:

◮ Add relaxation variables ◮ Add AtMost1 constraint

slide-76
SLIDE 76

28/41

Unsatisfiability-based Algorithms

Partial MaxSAT Formula: ϕh: ¬x2 ∨ ¬x1 x2 ∨ ¬x3 CNF(r1 + r2 ≤ 1) ϕs: x1 ∨ r1 x3 ∨ r2 x2 ∨ ¬x1 ¬x3 ∨ x1

◮ Formula is unsatisfiable

slide-77
SLIDE 77

28/41

Unsatisfiability-based Algorithms

Partial MaxSAT Formula: ϕh: ¬x2 ∨ ¬x1 x2 ∨ ¬x3 CNF(r1 + r2 ≤ 1) ϕs: x1 ∨ r1 x3 ∨ r2 x2 ∨ ¬x1 ¬x3 ∨ x1

◮ Formula is unsatisfiable ◮ Identify an unsatisfiable core

slide-78
SLIDE 78

28/41

Unsatisfiability-based Algorithms

Partial MaxSAT Formula: ϕh: ¬x2 ∨ ¬x1 x2 ∨ ¬x3 CNF(r1 + r2 ≤ 1) CNF(r3 + . . . + r6 ≤ 1) ϕs: x1 ∨ r1 ∨ r3 x3 ∨ r2 ∨ r4 x2 ∨ ¬x1 ∨ r5 ¬x3 ∨ x1 ∨ r6

◮ Relax unsatisfiable core:

◮ Add relaxation variables ◮ Add AtMost1 constraint

◮ Soft clauses may be relaxed multiple times

slide-79
SLIDE 79

28/41

Unsatisfiability-based Algorithms

Partial MaxSAT Formula: ϕh: ¬x2 ∨ ¬x1 x2 ∨ ¬x3 CNF(r1 + r2 ≤ 1) CNF(r3 + . . . + r6 ≤ 1) ϕs: x1 ∨ r1 ∨ r3 x3 ∨ r2 ∨ r4 x2 ∨ ¬x1 ∨ r5 ¬x3 ∨ x1 ∨ r6

◮ Formula is satisfiable ◮ An optimal solution would be:

◮ ν = {x1 = 1, x2 = 0, x3 = 0}

slide-80
SLIDE 80

28/41

Unsatisfiability-based Algorithms

Partial MaxSAT Formula: ϕh: ¬x2 ∨ ¬x1 x2 ∨ ¬x3 ϕs: x1 x3 x2 ∨ ¬x1 ¬x3 ∨ x1

◮ Formula is satisfiable ◮ An optimal solution would be:

◮ ν = {x1 = 1, x2 = 0, x3 = 0}

◮ This assignment unsatisfies 2 soft clauses

slide-81
SLIDE 81

29/41

Challenges for Unsatisfiability-based MaxSAT Algorithms

◮ Unsatisfiable cores found by the SAT solver are not

minimal

slide-82
SLIDE 82

29/41

Challenges for Unsatisfiability-based MaxSAT Algorithms

◮ Unsatisfiable cores found by the SAT solver are not

minimal

ϕ

Formula ϕ

slide-83
SLIDE 83

29/41

Challenges for Unsatisfiability-based MaxSAT Algorithms

◮ Unsatisfiable cores found by the SAT solver are not

minimal

ϕ ϕc

Formula ϕ Unsatisfiable core ϕc

slide-84
SLIDE 84

29/41

Challenges for Unsatisfiability-based MaxSAT Algorithms

◮ Unsatisfiable cores found by the SAT solver are not

minimal

ϕ ϕc ϕm

Formula ϕ Unsatisfiable core ϕc Minimal core ϕm

slide-85
SLIDE 85

29/41

Challenges for Unsatisfiability-based MaxSAT Algorithms

◮ Unsatisfiable cores found by the SAT solver are not

minimal

ϕ ϕc ϕm

Formula ϕ Unsatisfiable core ϕc Minimal core ϕm

◮ Minimizing unsatisfiable cores is computationally hard

slide-86
SLIDE 86

30/41

Partitioning in MaxSAT

◮ Partitioning in MaxSAT:

◮ Partition the soft clauses into disjoint sets ◮ Iteratively increase the size of the MaxSAT formula

ϕ ϕ3 ϕ2 ϕ1

. . .

ϕn

◮ Advantages:

◮ Easier formulas for the SAT solver ◮ Smaller unsatisfiable cores at each iteration

slide-87
SLIDE 87

31/41

Framework for Partitioning-based MaxSAT Algorithms

ϕ

SAT Solver Satisfying assignment Unsatisfiable subformula Refinement Optimal Solution SAT UNSAT

slide-88
SLIDE 88

31/41

Framework for Partitioning-based MaxSAT Algorithms

ϕ2 ϕ1 ϕ3

SAT Solver Satisfying assignment Unsatisfiable subformula Refinement Optimal Solution SAT UNSAT

slide-89
SLIDE 89

31/41

Framework for Partitioning-based MaxSAT Algorithms

ϕ1 ϕ2 ϕ1 ϕ3

SAT Solver Satisfying assignment Unsatisfiable subformula Refinement Optimal Solution SAT UNSAT

slide-90
SLIDE 90

31/41

Framework for Partitioning-based MaxSAT Algorithms

ϕ1 ϕ2 ϕ1 ϕ3

SAT Solver Satisfying assignment Unsatisfiable subformula Refinement Optimal Solution SAT UNSAT

ϕ1 ϕ′

1

slide-91
SLIDE 91

31/41

Framework for Partitioning-based MaxSAT Algorithms

ϕ′

1

ϕ2 ϕ1 ϕ3

SAT Solver Satisfying assignment Unsatisfiable subformula Refinement Optimal Solution SAT UNSAT

slide-92
SLIDE 92

31/41

Framework for Partitioning-based MaxSAT Algorithms

ϕ′

1

ϕ2 ϕ1 ϕ3

SAT Solver Satisfying assignment Unsatisfiable subformula Refinement Optimal Solution Solution may not be optimal! SAT UNSAT

slide-93
SLIDE 93

31/41

Framework for Partitioning-based MaxSAT Algorithms

ϕ′

1

ϕ2 ϕ1 ϕ3

SAT Solver Satisfying assignment Unsatisfiable subformula Refinement

Partitions?

Optimal Solution SAT UNSAT No Yes

slide-94
SLIDE 94

31/41

Framework for Partitioning-based MaxSAT Algorithms

ϕ′

1 ∪ ϕ2

ϕ2 ϕ1 ϕ3

SAT Solver Satisfying assignment Unsatisfiable subformula Refinement

Partitions?

Optimal Solution SAT UNSAT No Yes

slide-95
SLIDE 95

31/41

Framework for Partitioning-based MaxSAT Algorithms

ϕ′

1 ∪ ϕ2

ϕ2 ϕ1 ϕ3

SAT Solver Satisfying assignment Unsatisfiable subformula Refinement

Partitions?

Optimal Solution SAT UNSAT

ϕ′

1 ∪ ϕ2 ϕ′′ 1 ∪ ϕ′ 2 No Yes

slide-96
SLIDE 96

31/41

Framework for Partitioning-based MaxSAT Algorithms

ϕ′′

1 ∪ ϕ′ 2

ϕ2 ϕ1 ϕ3

SAT Solver Satisfying assignment Unsatisfiable subformula Refinement

Partitions?

Optimal Solution SAT UNSAT No Yes

slide-97
SLIDE 97

31/41

Framework for Partitioning-based MaxSAT Algorithms

ϕ′′

1 ∪ ϕ′ 2

ϕ2 ϕ1 ϕ3

SAT Solver Satisfying assignment Unsatisfiable subformula Refinement

Partitions?

Optimal Solution SAT UNSAT No Yes

slide-98
SLIDE 98

31/41

Framework for Partitioning-based MaxSAT Algorithms

ϕ′′

1 ∪ ϕ′ 2 ∪ ϕ3

ϕ2 ϕ1 ϕ3

SAT Solver Satisfying assignment Unsatisfiable subformula Refinement

Partitions?

Optimal Solution SAT UNSAT No Yes

slide-99
SLIDE 99

31/41

Framework for Partitioning-based MaxSAT Algorithms

ϕ′′

1 ∪ ϕ′ 2 ∪ ϕ3

ϕ2 ϕ1 ϕ3

SAT Solver Satisfying assignment Unsatisfiable subformula Refinement

Partitions?

Optimal Solution SAT UNSAT

ϕ′′

1 ∪ ϕ′ 2 ∪ ϕ3 ϕ′′′ 1 ∪ ϕ′′ 2 ∪ ϕ′ 3

No Yes

slide-100
SLIDE 100

31/41

Framework for Partitioning-based MaxSAT Algorithms

ϕ′′′

1 ∪ ϕ′′ 2 ∪ ϕ′ 3

ϕ2 ϕ1 ϕ3

SAT Solver Satisfying assignment Unsatisfiable subformula Refinement

Partitions?

Optimal Solution SAT UNSAT No Yes

slide-101
SLIDE 101

31/41

Framework for Partitioning-based MaxSAT Algorithms

ϕ′′′

1 ∪ ϕ′′ 2 ∪ ϕ′ 3

ϕ2 ϕ1 ϕ3

SAT Solver Satisfying assignment Unsatisfiable subformula Refinement

Partitions?

Optimal Solution SAT UNSAT No Yes

slide-102
SLIDE 102

31/41

Framework for Partitioning-based MaxSAT Algorithms

ϕ′′′

1 ∪ ϕ′′ 2 ∪ ϕ′ 3

ϕ2 ϕ1 ϕ3

SAT Solver Satisfying assignment Unsatisfiable subformula Refinement

Partitions?

Optimal Solution SAT UNSAT No Yes

slide-103
SLIDE 103

32/41

How to Partition Soft Clauses?

◮ Graph representation of the MaxSAT formula:

◮ Vertices: Variables ◮ Edges: Between variables that appear in the same clause

slide-104
SLIDE 104

32/41

How to Partition Soft Clauses?

◮ Graph representation of the MaxSAT formula:

◮ Vertices: Variables ◮ Edges: Between variables that appear in the same clause

slide-105
SLIDE 105

33/41

Graph representations for MaxSAT

◮ There are many ways to represent MaxSAT as a graph:

◮ Clause-Variable Incidence Graph (CVIG) ◮ Variable Incidence Graph (VIG) ◮ Hypergraph ◮ Resolution Graph ◮ . . .

slide-106
SLIDE 106

33/41

Graph representations for MaxSAT

◮ There are many ways to represent MaxSAT as a graph:

◮ Clause-Variable Incidence Graph (CVIG) ◮ Variable Incidence Graph (VIG) ◮ Hypergraph ◮ Resolution Graph ◮ . . .

slide-107
SLIDE 107

34/41

MaxSAT Formulas as Resolution-based Graphs

◮ MaxSAT solvers rely on the identification of

unsatisfiable cores

◮ How can we capture sets of clauses that are closely

related and are likely to result in unsatisfiable cores?

◮ Represent MaxSAT formulas as resolution graphs! ◮ Resolution graphs are based on the resolution rule

slide-108
SLIDE 108

34/41

MaxSAT Formulas as Resolution-based Graphs

◮ MaxSAT solvers rely on the identification of

unsatisfiable cores

◮ How can we capture sets of clauses that are closely

related and are likely to result in unsatisfiable cores?

◮ Represent MaxSAT formulas as resolution graphs! ◮ Resolution graphs are based on the resolution rule

◮ Example of the resolution rule:

(x1 ∨ x2) (¬x2 ∨ x3)

slide-109
SLIDE 109

34/41

MaxSAT Formulas as Resolution-based Graphs

◮ MaxSAT solvers rely on the identification of

unsatisfiable cores

◮ How can we capture sets of clauses that are closely

related and are likely to result in unsatisfiable cores?

◮ Represent MaxSAT formulas as resolution graphs! ◮ Resolution graphs are based on the resolution rule

◮ Example of the resolution rule:

(x1 ∨ x2) (¬x2 ∨ x3) (x1 ∨ x3)

slide-110
SLIDE 110

35/41

MaxSAT Formulas as Resolution-based Graphs

◮ Vertices: Represent each clause in the graph ◮ Edges: There is an edge between two vertices if you can

apply the resolution rule between the corresponding clauses

slide-111
SLIDE 111

35/41

MaxSAT Formulas as Resolution-based Graphs

◮ Vertices: Represent each clause in the graph ◮ Edges: There is an edge between two vertices if you can

apply the resolution rule between the corresponding clauses Hard clauses: c1 = x1 ∨ x2 c2 = ¬x2 ∨ x3 c3 = ¬x1 ∨ ¬x3 Soft clauses: c4 = ¬x1 c5 = ¬x3

slide-112
SLIDE 112

35/41

MaxSAT Formulas as Resolution-based Graphs

◮ Vertices: Represent each clause in the graph ◮ Edges: There is an edge between two vertices if you can

apply the resolution rule between the corresponding clauses Hard clauses: c1 = x1 ∨ x2 c2 = ¬x2 ∨ x3 c3 = ¬x1 ∨ ¬x3 Soft clauses: c4 = ¬x1 c5 = ¬x3 c4 c1 c3 c5 c2

slide-113
SLIDE 113

35/41

MaxSAT Formulas as Resolution-based Graphs

◮ Vertices: Represent each clause in the graph ◮ Edges: There is an edge between two vertices if you can

apply the resolution rule between the corresponding clauses Hard clauses: c1 = x1 ∨ x2 c2 = ¬x2 ∨ x3 c3 = ¬x1 ∨ ¬x3 Soft clauses: c4 = ¬x1 c5 = ¬x3 c4 c1 c3 c5 c2

slide-114
SLIDE 114

36/41

Impact of Partitioning in the MaxSAT Solving

200 400 600 800 1000 1200 1400 1600 1800 200 400 600 800 1000 1200 CPU Time (in seconds) Number of problems solved OPEN-WBO’14 Partitioning

slide-115
SLIDE 115

36/41

Impact of Partitioning in the MaxSAT Solving

200 400 600 800 1000 1200 1400 1600 1800 200 400 600 800 1000 1200 CPU Time (in seconds) Number of problems solved OPEN-WBO’14 Partitioning

◮ The techniques in Open-WBO have been adopted by

  • ther state-of-the-art MaxSAT solvers
slide-116
SLIDE 116

37/41

Want to try MaxSAT solving?

◮ Java:

◮ SAT4J ◮ http://www.sat4j.org/

◮ Python:

◮ RC2 ◮ Best solver in 2018 and 2019! ◮ SAT solvers written in C++ ◮ https://pysathq.github.io

slide-117
SLIDE 117

37/41

Want to try MaxSAT solving?

◮ C++:

◮ MaxHS ◮ One of the best solvers for weighted problems! ◮ Combines SAT and MIP solvers ◮ http://www.maxhs.org/ ◮ Open-WBO ◮ Winner of multiples tracks in the MaxSAT Competition

2014, 2015 and 2016!

◮ https://github.com/sat-group/open-wbo

◮ Annual competition:

◮ http://maxsat-evaluations.github.io ◮ Modify a solver today and enter this year competition!

slide-118
SLIDE 118

38/41

Standard Solver Input Format: DIMACS WCNF

◮ Variables indexed from 1 to n ◮ Negation: -

◮ -3 stands for ¬x3

◮ 0: special end-of-line character ◮ One special header “p”-line:

p wcnf #vars #clauses top

◮ #vars: number of variables ◮ #clauses: number of clauses ◮ top: “weight” of hard clauses

◮ Clauses represented as lists of integers

◮ Weight is the first number ◮ (¬x3 ∨ x1 ∨ ¬x45), weight 2:

2 -3 1 -45 0

◮ Clause is hard if weight is equal to top

slide-119
SLIDE 119

39/41

Standard Solver Input Format: DIMACS WCNF

Example: pointer analysis domain (pa-2.wcnf):

p wcnf 17997976 23364255 9223372036854775807 142 -11393180 12091478 0 200 -12496389 -1068725 13170751 0 209 -8854604 -8854942 -8854943 -8253894 9864153 0 174 -9406753 -8105076 11844088 0 200 -10403325 -8104972 12524177 0 142 -11987544 12096893 0 37 -10981341 -10980973 10838652 0 209 -9578314 -9579250 -9579251 -8254733 9578317 0 209 -8868994 -8870298 -8870299 -8254157 8868997 0 209 -9387012 -9387508 -9387509 -8253943 9387015 0 174 -9834074 -8106628 12074710 0 200 -10726788 -8105074 12909526 0 ... 9223372036854775807 -13181184 0 9223372036854775807 -13181215 0 ... truncated 763 MB

slide-120
SLIDE 120

40/41

Push-Button Solver Technology

Example: $ open-wbo pa-2.wcnf

slide-121
SLIDE 121

40/41

Push-Button Solver Technology

Example: $ open-wbo pa-2.wcnf

c Open-WBO: a Modular MaxSAT Solver c Version: MaxSAT Evaluation 2016 c Authors: Ruben Martins, Vasco Manquinho, Ines Lynce c Contributors: Miguel Neves, Saurabh Joshi, Mikolas Janota ... c Problem Type: Weighted c Number of variables: 17,997,976 c Number of hard clauses: 8,237,870 c Number of soft clauses: 15,126,385 c Parse time: 5.60 s ...

  • 4699
  • 4609
  • 143

s OPTIMUM FOUND c Total time: 361.26 s v 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15... ...17997976

slide-122
SLIDE 122

41/41

References

MaxSAT algorithms:

  • Z. Fu, S. Malik.

On Solving the Partial MAX-SAT Problem. SAT 2006: 252-265.

  • V. Manquinho, J. Marques-Silva, J. Planes. Algorithms for Weighted Boolean
  • Optimization. SAT 2009: 495-508
  • J. Marques-Silva, J. Planes. On using unsatisfiability for solving Maximum
  • Satisfiability. Technical report 2007
  • R. Martins, S. Joshi, V. Manquinho, I. Lynce. Incremental Cardinality Con-

straints for MaxSAT. CP 2014: 531-548

  • R. Martins, V. Manquinho, I. Lynce. Open-WBO: A Modular MaxSAT Solver.

SAT 2014: 438-445

  • R. Martins, V. Manquinho, I. Lynce.

Community-Based Partitioning for MaxSAT Solving. SAT 2013: 182-191

  • M. Neves, R. Martins, M. Janota, I. Lynce, V. Manquinho Exploiting

Resolution-Based Representations for MaxSAT Solving. SAT 2015: 272-286 Jessica Davies, Fahiem Bacchus: Postponing Optimization to Speed Up MAXSAT Solving. CP 2013: 247-262 Alexey Ignatiev, Antnio Morgado, Joao Marques-Silva: PySAT: A Python Toolkit for Prototyping with SAT Oracles. SAT 2018: 428-437

slide-123
SLIDE 123

41/41

References

Cardinality and Pseudo-Boolean Encodings:

  • C. Sinz. Towards an Optimal CNF Encoding of Boolean Cardinality Con-
  • straints. CP 2005: 827-831
  • N. Manthey, T. Philipp, P. Steinke. A More Compact Translation of Pseudo-

Boolean Constraints into CNF Such That Generalized Arc Consistency Is

  • Maintained. KI 2014: 123-134
  • T. Philipp, P. Steinke. PBLib - A Library for Encoding Pseudo-Boolean Con-

straints into CNF. SAT 2015: 9-16 http://tools.computational-logic.

  • rg/content/pblib.php

Community Structure:

  • C. Ans´
  • tegui, J. Gir´

aldez-Cru, Jordi Levy. The Community Structure of SAT

  • Formulas. SAT 2012: 410-423

Web pages of interest:

MaxSAT Evaluation: http://www.maxsat.udl.cat/ Open-WBO: http://sat.inesc-id.pt/open-wbo/ SAT4J: http://www.sat4j.org/ RC2: https://pysathq.github.io MaxHS: http://www.maxhs.org/ SATGraf: https://bitbucket.org/znewsham/satgraf