Automated Logical Reasoning Lecture 2: Normal Forms and DPLL 1/39 I¸Sıl Dillig, CS389L: Automated Logical Reasoning Lecture 2: Normal Forms and DPLL 2/39

Total Page:16

File Type:pdf, Size:1020Kb

Automated Logical Reasoning Lecture 2: Normal Forms and DPLL 1/39 I¸Sıl Dillig, CS389L: Automated Logical Reasoning Lecture 2: Normal Forms and DPLL 2/39 Overview CS389L: Automated Logical Reasoning I An algorithm called DPLL for determining satisfiability Lecture 2: Normal Forms and DPLL I Many SAT solvers used today based on DPLL I¸sıl Dillig I However, requires converting formulas to a respresentation called normal forms I¸sıl Dillig, CS389L: Automated Logical Reasoning Lecture 2: Normal Forms and DPLL 1/39 I¸sıl Dillig, CS389L: Automated Logical Reasoning Lecture 2: Normal Forms and DPLL 2/39 Normal Forms Negation Normal Form (NNF) Negation Normal Form requires two syntactic restrictions: I A normal form of a formula F is another formula F 0 such that F is equivalent to F 0, but F 0 obeys certain syntactic I The only logical connectives are , , (i.e., no , ) restrictions. ¬ ∧ ∨ → ↔ I Negations appear only in literals I There are three kinds of normal forms that are interesting in propositional logic: I i.e., negations not allowed inside , , or any other ∧ ∨ ¬ I Negation Normal Form (NNF) I Is formula p ( q (r s)) in NNF? ∨ ¬ ∧ ∨ ¬ I Disjunctive Normal Form (DNF) I What about p ( q ( r s))? ∨ ¬ ∧ ¬ ¬ ∧ I Conjunctive Normal Form (CNF) I What about p ( q ( r s))? ∨ ¬ ∧ ¬¬ ∨ ¬ I¸sıl Dillig, CS389L: Automated Logical Reasoning Lecture 2: Normal Forms and DPLL 3/39 I¸sıl Dillig, CS389L: Automated Logical Reasoning Lecture 2: Normal Forms and DPLL 4/39 Conversion to NNF I Conversion to NNF II I Also need to ensure negations appear only in literals: push negations in I To make sure the only logical connectives are , , , need to ¬ ∧ ∨ I Use DeMorgan’s laws to distribute over and : eliminate and ¬ ∧ ∨ → ↔ (F F ) F F ¬ 1 ∧ 2 ⇔ ¬ 1 ∨ ¬ 2 I How do we express F F using , , ? 1 → 2 ∨ ∧ ¬ (F F ) F F ¬ 1 ∨ 2 ⇔ ¬ 1 ∧ ¬ 2 I How do we express F F using only , . ? 1 ↔ 2 ¬ ∧ ∨ I We also disallow double negations: F F ¬¬ ⇔ I¸sıl Dillig, CS389L: Automated Logical Reasoning Lecture 2: Normal Forms and DPLL 5/39 I¸sıl Dillig, CS389L: Automated Logical Reasoning Lecture 2: Normal Forms and DPLL 6/39 1 NNF Example Disjunctive Normal Form (DNF) I A formula in disjunctive normal form is a disjunction of conjunction of literals. Convert F : (p (p q)) to NNF ¬ → ∧ `i,j for literals `i,j i j _ ^ I i.e., can never appear inside or ∨ ∧ ¬ I Called disjunctive normal form because disjuncts are at the outer level I Each inner conjunction is called a clause I Question: If a formula is in DNF, is it also in NNF? I¸sıl Dillig, CS389L: Automated Logical Reasoning Lecture 2: Normal Forms and DPLL 7/39 I¸sıl Dillig, CS389L: Automated Logical Reasoning Lecture 2: Normal Forms and DPLL 8/39 Conversion to DNF Example Convert F :(q q ) ( r r ) into DNF 1 ∨ ¬¬ 2 ∧ ¬ 1 → 2 I To convert formula to DNF, first convert it to NNF. I Then, distribute over : ∧ ∨ (F F ) F (F F ) (F F ) 1 ∨ 2 ∧ 3 ⇔ 1 ∧ 3 ∨ 2 ∧ 3 F (F F ) (F F ) (F F ) 1 ∧ 2 ∨ 3 ⇔ 1 ∧ 2 ∨ 1 ∧ 3 I¸sıl Dillig, CS389L: Automated Logical Reasoning Lecture 2: Normal Forms and DPLL 9/39 I¸sıl Dillig, CS389L: Automated Logical Reasoning Lecture 2: Normal Forms and DPLL 10/39 DNF and Satisfiability DNF and Blow-up in formula size I This idea is completely impractical. Why? I Claim: If formula is in DNF, trivial to determine satisfiability. I Consider formula: (F1 F2) (F3 F4) How? ∨ ∧ ∨ I In DNF: I (F F ) (F F ) (F F ) (F F ) 1 ∧ 3 ∨ 1 ∧ 4 ∨ 2 ∧ 3 ∨ 2 ∧ 4 I I Every time we distribute, formula size doubles! I Idea: To determine satisfiability, convert formula to DNF and just do a syntactic check. I Moral: DNF conversion causes exponential blow-up in size! I Checking satisfiability by converting to DNF is almost as bad as truth tables! I¸sıl Dillig, CS389L: Automated Logical Reasoning Lecture 2: Normal Forms and DPLL 11/39 I¸sıl Dillig, CS389L: Automated Logical Reasoning Lecture 2: Normal Forms and DPLL 12/39 2 Conjunctive Normal Form (CNF) Conversion to CNF I A formula in conjuctive normal form is a conjunction of disjunction of literals. `i,j for literals `i,j I To convert formula to CNF, first convert it to NNF. i j ^ _ I Then, distribute over : ∨ ∧ I i.e., not allowed inside , . (F1 F2) F3 (F1 F3) (F2 F3) ∧ ∨ ¬ ∧ ∨ ⇔ ∨ ∧ ∨ F (F F ) (F F ) (F F ) 1 ∨ 2 ∧ 3 ⇔ 1 ∨ 2 ∧ 1 ∨ 3 I Called conjunctive normal form because conjucts are at the outer level I Each inner disjunction is called a clause I Is formula in CNF also in NNF? I¸sıl Dillig, CS389L: Automated Logical Reasoning Lecture 2: Normal Forms and DPLL 13/39 I¸sıl Dillig, CS389L: Automated Logical Reasoning Lecture 2: Normal Forms and DPLL 14/39 CNF Conversion Example DNF vs. CNF Convert F :(p (q r)) into CNF ↔ → I Fact: Unlike DNF, it is not trivial to determine satisfiability of formula in CNF. I Does CNF conversion cause exponential blow-up in size? I News: But almost all SAT solvers first convert formula to CNF before solving! I¸sıl Dillig, CS389L: Automated Logical Reasoning Lecture 2: Normal Forms and DPLL 15/39 I¸sıl Dillig, CS389L: Automated Logical Reasoning Lecture 2: Normal Forms and DPLL 16/39 Why CNF? Equisatisfiability I Two formulas F and F 0 are equisatisfiable iff: I Interesting Question: If it is just as expensive to convert formula to CNF as to DNF, why do solvers convert to CNF F is satisfiable if and only if F 0 is satisfiable although it is much easier to determine satisfiability in DNF? I If two formulas are equisatisfiable, are they equivalent? I Example: I I Equisatisfiability is a much weaker notion than equivalence. I I But useful if all we want to do is determine satisfiability. I¸sıl Dillig, CS389L: Automated Logical Reasoning Lecture 2: Normal Forms and DPLL 17/39 I¸sıl Dillig, CS389L: Automated Logical Reasoning Lecture 2: Normal Forms and DPLL 18/39 3 The Plan Tseitin’s Transformation I To determine satisfiability of F , convert formula to equisatisfiable formula F 0 in CNF I Use an algorithm (DPLL) to decide satisfiability of F 0 Tseitin’s transformation converts formula F to equisatisfiable formula F 0 in CNF I Since F 0 is equisatisfiable to F , F is satifiable iff algorithm with only a linear increase in size. decides F 0 is satisfiable I Big question: How do we convert formula to equisatisfiable formula without causing exponential blow-up in size? I¸sıl Dillig, CS389L: Automated Logical Reasoning Lecture 2: Normal Forms and DPLL 19/39 I¸sıl Dillig, CS389L: Automated Logical Reasoning Lecture 2: Normal Forms and DPLL 20/39 Tseitin’s Transformation I Tseitin’s Transformation II I Step 2: Consider each subformula G : G1 G2 ( arbitrary boolean connective) I Step 1: Introduce a new variable pG for every subformula G ◦ ◦ of F (unless G is already an atom). I Stipulate representative of G is equivalent to representative of G G 1 ◦ 2 I For instance, if F = G1 G2, introduce two variables pG1 and p p p ∧ G ↔ G1 ◦ G2 pG2 representing G1 and G2 respectively. I p is said to be representative of G and p is I Step 3: Convert p p p to equivalent CNF (by G1 1 G2 G ↔ G1 ◦ G2 representative of G . converting to NNF and distributing ’s over ’s). 2 ∨ ∧ I Observe: Since p p p contains at most three G ↔ G1 ◦ G2 propositional variables and exactly two connectives, size of this formula in CNF is bound by a constant. I¸sıl Dillig, CS389L: Automated Logical Reasoning Lecture 2: Normal Forms and DPLL 21/39 I¸sıl Dillig, CS389L: Automated Logical Reasoning Lecture 2: Normal Forms and DPLL 22/39 Tseitin’s Transformation II Tseitin’s Transformation and Size I Using this transformation, we converted F to an I Given original formula F , let pF be its representative and let equisatisfiable CNF formula F 0. SF be the set of all subformulas of F (including F itself). I What about the size of F 0? I Then, introduce the formula p CNF (p p p ) F ∧ g ↔ g1 ◦ g2 pF CNF (pg pg1 pg2 ) G=(G1 G2) S ∧ ↔ ◦ ^◦ ∈ F G=(G1 G2) S ^◦ ∈ F I SF is bound by the number of connectives in F . I Claim: This formula is equisatisfiable to F . | | I Each formula CNF (pg pg1 pg2 ) has constant size. I The proof is by structural induction ↔ ◦ I Thus, trasformation causes only linear increase in formula size. I Formula is also in CNF because conjunction of CNF formulas is in CNF. I More precisely, the size of resulting formula is bound by 30n + 2 where n is size of original formula I¸sıl Dillig, CS389L: Automated Logical Reasoning Lecture 2: Normal Forms and DPLL 23/39 I¸sıl Dillig, CS389L: Automated Logical Reasoning Lecture 2: Normal Forms and DPLL 24/39 4 Tseitin’s Transformation Example SAT Solvers Convert F :(p q) (p r) to equisatisfiable CNF formula. ∨ → ∧ ¬ 1. 2. I Almost all SAT solvers today are based on an algorithm called DPLL (Davis-Putnam-Logemann-Loveland) 3. I¸sıl Dillig, CS389L: Automated Logical Reasoning Lecture 2: Normal Forms and DPLL 25/39 I¸sıl Dillig, CS389L: Automated Logical Reasoning Lecture 2: Normal Forms and DPLL 26/39 DPLL: Historical Perspective DPLL insight I 1962: the original algorithm known as DP (Davis-Putnam) I There are two distinct ways to approach the boolean “simple” procedure for automated theorem proving satisfiability problem: ⇒ I Search I Davis and Putnam hired two I Find satisfying assignment in by searching through all possible programmers, George Logemann assignments most basic incarnation: truth table! ⇒ and David Loveland, to implement their ideas on the IBM 704.
Recommended publications
  • 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.
    [Show full text]
  • An Algorithm for the Satisfiability Problem of Formulas in Conjunctive
    Journal of Algorithms 54 (2005) 40–44 www.elsevier.com/locate/jalgor An algorithm for the satisfiability problem of formulas in conjunctive normal form Rainer Schuler Abt. Theoretische Informatik, Universität Ulm, D-89069 Ulm, Germany Received 26 February 2003 Available online 9 June 2004 Abstract We consider the satisfiability problem on Boolean formulas in conjunctive normal form. We show that a satisfying assignment of a formula can be found in polynomial time with a success probability − − + of 2 n(1 1/(1 logm)),wheren and m are the number of variables and the number of clauses of the formula, respectively. If the number of clauses of the formulas is bounded by nc for some constant c, − + this gives an expected run time of O(p(n) · 2n(1 1/(1 c logn))) for a polynomial p. 2004 Elsevier Inc. All rights reserved. Keywords: Complexity theory; NP-completeness; CNF-SAT; Probabilistic algorithms 1. Introduction The satisfiability problem of Boolean formulas in conjunctive normal form (CNF-SAT) is one of the best known NP-complete problems. The problem remains NP-complete even if the formulas are restricted to a constant number k>2 of literals in each clause (k-SAT). In recent years several algorithms have been proposed to solve the problem exponentially faster than the 2n time bound, given by an exhaustive search of all possible assignments to the n variables. So far research has focused in particular on k-SAT, whereas improvements for SAT in general have been derived with respect to the number m of clauses in a formula [2,7].
    [Show full text]
  • Boolean Algebra
    Boolean Algebra Definition: A Boolean Algebra is a math construct (B,+, . , ‘, 0,1) where B is a non-empty set, + and . are binary operations in B, ‘ is a unary operation in B, 0 and 1 are special elements of B, such that: a) + and . are communative: for all x and y in B, x+y=y+x, and x.y=y.x b) + and . are associative: for all x, y and z in B, x+(y+z)=(x+y)+z, and x.(y.z)=(x.y).z c) + and . are distributive over one another: x.(y+z)=xy+xz, and x+(y.z)=(x+y).(x+z) d) Identity laws: 1.x=x.1=x and 0+x=x+0=x for all x in B e) Complementation laws: x+x’=1 and x.x’=0 for all x in B Examples: • (B=set of all propositions, or, and, not, T, F) • (B=2A, U, ∩, c, Φ,A) Theorem 1: Let (B,+, . , ‘, 0,1) be a Boolean Algebra. Then the following hold: a) x+x=x and x.x=x for all x in B b) x+1=1 and 0.x=0 for all x in B c) x+(xy)=x and x.(x+y)=x for all x and y in B Proof: a) x = x+0 Identity laws = x+xx’ Complementation laws = (x+x).(x+x’) because + is distributive over . = (x+x).1 Complementation laws = x+x Identity laws x = x.1 Identity laws = x.(x+x’) Complementation laws = x.x +x.x’ because + is distributive over .
    [Show full text]
  • Normal Forms
    Propositional Logic Normal Forms 1 Literals Definition A literal is an atom or the negation of an atom. In the former case the literal is positive, in the latter case it is negative. 2 Negation Normal Form (NNF) Definition A formula is in negation formal form (NNF) if negation (:) occurs only directly in front of atoms. Example In NNF: :A ^ :B Not in NNF: :(A _ B) 3 Transformation into NNF Any formula can be transformed into an equivalent formula in NNF by pushing : inwards. Apply the following equivalences from left to right as long as possible: ::F ≡ F :(F ^ G) ≡ (:F _:G) :(F _ G) ≡ (:F ^ :G) Example (:(A ^ :B) ^ C) ≡ ((:A _ ::B) ^ C) ≡ ((:A _ B) ^ C) Warning:\ F ≡ G ≡ H" is merely an abbreviation for \F ≡ G and G ≡ H" Does this process always terminate? Is the result unique? 4 CNF and DNF Definition A formula F is in conjunctive normal form (CNF) if it is a conjunction of disjunctions of literals: n m V Wi F = ( ( Li;j )), i=1 j=1 where Li;j 2 fA1; A2; · · · g [ f:A1; :A2; · · · g Definition A formula F is in disjunctive normal form (DNF) if it is a disjunction of conjunctions of literals: n m W Vi F = ( ( Li;j )), i=1 j=1 where Li;j 2 fA1; A2; · · · g [ f:A1; :A2; · · · g 5 Transformation into CNF and DNF Any formula can be transformed into an equivalent formula in CNF or DNF in two steps: 1. Transform the initial formula into its NNF 2.
    [Show full text]
  • Extended Conjunctive Normal Form and an Efficient Algorithm For
    Proceedings of the Twenty-Ninth International Joint Conference on Artificial Intelligence (IJCAI-20) Extended Conjunctive Normal Form and An Efficient Algorithm for Cardinality Constraints Zhendong Lei1;2 , Shaowei Cai1;2∗ and Chuan Luo3 1State Key Laboratory of Computer Science, Institute of Software, Chinese Academy of Sciences, China 2School of Computer Science and Technology, University of Chinese Academy of Sciences, China 3Microsoft Research, China fleizd, [email protected] Abstract efficient PMS solvers, including SAT-based solvers [Naro- dytska and Bacchus, 2014; Martins et al., 2014; Berg et Satisfiability (SAT) and Maximum Satisfiability al., 2019; Nadel, 2019; Joshi et al., 2019; Demirovic and (MaxSAT) are two basic and important constraint Stuckey, 2019] and local search solvers [Cai et al., 2016; problems with many important applications. SAT Luo et al., 2017; Cai et al., 2017; Lei and Cai, 2018; and MaxSAT are expressed in CNF, which is dif- Guerreiro et al., 2019]. ficult to deal with cardinality constraints. In this One of the most important drawbacks of these logical lan- paper, we introduce Extended Conjunctive Normal guages is the difficulty to deal with cardinality constraints. Form (ECNF), which expresses cardinality con- Indeed, cardinality constraints arise frequently in the encod- straints straightforward and does not need auxiliary ing of many real world situations such as scheduling, logic variables or clauses. Then, we develop a simple and synthesis or verification, product configuration and data min- efficient local search solver LS-ECNF with a well ing. For the above reasons, many works have been done on designed scoring function under ECNF. We also de- finding an efficient encoding of cardinality constraints in CNF velop a generalized Unit Propagation (UP) based formulas [Sinz, 2005; As´ın et al., 2009; Hattad et al., 2017; algorithm to generate the initial solution for local Boudane et al., 2018; Karpinski and Piotrow,´ 2019].
    [Show full text]
  • Lecture 1: Propositional Logic
    Lecture 1: Propositional Logic Syntax Semantics Truth tables Implications and Equivalences Valid and Invalid arguments Normal forms Davis-Putnam Algorithm 1 Atomic propositions and logical connectives An atomic proposition is a statement or assertion that must be true or false. Examples of atomic propositions are: “5 is a prime” and “program terminates”. Propositional formulas are constructed from atomic propositions by using logical connectives. Connectives false true not and or conditional (implies) biconditional (equivalent) A typical propositional formula is The truth value of a propositional formula can be calculated from the truth values of the atomic propositions it contains. 2 Well-formed propositional formulas The well-formed formulas of propositional logic are obtained by using the construction rules below: An atomic proposition is a well-formed formula. If is a well-formed formula, then so is . If and are well-formed formulas, then so are , , , and . If is a well-formed formula, then so is . Alternatively, can use Backus-Naur Form (BNF) : formula ::= Atomic Proposition formula formula formula formula formula formula formula formula formula formula 3 Truth functions The truth of a propositional formula is a function of the truth values of the atomic propositions it contains. A truth assignment is a mapping that associates a truth value with each of the atomic propositions . Let be a truth assignment for . If we identify with false and with true, we can easily determine the truth value of under . The other logical connectives can be handled in a similar manner. Truth functions are sometimes called Boolean functions. 4 Truth tables for basic logical connectives A truth table shows whether a propositional formula is true or false for each possible truth assignment.
    [Show full text]
  • Logic and Proof
    Logic and Proof Computer Science Tripos Part IB Michaelmas Term Lawrence C Paulson Computer Laboratory University of Cambridge [email protected] Copyright c 2007 by Lawrence C. Paulson Contents 1 Introduction and Learning Guide 1 2 Propositional Logic 3 3 Proof Systems for Propositional Logic 13 4 First-order Logic 20 5 Formal Reasoning in First-Order Logic 27 6 Clause Methods for Propositional Logic 33 7 Skolem Functions and Herbrand’s Theorem 41 8 Unification 50 9 Applications of Unification 58 10 BDDs, or Binary Decision Diagrams 65 11 Modal Logics 68 12 Tableaux-Based Methods 74 i ii 1 1 Introduction and Learning Guide This course gives a brief introduction to logic, with including the resolution method of theorem-proving and its relation to the programming language Prolog. Formal logic is used for specifying and verifying computer systems and (some- times) for representing knowledge in Artificial Intelligence programs. The course should help you with Prolog for AI and its treatment of logic should be helpful for understanding other theoretical courses. Try to avoid getting bogged down in the details of how the various proof methods work, since you must also acquire an intuitive feel for logical reasoning. The most suitable course text is this book: Michael Huth and Mark Ryan, Logic in Computer Science: Modelling and Reasoning about Systems, 2nd edition (CUP, 2004) It costs £35. It covers most aspects of this course with the exception of resolution theorem proving. It includes material (symbolic model checking) that should be useful for Specification and Verification II next year.
    [Show full text]
  • Solving QBF by Combining Conjunctive and Disjunctive Normal Forms
    Solving QBF with Combined Conjunctive and Disjunctive Normal Form Lintao Zhang Microsoft Research Silicon Valley Lab 1065 La Avenida, Mountain View, CA 94043, USA [email protected] Abstract of QBF solvers have been proposed based on a number of Similar to most state-of-the-art Boolean Satisfiability (SAT) different underlying principles such as Davis-Logemann- solvers, all contemporary Quantified Boolean Formula Loveland (DLL) search (Cadoli et al., 1998, Giunchiglia et (QBF) solvers require inputs to be in the Conjunctive al. 2002a, Zhang & Malik, 2002, Letz, 2002), resolution Normal Form (CNF). Most of them also store the QBF in and expansion (Biere 2004), Binary Decision Diagrams CNF internally for reasoning. In order to use these solvers, (Pan & Vardi, 2005) and symbolic Skolemization arbitrary Boolean formulas have to be transformed into (Benedetti, 2004). Unfortunately, unlike the SAT solvers, equi-satisfiable formulas in Conjunctive Normal Form by which enjoy huge success in solving problems generated introducing additional variables. In this paper, we point out from real world applications, QBF solvers are still only an inherent limitation of this approach, namely the able to tackle trivial problems and remain limited in their asymmetric treatment of satisfactions and conflicts. This deficiency leads to artificial increase of search space for usefulness in practice. QBF solving. To overcome the limitation, we propose to Even though the current QBF solvers are based on many transform a Boolean formula into a combination of an equi- different reasoning principles, they all require the input satisfiable CNF formula and an equi-tautological DNF QBF to be in Conjunctive Normal Form (CNF).
    [Show full text]
  • Transformation of Boolean Expression Into Disjunctive Or Conjunctive Normal Form
    Central European Researchers Journal, Vol.3 Issue 1 Transformation of Boolean Expression into Disjunctive or Conjunctive Normal Form Patrik Rusnak Abstract—Reliability is an important characteristic of many systems. One of the current issues of reliability analysis is investigation of systems that are composed of many components. Structure of such systems can be defined in the form of a Boolean function. A Boolean function can be expressed in several ways. One of them is a symbolic expression. Several types of symbolic representations of Boolean functions exist. The most commonly known are disjunctive and conjunctive normal forms. These forms are often used not only in reliability analysis but also in other fields, such as game theory or logic design. Therefore, it is very important to have software that is able to transform any kind of Boolean expression into one of these normal forms. In this paper, an algorithm that allows such transformation is presented. Keywords—reliability, Boolean function, normal forms. I. INTRODUCTION Investigation of system reliability is a complex problem consisting of many steps. One of them is creation of a model of the system. Since the system is usually composed of several components, a special map defining the dependency between operation of the components and operation of the system has to be known. This map is known as structure function and, for a system consisting of 푛 components, it has the following form [1]: 푛 휙(푥1, 푥2, … , 푥푛) = 휙(풙): {0,1} → {0,1}, (1) where set {0,1} is a set of possible states at which the components and the system can operate (state 1 means that the component/system is functioning while state 0 agrees with a failure of the component/system), 푥푖 is a variable defining state of the 푖-th system component, for 푖 = 1,2, … , 푛, and 풙 = (푥1, 푥2, … , 푥푛) is a vector of components states (state vector).
    [Show full text]
  • On Non-Canonical Solving the Satisfiability Problem
    On non-canonical solving the Satisfiability problem Anatoly D. Plotnikov Department of Social Informatics and Safety of Information Systems, Dalh East-Ukrainian National University, Luhansk, Ukraine Email: [email protected] Abstract We study the non-canonical method for solving the Satisfiability problem which given by a formula in the form of the conjunctive normal form. The essence of this method consists in counting the number of tuples of Boolean variables, on which at least one clause of the given formula is false. On this basis the solution of the problem obtains in the form YES or NO without constructing tuple, when the answer is YES. It is found that if the clause in the given formula has pairwise contrary literals, then the problem can be solved efficiently. However, when in the formula there are a long chain of clauses with pairwise non-contrary literals, the solution leads to an exponential calculations. Key words: Satisfiability problem, satisfying tuple, disjunction, clause, conjunction, NP- complete. 1 Introduction To uniquely understand used terminology in the article, we recall some definitions. n Suppose we have a two-element set E {0; 1} . The function f: E o E is called Boolean. n x,xx ,..., Every vector in E is considered as the tuple of values of variables 12 n of the function fx(,xx ,..., ) . 12 n A Boolean variable with negation or without negation is called literal. Literals x and x is called contrary. The conjunction of r (1 d r d n) different non-contrary literals, called elementary. Any Boolean function can be represented as a disjunction of some elementary conjunctions.
    [Show full text]
  • Lecture 4 1 Overview 2 Propositional Logic
    COMPSCI 230: Discrete Mathematics for Computer Science January 23, 2019 Lecture 4 Lecturer: Debmalya Panigrahi Scribe: Kevin Sun 1 Overview In this lecture, we give an introduction to propositional logic, which is the mathematical formaliza- tion of logical relationships. We also discuss the disjunctive and conjunctive normal forms, how to convert formulas to each form, and conclude with a fundamental problem in computer science known as the satisfiability problem. 2 Propositional Logic Until now, we have seen examples of different proofs by primarily drawing from simple statements in number theory. Now we will establish the fundamentals of writing formal proofs by reasoning about logical statements. Throughout this section, we will maintain a running analogy of propositional logic with the system of arithmetic with which we are already familiar. In general, capital letters (e.g., A, B, C) represent propositional variables, while lowercase letters (e.g., x, y, z) represent arithmetic variables. But what is a propositional variable? A propositional variable is the basic unit of propositional logic. Recall that in arithmetic, the variable x is a placeholder for any real number, such as 7, 0.5, or −3. In propositional logic, the variable A is a placeholder for any truth value. While x has (infinitely) many possible values, there are only two possible values of A: True (denoted T) and False (denoted F). Since propositional variables can only take one of two possible values, they are also known as Boolean variables, named after their inventor George Boole. By letting x denote any real number, we can make claims like “x2 − 1 = (x + 1)(x − 1)” regardless of the numerical value of x.
    [Show full text]
  • Conjunctive Normal Form Converter
    Conjunctive Normal Form Converter Stringendo and drearier Yaakov infest almost monopodially, though Bill superheats his battlers misadvise. Crescendo and unpasteurised Flin dehorn her girn platelayers overheats and whinge tongue-in-cheek. Cadgy Bard never undocks so habitably or rebracing any voltameters ne'er. If all we start from conjunctive normal form There is no quadratic or exponential blowup. Hence this leads to a procedure that can be used to generate a hierarchy of relaxations for convex disjunctive programs. Prop takes constant time as conjunctions of this first step is in real world applications of horn clause notation which there is there anything in cnf? Footer as conjunctions, at most k terms formed according to convert to dimacs format is equivalent in disjunctive normal clauses. This takes constant time as well. This second approach only conjunctions where all how we convert to. Return an expression. What about these two expressions? To convert to. In this is an error if p is easy ones which is a standard practice. This verse like saying almost every assignment has to meet eight of a coffin of requirements. Return a CNF expression connect the disjunction. First find a list of all the variables in use. Therefore we convert an expression into conjunctive normal form is a conjunction of conjuncts corresponds to automated theorem shows that. Thanks for converting from conjunctive normal form, with a normalizer. And anywhere as see alpha right arrow beta, you pocket change it use not alpha or beta. So you work is not an expression is a normalizer is conflicting clause.
    [Show full text]