pseudo boolean constraints reasoning and compilation
play

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


  1. Some compilation languages: IP , PI et MODS Let us consider φ “ x _ p y ^ x q _ p z ^ x q _ � t IP p φ q “ p x q _ p� t q PI p φ q “ x _ � t MODS p φ q “ p x ^ y ^ z ^ t q _ p x ^ y ^ z ^ � t q _ p x ^ y ^ � z ^ t q _ p x ^ y ^ � z ^ � t q _ p x ^ � y ^ z ^ t q _ p x ^ � y ^ z ^ � t q _ p x ^ � y ^ � z ^ t q _ p x ^ � y ^ � z ^ � t q _ p� x ^ y ^ z ^ � t q _ p� x ^ y ^ � z ^ � t q _ p� x ^ � y ^ z ^ � t q _ p� x ^ � y ^ � z ^ � t q 13 / 37

  2. 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

  3. 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

  4. 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

  5. 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

  6. 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

  7. Succinctness [DM02] Succinctness captures the ability of a language to represent information using little space 15 / 37

  8. Succinctness [DM02] Succinctness captures the ability of a language to represent information using little space L 1 is at least as succinct as L 2 , denoted L 1 ď L 2 , iff there exists a polynomial p such that for every formula α P L 2 , there exists an equivalent formula β where | β | ď p p| α |q 15 / 37

  9. Succinctness [DM02] Succinctness captures the ability of a language to represent information using little space L 1 is at least as succinct as L 2 , denoted L 1 ď L 2 , iff there exists a polynomial p such that for every formula α P L 2 , there exists an equivalent formula β where | β | ď p p| α |q In other words, L 1 ď L 2 iff any formula α P L 2 can be written as a formula β P L 1 of polynomial size 15 / 37

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

  11. 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

  12. Queries [DM02] Given one or several formulas, what are the properties of these formulas? 17 / 37

  13. 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

  14. 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

  15. 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

  16. Results from the KC map (queries) [DM02] CO VA CE IM EQ SE CT ME L NNF ˝ ˝ ˝ ˝ ˝ ˝ ˝ ˝ DNNF � ˝ � ˝ ˝ ˝ ˝ � d ´ DNNF � � � � ? ˝ � � sd ´ DNNF � � � � ? ˝ � � BDD ˝ ˝ ˝ ˝ ˝ ˝ ˝ ˝ FBDD ? ˝ � � � � � � OBDD ˝ � � � � � � � OBDD ă � � � � � � � � DNF � ˝ � ˝ ˝ ˝ ˝ � CNF ˝ � ˝ � ˝ ˝ ˝ ˝ PI � � � � � � ˝ � IP ˝ � � � � � � � MODS � � � � � � � � Verified ˝ Not verified (unless P “ NP) � 18 / 37

  17. 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

  18. 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 D x .φ ” p φ | x q _ p φ | x q FO (FOrgetting) Compute D X .φ 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

  19. Results from the KC map (transformations) [DM02] CD FO SFO ^ C ^ BC _ C _ BC � C L 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

  20. Properties of pseudo-Boolean constraints

  21. Some interesting (but hard) problems on a single constraint CO VA CE IM EQ SE CT ME 1-CARD ? ? ? ? ? ? ? ? 1-PBC ? ? ? ? ? ? ? ? 21 / 37

  22. Some interesting (but hard) problems on a single constraint CO VA CE IM EQ SE CT ME 1-CARD ? ? ? ? ? ? ? ? 1-PBC ? ? ? ? ? ? ? ? Increasible degree: 9 w ` 6 x ` 3 y ` z ě 11 21 / 37

  23. Some interesting (but hard) problems on a single constraint CO VA CE IM EQ SE CT ME 1-CARD ? ? ? ? ? ? ? ? 1-PBC ? ? ? ? ? ? ? ? Increasible degree: 9 w ` 6 x ` 3 y ` z ě 11 21 / 37

  24. Some interesting (but hard) problems on a single constraint CO VA CE IM EQ SE CT ME 1-CARD ? ? ? ? ? ? ? ? 1-PBC ? ? ? ? ? ? ? ? Increasible degree: 9 w ` 6 x ` 3 y ` z ě 11 ” 9 w ` 6 x ` 3 y ` z ě 12 21 / 37

  25. 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) 9 w ` 6 x ` 3 y ` z ě 11 ” 9 w ` 6 x ` 3 y ` z ě 12 21 / 37

  26. 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) 9 w ` 6 x ` 3 y ` z ě 11 ” 9 w ` 6 x ` 3 y ` z ě 12 Dependency on a variable: 9 w ` 6 x ` 3 y ` z ě 11 21 / 37

  27. 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) 9 w ` 6 x ` 3 y ` z ě 11 ” 9 w ` 6 x ` 3 y ` z ě 12 Dependency on a variable: 9 w ` 6 x ` 3 y ` z ě 11 21 / 37

  28. 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) 9 w ` 6 x ` 3 y ` z ě 11 ” 9 w ` 6 x ` 3 y ` z ě 12 Dependency on a variable: 9 w ` 6 x ` 3 y ` z ě 11 ” 9 w ` 6 x ` 3 y ě 11 21 / 37

  29. 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) 9 w ` 6 x ` 3 y ` z ě 11 ” 9 w ` 6 x ` 3 y ` z ě 12 Dependency on a variable: (NP-hard: reduction from increasible degree) 9 w ` 6 x ` 3 y ` z ě 11 ” 9 w ` 6 x ` 3 y ě 11 21 / 37

  30. Querying a single pseudo-Boolean constraint CO VA CE IM EQ SE CT ME 1-CARD ? ? ? ? ? ? ? ? 1-PBC ? ? ? ? ? ? ? ? 22 / 37

  31. 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 3 a ` 2 b ` c ě 3 3 a ` 2 b ` c ě 7 22 / 37

  32. 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 3 a ` 2 b ` c ě 3 3 a ` 2 b ` c ě 7 ✓ 22 / 37

  33. 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 3 a ` 2 b ` c ě 3 3 a ` 2 b ` c ě 7 ✓ ✗ 22 / 37

  34. 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 3 a ` 2 b ` c ě 3 3 a ` 2 b ` c ě 7 ✓ ✗ A normalized pseudo-Boolean constraint is valid iff its degree is 0 22 / 37

  35. 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 3 a ` 2 b ` c ě 3 3 a ` 2 b ` c ě 7 ✓ ✗ A normalized pseudo-Boolean constraint is valid iff its degree is 0 Properties of pseudo-Boolean constraints give these results 22 / 37

  36. 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 3 a ` 2 b ` c ě 3 3 a ` 2 b ` c ě 7 ✓ ✗ A normalized pseudo-Boolean constraint is valid iff its degree is 0 Properties of pseudo-Boolean constraints give these results l 1 P L 1 l 1 ě k 1 iff k 1 ď 0 or | L z L 1 | ď k ´ k 1 ř l P L l ě k | ù ř 22 / 37

  37. 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 3 a ` 2 b ` c ě 3 3 a ` 2 b ` c ě 7 ✓ ✗ A normalized pseudo-Boolean constraint is valid iff its degree is 0 Properties of pseudo-Boolean constraints give these results l 1 P L 1 l 1 ě k 1 iff k 1 ď 0 or | L z L 1 | ď k ´ k 1 ř l P L l ě k | ù ř 22 / 37

  38. 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 3 a ` 2 b ` c ě 3 3 a ` 2 b ` c ě 7 ✓ ✗ A normalized pseudo-Boolean constraint is valid iff its degree is 0 Properties of pseudo-Boolean constraints give these results l 1 P L 1 l 1 ě k 1 iff k 1 ď 0 or | L z L 1 | ď k ´ k 1 ř l P L l ě k | ù ř Reduction from increasible degree 22 / 37

  39. 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 3 a ` 2 b ` c ě 3 3 a ` 2 b ` c ě 7 ✓ ✗ A normalized pseudo-Boolean constraint is valid iff its degree is 0 Properties of pseudo-Boolean constraints give these results l 1 P L 1 l 1 ě k 1 iff k 1 ď 0 or | L z L 1 | ď k ´ k 1 ř l P L l ě k | ù ř Reduction from increasible degree 22 / 37

  40. 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 3 a ` 2 b ` c ě 3 3 a ` 2 b ` c ě 7 ✓ ✗ A normalized pseudo-Boolean constraint is valid iff its degree is 0 Properties of pseudo-Boolean constraints give these results l 1 P L 1 l 1 ě k 1 iff k 1 ď 0 or | L z L 1 | ď k ´ k 1 ř l P L l ě k | ù ř Reduction from increasible degree There are ř n models of a cardinality constraint ř n ` n ˘ i “ 1 l j ě n j “ k j 22 / 37

  41. 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 3 a ` 2 b ` c ě 3 3 a ` 2 b ` c ě 7 ✓ ✗ A normalized pseudo-Boolean constraint is valid iff its degree is 0 Properties of pseudo-Boolean constraints give these results l 1 P L 1 l 1 ě k 1 iff k 1 ď 0 or | L z L 1 | ď k ´ k 1 ř l P L l ě k | ù ř Reduction from increasible degree There are ř n models of a cardinality constraint ř n ` n ˘ i “ 1 l j ě n j “ k j Reduction from subset-sum 22 / 37

  42. Transforming a single pseudo-Boolean constraint CD FO SFO ^ C ^ BC _ C _ BC � C 1-CARD ? ? ? ? ? ? ? ? 1-PBC ? ? ? ? ? ? ? ? 23 / 37

  43. 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

  44. 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: ˜ n ¸ ˜ n ¸ ˜ n ¸ ÿ ÿ ÿ D x . ax ` a j l j ě k ” a j l j ě k ´ a _ a j l j ě k j “ 0 j “ 0 j “ 0 23 / 37

  45. 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: ˜ n ¸ ˜ n ¸ ÿ ÿ D x . ax ` a j l j ě k ” a j l j ě k ´ a j “ 0 j “ 0 23 / 37

  46. 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: ˜ n ¸ ˜ n ¸ ÿ ÿ D x . ax ` a j l j ě k ” a j l j ě k ´ a j “ 0 j “ 0 23 / 37

  47. 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: ˜ n ¸ ˜ n ¸ ÿ ÿ D x . ax ` a j l j ě k ” a j l j ě k ´ a j “ 0 j “ 0 ´ ř n ¯ ” ř n Negation is computable in polytime: � j “ 1 a j l j ě n j “ 1 a j l j ă n 23 / 37

  48. 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: ˜ n ¸ ˜ n ¸ ÿ ÿ D x . ax ` a j l j ě k ” a j l j ě k ´ a j “ 0 j “ 0 ´ ř n ¯ ” ř n Negation is computable in polytime: � j “ 1 a j l j ě n j “ 1 a j l j ă n Conjunctions and disjunctions are not computable in general since both languages are not expressive enough 23 / 37

  49. One constraint is not enough In general, a propositional formula may require more than a single pseudo-Boolean constraint to be expressed 24 / 37

  50. 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

  51. 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

  52. PBC and CARD as compilation languages

  53. Succinctness of PBC and CARD 25 / 37

  54. Succinctness of PBC and CARD CARD ę PBC because translating κ “ kx ` ř 2 k j “ 1 x j ě k into CARD requires clauses, and there is an exponential number of them 25 / 37

  55. Succinctness of PBC and CARD CARD ę PBC because translating κ “ kx ` ř 2 k j “ 1 x j ě k into CARD requires clauses, and there is an exponential number of them ´ ¯ ľ ł x _ x i I Ă 1 .. 2 k i P I | I |“ k ` 1 25 / 37

  56. 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

  57. 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] ě ` k . . . ˆ ˆ a 1 a n l 1 l n 25 / 37

  58. Succinctness of PBC and CARD PBC ę IP because Ž n i “ 1 p x i ^ y i q requires an exponential number of constraints to be expressed 25 / 37

  59. Succinctness of PBC and CARD PBC ę OBDD ă because parity function can only be represented in PBC with clauses 25 / 37

  60. Succinctness of PBC and CARD PBC ę OBDD ă because parity function can only be represented in PBC with clauses φ “ x ‘ y ‘ z 25 / 37

  61. Succinctness of PBC and CARD PBC ę OBDD ă because parity function can only be represented in PBC with clauses φ “ x ‘ y ‘ z ” p x _ y _ z q ^ p x _ � y _ � z q ^ p� x _ y _ � z q ^ p� x _ � y _ z q 25 / 37

Recommend


More recommend