Pseudo-Boolean Constraints: Reasoning and Compilation Romain Wallon - - PowerPoint PPT Presentation

pseudo boolean constraints reasoning and compilation
SMART_READER_LITE
LIVE PREVIEW

Pseudo-Boolean Constraints: Reasoning and Compilation Romain Wallon - - PowerPoint PPT Presentation

Pseudo-Boolean Constraints: Reasoning and Compilation Romain Wallon (Advisors: Daniel Le Berre, Pierre Marquis, Stefan Mengel) September 11, 2017 CRIL - U. Artois & CNRS Overview 1. Reasoning with Pseudo-Boolean Constraints 2. A Knowledge


slide-1
SLIDE 1

Pseudo-Boolean Constraints: Reasoning and Compilation

Romain Wallon (Advisors: Daniel Le Berre, Pierre Marquis, Stefan Mengel) September 11, 2017

CRIL - U. Artois & CNRS

slide-2
SLIDE 2

Overview

  • 1. Reasoning with Pseudo-Boolean Constraints
  • 2. A Knowledge Compilation Map
  • 3. Properties of pseudo-Boolean constraints
  • 4. PBC and CARD as compilation languages
  • 5. What’s next?
  • 6. Conclusion

1 / 37

slide-3
SLIDE 3

Reasoning with Pseudo-Boolean Constraints

slide-4
SLIDE 4

The usual resolution approach...

SAT solvers deal with information represented as propositional formulae, in conjunctive normal form (CNF)

2 / 37

slide-5
SLIDE 5

The usual resolution approach...

SAT solvers deal with information represented as propositional formulae, in conjunctive normal form (CNF) pa _ b _ cq ^ pa _ b _ dq

2 / 37

slide-6
SLIDE 6

The usual resolution approach...

SAT solvers deal with information represented as propositional formulae, in conjunctive normal form (CNF) pa _ b _ cq ^ pa _ b _ dq To reason on such formulae, the resolution proof system can be used

x _ φ x _ ψ (resolution) φ _ ψ l _ l _ φ (fusion) l _ φ

2 / 37

slide-7
SLIDE 7

The usual resolution approach...

SAT solvers deal with information represented as propositional formulae, in conjunctive normal form (CNF) pa _ b _ cq ^ pa _ b _ dq To reason on such formulae, the resolution proof system can be used

x _ φ x _ ψ (resolution) φ _ ψ l _ l _ φ (fusion) l _ φ

When the formula is UNSAT, this proof system is used to find a proof of K

2 / 37

slide-8
SLIDE 8

...is not efficient on some problems!

Definition (Pigeon-Hole Principle – PHP) You cannot put p pigeons in p ´ 1 holes!

3 / 37

slide-9
SLIDE 9

...is not efficient on some problems!

Definition (Pigeon-Hole Principle – PHP) You cannot put p pigeons in p ´ 1 holes! Example Let us consider:

  • p pigeons and h holes
  • xi,j meaning that pigeon i is put in hole j

3 / 37

slide-10
SLIDE 10

...is not efficient on some problems!

Definition (Pigeon-Hole Principle – PHP) You cannot put p pigeons in p ´ 1 holes! Example Let us consider:

  • p pigeons and h holes
  • xi,j meaning that pigeon i is put in hole j

The encoding is based on the following assertions: Each pigeon is assigned at least one hole and Each hole contains at most one pigeon

3 / 37

slide-11
SLIDE 11

...is not efficient on some problems!

Definition (Pigeon-Hole Principle – PHP) You cannot put p pigeons in p ´ 1 holes! Example Let us consider:

  • p pigeons and h holes
  • xi,j meaning that pigeon i is put in hole j

A CNF encoding is:

p

ľ

i“1 h

ł

j“1

xi,j ^

p´1

ľ

i“1 p

ľ

j“i`1 h

ľ

k“1

pxi,k _ xj,kq

3 / 37

slide-12
SLIDE 12

...is not efficient on some problems!

Definition (Pigeon-Hole Principle – PHP) You cannot put p pigeons in p ´ 1 holes! Example Let us consider:

  • p pigeons and h holes
  • xi,j meaning that pigeon i is put in hole j

A CNF encoding is:

p

ľ

i“1 h

ł

j“1

xi,j ^

p´1

ľ

i“1 p

ľ

j“i`1 h

ľ

k“1

pxi,k _ xj,kq When h ă p, an exponential number of resolution steps is required to prove unsatisfiability

3 / 37

slide-13
SLIDE 13

Linear Pseudo-Boolean Constraints

4 / 37

slide-14
SLIDE 14

Linear Pseudo-Boolean Constraints

A linear pseudo-Boolean constraint is of the form: ÿ

j

ajlj ⊲ k where:

  • @j, aj P Z
  • @j, lj is a literal (i.e. a boolean value)
  • ⊲ P tă, ď, “, ě, ąu
  • k P Z is the degree (threshold) of the constraint

4 / 37

slide-15
SLIDE 15

PBC and CARD

We focus on two kinds of constraints

5 / 37

slide-16
SLIDE 16

PBC and CARD

We focus on two kinds of constraints Normalized pseudo-Boolean constraints are of the form: ř

j

ajlj ě k @j, aj P N, k P N

5 / 37

slide-17
SLIDE 17

PBC and CARD

We focus on two kinds of constraints Normalized pseudo-Boolean constraints are of the form: ř

j

ajlj ě k @j, aj P N, k P N Cardinality constraints are of the form: ř

j

lj ě k k P N

5 / 37

slide-18
SLIDE 18

PBC and CARD

We focus on two kinds of constraints Normalized pseudo-Boolean constraints are of the form: ř

j

ajlj ě k @j, aj P N, k P N Cardinality constraints are of the form: ř

j

lj ě k k P N A formula of PBC (resp. CARD) is a conjunction of normalized constraints (resp. cardinality constraints)

5 / 37

slide-19
SLIDE 19

Generalized Resolution

The proof system used to reason on PBC and CARD formulas is the generalized resolution proof system, which is more powerful than the resolution one [Hooker, 1988]

αl ` ř

j

ajlj ě k βl ` ř

j

bjlj ě k1 α P N˚ β P N˚ (cancellation) ř

j

pβaj ` αbjqlj ě αk1 ` βk ´ αβ

ř

j

