Introduction to the Boolean Satisfiability Problem

Total Page:16

File Type:pdf, Size:1020Kb

Introduction to the Boolean Satisfiability Problem Introduction to the Boolean Satisfiability Problem Spring 2018 CSCE 235H Introduction to Discrete Structures URL: cse.unl.edu/~cse235h All questions: Piazza Satisfiability Study • 7 weeks • 30 min lectures in recitation • ~2 hours of homework per week • Goals: – Exposure to fundamental research in CS – Understand how to model problems – Learn to use SAT solver, MiniSAT CSCE 235 Logic 2 Boolean Satisfiability Problem • Given: – A Boolean formula • Question: – Is there an assignment of truth values to the Boolean variables such that the formula holds true? CSCE 235 Logic 3 Boolean Satisfiability Problem a ( a b) _ ¬ ^ (a a) (b b) _ ¬ ! ^ ¬ CSCE 235 Logic 4 Boolean Satisfiability Problem a ( a b) _ ¬ ^ SATISFIABLE a=true, b=true (a a) (b b) _ ¬ ! ^ ¬ CSCE 235 Logic 5 Boolean Satisfiability Problem a ( a b) _ ¬ ^ SATISFIABLE a=true, b=true (a a) (b b) _ ¬ ! ^ ¬ UNSATISFIABLE Left side of implication is a tautology. Right side of implication is a contradiction. True cannot imply false. CSCE 235 Logic 6 Applications of SAT • Scheduling • Resource allocation • Hardware/software verification • Planning • Cryptography CSCE 235 Logic 7 Conjunctive Normal Form • Variable a, b, p, q, x1,x2 • Literal a, a, q, q, x , x ¬ ¬ 1 ¬ 1 • Clause (a b c) _ ¬ _ • Formula (a b c) _ ¬ _ (b c) ^ _ ( a c) ^ ¬ _ ¬ CSCE 235 Logic 8 Converting to CNF • All Boolean formulas can be converted to CNF • The operators can be rewritten in , , terms of ! $,⊕, ¬ _ ^ • , , can be rearranged using ¬– De Morgan_ ^ ’s Laws – Distributive Laws – Double Negative • May result in exponential size increase of the formula CSCE 235 Logic 9 Converting to CNF (a a) (b b) _ ¬ ! ^ ¬ ⌘ CSCE 235 Logic 10 Converting to CNF (a a) (b b) _ ¬ ! ^ ¬ ⌘ Implication (a a) (b b) ¬ _ ¬ _ ^ ¬ ⌘ CSCE 235 Logic 11 Converting to CNF (a a) (b b) _ ¬ ! ^ ¬ ⌘ Implication (a a) (b b) ¬ _ ¬ _ ^ ¬ ⌘ DeMorgan’s ( a a) (b b) ¬ ^ _ ^ ¬ ⌘ CSCE 235 Logic 12 Converting to CNF (a a) (b b) _ ¬ ! ^ ¬ ⌘ Implication (a a) (b b) ¬ _ ¬ _ ^ ¬ ⌘ DeMorgan’s ( a a) (b b) ¬ ^ _ ^ ¬ ⌘ ( a b) ( a b) (a b) (a b) ¬ _ ^ ¬ _ ¬ ^ _ ^ _ ¬ Distributive CSCE 235 Logic 13 Interpretation of CNF • Every clause must be satisfied by at least one true literal • Total possible number of solutions increases as number of variables increases • Clauses constrain the possible solutions • Smaller clauses are more constraining CSCE 235 Logic 14 Interpretation of CNF (a b c) a b C _ ¬ _ ¬ 0 0 0 (b c) 0 0 1 ^ _ 0 1 0 ( a) 0 1 1 ^ ¬ 1 0 0 1 0 1 1 1 0 1 1 1 CSCE 235 Logic 15 Interpretation of CNF (a b c) a b C _ ¬ _ ¬ ( a b c) 0 0 0 (b c) ¬ ¬ ^ ^ 0 0 1 ^ _ 0 1 0 ( a) 0 1 1 ^ ¬ 1 0 0 1 0 1 1 1 0 1 1 1 CSCE 235 Logic 16 Interpretation of CNF (a b c) a b C _ ¬ _ ¬ ( b c) 0 0 0 (b c) ¬ ¬ ^ ¬ 0 0 1 ^ _ 0 1 0 ( a) 0 1 1 ^ ¬ 1 0 0 1 0 1 1 1 0 1 1 1 CSCE 235 Logic 17 Interpretation of CNF (a b c) a b C _ ¬ _ ¬ (a) 0 0 0 (b c) ¬ 0 0 1 ^ _ 0 1 0 ( a) 0 1 1 ^ ¬ 1 0 0 1 0 1 1 1 0 1 1 1 CSCE 235 Logic 18 Interpretation of CNF (a b c) a b C _ ¬ _ ¬ 0 0 0 (b c) 0 0 1 ^ _ 0 1 0 ( a) 0 1 1 ^ ¬ 1 0 0 1 0 1 1 1 0 1 1 1 CSCE 235 Logic 19 Determining SAT/UNSAT • All that is required to show satisfiability is to find a valid solution • Many techniques available: – Guessing and checking – Systematic search – Inference CSCE 235 Logic 20 Systematic Search with Backtracking • Construct a binary tree of all combinations • Proceeds in a depth first manner • Each level corresponds to a variable • Each branch corresponds to a truth assignment • Branches of the tree are ‘pruned’ when the assignment cannot be extended in a satisfiable manner CSCE 235 Logic 21 Systematic Search with Backtracking (a b c) _ _ ( a b) ^ ¬ _ ¬ ( b c) ^ ¬ _ ¬ ( c a) ^ ¬ _ ¬ CSCE 235 Logic 22 Systematic Search with Backtracking (a b c) _ _ ( a b) ^ ¬ _ ¬ ( b c) ^ ¬ _ ¬ ( c a) ^ ¬ _ ¬ CSCE 235 Logic 23 Systematic Search with Backtracking (a b c) _ _ ( a b) ^ ¬ _ ¬ ( b c) ^ ¬ _ ¬ ( c a) ^ ¬ _ ¬ CSCE 235 Logic 24 Systematic Search with Backtracking (a b c) _ _ ( a b) ^ ¬ _ ¬ ( b c) ^ ¬ _ ¬ ( c a) ^ ¬ _ ¬ CSCE 235 Logic 25 Systematic Search with Backtracking (a b c) _ _ ( a b) ^ ¬ _ ¬ ( b c) ^ ¬ _ ¬ ( c a) ^ ¬ _ ¬ CSCE 235 Logic 26 Systematic Search with Backtracking (a b c) _ _ ( a b) ^ ¬ _ ¬ ( b c) ^ ¬ _ ¬ ( c a) ^ ¬ _ ¬ CSCE 235 Logic 27 Systematic Search with Backtracking (a b c) _ _ ( a b) ^ ¬ _ ¬ ( b c) ^ ¬ _ ¬ ( c a) ^ ¬ _ ¬ Satisfiable CSCE 235 Logic 28 Systematic Search with Backtracking (a b c) _ _ ( a b) ^ ¬ _ ¬ ( b c) ^ ¬ _ ¬ ( c a) ^ ¬ _ ¬ Satisfiable CSCE 235 Logic 29 Systematic Search with Backtracking (a b c) _ _ ( a b) ^ ¬ _ ¬ ( b c) ^ ¬ _ ¬ ( c a) ^ ¬ _ ¬ Satisfiable CSCE 235 Logic 30 Systematic Search with Backtracking (a b c) _ _ ( a b) ^ ¬ _ ¬ ( b c) ^ ¬ _ ¬ ( c a) ^ ¬ _ ¬ Satisfiable CSCE 235 Logic 31 Systematic Search with Backtracking (a b c) _ _ ( a b) ^ ¬ _ ¬ ( b c) ^ ¬ _ ¬ ( c a) ^ ¬ _ ¬ Satisfiable CSCE 235 Logic 32 Systematic Search with Backtracking (a b c) _ _ ( a b) ^ ¬ _ ¬ ( b c) ^ ¬ _ ¬ ( c a) ^ ¬ _ ¬ Satisfiable CSCE 235 Logic 33 Systematic Search with Backtracking (a b c) _ _ ( a b) ^ ¬ _ ¬ ( b c) ^ ¬ _ ¬ ( c a) ^ ¬ _ ¬ Satisfiable CSCE 235 Logic 34 Systematic Search with Backtracking (a b c) _ _ ( a b) ^ ¬ _ ¬ ( b c) ^ ¬ _ ¬ ( c a) ^ ¬ _ ¬ Satisfiable CSCE 235 Logic 35 Systematic Search with Backtracking (a b c) _ _ ( a b) ^ ¬ _ ¬ ( b c) ^ ¬ _ ¬ ( c a) ^ ¬ _ ¬ Satisfiable CSCE 235 Logic 36 Systematic Search with Backtracking (a b c) _ _ ( a b) ^ ¬ _ ¬ ( b c) ^ ¬ _ ¬ ( c a) ^ ¬ _ ¬ Satisfiable CSCE 235 Logic 37 Systematic Search with Backtracking (a b c) _ _ ( a b) ^ ¬ _ ¬ ( b c) ^ ¬ _ ¬ ( c a) ^ ¬ _ ¬ Satisfiable CSCE 235 Logic 38 Systematic Search with Backtracking (a b c) _ _ ( a b) ^ ¬ _ ¬ ( b c) ^ ¬ _ ¬ ( c a) ^ ¬ _ ¬ Satisfiable CSCE 235 Logic 39 Systematic Search with Backtracking (a b c) _ _ ( a b) ^ ¬ _ ¬ ( b c) ^ ¬ _ ¬ ( c a) ^ ¬ _ ¬ Satisfiable CSCE 235 Logic 40 Systematic Search with Backtracking (a b c) _ _ ( a b) ^ ¬ _ ¬ ( b c) ^ ¬ _ ¬ ( c a) ^ ¬ _ ¬ Satisfiable CSCE 235 Logic 41 Systematic Search with Backtracking (a b c) _ _ ( a b) ^ ¬ _ ¬ ( b c) ^ ¬ _ ¬ ( c a) ^ ¬ _ ¬ Satisfiable 3 solutions total CSCE 235 Logic 42.
Recommended publications
  • Boolean Satisfiability Solvers: Techniques and Extensions
    Boolean Satisfiability Solvers: Techniques and Extensions Georg WEISSENBACHER a and Sharad MALIK a a Princeton University Abstract. Contemporary satisfiability solvers are the corner-stone of many suc- cessful applications in domains such as automated verification and artificial intelli- gence. The impressive advances of SAT solvers, achieved by clever engineering and sophisticated algorithms, enable us to tackle Boolean Satisfiability (SAT) problem instances with millions of variables – which was previously conceived as a hope- less problem. We provide an introduction to contemporary SAT-solving algorithms, covering the fundamental techniques that made this revolution possible. Further, we present a number of extensions of the SAT problem, such as the enumeration of all satisfying assignments (ALL-SAT) and determining the maximum number of clauses that can be satisfied by an assignment (MAX-SAT). We demonstrate how SAT solvers can be leveraged to solve these problems. We conclude the chapter with an overview of applications of SAT solvers and their extensions in automated verification. Keywords. Satisfiability solving, Propositional logic, Automated decision procedures 1. Introduction Boolean Satisfibility (SAT) is the problem of checking if a propositional logic formula can ever evaluate to true. This problem has long enjoyed a special status in computer science. On the theoretical side, it was the first problem to be classified as being NP- complete. NP-complete problems are notorious for being hard to solve; in particular, in the worst case, the computation time of any known solution for a problem in this class increases exponentially with the size of the problem instance. On the practical side, SAT manifests itself in several important application domains such as the design and verification of hardware and software systems, as well as applications in artificial intelligence.
    [Show full text]
  • Deduction (I) Tautologies, Contradictions And
    D (I) T, & L L October , Tautologies, contradictions and contingencies Consider the truth table of the following formula: p (p ∨ p) () If you look at the final column, you will notice that the truth value of the whole formula depends on the way a truth value is assigned to p: the whole formula is true if p is true and false if p is false. Contrast the truth table of (p ∨ p) in () with the truth table of (p ∨ ¬p) below: p ¬p (p ∨ ¬p) () If you look at the final column, you will notice that the truth value of the whole formula does not depend on the way a truth value is assigned to p. The formula is always true because of the meaning of the connectives. Finally, consider the truth table table of (p ∧ ¬p): p ¬p (p ∧ ¬p) () This time the formula is always false no matter what truth value p has. Tautology A statement is called a tautology if the final column in its truth table contains only ’s. Contradiction A statement is called a contradiction if the final column in its truth table contains only ’s. Contingency A statement is called a contingency or contingent if the final column in its truth table contains both ’s and ’s. Let’s consider some examples from the book. Can you figure out which of the following sentences are tautologies, which are contradictions and which contingencies? Hint: the answer is the same for all the formulas with a single row. () a. (p ∨ ¬p), (p → p), (p → (q → p)), ¬(p ∧ ¬p) b.
    [Show full text]
  • Solving the Boolean Satisfiability Problem Using the Parallel Paradigm Jury Composition
    Philosophæ doctor thesis Hoessen Benoît Solving the Boolean Satisfiability problem using the parallel paradigm Jury composition: PhD director Audemard Gilles Professor at Universit´ed'Artois PhD co-director Jabbour Sa¨ıd Assistant Professor at Universit´ed'Artois PhD co-director Piette C´edric Assistant Professor at Universit´ed'Artois Examiner Simon Laurent Professor at University of Bordeaux Examiner Dequen Gilles Professor at University of Picardie Jules Vernes Katsirelos George Charg´ede recherche at Institut national de la recherche agronomique, Toulouse Abstract This thesis presents different technique to solve the Boolean satisfiability problem using parallel and distributed architec- tures. In order to provide a complete explanation, a careful presentation of the CDCL algorithm is made, followed by the state of the art in this domain. Once presented, two proposi- tions are made. The first one is an improvement on a portfo- lio algorithm, allowing to exchange more data without loosing efficiency. The second is a complete library with its API al- lowing to easily create distributed SAT solver. Keywords: SAT, parallelism, distributed, solver, logic R´esum´e Cette th`ese pr´esente diff´erentes techniques permettant de r´esoudre le probl`eme de satisfaction de formule bool´eenes utilisant le parall´elismeet du calcul distribu´e. Dans le but de fournir une explication la plus compl`ete possible, une pr´esentation d´etaill´ee de l'algorithme CDCL est effectu´ee, suivi d'un ´etatde l'art. De ce point de d´epart,deux pistes sont explor´ees. La premi`ereest une am´eliorationd'un algorithme de type portfolio, permettant d'´echanger plus d'informations sans perte d’efficacit´e.
    [Show full text]
  • 12 Propositional Logic
    CHAPTER 12 ✦ ✦ ✦ ✦ Propositional Logic In this chapter, we introduce propositional logic, an algebra whose original purpose, dating back to Aristotle, was to model reasoning. In more recent times, this algebra, like many algebras, has proved useful as a design tool. For example, Chapter 13 shows how propositional logic can be used in computer circuit design. A third use of logic is as a data model for programming languages and systems, such as the language Prolog. Many systems for reasoning by computer, including theorem provers, program verifiers, and applications in the field of artificial intelligence, have been implemented in logic-based programming languages. These languages generally use “predicate logic,” a more powerful form of logic that extends the capabilities of propositional logic. We shall meet predicate logic in Chapter 14. ✦ ✦ ✦ ✦ 12.1 What This Chapter Is About Section 12.2 gives an intuitive explanation of what propositional logic is, and why it is useful. The next section, 12,3, introduces an algebra for logical expressions with Boolean-valued operands and with logical operators such as AND, OR, and NOT that Boolean algebra operate on Boolean (true/false) values. This algebra is often called Boolean algebra after George Boole, the logician who first framed logic as an algebra. We then learn the following ideas. ✦ Truth tables are a useful way to represent the meaning of an expression in logic (Section 12.4). ✦ We can convert a truth table to a logical expression for the same logical function (Section 12.5). ✦ The Karnaugh map is a useful tabular technique for simplifying logical expres- sions (Section 12.6).
    [Show full text]
  • Logic, Proofs
    CHAPTER 1 Logic, Proofs 1.1. Propositions A proposition is a declarative sentence that is either true or false (but not both). For instance, the following are propositions: “Paris is in France” (true), “London is in Denmark” (false), “2 < 4” (true), “4 = 7 (false)”. However the following are not propositions: “what is your name?” (this is a question), “do your homework” (this is a command), “this sentence is false” (neither true nor false), “x is an even number” (it depends on what x represents), “Socrates” (it is not even a sentence). The truth or falsehood of a proposition is called its truth value. 1.1.1. Connectives, Truth Tables. Connectives are used for making compound propositions. The main ones are the following (p and q represent given propositions): Name Represented Meaning Negation p “not p” Conjunction p¬ q “p and q” Disjunction p ∧ q “p or q (or both)” Exclusive Or p ∨ q “either p or q, but not both” Implication p ⊕ q “if p then q” Biconditional p → q “p if and only if q” ↔ The truth value of a compound proposition depends only on the value of its components. Writing F for “false” and T for “true”, we can summarize the meaning of the connectives in the following way: 6 1.1. PROPOSITIONS 7 p q p p q p q p q p q p q T T ¬F T∧ T∨ ⊕F →T ↔T T F F F T T F F F T T F T T T F F F T F F F T T Note that represents a non-exclusive or, i.e., p q is true when any of p, q is true∨ and also when both are true.
    [Show full text]
  • Logic, Sets, and Proofs David A
    Logic, Sets, and Proofs David A. Cox and Catherine C. McGeoch Amherst College 1 Logic Logical Statements. A logical statement is a mathematical statement that is either true or false. Here we denote logical statements with capital letters A; B. Logical statements be combined to form new logical statements as follows: Name Notation Conjunction A and B Disjunction A or B Negation not A :A Implication A implies B if A, then B A ) B Equivalence A if and only if B A , B Here are some examples of conjunction, disjunction and negation: x > 1 and x < 3: This is true when x is in the open interval (1; 3). x > 1 or x < 3: This is true for all real numbers x. :(x > 1): This is the same as x ≤ 1. Here are two logical statements that are true: x > 4 ) x > 2. x2 = 1 , (x = 1 or x = −1). Note that \x = 1 or x = −1" is usually written x = ±1. Converses, Contrapositives, and Tautologies. We begin with converses and contrapositives: • The converse of \A implies B" is \B implies A". • The contrapositive of \A implies B" is \:B implies :A" Thus the statement \x > 4 ) x > 2" has: • Converse: x > 2 ) x > 4. • Contrapositive: x ≤ 2 ) x ≤ 4. 1 Some logical statements are guaranteed to always be true. These are tautologies. Here are two tautologies that involve converses and contrapositives: • (A if and only if B) , ((A implies B) and (B implies A)). In other words, A and B are equivalent exactly when both A ) B and its converse are true.
    [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]
  • (Slides) Propositional Logic: Semantics
    Propositional Logic: Semantics Alice Gao Lecture 4, September 19, 2017 Semantics 1/56 Announcements Semantics 2/56 The roadmap of propositional logic Semantics 3/56 FCC spectrum auction — an application of propositional logic To repurpose radio spectrums 2 auctions: • one to buy back spectrums from broadcasters • the other to sell spectrums to telecoms A computational problem in the buy back auction: If I pay these broadcasters to go off air, could I repackage the spectrums and sellto telecoms? Could I lower your price and still manage to get useful spectrums to sell to telecoms? The problem comes down to, how many satisfiability problems can I solve in a very short amount of time? (determine that a formula is satisfiable or determine that it is unsatisfiable.) Talk by Kevin Leyton-Brown https://www.youtube.com/watch?v=u1-jJOivP70 Semantics 4/56 Learning goals By the end of this lecture, you should be able to • Evaluate the truth value of a formula • Define a (truth) valuation. • Determine the truth value of a formula by using truth tables. • Determine the truth value of a formula by using valuation trees. • Determine and prove whether a formula has a particular property • Define tautology, contradiction, and satisfiable formula. • Compare and contrast the three properties (tautology, contradiction, and satisfiable formula). • Prove whether a formula is a tautology, a contradiction, or satisfiable, using a truth table and/or a valuation tree. • Describe strategies to prove whether a formula is a tautology, a contradiction or a satisfiable formula. Semantics 5/56 The meaning of well-formed formulas To interpret a formula, we have to give meanings to the propositional variables and the connectives.
    [Show full text]
  • Lecture 2.2: Tautology and Contradiction
    Lecture 2.2: Tautology and contradiction Matthew Macauley Department of Mathematical Sciences Clemson University http://www.math.clemson.edu/~macaule/ Math 4190, Discrete Mathematical Structures M. Macauley (Clemson) Lecture 2.2: Tautology and contradiction Discrete Mathematical Structures 1 / 8 Motivation Digital electronic circuits are made from large collections of logic gates, which are physical devices that implement Boolean functions. Figure: Image by user EICC on Vimeo, under a Creative Commons license. M. Macauley (Clemson) Lecture 2.2: Tautology and contradiction Discrete Mathematical Structures 2 / 8 Motivation Digital electronic circuits are made from large collections of logic gates, which are physical devices that implement Boolean functions. Figure: Image by user EICC on Vimeo, under a Creative Commons license. M. Macauley (Clemson) Lecture 2.2: Tautology and contradiction Discrete Mathematical Structures 3 / 8 Motivation Understanding digital circuits requires an understanding of Boolean logic. Recall that we have seen the following logical operations: p q p ^ q p _ q p ! q q ! p :q !:p p $ q 0 0 0 0 1 1 1 1 0 1 0 1 1 0 1 0 1 0 0 1 0 1 0 0 1 1 1 1 1 1 1 1 Note that: p ! q has the same truth table as (:p ^ :q) _ (:p ^ q) _ (p ^ q), or just :p _ q. q ! p has the same truth table as (:p ^ :q) _ (p ^ :q) _ (p ^ q), or just p _:q. p $ q has the same truth table as (:p ^ :q) _ (p ^ q). Not surprisingly, every Boolean function can be written with ^, _, and :.
    [Show full text]
  • My Slides for a Course on Satisfiability
    Satisfiability Victor W. Marek Computer Science University of Kentucky Spring Semester 2005 Satisfiability – p.1/97 Satisfiability story ie× Á Satisfiability - invented in the ¾¼ of XX century by philosophers and mathematicians (Wittgenstein, Tarski) ie× Á Shannon (late ¾¼ ) applications to what was then known as electrical engineering ie× ie× Á Fundamental developments: ¼ and ¼ – both mathematics of it, and fundamental algorithms ie× Á ¼ - progress in computing speed and solving moderately large problems Á Emergence of “killer applications” in Computer Engineering, Bounded Model Checking Satisfiability – p.2/97 Current situation Á SAT solvers as a class of software Á Solving large cases generated by industrial applications Á Vibrant area of research both in Computer Science and in Computer Engineering ¯ Various CS meetings (SAT, AAAI, CP) ¯ Various CE meetings (CAV, FMCAD, DATE) ¯ CE meetings Stressing applications Satisfiability – p.3/97 This Course Á Providing mathematical and computer science foundations of SAT ¯ General mathematical foundations ¯ Two- and Three- valued logics ¯ Complete sets of functors ¯ Normal forms (including ite) ¯ Compactness of propositional logic ¯ Resolution rule, completeness of resolution, semantical resolution ¯ Fundamental algorithms for SAT ¯ Craig Lemma Satisfiability – p.4/97 And if there is enough of time and will... Á Easy cases of SAT ¯ Horn ¯ 2SAT ¯ Linear formulas Á And if there is time (but notes will be provided anyway) ¯ Expressing runs of polynomial-time NDTM as SAT, NP completeness ¯ “Mix and match” ¯ Learning in SAT, partial closure under resolution ¯ Bounded Model Checking Satisfiability – p.5/97 Various remarks Á Expected involvement of Dr. Truszczynski Á An extensive set of notes (> 200 pages), covering most of topics will be provided f.o.c.
    [Show full text]
  • Tautology Checkers in Isabelle and Haskell ⋆
    Tautology Checkers in Isabelle and Haskell ? Jørgen Villadsen Algorithms, Logic and Graphs Section Department of Applied Mathematics and Computer Science Technical University of Denmark Richard Petersens Plads, Building 324, DK-2800 Kongens Lyngby, Denmark Abstract. With the purpose of teaching functional programming and automated reasoning to computer science students, we formally verify a sound, complete and terminating tautology checker in Isabelle with code generation to Haskell. We describe a series of approaches and finish with a formalization based on formulas in negation normal form where the Isabelle/HOL functions consist of just 4 lines and the Isabelle/HOL proofs also consist of just 4 lines. We investigate the generated Haskell code and present a 24-line manually assembled program. 1 Introduction Logic textbooks usually have pen-and-paper proofs only. But we find that the formalization of logic can be a very rewarding endeavor. Our main interest in the formalizations of logic is for teaching an advanced course on automated reasoning for computer science students at the Technical University of Denmark (DTU). The prerequisites for the automated reasoning course include courses in logic and functional programming. In the course, we start with the formal verification of a sound, complete and terminating tautology checker as described in the present paper. We end with the formal verification of a proof system kernel for first-order logic [7]. Both in our courses and and in our student projects and theses we mainly use the proof assistant Isabelle/HOL [10]. https://isabelle.in.tum.de/ Our longer term goal is a formalized logic textbook.
    [Show full text]
  • Section 2.2: Tautological Consequence Review Vocabulary
    Section 2.2: Tautological Consequence Math 350: Logic Class03 Mon 29-Jan-2001 Review vocabulary: Logical connectives; conjuction; disjunction; propositions; antecedent; conclusion; propsitional variable. Review truth tables (from Math 140) for each of the ¯ve logical connectives. Recall: The only time p q is false is when? When p is T and q is F. ! Remember def of when a proposition is said to be a tautology? (Informal def:) A proposition is said to be a tautology if it is always true, regardless of whether each of its propisitional vars is T or F. For more precise defs (and to learn new concepts such as satis¯ability, tautological consequence, etc.) we ¯rst de¯ne truth functions and truth assignments. De¯nition 1. A truth assignment is a function from the propostional variables p1; p2; to T; F . f ¢ ¢ ¢g f g (In other words, we assign a value of T or F to each propositional variable.) T if n = 1; 2 Example 1. Let Á be the truth assignment Á(p ) = . Let A = (p p ). n ½ F if n > 2 1 3 ^ Q: Under the truth assignment Á, is A true or false? Ans: F. So we write Á(A) = F. De¯nition 2. A formula A is said to be a tautology if for every truth assignment Á, Á(A) = T. De¯nition 3. A formula A is said to be a satis¯able if for some truth assignment Á, Á(A) = T; we say Á satis¯es A, or A is satis¯ed by Á. Example 2. Determine whether each of the following formulas is a tautology, satis¯able, both, or neither.
    [Show full text]