CS 512, Spring 2017, Handout 10 [1Ex] Propositional Logic: [2Ex

CS 512, Spring 2017, Handout 10 [1Ex] Propositional Logic: [2Ex

CS 512, Spring 2017, Handout 10 Propositional Logic: Conjunctive Normal Forms, Disjunctive Normal Forms, Horn Formulas, and other special forms Assaf Kfoury 5 February 2017 Assaf Kfoury, CS 512, Spring 2017, Handout 10 page 1 of 28 CNF L ::= p j :p literal D ::= L j L _ D disjuntion of literals C ::= D j D ^ C conjunction of disjunctions DNF L ::= p j :p literal C ::= L j L ^ C conjunction of literals D ::= C j C _ D disjunction of conjunctions conjunctive normal form & disjunctive normal form Assaf Kfoury, CS 512, Spring 2017, Handout 10 page 2 of 28 DNF L ::= p j :p literal C ::= L j L ^ C conjunction of literals D ::= C j C _ D disjunction of conjunctions conjunctive normal form & disjunctive normal form CNF L ::= p j :p literal D ::= L j L _ D disjuntion of literals C ::= D j D ^ C conjunction of disjunctions Assaf Kfoury, CS 512, Spring 2017, Handout 10 page 3 of 28 conjunctive normal form & disjunctive normal form CNF L ::= p j :p literal D ::= L j L _ D disjuntion of literals C ::= D j D ^ C conjunction of disjunctions DNF L ::= p j :p literal C ::= L j L ^ C conjunction of literals D ::= C j C _ D disjunction of conjunctions Assaf Kfoury, CS 512, Spring 2017, Handout 10 page 4 of 28 I A disjunction of literals L1 _···_ Lm is valid (equivalently, is a tautology) iff there are 1 6 i; j 6 m with i 6= j such that Li is :Lj. I A conjunction of disjunctions D1 ^ · · · ^ Dn is valid (equivalently, is a tautology) iff for every 1 6 i 6 n it is the case that Di is valid. I CNF allows for a fast and easy syntactic test of validity. I Unfortunately, conversion into CNF may lead to exponential blow-up: (x1 ^ y1) _ (x2 ^ y2) _···_ (xn ^ yn) becomes (x1 _···_ xn−1 _ xn) ^ (x1 _···_ xn−1 _ yn) ^ · · · ^ (y1 _···_ yn−1 _ yn) i.e., the initial WFF of size O(n) becomes an equivalent WFF of size n O(2 ), because each clause in the latter contains either xi or yi for every i. I Converting a WFF into an equivalent WFF in CNF, preserving validity, is NP-hard! (However, converting a WFF into another WFF, not necessarily equivalent, preserving satisfiability can be carried out in linear time – more in a later handout.) Why CNF? Assaf Kfoury, CS 512, Spring 2017, Handout 10 page 5 of 28 I A conjunction of disjunctions D1 ^ · · · ^ Dn is valid (equivalently, is a tautology) iff for every 1 6 i 6 n it is the case that Di is valid. I CNF allows for a fast and easy syntactic test of validity. I Unfortunately, conversion into CNF may lead to exponential blow-up: (x1 ^ y1) _ (x2 ^ y2) _···_ (xn ^ yn) becomes (x1 _···_ xn−1 _ xn) ^ (x1 _···_ xn−1 _ yn) ^ · · · ^ (y1 _···_ yn−1 _ yn) i.e., the initial WFF of size O(n) becomes an equivalent WFF of size n O(2 ), because each clause in the latter contains either xi or yi for every i. I Converting a WFF into an equivalent WFF in CNF, preserving validity, is NP-hard! (However, converting a WFF into another WFF, not necessarily equivalent, preserving satisfiability can be carried out in linear time – more in a later handout.) Why CNF? I A disjunction of literals L1 _···_ Lm is valid (equivalently, is a tautology) iff there are 1 6 i; j 6 m with i 6= j such that Li is :Lj. Assaf Kfoury, CS 512, Spring 2017, Handout 10 page 6 of 28 I CNF allows for a fast and easy syntactic test of validity. I Unfortunately, conversion into CNF may lead to exponential blow-up: (x1 ^ y1) _ (x2 ^ y2) _···_ (xn ^ yn) becomes (x1 _···_ xn−1 _ xn) ^ (x1 _···_ xn−1 _ yn) ^ · · · ^ (y1 _···_ yn−1 _ yn) i.e., the initial WFF of size O(n) becomes an equivalent WFF of size n O(2 ), because each clause in the latter contains either xi or yi for every i. I Converting a WFF into an equivalent WFF in CNF, preserving validity, is NP-hard! (However, converting a WFF into another WFF, not necessarily equivalent, preserving satisfiability can be carried out in linear time – more in a later handout.) Why CNF? I A disjunction of literals L1 _···_ Lm is valid (equivalently, is a tautology) iff there are 1 6 i; j 6 m with i 6= j such that Li is :Lj. I A conjunction of disjunctions D1 ^ · · · ^ Dn is valid (equivalently, is a tautology) iff for every 1 6 i 6 n it is the case that Di is valid. Assaf Kfoury, CS 512, Spring 2017, Handout 10 page 7 of 28 I Unfortunately, conversion into CNF may lead to exponential blow-up: (x1 ^ y1) _ (x2 ^ y2) _···_ (xn ^ yn) becomes (x1 _···_ xn−1 _ xn) ^ (x1 _···_ xn−1 _ yn) ^ · · · ^ (y1 _···_ yn−1 _ yn) i.e., the initial WFF of size O(n) becomes an equivalent WFF of size n O(2 ), because each clause in the latter contains either xi or yi for every i. I Converting a WFF into an equivalent WFF in CNF, preserving validity, is NP-hard! (However, converting a WFF into another WFF, not necessarily equivalent, preserving satisfiability can be carried out in linear time – more in a later handout.) Why CNF? I A disjunction of literals L1 _···_ Lm is valid (equivalently, is a tautology) iff there are 1 6 i; j 6 m with i 6= j such that Li is :Lj. I A conjunction of disjunctions D1 ^ · · · ^ Dn is valid (equivalently, is a tautology) iff for every 1 6 i 6 n it is the case that Di is valid. I CNF allows for a fast and easy syntactic test of validity. Assaf Kfoury, CS 512, Spring 2017, Handout 10 page 8 of 28 Why CNF? I A disjunction of literals L1 _···_ Lm is valid (equivalently, is a tautology) iff there are 1 6 i; j 6 m with i 6= j such that Li is :Lj. I A conjunction of disjunctions D1 ^ · · · ^ Dn is valid (equivalently, is a tautology) iff for every 1 6 i 6 n it is the case that Di is valid. I CNF allows for a fast and easy syntactic test of validity. I Unfortunately, conversion into CNF may lead to exponential blow-up: (x1 ^ y1) _ (x2 ^ y2) _···_ (xn ^ yn) becomes (x1 _···_ xn−1 _ xn) ^ (x1 _···_ xn−1 _ yn) ^ · · · ^ (y1 _···_ yn−1 _ yn) i.e., the initial WFF of size O(n) becomes an equivalent WFF of size n O(2 ), because each clause in the latter contains either xi or yi for every i. I Converting a WFF into an equivalent WFF in CNF, preserving validity, is NP-hard! (However, converting a WFF into another WFF, not necessarily equivalent, preserving satisfiability can be carried out in linear time – more in a later handout.) Assaf Kfoury, CS 512, Spring 2017, Handout 10 page 9 of 28 I A conjunction of literals L1 ^ · · · ^ Lm is satisfiable iff fL1;:::; Lmg does not include both a propositional atom P and its negation :P. I A disjunction of conjunctions C1 _···_ Cn is satisfiable iff there is some 1 6 i 6 n such that Ci is satisfiable. I DNF allows for a fast and easy syntactic test of satisfiability. I Unfortunately, conversion into DNF may lead to exponential blow-up: (x1 _ y1) ^ (x2 _ y2) ^ · · · ^ (xn _ yn) becomes (x1 ^ · · · ^ xn−1 ^ xn) _ (x1 ^ · · · ^ xn−1 ^ yn) _···_ (y1 ^ · · · ^ yn−1 ^ yn) i.e., the initial WFF of size O(n) becomes an equivalent WFF of size n O(2 ), because each clause in the latter contains either xi or yi for every i. I Converting a WFF into an equivalent WFF in DNF, preserving satisfiability, is NP-hard! Why DNF? Assaf Kfoury, CS 512, Spring 2017, Handout 10 page 10 of 28 I A disjunction of conjunctions C1 _···_ Cn is satisfiable iff there is some 1 6 i 6 n such that Ci is satisfiable. I DNF allows for a fast and easy syntactic test of satisfiability. I Unfortunately, conversion into DNF may lead to exponential blow-up: (x1 _ y1) ^ (x2 _ y2) ^ · · · ^ (xn _ yn) becomes (x1 ^ · · · ^ xn−1 ^ xn) _ (x1 ^ · · · ^ xn−1 ^ yn) _···_ (y1 ^ · · · ^ yn−1 ^ yn) i.e., the initial WFF of size O(n) becomes an equivalent WFF of size n O(2 ), because each clause in the latter contains either xi or yi for every i. I Converting a WFF into an equivalent WFF in DNF, preserving satisfiability, is NP-hard! Why DNF? I A conjunction of literals L1 ^ · · · ^ Lm is satisfiable iff fL1;:::; Lmg does not include both a propositional atom P and its negation :P. Assaf Kfoury, CS 512, Spring 2017, Handout 10 page 11 of 28 I DNF allows for a fast and easy syntactic test of satisfiability. I Unfortunately, conversion into DNF may lead to exponential blow-up: (x1 _ y1) ^ (x2 _ y2) ^ · · · ^ (xn _ yn) becomes (x1 ^ · · · ^ xn−1 ^ xn) _ (x1 ^ · · · ^ xn−1 ^ yn) _···_ (y1 ^ · · · ^ yn−1 ^ yn) i.e., the initial WFF of size O(n) becomes an equivalent WFF of size n O(2 ), because each clause in the latter contains either xi or yi for every i.

View Full Text

Details

  • File Type
    pdf
  • Upload Time
    -
  • Content Languages
    English
  • Upload User
    Anonymous/Not logged-in
  • File Pages
    28 Page
  • File Size
    -

Download

Channel Download Status
Express Download Enable

Copyright

We respect the copyrights and intellectual property rights of all users. All uploaded documents are either original works of the uploader or authorized works of the rightful owners.

  • Not to be reproduced or distributed without explicit permission.
  • Not used for commercial purposes outside of approved use cases.
  • Not used to infringe on the rights of the original creators.
  • If you believe any content infringes your copyright, please contact us immediately.

Support

For help with questions, suggestions, or problems, please contact us