ajlj ě k @j, aj ě 0 ai ą k (saturation) kli ` ř

j‰i

ajlj ě k 6 / 37

slide-20
SLIDE 20

Is it worth the effort?

The PBC encoding of PHP is:

p

ľ

i“1

atLeastptxi,1, . . . , xi,hu, 1q ^

h

ľ

i“1

atMostptx1,j, . . . , xp,ju, 1q

7 / 37

slide-21
SLIDE 21

Is it worth the effort?

The PBC encoding of PHP is:

p

ľ

i“1

atLeastptxi,1, . . . , xi,hu, 1q ^

h

ľ

i“1

atLeastptx1,j, . . . , xp,ju, p-1q

7 / 37

slide-22
SLIDE 22

Is it worth the effort?

The PBC encoding of PHP is:

p

ľ

i“1

˜

h

ÿ

j“1

xi,j ě 1 ¸ ^

h

ľ

j“1

˜

p

ÿ

i“1

xi,j ě p ´ 1 ¸

7 / 37

slide-23
SLIDE 23

Is it worth the effort?

The PBC encoding of PHP is:

p

ľ

i“1

˜

h

ÿ

j“1

xi,j ě 1 ¸ ^

h

ľ

j“1

˜

p

ÿ

i“1

xi,j ě p ´ 1 ¸ By using this encoding, one can solve a PHP instance in a linear number

  • f steps [Haken, 1985 & Hooker, 1988]

7 / 37

slide-24
SLIDE 24

From CARD to CNF

Let us consider the following cardinality constraint: a ` b ` c ` d ` e ě 3

8 / 37

slide-25
SLIDE 25

From CARD to CNF

Let us consider the following cardinality constraint: a ` b ` c ` d ` e ě 3 Its CNF encoding is given below: pa _ b _ cq ^ pa _ b _ dq ^ pa _ b _ eq ^ pa _ c _ dq ^ pa _ c _ eq ^pa _ d _ eq ^ pb _ c _ dq ^ pb _ c _ eq ^ pb _ d _ eq ^ pc _ d _ eq

8 / 37

slide-26
SLIDE 26

From CARD to CNF

Let us consider the following cardinality constraint: a ` b ` c ` d ` e ě 3 Its CNF encoding is given below: pa _ b _ cq ^ pa _ b _ dq ^ pa _ b _ eq ^ pa _ c _ dq ^ pa _ c _ eq ^pa _ d _ eq ^ pb _ c _ dq ^ pb _ c _ eq ^ pb _ d _ eq ^ pc _ d _ eq This CNF encoding is the smallest which does not require to introduce new variables [Dixon, 2004]

8 / 37

slide-27
SLIDE 27

Representing knowledge using PBC and CARD

Let us recap what we have seen

  • pseudo-Boolean constraints enable to improve reasoning efficiency in

some cases

  • representing a problem in this language requires less space than CNF

9 / 37

slide-28
SLIDE 28

Representing knowledge using PBC and CARD

Let us recap what we have seen

  • pseudo-Boolean constraints enable to improve reasoning efficiency in

some cases

  • representing a problem in this language requires less space than CNF

With PBC or CARD, modeling problems is also more natural: subset-sum and knapsack require two normalized pseudo-Boolean constraints to be modeled

9 / 37

slide-29
SLIDE 29

Representing knowledge using PBC and CARD

Let us recap what we have seen

  • pseudo-Boolean constraints enable to improve reasoning efficiency in

some cases

  • representing a problem in this language requires less space than CNF

With PBC or CARD, modeling problems is also more natural: subset-sum and knapsack require two normalized pseudo-Boolean constraints to be modeled Let us consider PBC and CARD as knowledge representation languages

9 / 37

slide-30
SLIDE 30

A Knowledge Compilation Map

slide-31
SLIDE 31

Knowledge compilation

Given a formula written in a specific language (e.g. CNF, DNF, etc.),

  • ne would like to perform operations on it

But sometimes they are too expensive to be performed

10 / 37

slide-32
SLIDE 32

Knowledge compilation

Given a formula written in a specific language (e.g. CNF, DNF, etc.),

  • ne would like to perform operations on it

But sometimes they are too expensive to be performed Compiling a formula is translating it into an other language to obtain an equivalent formula on which performing the wanted operations is easier

10 / 37

slide-33
SLIDE 33

Some compilation languages: NNF

A circuit in Negative Normal Form is a DAG like this one: _ _ ^ t x _ y z

11 / 37

slide-34
SLIDE 34

Some compilation languages: OBDDă

Let us consider φ “ x _ py ^ xq _ pz ^ xq _ t

12 / 37

slide-35
SLIDE 35

Some compilation languages: OBDDă

Let us consider φ “ x _ py ^ xq _ pz ^ xq _ t Given the order over the variables y ă x ă t ă z,

12 / 37

slide-36
SLIDE 36

Some compilation languages: OBDDă

Let us consider φ “ x _ py ^ xq _ pz ^ xq _ t Given the order over the variables y ă x ă t ă z, the Ordered Binary Decision Diagram representing φ, written OBDDăpφq, is: y x t 1 1 1 1

12 / 37

slide-37
SLIDE 37

Some compilation languages: IP, PI et MODS

Let us consider φ “ x _ py ^ xq _ pz ^ xq _ t

13 / 37

slide-38
SLIDE 38

Some compilation languages: IP, PI et MODS

Let us consider φ “ x _ py ^ xq _ pz ^ xq _ t IPpφq “ pxq _ ptq

13 / 37

slide-39
SLIDE 39

Some compilation languages: IP, PI et MODS

Let us consider φ “ x _ py ^ xq _ pz ^ xq _ t IPpφq “ pxq _ ptq PIpφq “ x _ t

13 / 37

slide-40
SLIDE 40

Some compilation languages: IP, PI et MODS

Let us consider φ “ x _ py ^ xq _ pz ^ xq _ t IPpφq “ pxq _ ptq PIpφq “ x _ t MODSpφq “ px ^ y ^ z ^ tq _ px ^ y ^ z ^ tq _ px ^ y ^ z ^ tq _ px ^ y ^ z ^ tq _ px ^ y ^ z ^ tq _ px ^ y ^ z ^ tq _ px ^ y ^ z ^ tq _ px ^ y ^ z ^ tq _ px ^ y ^ z ^ tq _ px ^ y ^ z ^ tq _ px ^ y ^ z ^ tq _ px ^ y ^ z ^ tq

13 / 37

slide-41
SLIDE 41

A map to compare them all

To compare all these languages, Adnan Darwiche and Pierre Marquis proposed in 2002 a knowledge compilation map [DM02]

14 / 37

slide-42
SLIDE 42

A map to compare them all

To compare all these languages, Adnan Darwiche and Pierre Marquis proposed in 2002 a knowledge compilation map [DM02] Three criteria are taken into account to identify which language is the best to use w.r.t. the wanted operations

14 / 37

slide-43
SLIDE 43

A map to compare them all

To compare all these languages, Adnan Darwiche and Pierre Marquis proposed in 2002 a knowledge compilation map [DM02] Three criteria are taken into account to identify which language is the best to use w.r.t. the wanted operations

  • succinctness

14 / 37

slide-44
SLIDE 44

A map to compare them all

To compare all these languages, Adnan Darwiche and Pierre Marquis proposed in 2002 a knowledge compilation map [DM02] Three criteria are taken into account to identify which language is the best to use w.r.t. the wanted operations

  • succinctness
  • queries

14 / 37

slide-45
SLIDE 45

A map to compare them all

To compare all these languages, Adnan Darwiche and Pierre Marquis proposed in 2002 a knowledge compilation map [DM02] Three criteria are taken into account to identify which language is the best to use w.r.t. the wanted operations

  • succinctness
  • queries
  • transformations

14 / 37

slide-46
SLIDE 46

Succinctness [DM02]

Succinctness captures the ability of a language to represent information using little space

15 / 37

slide-47
SLIDE 47

Succinctness [DM02]

Succinctness captures the ability of a language to represent information using little space L1 is at least as succinct as L2, denoted L1 ď L2, iff there exists a polynomial p such that for every formula α P L2, there exists an equivalent formula β where |β| ď pp|α|q

15 / 37

slide-48
SLIDE 48

Succinctness [DM02]

Succinctness captures the ability of a language to represent information using little space L1 is at least as succinct as L2, denoted L1 ď L2, iff there exists a polynomial p such that for every formula α P L2, there exists an equivalent formula β where |β| ď pp|α|q In other words, L1 ď L2 iff any formula α P L2 can be written as a formula β P L1 of polynomial size

15 / 37

slide-49
SLIDE 49

Succinctness [DM02]

Succinctness captures the ability of a language to represent information using little space L1 is at least as succinct as L2, denoted L1 ď L2, iff there exists a polynomial p such that for every formula α P L2, there exists an equivalent formula β where |β| ď pp|α|q In other words, L1 ď L2 iff any formula α P L2 can be written as a formula β P L1 of polynomial size Note that there is no hypothesis on the time complexity of the algorithm needed to translate a formula from L2 to L1

15 / 37

slide-50
SLIDE 50

Results from the KC map (succinctness)

Results from [DM02], [Bova-Capelli-Mengel-Slivovsky, 2016] and [Kaleyski, 2017]

NNF DNNF d ´ DNNF sd ´ DNNF FBDD OBDD OBDDă DNF CNF PI IP MODS NNF ď ď ď ď ď ď ď ď ď ď ď ď DNNF ę ď ď ď ď ď ď ď ę ę ď ď d ´ DNNF ę ę ď ď ď ď ď ę˚ ę ę ? ď sd ´ DNNF ę ę ď ď ď ď ď ę ę ę ę ď FBDD ę ę ę ę ď ď ď ę ę ę ę ď OBDD ę ę ę ę ę ď ď ę ę ę ę ď OBDDă ę ę ę ę ę ę ď ę ę ę ę ď DNF ę ę ę ę ę ę ę ď ę ę ď ď CNF ę ę ę ę ę ę ę ę ď ď ę ď PI ę ę ę ę ę ę ę ę ę ď ę ę p?q IP ę ę ę ę ę ę ę ę ę ę ď ď MODS ę ę ę ę ę ę ę ę ę ę ę ď

16 / 37

slide-51
SLIDE 51

Queries [DM02]

Given one or several formulas, what are the properties of these formulas?

17 / 37

slide-52
SLIDE 52

Queries [DM02]

Given one or several formulas, what are the properties of these formulas? CO (COnsistency) Is a formula consistent? VA (VAlidity) Is a formula valid? CE (Clausal Entailment) Is a given clause implied by a formula? IM (IMplication) Is a formula implied by a given cube/term? EQ (EQuivalence) Are two formulas equivalent? SE (Sentential Entailment) Is a formula entailed by an other one?

17 / 37

slide-53
SLIDE 53

Queries [DM02]

Given one or several formulas, what are the properties of these formulas? CO (COnsistency) Is a formula consistent? VA (VAlidity) Is a formula valid? CE (Clausal Entailment) Is a given clause implied by a formula? IM (IMplication) Is a formula implied by a given cube/term? EQ (EQuivalence) Are two formulas equivalent? SE (Sentential Entailment) Is a formula entailed by an other one? CT (CounTing) How many models does a formula have?

17 / 37

slide-54
SLIDE 54

Queries [DM02]

Given one or several formulas, what are the properties of these formulas? CO (COnsistency) Is a formula consistent? VA (VAlidity) Is a formula valid? CE (Clausal Entailment) Is a given clause implied by a formula? IM (IMplication) Is a formula implied by a given cube/term? EQ (EQuivalence) Are two formulas equivalent? SE (Sentential Entailment) Is a formula entailed by an other one? CT (CounTing) How many models does a formula have? ME (Model Enumeration) What are all the models of a formula?

17 / 37

slide-55
SLIDE 55

Results from the KC map (queries) [DM02]

L CO VA CE IM EQ SE CT ME NNF ˝ ˝ ˝ ˝ ˝ ˝ ˝ ˝ DNNF

  • ˝
  • ˝

˝ ˝ ˝

  • d ´ DNNF
  • ?

˝

  • sd ´ DNNF
  • ?

˝

  • BDD

˝ ˝ ˝ ˝ ˝ ˝ ˝ ˝ FBDD

  • ?

˝

  • OBDD
  • ˝
  • OBDDă
  • DNF
  • ˝
  • ˝

˝ ˝ ˝

  • CNF

˝

  • ˝
  • ˝

˝ ˝ ˝ PI

  • ˝
  • IP
  • ˝
  • MODS
  • Verified

˝ Not verified (unless P “ NP)

18 / 37

slide-56
SLIDE 56

Transformations [DM02]

Given one or several formulas, transform them into a formula equivalent in the considered language to the application of a logical operator

19 / 37

slide-57
SLIDE 57

Transformations [DM02]

Given one or several formulas, transform them into a formula equivalent in the considered language to the application of a logical operator CD (ConDitioning) Compute φ|τ where τ is a consistent cube/term SFO (Singleton FOrgetting) Compute Dx.φ ” pφ|xq _ pφ|xq FO (FOrgetting) Compute DX.φ where X is a set of variables ^C (Closure under ^) Compute Źn

i“1 φi

^BC (Bounded Closure under ^) Compute Źn

i“1 φi, where n ď N

_C (Closure under _) Compute Žn

i“1 φi

_BC (Bounded Closure under _) Compute Žn

i“1 φi, where n ď N

C (Closure under ) Compute φ

19 / 37

slide-58
SLIDE 58

Results from the KC map (transformations) [DM02]

L CD FO SFO ^C ^BC _C _BC C NNF

  • ˝
  • DNNF
  • ˝

˝

  • ˝

d ´ DNNF

  • ˝

˝ ˝ ˝ ˝ ˝ ? sd ´ DNNF

  • ˝

˝ ˝ ˝ ˝ ˝ ? BDD

  • ˝
  • FBDD
  • ˝
  • ˝
  • ˝
  • OBDD
  • ˝
  • ˝
  • OBDDă
  • DNF
  • CNF
  • ˝
  • PI
  • IP
  • MODS
  • Verified

˝ Not verified (unless P “ NP)

  • Not verified

20 / 37

slide-59
SLIDE 59

Properties of pseudo-Boolean constraints

slide-60
SLIDE 60

Some interesting (but hard) problems on a single constraint

CO VA CE IM EQ SE CT ME 1-CARD ? ? ? ? ? ? ? ? 1-PBC ? ? ? ? ? ? ? ?

21 / 37

slide-61
SLIDE 61

Some interesting (but hard) problems on a single constraint

CO VA CE IM EQ SE CT ME 1-CARD ? ? ? ? ? ? ? ? 1-PBC ? ? ? ? ? ? ? ? Increasible degree: 9w ` 6x ` 3y ` z ě 11

