1. Trang chủ
  2. » Giáo án - Bài giảng

Discrrete mathematics for computer science 06normal forms

6 140 0

Đang tải... (xem toàn văn)

THÔNG TIN TÀI LIỆU

Thông tin cơ bản

Định dạng
Số trang 6
Dung lượng 620,5 KB

Nội dung

Normal Forms, Tautology and Satisfiability 2/3/12 DeMorgan’s Laws • ¬(p∨q) ≡(¬p∧ ¬ q) “neither” – driving in negations flips ands to ors ơ(pq) (ơp q) nand Driving in negations flips ors to ands • Also law of double negation: ơơp p By repeatedly replacing LHS by RHS all negation signs can be pressed against variables • ¬ (p∨(q∧r)) ≡ ¬ p∧ ¬ (q∧r) ≡ ¬ p∧( ¬ q∨ ¬ r) 2/3/12 Distributive Laws, Normal Forms • p∧(q∨r)≡(p∧q)∨(p∧r) • p∨(q∧r)≡(p∨q)∧(p∨r) • By applying these transformations, every formula can be put in either – Conjunctive normal form (and-of-ors-ofliterals), or – Disjunctive normal form (or-of-ands-ofliterals) • ¬ p∨ ( ¬ q∧ ¬ r) is in DNF • ( ¬ p∨ ¬ q)∧( ¬ p∨ ¬ r) is an equivalent CNF 2/3/12 Tautology • A tautology is a formula that is true under all possible truth assignments 2/3/12 p q ¬ (p∧q) ≡ (¬p∨ ¬ q) T T T T F T F T T F F T Satisfiability • A satisfiable formula is one that is true for some truth assignment p q T T ¬ p∧q F T F F F T T F F F • A formula is unsatisfiable (last column all F) iff its negation is a tautology (last column all T) 2/3/12 P = NP? • One can in principle always determine whether a formula is satisfiable, unsatisfiable, a tautology by filling in the truth table and looking at the last column • Each line is easy, but the table for a formula with n variables has 2n rows • n = 100 => 2n >> age of the universe, in nanoseconds • Is there a subexponential algorithm? 2/3/12 ... Distributive Laws, Normal Forms • p∧(q∨r)≡(p∧q)∨(p∧r) • p∨(q∧r)≡(p∨q)∧(p∨r) • By applying these transformations, every formula can be put in either – Conjunctive normal form (and-of-ors-ofliterals),... T F T F T T F F T Satisfiability • A satisfiable formula is one that is true for some truth assignment p q T T ¬ p∧q F T F F F T T F F F • A formula is unsatisfiable (last column all F) iff its... determine whether a formula is satisfiable, unsatisfiable, a tautology by filling in the truth table and looking at the last column • Each line is easy, but the table for a formula with n variables

Ngày đăng: 22/03/2019, 10:39

TỪ KHÓA LIÊN QUAN