21 / 37

slide-62
SLIDE 62

Some interesting (but hard) problems on a single constraint

CO VA CE IM EQ SE CT ME 1-CARD ? ? ? ? ? ? ? ? 1-PBC ? ? ? ? ? ? ? ? Increasible degree: 9w ` 6x ` 3y ` z ě 11

21 / 37

slide-63
SLIDE 63

Some interesting (but hard) problems on a single constraint

CO VA CE IM EQ SE CT ME 1-CARD ? ? ? ? ? ? ? ? 1-PBC ? ? ? ? ? ? ? ? Increasible degree: 9w ` 6x ` 3y ` z ě 11 ” 9w ` 6x ` 3y ` z ě 12

21 / 37

slide-64
SLIDE 64

Some interesting (but hard) problems on a single constraint

CO VA CE IM EQ SE CT ME 1-CARD ? ? ? ? ? ? ? ? 1-PBC ? ? ? ? ? ? ? ? Increasible degree: (coNP-hard: reduction from subset-sum) 9w ` 6x ` 3y ` z ě 11 ” 9w ` 6x ` 3y ` z ě 12

21 / 37

slide-65
SLIDE 65

Some interesting (but hard) problems on a single constraint

CO VA CE IM EQ SE CT ME 1-CARD ? ? ? ? ? ? ? ? 1-PBC ? ? ? ? ? ? ? ? Increasible degree: (coNP-hard: reduction from subset-sum) 9w ` 6x ` 3y ` z ě 11 ” 9w ` 6x ` 3y ` z ě 12 Dependency on a variable: 9w ` 6x ` 3y ` z ě 11

21 / 37

slide-66
SLIDE 66

Some interesting (but hard) problems on a single constraint

CO VA CE IM EQ SE CT ME 1-CARD ? ? ? ? ? ? ? ? 1-PBC ? ? ? ? ? ? ? ? Increasible degree: (coNP-hard: reduction from subset-sum) 9w ` 6x ` 3y ` z ě 11 ” 9w ` 6x ` 3y ` z ě 12 Dependency on a variable: 9w ` 6x ` 3y ` z ě 11

21 / 37

slide-67
SLIDE 67

Some interesting (but hard) problems on a single constraint

CO VA CE IM EQ SE CT ME 1-CARD ? ? ? ? ? ? ? ? 1-PBC ? ? ? ? ? ? ? ? Increasible degree: (coNP-hard: reduction from subset-sum) 9w ` 6x ` 3y ` z ě 11 ” 9w ` 6x ` 3y ` z ě 12 Dependency on a variable: 9w ` 6x ` 3y ` z ě 11 ” 9w ` 6x ` 3y ě 11

21 / 37

slide-68
SLIDE 68

Some interesting (but hard) problems on a single constraint

CO VA CE IM EQ SE CT ME 1-CARD ? ? ? ? ? ? ? ? 1-PBC ? ? ? ? ? ? ? ? Increasible degree: (coNP-hard: reduction from subset-sum) 9w ` 6x ` 3y ` z ě 11 ” 9w ` 6x ` 3y ` z ě 12 Dependency on a variable: (NP-hard: reduction from increasible degree) 9w ` 6x ` 3y ` z ě 11 ” 9w ` 6x ` 3y ě 11

21 / 37

slide-69
SLIDE 69

Querying a single pseudo-Boolean constraint

CO VA CE IM EQ SE CT ME 1-CARD ? ? ? ? ? ? ? ? 1-PBC ? ? ? ? ? ? ? ?

22 / 37

slide-70
SLIDE 70

Querying a single pseudo-Boolean constraint

CO VA CE IM EQ SE CT ME 1-CARD

  • ?

? ? ? ? ? ? 1-PBC

  • ?

? ? ? ? ? ? Consistency can be checked by summing the weights 3a ` 2b ` c ě 3 3a ` 2b ` c ě 7

22 / 37

slide-71
SLIDE 71

Querying a single pseudo-Boolean constraint

CO VA CE IM EQ SE CT ME 1-CARD

  • ?

? ? ? ? ? ? 1-PBC

  • ?

? ? ? ? ? ? Consistency can be checked by summing the weights 3a ` 2b ` c ě 3 ✓ 3a ` 2b ` c ě 7

22 / 37

slide-72
SLIDE 72

Querying a single pseudo-Boolean constraint

CO VA CE IM EQ SE CT ME 1-CARD

  • ?

? ? ? ? ? ? 1-PBC

  • ?

? ? ? ? ? ? Consistency can be checked by summing the weights 3a ` 2b ` c ě 3 ✓ 3a ` 2b ` c ě 7 ✗

22 / 37

slide-73
SLIDE 73

Querying a single pseudo-Boolean constraint

CO VA CE IM EQ SE CT ME 1-CARD

  • ?

? ? ? ? ? 1-PBC

  • ?

? ? ? ? ? Consistency can be checked by summing the weights 3a ` 2b ` c ě 3 ✓ 3a ` 2b ` c ě 7 ✗ A normalized pseudo-Boolean constraint is valid iff its degree is 0

22 / 37

slide-74
SLIDE 74

Querying a single pseudo-Boolean constraint

CO VA CE IM EQ SE CT ME 1-CARD

  • ?

? ?

  • 1-PBC
  • ?

? ?

  • Consistency can be checked by summing the weights

3a ` 2b ` c ě 3 ✓ 3a ` 2b ` c ě 7 ✗ A normalized pseudo-Boolean constraint is valid iff its degree is 0 Properties of pseudo-Boolean constraints give these results

22 / 37

slide-75
SLIDE 75

Querying a single pseudo-Boolean constraint

CO VA CE IM EQ SE CT ME 1-CARD

  • ?
  • ?
  • 1-PBC
  • ?

? ?

  • Consistency can be checked by summing the weights

3a ` 2b ` c ě 3 ✓ 3a ` 2b ` c ě 7 ✗ A normalized pseudo-Boolean constraint is valid iff its degree is 0 Properties of pseudo-Boolean constraints give these results ř

lPL l ě k |

ù ř

l1PL1 l1 ě k1 iff k1 ď 0 or |LzL1| ď k ´ k1 22 / 37

slide-76
SLIDE 76

Querying a single pseudo-Boolean constraint

CO VA CE IM EQ SE CT ME 1-CARD

  • ?
  • 1-PBC
  • ?

? ?

  • Consistency can be checked by summing the weights

3a ` 2b ` c ě 3 ✓ 3a ` 2b ` c ě 7 ✗ A normalized pseudo-Boolean constraint is valid iff its degree is 0 Properties of pseudo-Boolean constraints give these results ř

lPL l ě k |

ù ř

l1PL1 l1 ě k1 iff k1 ď 0 or |LzL1| ď k ´ k1 22 / 37

slide-77
SLIDE 77

Querying a single pseudo-Boolean constraint

CO VA CE IM EQ SE CT ME 1-CARD

  • ?
  • 1-PBC
  • ˝

? ?

  • Consistency can be checked by summing the weights

3a ` 2b ` c ě 3 ✓ 3a ` 2b ` c ě 7 ✗ A normalized pseudo-Boolean constraint is valid iff its degree is 0 Properties of pseudo-Boolean constraints give these results ř

lPL l ě k |

ù ř

l1PL1 l1 ě k1 iff k1 ď 0 or |LzL1| ď k ´ k1

Reduction from increasible degree

22 / 37

slide-78
SLIDE 78

Querying a single pseudo-Boolean constraint

CO VA CE IM EQ SE CT ME 1-CARD

  • ?
  • 1-PBC
  • ˝

˝ ?

  • Consistency can be checked by summing the weights

3a ` 2b ` c ě 3 ✓ 3a ` 2b ` c ě 7 ✗ A normalized pseudo-Boolean constraint is valid iff its degree is 0 Properties of pseudo-Boolean constraints give these results ř

lPL l ě k |

ù ř

l1PL1 l1 ě k1 iff k1 ď 0 or |LzL1| ď k ´ k1

Reduction from increasible degree

22 / 37

slide-79
SLIDE 79

Querying a single pseudo-Boolean constraint

CO VA CE IM EQ SE CT ME 1-CARD

  • 1-PBC
  • ˝

˝ ?

  • Consistency can be checked by summing the weights

3a ` 2b ` c ě 3 ✓ 3a ` 2b ` c ě 7 ✗ A normalized pseudo-Boolean constraint is valid iff its degree is 0 Properties of pseudo-Boolean constraints give these results ř

lPL l ě k |

ù ř

l1PL1 l1 ě k1 iff k1 ď 0 or |LzL1| ď k ´ k1

Reduction from increasible degree There are řn

j“k

`n

j

˘ models of a cardinality constraint řn

i“1 lj ě n 22 / 37

slide-80
SLIDE 80

Querying a single pseudo-Boolean constraint

CO VA CE IM EQ SE CT ME 1-CARD

  • 1-PBC
  • ˝

˝ ˝

  • Consistency can be checked by summing the weights

3a ` 2b ` c ě 3 ✓ 3a ` 2b ` c ě 7 ✗ A normalized pseudo-Boolean constraint is valid iff its degree is 0 Properties of pseudo-Boolean constraints give these results ř

lPL l ě k |

ù ř

l1PL1 l1 ě k1 iff k1 ď 0 or |LzL1| ď k ´ k1

Reduction from increasible degree There are řn

j“k

`n

j

˘ models of a cardinality constraint řn

i“1 lj ě n

Reduction from subset-sum

22 / 37

slide-81
SLIDE 81

Transforming a single pseudo-Boolean constraint

CD FO SFO ^C ^BC _C _BC C 1-CARD ? ? ? ? ? ? ? ? 1-PBC ? ? ? ? ? ? ? ?

23 / 37

slide-82
SLIDE 82

Transforming a single pseudo-Boolean constraint

CD FO SFO ^C ^BC _C _BC C 1-CARD

  • ?

? ? ? ? ? ? 1-PBC

  • ?

? ? ? ? ? ? Conditioning is just replacing a variable by 0 or 1

23 / 37

slide-83
SLIDE 83

Transforming a single pseudo-Boolean constraint

CD FO SFO ^C ^BC _C _BC C 1-CARD

  • ?
  • ?

? ? ? ? 1-PBC

  • ?
  • ?

? ? ? ? Conditioning is just replacing a variable by 0 or 1 Forgetting one variable can be computed in polytime: Dx. ˜ ax `

n

ÿ

j“0

ajlj ě k ¸ ” ˜

n

ÿ

j“0

ajlj ě k ´ a ¸ _ ˜

n

ÿ

j“0

ajlj ě k ¸

23 / 37

slide-84
SLIDE 84

Transforming a single pseudo-Boolean constraint

CD FO SFO ^C ^BC _C _BC C 1-CARD

  • ?
  • ?

? ? ? ? 1-PBC

  • ?
  • ?

? ? ? ? Conditioning is just replacing a variable by 0 or 1 Forgetting one variable can be computed in polytime: Dx. ˜ ax `

n

ÿ

j“0

ajlj ě k ¸ ” ˜

n

ÿ

j“0

ajlj ě k ´ a ¸

23 / 37

slide-85
SLIDE 85

Transforming a single pseudo-Boolean constraint

CD FO SFO ^C ^BC _C _BC C 1-CARD

  • ?

? ? ? ? 1-PBC

  • ?

? ? ? ? Conditioning is just replacing a variable by 0 or 1 Forgetting one variable can be computed in polytime: Dx. ˜ ax `

n

ÿ

j“0

ajlj ě k ¸ ” ˜

n

ÿ

j“0

ajlj ě k ´ a ¸

23 / 37

slide-86
SLIDE 86

Transforming a single pseudo-Boolean constraint

CD FO SFO ^C ^BC _C _BC C 1-CARD

  • ?

? ? ?

  • 1-PBC
  • ?

? ? ?

  • Conditioning is just replacing a variable by 0 or 1

Forgetting one variable can be computed in polytime: Dx. ˜ ax `

n

ÿ

j“0

ajlj ě k ¸ ” ˜

n

ÿ

j“0

ajlj ě k ´ a ¸ Negation is computable in polytime: ´ řn

j“1 ajlj ě n

¯ ” řn

j“1 ajlj ă n 23 / 37

slide-87
SLIDE 87

Transforming a single pseudo-Boolean constraint

CD FO SFO ^C ^BC _C _BC C 1-CARD

  • 1-PBC
  • Conditioning is just replacing a variable by 0 or 1

Forgetting one variable can be computed in polytime: Dx. ˜ ax `

n

ÿ

j“0

ajlj ě k ¸ ” ˜

n

ÿ

j“0

ajlj ě k ´ a ¸ Negation is computable in polytime: ´ řn

j“1 ajlj ě n

¯ ” řn

j“1 ajlj ă n

Conjunctions and disjunctions are not computable in general since both languages are not expressive enough

23 / 37

slide-88
SLIDE 88

One constraint is not enough

In general, a propositional formula may require more than a single pseudo-Boolean constraint to be expressed

24 / 37

slide-89
SLIDE 89

One constraint is not enough

In general, a propositional formula may require more than a single pseudo-Boolean constraint to be expressed φ “ x ‘ y

24 / 37

slide-90
SLIDE 90

One constraint is not enough

In general, a propositional formula may require more than a single pseudo-Boolean constraint to be expressed φ “ x ‘ y We need to use a conjunction of a set of constraints: PBC or CARD

24 / 37

slide-91
SLIDE 91

PBC and CARD as compilation languages

slide-92
SLIDE 92

Succinctness of PBC and CARD

25 / 37

slide-93
SLIDE 93

Succinctness of PBC and CARD

CARD ę PBC because translating κ “ kx ` ř2k

j“1 xj ě k into CARD

requires clauses, and there is an exponential number of them

25 / 37

slide-94
SLIDE 94

Succinctness of PBC and CARD

CARD ę PBC because translating κ “ kx ` ř2k

j“1 xj ě k into CARD

requires clauses, and there is an exponential number of them ľ

IĂ1..2k |I|“k`1

´ x _ ł

iPI

xi ¯

25 / 37

slide-95
SLIDE 95

Succinctness of PBC and CARD

NNF ď PBC because a formula from PBC can be seen as an arithmetic circuit, and such a circuit can be translated into a polysize NNF circuit [Vollmer, 1999]

25 / 37

slide-96
SLIDE 96

Succinctness of PBC and CARD

NNF ď PBC because a formula from PBC can be seen as an arithmetic circuit, and such a circuit can be translated into a polysize NNF circuit [Vollmer, 1999] a1 ˆ l1 ` . . . an ˆ ln ě k

25 / 37

slide-97
SLIDE 97

Succinctness of PBC and CARD

PBC ę IP because Žn

i“1pxi ^ yiq requires an exponential number of

constraints to be expressed

25 / 37

slide-98
SLIDE 98

Succinctness of PBC and CARD

PBC ę OBDDă because parity function can only be represented in PBC with clauses

25 / 37

slide-99
SLIDE 99

Succinctness of PBC and CARD

PBC ę OBDDă because parity function can only be represented in PBC with clauses φ “ x ‘ y ‘ z

25 / 37

slide-100
SLIDE 100

Succinctness of PBC and CARD

PBC ę OBDDă because parity function can only be represented in PBC with clauses φ “ x ‘ y ‘ z ” px _ y _ zq ^ px _ y _ zq ^ px _ y _ zq ^ px _ y _ zq

25 / 37

slide-101
SLIDE 101

Succinctness of PBC and CARD

PBC ę OBDDă because parity function can only be represented in PBC with clauses φ “ x ‘ y ‘ z ” px _ y _ zq ^ px _ y _ zq ^ px _ y _ zq ^ px _ y _ zq x

25 / 37

slide-102
SLIDE 102

Succinctness of PBC and CARD

PBC ę OBDDă because parity function can only be represented in PBC with clauses φ “ x ‘ y ‘ z ” px _ y _ zq ^ px _ y _ zq ^ px _ y _ zq ^ px _ y _ zq x y y 1

25 / 37

slide-103
SLIDE 103

Succinctness of PBC and CARD

PBC ę OBDDă because parity function can only be represented in PBC with clauses φ “ x ‘ y ‘ z ” px _ y _ zq ^ px _ y _ zq ^ px _ y _ zq ^ px _ y _ zq x y y z 1 1

25 / 37

slide-104
SLIDE 104

Succinctness of PBC and CARD

PBC ę OBDDă because parity function can only be represented in PBC with clauses φ “ x ‘ y ‘ z ” px _ y _ zq ^ px _ y _ zq ^ px _ y _ zq ^ px _ y _ zq z x y y z 1 1 1

25 / 37

slide-105
SLIDE 105

Succinctness of PBC and CARD

PBC ę OBDDă because parity function can only be represented in PBC with clauses φ “ x ‘ y ‘ z ” px _ y _ zq ^ px _ y _ zq ^ px _ y _ zq ^ px _ y _ zq z x y y z 1 1 1 1

25 / 37

slide-106
SLIDE 106

Succinctness of PBC and CARD

PBC ę OBDDă because parity function can only be represented in PBC with clauses φ “ x ‘ y ‘ z ” px _ y _ zq ^ px _ y _ zq ^ px _ y _ zq ^ px _ y _ zq z x 1 y y z 1 1 1 1 1

25 / 37

slide-107
SLIDE 107

Succinctness of PBC and CARD

CARD PBC NNF ? ? DNNF ? ? d ´ DNNF ? ? sd ´ DNNF ? ? FBDD ? ? OBDD ? ? OBDDă ? ? DNF ? ? CNF ? ? PI ? ? IP ? ? MODS ? ? CARD ě ě PBC ? ě CARD PBC NNF ? ? DNNF ? ? d ´ DNNF ? ? sd ´ DNNF ? ? FBDD ? ? OBDD ? ? OBDDă ? ? DNF ? ? CNF ? ? PI ? ? IP ? ? MODS ? ? CARD ď ? PBC ď ď ⊲ Proven ⊲ [Dixon, 2004] ⊲ Transitivity

26 / 37

slide-108
SLIDE 108

Succinctness of PBC and CARD

CARD PBC NNF ? ? DNNF ? ? d ´ DNNF ? ? sd ´ DNNF ? ? FBDD ? ? OBDD ? ? OBDDă ? ? DNF ? ? CNF ? ? PI ? ? IP ? ? MODS ? ? CARD ě ě PBC ğ ě CARD PBC NNF ? ? DNNF ? ? d ´ DNNF ? ? sd ´ DNNF ? ? FBDD ? ? OBDD ? ? OBDDă ? ? DNF ? ? CNF ? ? PI ? ? IP ? ? MODS ? ? CARD ď ę PBC ď ď ⊲ Proven ⊲ [Dixon, 2004] ⊲ Transitivity

26 / 37

slide-109
SLIDE 109

Succinctness of PBC and CARD

CARD PBC NNF ? ? DNNF ? ? d ´ DNNF ? ? sd ´ DNNF ? ? FBDD ? ? OBDD ? ? OBDDă ? ? DNF ? ? CNF ě ě PI ? ? IP ? ? MODS ? ? CARD ě ě PBC ğ ě CARD PBC NNF ? ? DNNF ? ? d ´ DNNF ? ? sd ´ DNNF ? ? FBDD ? ? OBDD ? ? OBDDă ? ? DNF ? ? CNF ? ? PI ? ? IP ? ? MODS ? ? CARD ď ę PBC ď ď ⊲ Proven ⊲ [Dixon, 2004] ⊲ Transitivity

26 / 37

slide-110
SLIDE 110

Succinctness of PBC and CARD

CARD PBC NNF ? ? DNNF ? ? d ´ DNNF ? ? sd ´ DNNF ? ? FBDD ? ? OBDD ? ? OBDDă ? ? DNF ? ? CNF ě ě PI ě ě IP ? ? MODS ě ě CARD ě ě PBC ğ ě CARD PBC NNF ? ? DNNF ? ? d ´ DNNF ? ? sd ´ DNNF ? ? FBDD ? ? OBDD ? ? OBDDă ? ? DNF ? ? CNF ? ? PI ? ? IP ? ? MODS ? ? CARD ď ę PBC ď ď ⊲ Proven ⊲ [Dixon, 2004] ⊲ Transitivity

26 / 37

slide-111
SLIDE 111

Succinctness of PBC and CARD

CARD PBC NNF ? ? DNNF ? ? d ´ DNNF ? ? sd ´ DNNF ? ? FBDD ? ? OBDD ? ? OBDDă ? ? DNF ? ? CNF ě ě PI ě ě IP ? ? MODS ě ě CARD ě ě PBC ğ ě CARD PBC NNF ? ? DNNF ? ? d ´ DNNF ? ? sd ´ DNNF ? ? FBDD ? ? OBDD ? ? OBDDă ? ? DNF ? ? CNF ę ę PI ? ? IP ? ? MODS ? ? CARD ď ę PBC ď ď ⊲ Proven ⊲ [Dixon, 2004] ⊲ Transitivity

26 / 37

slide-112
SLIDE 112

Succinctness of PBC and CARD

CARD PBC NNF ? ? DNNF ? ? d ´ DNNF ? ? sd ´ DNNF ? ? FBDD ? ? OBDD ? ? OBDDă ? ? DNF ? ? CNF ě ě PI ě ě IP ? ? MODS ě ě CARD ě ě PBC ğ ě CARD PBC NNF ? ? DNNF ę ę d ´ DNNF ę ę sd ´ DNNF ę ę FBDD ę ę OBDD ę ę OBDDă ę ę DNF ę ę CNF ę ę PI ę ę IP ę ę MODS ę ę CARD ď ę PBC ď ď ⊲ Proven ⊲ [Dixon, 2004] ⊲ Transitivity

26 / 37

slide-113
SLIDE 113

Succinctness of PBC and CARD

CARD PBC NNF ? ? DNNF ? ? d ´ DNNF ? ? sd ´ DNNF ? ? FBDD ? ? OBDD ? ? OBDDă ? ? DNF ? ? CNF ě ě PI ě ě IP ? ? MODS ě ě CARD ě ě PBC ğ ě CARD PBC NNF ď ď DNNF ę ę d ´ DNNF ę ę sd ´ DNNF ę ę FBDD ę ę OBDD ę ę OBDDă ę ę DNF ę ę CNF ę ę PI ę ę IP ę ę MODS ę ę CARD ď ę PBC ď ď ⊲ Proven ⊲ [Dixon, 2004] ⊲ Transitivity

26 / 37

slide-114
SLIDE 114

Succinctness of PBC and CARD

CARD PBC NNF ? ? DNNF ? ? d ´ DNNF ? ? sd ´ DNNF ? ? FBDD ? ? OBDD ? ? OBDDă ğ ğ DNF ? ? CNF ě ě PI ě ě IP ? ? MODS ě ě CARD ě ě PBC ğ ě CARD PBC NNF ď ď DNNF ę ę d ´ DNNF ę ę sd ´ DNNF ę ę FBDD ę ę OBDD ę ę OBDDă ę ę DNF ę ę CNF ę ę PI ę ę IP ę ę MODS ę ę CARD ď ę PBC ď ď ⊲ Proven ⊲ [Dixon, 2004] ⊲ Transitivity

26 / 37

slide-115
SLIDE 115

Succinctness of PBC and CARD

CARD PBC NNF ğ ğ DNNF ğ ğ d ´ DNNF ğ ğ sd ´ DNNF ğ ğ FBDD ğ ğ OBDD ğ ğ OBDDă ğ ğ DNF ? ? CNF ě ě PI ě ě IP ? ? MODS ě ě CARD ě ě PBC ğ ě CARD PBC NNF ď ď DNNF ę ę d ´ DNNF ę ę sd ´ DNNF ę ę FBDD ę ę OBDD ę ę OBDDă ę ę DNF ę ę CNF ę ę PI ę ę IP ę ę MODS ę ę CARD ď ę PBC ď ď ⊲ Proven ⊲ [Dixon, 2004] ⊲ Transitivity

26 / 37

slide-116
SLIDE 116

Succinctness of PBC and CARD

CARD PBC NNF ğ ğ DNNF ğ ğ d ´ DNNF ğ ğ sd ´ DNNF ğ ğ FBDD ğ ğ OBDD ğ ğ OBDDă ğ ğ DNF ? ? CNF ě ě PI ě ě IP ğ ğ MODS ě ě CARD ě ě PBC ğ ě CARD PBC NNF ď ď DNNF ę ę d ´ DNNF ę ę sd ´ DNNF ę ę FBDD ę ę OBDD ę ę OBDDă ę ę DNF ę ę CNF ę ę PI ę ę IP ę ę MODS ę ę CARD ď ę PBC ď ď ⊲ Proven ⊲ [Dixon, 2004] ⊲ Transitivity

26 / 37

slide-117
SLIDE 117

Succinctness of PBC and CARD

CARD PBC NNF ğ ğ DNNF ğ ğ d ´ DNNF ğ ğ sd ´ DNNF ğ ğ FBDD ğ ğ OBDD ğ ğ OBDDă ğ ğ DNF ğ ğ CNF ě ě PI ě ě IP ğ ğ MODS ě ě CARD ě ě PBC ğ ě CARD PBC NNF ď ď DNNF ę ę d ´ DNNF ę ę sd ´ DNNF ę ę FBDD ę ę OBDD ę ę OBDDă ę ę DNF ę ę CNF ę ę PI ę ę IP ę ę MODS ę ę CARD ď ę PBC ď ď ⊲ Proven ⊲ [Dixon, 2004] ⊲ Transitivity

26 / 37

slide-118
SLIDE 118

Querying a set of constraints

CO VA CE IM EQ SE CT ME CNF ˝

  • ˝
  • ˝

˝ ˝ ˝ CARD ? ? ? ? ? ? ? ? PBC ? ? ? ? ? ? ? ?

27 / 37

slide-119
SLIDE 119

Querying a set of constraints

CO VA CE IM EQ SE CT ME CNF ˝

  • ˝
  • ˝

˝ ˝ ˝ CARD ˝ ? ˝ ? ˝ ˝ ˝ ˝ PBC ˝ ? ˝ ? ˝ ˝ ˝ ˝ By functional reduction, NP-hard problems for CNF are NP-hard for CARD and PBC PBC CARD CNF

27 / 37

slide-120
SLIDE 120

Querying a set of constraints

CO VA CE IM EQ SE CT ME CNF ˝

  • ˝
  • ˝

˝ ˝ ˝ CARD ˝

  • ˝
  • ˝

˝ ˝ ˝ PBC ˝

  • ˝
  • ˝

˝ ˝ ˝ By functional reduction, NP-hard problems for CNF are NP-hard for CARD and PBC PBC CARD CNF Properties of pseudo-Boolean constraints give the other results

27 / 37

slide-121
SLIDE 121

Transforming a set of constraints

CD FO SFO ^C ^BC _C _BC C CNF

  • ˝
  • CARD

? ? ? ? ? ? ? ? PBC ? ? ? ? ? ? ? ?

28 / 37

slide-122
SLIDE 122

Transforming a set of constraints

CD FO SFO ^C ^BC _C _BC C CNF

  • ˝
  • CARD
  • ˝

?

  • ?

? ? ? PBC

  • ˝

?

  • ?

? ? ? Arguments for CNF can be applied to PBC and CARD

28 / 37

slide-123
SLIDE 123

Transforming a set of constraints

CD FO SFO ^C ^BC _C _BC C CNF

  • ˝
  • CARD
  • ˝

?

  • ?

? ? PBC

  • ˝

?

  • ?

? ? Arguments for CNF can be applied to PBC and CARD

28 / 37

slide-124
SLIDE 124

Transforming a set of constraints

CD FO SFO ^C ^BC _C _BC C CNF

  • ˝
  • CARD
  • ˝

?

  • ?
  • ?

PBC

  • ˝

?

  • ?
  • ?

Arguments for CNF can be applied to PBC and CARD ř2n

i“1 xi ‰ n can only be expressed with an exponential number of

clauses, and

2n

ÿ

i“1

xi ‰ n ” ˜ 2n ÿ

i“1

xi ă n ¸ _ ˜ 2n ÿ

i“1

xi ą n ¸

28 / 37

slide-125
SLIDE 125

Transforming a set of constraints

CD FO SFO ^C ^BC _C _BC C CNF

  • ˝
  • CARD
  • ˝

?

  • ?

PBC

  • ˝

?

  • ?

Arguments for CNF can be applied to PBC and CARD ř2n

i“1 xi ‰ n can only be expressed with an exponential number of

clauses, and

2n

ÿ

i“1

xi ‰ n ” ˜ 2n ÿ

i“1

xi ă n ¸ _ ˜ 2n ÿ

i“1

xi ą n ¸

28 / 37

slide-126
SLIDE 126

Transforming a set of constraints

CD FO SFO ^C ^BC _C _BC C CNF

  • ˝
  • CARD
  • ˝

?

  • PBC
  • ˝

?

  • Arguments for CNF can be applied to PBC and CARD

ř2n

i“1 xi ‰ n can only be expressed with an exponential number of

clauses, and

2n

ÿ

i“1

xi ‰ n ” ˜ 2n ÿ

i“1

xi ă n ¸ _ ˜ 2n ÿ

i“1

xi ą n ¸

28 / 37

slide-127
SLIDE 127

Transforming a set of constraints

CD FO SFO ^C ^BC _C _BC C CNF

  • ˝
  • CARD
  • ˝

?

  • PBC
  • ˝

?

  • Arguments for CNF can be applied to PBC and CARD

ř2n

i“1 xi ‰ n can only be expressed with an exponential number of

clauses, and

2n

ÿ

i“1

xi ‰ n ” ˜ 2n ÿ

i“1

xi ă n ¸ _ ˜ 2n ÿ

i“1

xi ą n ¸

28 / 37

slide-128
SLIDE 128

Recap of the results

Succinctness: PBC ă CARD ă CNF

29 / 37

slide-129
SLIDE 129

Recap of the results

Succinctness: PBC ă CARD ă CNF Queries: CO VA CE IM EQ SE CT ME CNF ˝

  • ˝
  • ˝

˝ ˝ ˝ CARD ˝

  • ˝
  • ˝

˝ ˝ ˝ PBC ˝

  • ˝
  • ˝

˝ ˝ ˝

29 / 37

slide-130
SLIDE 130

Recap of the results

Succinctness: PBC ă CARD ă CNF Queries: CO VA CE IM EQ SE CT ME CNF ˝

  • ˝
  • ˝

˝ ˝ ˝ CARD ˝

  • ˝
  • ˝

˝ ˝ ˝ PBC ˝

  • ˝
  • ˝

˝ ˝ ˝ Transformations: CD FO SFO ^C ^BC _C _BC C CNF

  • ˝
  • CARD
  • ˝

?

  • PBC
  • ˝

?

  • 29 / 37
slide-131
SLIDE 131

Recap of the results

Succinctness: PBC ă CARD ă CNF Queries: CO VA CE IM EQ SE CT ME CNF ˝

  • ˝
  • ˝

˝ ˝ ˝ CARD ˝

  • ˝
  • ˝

˝ ˝ ˝ PBC ˝

  • ˝
  • ˝

˝ ˝ ˝ Transformations: CD FO SFO ^C ^BC _C _BC C CNF

  • ˝
  • CARD
  • ˝

?

  • PBC
  • ˝

?

  • Compared to CNF, PBC and CARD are strictly more succinct, but the

same queries and less transformations can be computed in polytime

29 / 37

slide-132
SLIDE 132

What’s next?

slide-133
SLIDE 133

Open question: SFO?

Is there any polytime algorithm to compute the forgetting of a variable x in a PBC formula K?

30 / 37

slide-134
SLIDE 134

Open question: SFO?

Is there any polytime algorithm to compute the forgetting of a variable x in a PBC formula K? Dx.K ” pK|xq _ pK|xq

30 / 37

slide-135
SLIDE 135

Singleton Forgetting (SFO): an example

Let us consider:

  • κ1 “ x ` a ` b ě 2
  • κ2 “ x ` 2c ` 2d ě 3

31 / 37

slide-136
SLIDE 136

Singleton Forgetting (SFO): an example

Let us consider:

  • κ1 “ x ` a ` b ě 2
  • κ2 “ x ` 2c ` 2d ě 3

Then: x ` a ` b ě 2 x ` 2c ` 2d ě 3 a ` b ` 2c ` 2d ě 4

31 / 37

slide-137
SLIDE 137

Singleton Forgetting (SFO): an example

Let us consider:

  • κ1 “ x ` a ` b ě 2
  • κ2 “ x ` 2c ` 2d ě 3

Then: x ` a ` b ě 2 x ` 2c ` 2d ě 3 a ` b ` 2c ` 2d ě 4 But: Dx.pκ1 ^ κ2q ” a ` b ` c ` d ě 3

31 / 37

slide-138
SLIDE 138

Singleton Forgetting (SFO): an example

Let us consider:

  • κ1 “ x ` a ` b ě 2
  • κ2 “ x ` 2c ` 2d ě 3 ” x ` c ` d ě 2

Then: x ` a ` b ě 2 x ` 2c ` 2d ě 3 a ` b ` 2c ` 2d ě 4 But: Dx.pκ1 ^ κ2q ” a ` b ` c ` d ě 3

31 / 37

slide-139
SLIDE 139

Singleton Forgetting (SFO): an example

Let us consider:

  • κ1 “ x ` a ` b ě 2
  • κ2 “ x ` 2c ` 2d ě 3 ” x ` c ` d ě 2

Then: x ` a ` b ě 2 x ` c ` d ě 2 a ` b ` c ` d ě 3 But: Dx.pκ1 ^ κ2q ” a ` b ` c ` d ě 3

31 / 37

slide-140
SLIDE 140

Singleton Forgetting (SFO): an other example

Let us consider:

  • κ1 “ x ` a ` b ě 2
  • κ3 “ x ` c ` 2d ` 3e ě 5

32 / 37

slide-141
SLIDE 141

Singleton Forgetting (SFO): an other example

Let us consider:

  • κ1 “ x ` a ` b ě 2
  • κ3 “ x ` c ` 2d ` 3e ě 5

Then: x ` a ` b ě 2 x ` c ` 2d ` 3e ě 5 a ` b ` c ` 2d ` 3e ě 6

32 / 37

slide-142
SLIDE 142

Singleton Forgetting (SFO): an other example

Let us consider:

  • κ1 “ x ` a ` b ě 2
  • κ3 “ x ` c ` 2d ` 3e ě 5

Then: x ` a ` b ě 2 x ` c ` 2d ` 3e ě 5 a ` b ` c ` 2d ` 3e ě 6 But: Dx.pκ1 ^ κ3q ” 2a ` 2b ` c ` 3d ` 4e ě 9

32 / 37

slide-143
SLIDE 143

Singleton Forgetting (SFO): an other example

Let us consider:

  • κ1 “ x ` a ` b ě 2 ” x ` 2a ` 2b ě 3
  • κ3 “ x ` c ` 2d ` 3e ě 5

Then: x ` a ` b ě 2 x ` c ` 2d ` 3e ě 5 a ` b ` c ` 2d ` 3e ě 6 But: Dx.pκ1 ^ κ3q ” 2a ` 2b ` c ` 3d ` 4e ě 9

32 / 37

slide-144
SLIDE 144

Singleton Forgetting (SFO): an other example

Let us consider:

  • κ1 “ x ` a ` b ě 2 ” x ` 2a ` 2b ě 3
  • κ3 “ x ` c ` 2d ` 3e ě 5

Then: x ` 2a ` 2b ě 3 x ` c ` 2d ` 3e ě 5 2a ` 2b ` c ` 2d ` 3e ě 7 But: Dx.pκ1 ^ κ3q ” 2a ` 2b ` c ` 3d ` 4e ě 9

32 / 37

slide-145
SLIDE 145

Singleton Forgetting (SFO): an other example

Let us consider:

  • κ1 “ x ` a ` b ě 2 ” x ` 2a ` 2b ě 3
  • κ3 “ x ` c ` 2d ` 3e ě 5 ) x ` c ` 3d ` 4e ě 7

Then: x ` 2a ` 2b ě 3 x ` c ` 2d ` 3e ě 5 2a ` 2b ` c ` 2d ` 3e ě 7 But: Dx.pκ1 ^ κ3q ” 2a ` 2b ` c ` 3d ` 4e ě 9

32 / 37

slide-146
SLIDE 146

Singleton Forgetting (SFO): an other example

Let us consider:

  • κ1 “ x ` a ` b ě 2 ” x ` 2a ` 2b ě 3
  • κ3 “ x ` c ` 2d ` 3e ě 5 ) x ` c ` 3d ` 4e ě 7

Then: x ` 2a ` 2b ě 3 x ` c ` 3d ` 4e ě 7 2a ` 2b ` c ` 3d ` 4e ě 9 But: Dx.pκ1 ^ κ3q ” 2a ` 2b ` c ` 3d ` 4e ě 9

32 / 37

slide-147
SLIDE 147

Compile!

PBC and CARD are not good compilation languages

33 / 37

slide-148
SLIDE 148

Compile!

PBC and CARD are not good compilation languages We need to define sub-languages of PBC which enable to perform more queries and transformations

33 / 37

slide-149
SLIDE 149

Compile!

PBC and CARD are not good compilation languages We need to define sub-languages of PBC which enable to perform more queries and transformations As an example, we can define pseudo-Boolean prime implicants and implicates

  • κ is an IP-PBC of K iff κ |

ù K and, if κ1 | ù K and κ | ù κ1, then κ1 ” κ

  • κ is a PI-PBC of K iff K |

ù κ and, if K | ù κ1 and κ1 | ù κ, then κ1 ” κ

33 / 37

slide-150
SLIDE 150

Compile!

PBC and CARD are not good compilation languages We need to define sub-languages of PBC which enable to perform more queries and transformations As an example, we can define pseudo-Boolean prime implicants and implicates

  • κ is an IP-PBC of K iff κ |

ù K and, if κ1 | ù K and κ | ù κ1, then κ1 ” κ

  • κ is a PI-PBC of K iff K |

ù κ and, if K | ù κ1 and κ1 | ù κ, then κ1 ” κ

33 / 37

slide-151
SLIDE 151

Canonical form

Can we define a canonical form for pseudo-Boolean constraints?

34 / 37

slide-152
SLIDE 152

Canonical form

Can we define a canonical form for pseudo-Boolean constraints? We need a unique way to write the constraint, which must be as simple as possible

34 / 37

slide-153
SLIDE 153

Canonical form

Can we define a canonical form for pseudo-Boolean constraints? We need a unique way to write the constraint, which must be as simple as possible 9w ` 6x ` 3y ` z ě 11

34 / 37

slide-154
SLIDE 154

Canonical form

Can we define a canonical form for pseudo-Boolean constraints? We need a unique way to write the constraint, which must be as simple as possible 9w ` 6x ` 3y ` z ě 11 ” 9w ` 6x ` 3y ě 11

34 / 37

slide-155
SLIDE 155

Canonical form

Can we define a canonical form for pseudo-Boolean constraints? We need a unique way to write the constraint, which must be as simple as possible 9w ` 6x ` 3y ` z ě 11 ” 9w ` 6x ` 3y ě 11 ” 9w ` 6x ` 3y ě 12

34 / 37

slide-156
SLIDE 156

Canonical form

Can we define a canonical form for pseudo-Boolean constraints? We need a unique way to write the constraint, which must be as simple as possible 9w ` 6x ` 3y ` z ě 11 ” 9w ` 6x ` 3y ě 11 ” 9w ` 6x ` 3y ě 12 ” 3w ` 2x ` y ě 4

34 / 37

slide-157
SLIDE 157

Canonical form

Can we define a canonical form for pseudo-Boolean constraints? We need a unique way to write the constraint, which must be as simple as possible 9w ` 6x ` 3y ` z ě 11 ” 9w ` 6x ` 3y ě 11 ” 9w ` 6x ` 3y ě 12 ” 3w ` 2x ` y ě 4 ” 2w ` x ` y ě 3

34 / 37

slide-158
SLIDE 158

Canonical form

Can we define a canonical form for pseudo-Boolean constraints? We need a unique way to write the constraint, which must be as simple as possible 9w ` 6x ` 3y ` z ě 11 ” 9w ` 6x ` 3y ě 11 ” 9w ` 6x ` 3y ě 12 ” 3w ` 2x ` y ě 4 ” 2w ` x ` y ě 3 ” pw ě 1q ^ px ` y ě 1q

34 / 37

slide-159
SLIDE 159

Canonical form

Can we define a canonical form for pseudo-Boolean constraints? We need a unique way to write the constraint, which must be as simple as possible 9w ` 6x ` 3y ` z ě 11 ” 9w ` 6x ` 3y ě 11 ” 9w ` 6x ` 3y ě 12 ” 3w ` 2x ` y ě 4 ” 2w ` x ` y ě 3 ” pw ě 1q ^ px ` y ě 1q ” w ^ px _ yq

34 / 37

slide-160
SLIDE 160

Canonical form: a sketch of definition

A pseudo-Boolean constraint κ “ řn

j“1 ajlj ě k is in canonical form iff it

satisfies the following properties:

35 / 37

slide-161
SLIDE 161

Canonical form: a sketch of definition

A pseudo-Boolean constraint κ “ řn

j“1 ajlj ě k is in canonical form iff it

satisfies the following properties:

  • @x P Varpκq, x appears in κ only once

35 / 37

slide-162
SLIDE 162

Canonical form: a sketch of definition

A pseudo-Boolean constraint κ “ řn

j“1 ajlj ě k is in canonical form iff it

satisfies the following properties:

  • @x P Varpκq, x appears in κ only once
  • @i, i1 P 1..n, i ď i1 ð

ñ ai ě ai1, i.e. literals are sorted by descending weights

35 / 37

slide-163
SLIDE 163

Canonical form: a sketch of definition

A pseudo-Boolean constraint κ “ řn

j“1 ajlj ě k is in canonical form iff it

satisfies the following properties:

  • @x P Varpκq, x appears in κ only once
  • @i, i1 P 1..n, i ď i1 ð

ñ ai ě ai1, i.e. literals are sorted by descending weights

  • there exists a model of κ which is a model of řn

j“1 ajlj “ k 35 / 37

slide-164
SLIDE 164

Canonical form: a sketch of definition

A pseudo-Boolean constraint κ “ řn

j“1 ajlj ě k is in canonical form iff it

satisfies the following properties:

  • @x P Varpκq, x appears in κ only once
  • @i, i1 P 1..n, i ď i1 ð

ñ ai ě ai1, i.e. literals are sorted by descending weights

  • there exists a model of κ which is a model of řn

j“1 ajlj “ k

  • @j P 1..n, there exists no other constraint κ1 ” κ such that lj has a

weight a1

j ă aj in κ1 35 / 37

slide-165
SLIDE 165

Canonical form: a sketch of definition

A pseudo-Boolean constraint κ “ řn

j“1 ajlj ě k is in canonical form iff it

satisfies the following properties:

  • @x P Varpκq, x appears in κ only once
  • @i, i1 P 1..n, i ď i1 ð

ñ ai ě ai1, i.e. literals are sorted by descending weights

  • there exists a model of κ which is a model of řn

j“1 ajlj “ k

  • @j P 1..n, there exists no other constraint κ1 ” κ such that lj has a

weight a1

j ă aj in κ1

For a given constraint κ, is there always a unique ”canonical form” of κ?

35 / 37

slide-166
SLIDE 166

Canonical form: a sketch of definition

A pseudo-Boolean constraint κ “ řn

j“1 ajlj ě k is in canonical form iff it

satisfies the following properties:

  • @x P Varpκq, x appears in κ only once
  • @i, i1 P 1..n, i ď i1 ð

ñ ai ě ai1, i.e. literals are sorted by descending weights

  • there exists a model of κ which is a model of řn

j“1 ajlj “ k

  • @j P 1..n, there exists no other constraint κ1 ” κ such that lj has a

weight a1

j ă aj in κ1

For a given constraint κ, is there always a unique ”canonical form” of κ?

35 / 37

slide-167
SLIDE 167

Implement an efficient pseudo-Boolean solver

36 / 37

slide-168
SLIDE 168

Implement an efficient pseudo-Boolean solver

  • Investigate why pseudo-Boolean solvers are not as efficient in

practice as they should theoretically be

36 / 37

slide-169
SLIDE 169

Implement an efficient pseudo-Boolean solver

  • Investigate why pseudo-Boolean solvers are not as efficient in

practice as they should theoretically be

  • Use arbitrary precision only when needed

36 / 37

slide-170
SLIDE 170

Implement an efficient pseudo-Boolean solver

  • Investigate why pseudo-Boolean solvers are not as efficient in

practice as they should theoretically be

  • Use arbitrary precision only when needed
  • Find a better solution than reduction for learning

36 / 37

slide-171
SLIDE 171

Implement an efficient pseudo-Boolean solver

  • Investigate why pseudo-Boolean solvers are not as efficient in

practice as they should theoretically be

  • Use arbitrary precision only when needed
  • Find a better solution than reduction for learning
  • Find a solution to the fact that generalized resolution is not

implication-complete

36 / 37

slide-172
SLIDE 172

Conclusion

slide-173
SLIDE 173

Conclusion

Recap:

  • Pseudo-Boolean constraints properties
  • Pseudo-Boolean constraints as a compilation language

37 / 37

slide-174
SLIDE 174

Conclusion

Recap:

  • Pseudo-Boolean constraints properties
  • Pseudo-Boolean constraints as a compilation language

Future works:

  • Get a better understanding of pseudo-Boolean constraints
  • Define PBC sublanguages for compilation
  • Implement an efficient solver using PBC and CARD

37 / 37

slide-175
SLIDE 175

Pseudo-Boolean Constraints: Reasoning and Compilation

Romain Wallon (Advisors: Daniel Le Berre, Pierre Marquis, Stefan Mengel) September 11, 2017

CRIL - U. Artois & CNRS