Decision Procedures. Jochen Hoenicke. Software Engineering Albert-Ludwigs-University Freiburg. Summer 2012

Size: px
Start display at page:

Download "Decision Procedures. Jochen Hoenicke. Software Engineering Albert-Ludwigs-University Freiburg. Summer 2012"

Transcription

1 Decision Procedures Jochen Hoenicke Software Engineering Albert-Ludwigs-University Freiburg Summer 2012 Jochen Hoenicke (Software Engineering) Decision Procedures Summer / 28

2 Quantifier-free Rationals

3 Conjunctive Quantifier-free Fragment In the next lectures, we consider conjunctive quantifier-free Σ-formulae, ie, conjunctions of Σ-literals (Σ-atoms or negations of Σ-atoms) Remark 1: From this an algorithm for arbitrary quantifier-free formulae can be built For given arbitrary quantifier-free Σ-formula F, convert it into DNF Σ-formula F 1 F k where each F i conjunctive F is T -satisfiable iff at least one F i is T -satisfiable Remark 2: One can also combine a decision procedure for conjunctive fragment with DPLL Jochen Hoenicke (Software Engineering) Decision Procedures Summer / 28

4 Conjunctive Quantifier-free Fragment of Rationals For T Q a formula in the conjunctive fragment looks like this: a 11 x 1 + a 12 x a 1n x n b 1 a 21 x 1 + a 22 x a 2n x n b 2 a m1 x 1 + a m2 x a mn x n b m as vectors: A x b Note: x = b can be expressed as x b x b (x b) can be expressed as x < b x < b requires some additional handling (later) Jochen Hoenicke (Software Engineering) Decision Procedures Summer / 28

5 Dutertre de Moura Algorithm Presented 2006 by B Dutertre and L de Moura Based on Simplex algorithm Simpler; it doesn t optimize Jochen Hoenicke (Software Engineering) Decision Procedures Summer / 28

6 Nonbasic and Basic Variables The set of variables in the formula is called N (set of non-basic variables) Additionally we introduce basic variables B, one variable for each linear term in the formula: y i := a i1 x 1 + a i2 x a in x n The basic variables depend on the non-basic variables Note: The naming is counter-intuitive Unfortunately it is the standard naming for Simplex algorithm We need to find a solution for y 1 b 1,, y m b m Jochen Hoenicke (Software Engineering) Decision Procedures Summer / 28

7 Computing Basic from Non-basic Variables The basic variables can be computed by a simple Matrix computation: y 1 a 11 a 1n x 1 = y m a m1 a mn x n One can also use tableaux notation: x 1 x n y 1 a 11 a 1n y m a m1 a mn We start by setting all non-basic to 0 and computing the basic variables, denoted as β 0 (x) := 0 The valuation β s assigns values for the variables at step s Jochen Hoenicke (Software Engineering) Decision Procedures Summer / 28

8 Configuration A configuration at step s of the algorithm consists of a partition of the variables into non-basic and basic variables N s B s = {x 1,, x n, y 1, y m }, a tableaux A (a m n matrix) where the columns correspond to non-basic and rows correspond to basic variables, and a valuation β s, that assigns β s (x i ) = 0 for x i N s, β s (y i ) = b i for y i N s, β s (z i ) = z j N s a ij β(z j ) for z i B s (Here z stands for either an x or a y variable) The initial configuration is: N 0 = {x 1,, x n }, B 0 = {y 1,, y m }, A 0 = A, β 0 (x i ) = 0 In later steps variables from N and B are swapped Jochen Hoenicke (Software Engineering) Decision Procedures Summer / 28

9 Pivoting aka Exchanging Basic and Non-basic Variables Suppose β s is not a solution for y 1 b 1,, y m b m Let y i be a variable whose value β s (y i ) > b i Consider the row in the matrix: y i = a i1 z 1 + a i2 z a in z n Idea: Choose a z j, then solve z j in the above equation Thus, z j becomes non-basic variable, y i becomes basic Then decrease β(y i ) to b i This will either decrease z j (if a ij > 0) or increase z j (if a ij < 0, z j must be a x-variable) Solving z j in the above equation gives: z j = a i1 a ij z 1 + a i2 a ij z a in z n + 1 y i a ij a ij Jochen Hoenicke (Software Engineering) Decision Procedures Summer / 28

10 Result of Pivoting After pivoting y i and z j the matrix looks as follows: y 1 = (a 11 a 1j a i1 a ij )z a 1j a ij y i + + (a 1n a 1j a in a ij )z n z j = a i1 a ij z a ij y i + + a in a ij z n y m = (a m1 a mj a i1 a ij )z a mj a ij y i + + (a mn a mj a in a ij )z n Now, set β s+1 (y i ) to b i and recompute basic variables Jochen Hoenicke (Software Engineering) Decision Procedures Summer / 28

11 Detecting Conflicts We may arrive at a configuration like: y i = 0 x a ij1 y j1 + + a ijk y jk + 0 x n where the non-basic y variables are set to their bound: β s (y j1 ) = b j1,, β s (y jk ) = b jk, coefficients of x variables are zero, coefficients a ij1,, a ijk β s (y i ) > b i 0, and Then, we have a conflict: The formula is not satisfiable y j1 b j1 y jk b jk y i > b i Jochen Hoenicke (Software Engineering) Decision Procedures Summer / 28

12 Example Consider the formula F : x 1 + x 2 4 x 1 x 2 1 We have two non-basic variables N = {x 1, x 2 } Define basic variables B = {y 1, y 2 }: y 1 = x 1 x 2, y 1 4 y 2 = x 1 x 2, y 2 1 We write the equation as a tableaux: x 1 x 2 y y Jochen Hoenicke (Software Engineering) Decision Procedures Summer / 28

13 Example (cont) Tableaux: x 1 x 2 y y Values: x 1 = x 2 = 0 y 1 = 0 > 4 (!) y 2 = 0 1 Pivot y 1 against x 1 : x 1 = y 1 x 2 New Tableaux: y 1 x 2 x y Jochen Hoenicke (Software Engineering) Decision Procedures Summer / 28

14 Example (cont) Tableaux: y 1 x 2 x y Values: y 1 = 4, x 2 = 0 x 1 = 4 y 2 = 4 > 1 (!) y 2 cannot be pivoted with y 1, since 1 negative Pivot y 2 and x 2 : New Tableaux: y 1 y 2 x x Jochen Hoenicke (Software Engineering) Decision Procedures Summer / 28

15 Example (cont) Tableaux: y 1 y 2 x x Values: y 1 = 4, y 2 = 1 x 1 = 25 x 2 = 15 We found a satisfying interpretation for: F : x 1 + x 2 4 x 1 x 2 1 Jochen Hoenicke (Software Engineering) Decision Procedures Summer / 28

16 Example Now, consider the formula F : x 1 + x 2 4 x 1 x 2 1 x 2 1 We have two non-basic variables N = {x 1, x 2 } Define basic variables B = {y 1, y 2, y 3 }: y 1 = x 1 x 2, y 1 4 y 2 = x 1 x 2, y 2 1 y 3 = x 2, y 3 1 We write the equation as tableaux: x 1 x 2 y y y Jochen Hoenicke (Software Engineering) Decision Procedures Summer / 28

17 Example (cont) The first two steps are identical: pivot y 1 resp y 2 and x 1 resp x 2 y 1 y 2 x x y Jochen Hoenicke (Software Engineering) Decision Procedures Summer / 28

18 Example (cont) Tableaux: y 1 y 2 x x y Values: y 1 = 4, y 2 = 1 x 1 = 25 x 2 = 15 y 3 = 15 > 1! Now, y 3 cannot pivot, since all coefficients in that row are negative Conflict is x 1 x 2 4 x 1 x 2 1 x 2 > 1 Formula F is unsatisfiable Jochen Hoenicke (Software Engineering) Decision Procedures Summer / 28

19 Termination To guarantee termination we need a fixed pivot selection rule The following rule works: When choosing the basic variable (row) to pivot: Choose the y-variable with the smallest index, whose value exceeds the bound If there is no such variable, return satisfiable When choosing the non-basic variable (column) to pivot with: if possible, take a x-variable Otherwise, take the y-variable with the smallest index, such that the corresponding coefficient in the matrix is positive If there is no such variable, return unsatisfiable Jochen Hoenicke (Software Engineering) Decision Procedures Summer / 28

20 Termination Proof Assume we have an infinite computation of the algorithm Let y j be the variable with the largest index, that is infinitely often pivoted Look at the step where y j is pivoted to a non-basic variable and where for k > j, y k is not pivoted any more The (ordered) tableaux at the point of pivoting looks like this: x x y y y j y y i 0 0 /0 /0 + ±/0 (+ denotes a positive coefficient, a negative coefficient) After pivoting the tableaux changes to: x x y y y i y y j 0 0 +/0 +/0 + /0 Jochen Hoenicke (Software Engineering) Decision Procedures Summer / 28

21 Termination Proof (cont) After pivoting the tableaux changes to: x x y y y i y y j 0 0 +/0 +/0 + /0 k<j,y k N s a k b k + k>j,y k N s a k b k = β s (y j ) < b j, where a k 0 for k < j Now look at the step s where y j is pivoted back By the pivoting rule: β s (y k ) b k for all k < j For k > j, the non-basic/basic variables do not change Therefore, the value of y j can only get smaller β s (y j ) = This contradicts β s (y j ) > b j k<j,y k N s a k β s (y k ) + k>j,y k N s a k b k < b j Therefore, assumption was wrong and algorithm terminates Jochen Hoenicke (Software Engineering) Decision Procedures Summer / 28

22 Strict Bounds With strict bounds the formula looks like this: a 11 x 1 + a 12 x a 1n x n b 1 a i1 x 1 + a i2 x a in x n b i a (i+1)1 x 1 + a (i+1)2 x a (i+1)n x n < b i+1 a m1 x 1 + a m2 x a mn x n < b m If the formula is satisfiable, then there is an ε > 0 with: a 11 x 1 + a 12 x a 1n x n b 1 a i1 x 1 + a i2 x a in x n b i a (i+1)1 x 1 + a (i+1)2 x a (i+1)n x n b i+1 ε a m1 x 1 + a m2 x a mn x n b m ε Jochen Hoenicke (Software Engineering) Decision Procedures Summer / 28

23 Infinitesimal Numbers We compute with ε symbolically Our bounds are elements of Q ε := {a 1 + a 2 ε a 1, a 2 Q} The arithmetical operators and the ordering are defined as: (a 1 + a 2 ε) + (b 1 + b 2 ε) = (a 1 + b 1 ) + (a 2 + b 2 )ε a (b 1 + b 2 ε) = ab 1 + ab 2 ε a 1 + a 2 ε b 1 + b 2 ε iff a 1 < b 1 (a 1 = b 1 a 2 b 2 ) Note: Q ε is a two-dimensional vector space over Q Changes to the configuration: β gives values for variables in Q ε The tableaux does not contain ε It is still a Q m n matrix Jochen Hoenicke (Software Engineering) Decision Procedures Summer / 28

24 Example F 1 : 3x 1 + 2x 2 < 5 2x 1 + 3x 2 < 1 x 1 + x 2 > 1 Jochen Hoenicke (Software Engineering) Decision Procedures Summer / 28

25 Example F 1 Step 1: x 1 x 2 β b i β 0 0 y ε y ε y ε (!) Step 2: y 3 x 2 β b i β 1 ε 0 y ε 5 ε y ε 1 ε (!) x ε Step 3: y 3 y 2 β b i β 1 ε 1 ε y ε 5 ε x ε x ε β(y 1 ) = 4 + 6ε 5 ε (for 0 < ε 1/7) Solution (ε = 01): x 1 = 24, x 2 = 13 Jochen Hoenicke (Software Engineering) Decision Procedures Summer / 28

26 Example F 2 : 3x 1 + 2x 2 < 5 2x 1 x 2 > 1 x 1 + 3x 2 > 4 Jochen Hoenicke (Software Engineering) Decision Procedures Summer / 28

27 Example F 2 Step 1: x 1 x 2 β b i β 0 0 y ε y ε (!) y ε (!) Step 2: x 1 y 2 β b i β 0 1 ε y ε 5 ε x ε y ε 4 ε (!) Step 3: y 3 y 2 β b i β 4 ε 1 ε y ε 5 ε (!) x 2-2/7 1/ /7ε x 1-1/7-3/ /7ε Now 5 + 2ε > 5 ε but all coefficients in first row negative Unsatisfiable Jochen Hoenicke (Software Engineering) Decision Procedures Summer / 28

28 Correctness of the Algorithm Theorem (Sound and Complete) Quantifier-free conjunctive Σ Q -formula F is T Q -satisfiable iff the Dutertre-de-Moura algorithm returns satisfiable Jochen Hoenicke (Software Engineering) Decision Procedures Summer / 28

Gomory Cuts. Chapter 5. Linear Arithmetic. Decision Procedures. An Algorithmic Point of View. Revision 1.0

Gomory Cuts. Chapter 5. Linear Arithmetic. Decision Procedures. An Algorithmic Point of View. Revision 1.0 Chapter 5 Linear Arithmetic Decision Procedures An Algorithmic Point of View D.Kroening O.Strichman Revision 1.0 Cutting planes Recall that in Branch & Bound we first solve a relaxed problem (i.e., no

More information

Constraint Logic Programming and Integrating Simplex with DPLL(T )

Constraint Logic Programming and Integrating Simplex with DPLL(T ) Constraint Logic Programming and Integrating Simplex with DPLL(T ) Ali Sinan Köksal December 3, 2010 Constraint Logic Programming Underlying concepts The CLP(X ) framework Comparison of CLP with LP Integrating

More information

Formal Methods for Java

Formal Methods for Java Formal Methods for Java Lecture 12: Soundness of Sequent Calculus Jochen Hoenicke Software Engineering Albert-Ludwigs-University Freiburg June 12, 2017 Jochen Hoenicke (Software Engineering) Formal Methods

More information

Formal Methods for Java

Formal Methods for Java Formal Methods for Java Lecture 20: Sequent Calculus Jochen Hoenicke Software Engineering Albert-Ludwigs-University Freiburg January 15, 2013 Jochen Hoenicke (Software Engineering) Formal Methods for Java

More information

Logic and Inferences

Logic and Inferences Artificial Intelligence Logic and Inferences Readings: Chapter 7 of Russell & Norvig. Artificial Intelligence p.1/34 Components of Propositional Logic Logic constants: True (1), and False (0) Propositional

More information

CS156: The Calculus of Computation

CS156: The Calculus of Computation CS156: The Calculus of Computation Zohar Manna Winter 2010 It is reasonable to hope that the relationship between computation and mathematical logic will be as fruitful in the next century as that between

More information

Foundations of Artificial Intelligence

Foundations of Artificial Intelligence Foundations of Artificial Intelligence 7. Propositional Logic Rational Thinking, Logic, Resolution Wolfram Burgard, Maren Bennewitz, and Marco Ragni Albert-Ludwigs-Universität Freiburg Contents 1 Agents

More information

Foundations of Artificial Intelligence

Foundations of Artificial Intelligence Foundations of Artificial Intelligence 7. Propositional Logic Rational Thinking, Logic, Resolution Joschka Boedecker and Wolfram Burgard and Bernhard Nebel Albert-Ludwigs-Universität Freiburg May 17, 2016

More information

CS 486: Applied Logic Lecture 7, February 11, Compactness. 7.1 Compactness why?

CS 486: Applied Logic Lecture 7, February 11, Compactness. 7.1 Compactness why? CS 486: Applied Logic Lecture 7, February 11, 2003 7 Compactness 7.1 Compactness why? So far, we have applied the tableau method to propositional formulas and proved that this method is sufficient and

More information

Motivation. CS389L: Automated Logical Reasoning. Lecture 10: Overview of First-Order Theories. Signature and Axioms of First-Order Theory

Motivation. CS389L: Automated Logical Reasoning. Lecture 10: Overview of First-Order Theories. Signature and Axioms of First-Order Theory Motivation CS389L: Automated Logical Reasoning Lecture 10: Overview of First-Order Theories Işıl Dillig Last few lectures: Full first-order logic In FOL, functions/predicates are uninterpreted (i.e., structure

More information

Integrating Simplex with DPLL(T )

Integrating Simplex with DPLL(T ) CSL Technical Report SRI-CSL-06-01 May 23, 2006 Integrating Simplex with DPLL(T ) Bruno Dutertre and Leonardo de Moura This report is based upon work supported by the Defense Advanced Research Projects

More information

1 FUNDAMENTALS OF LOGIC NO.10 HERBRAND THEOREM Tatsuya Hagino hagino@sfc.keio.ac.jp lecture URL https://vu5.sfc.keio.ac.jp/slide/ 2 So Far Propositional Logic Logical connectives (,,, ) Truth table Tautology

More information

Computing a Complete Basis for Equalities Implied by a System of LRA Constraints

Computing a Complete Basis for Equalities Implied by a System of LRA Constraints Computing a Complete Basis for Equalities Implied by a System of LRA Constraints Martin Bromberger 1,2 and Christoph Weidenbach 1 1 Max Planck Institute for Informatics, Saarbrücken, Germany {mbromber,weidenb}@mpi-inf.mpg.de

More information

Introduction to Logic in Computer Science: Autumn 2006

Introduction to Logic in Computer Science: Autumn 2006 Introduction to Logic in Computer Science: Autumn 2006 Ulle Endriss Institute for Logic, Language and Computation University of Amsterdam Ulle Endriss 1 Plan for Today Today s class will be an introduction

More information

Satisfiability Modulo Theories

Satisfiability Modulo Theories Satisfiability Modulo Theories Bruno Dutertre SRI International Leonardo de Moura Microsoft Research Satisfiability a > b + 2, a = 2c + 10, c + b 1000 SAT a = 0, b = 3, c = 5 Model 0 > 3 + 2, 0 = 2 5 +

More information

Deductive Systems. Lecture - 3

Deductive Systems. Lecture - 3 Deductive Systems Lecture - 3 Axiomatic System Axiomatic System (AS) for PL AS is based on the set of only three axioms and one rule of deduction. It is minimal in structure but as powerful as the truth

More information

The Eager Approach to SMT. Eager Approach to SMT

The Eager Approach to SMT. Eager Approach to SMT The Eager Approach to SMT Sanjit A. Seshia UC Berkeley Slides based on ICCAD 09 Tutorial Eager Approach to SMT Input Formula Satisfiability-preserving Boolean Encoder Boolean Formula SAT Solver SAT Solver

More information

SMT BASICS WS 2017/2018 ( ) LOGIC SATISFIABILITY MODULO THEORIES. Institute for Formal Models and Verification Johannes Kepler Universität Linz

SMT BASICS WS 2017/2018 ( ) LOGIC SATISFIABILITY MODULO THEORIES. Institute for Formal Models and Verification Johannes Kepler Universität Linz LOGIC SATISFIABILITY MODULO THEORIES SMT BASICS WS 2017/2018 (342.208) Armin Biere Martina Seidl biere@jku.at martina.seidl@jku.at Institute for Formal Models and Verification Johannes Kepler Universität

More information

Decision Procedures. Jochen Hoenicke. Software Engineering Albert-Ludwigs-University Freiburg. Winter Term 2016/17

Decision Procedures. Jochen Hoenicke. Software Engineering Albert-Ludwigs-University Freiburg. Winter Term 2016/17 Decision Procedures Jochen Hoenicke Software Engineering Albert-Ludwigs-University Freiburg Winter Term 2016/17 Jochen Hoenicke (Software Engineering) Decision Procedures Winter Term 2016/17 1 / 436 Program

More information

Foundations of Artificial Intelligence

Foundations of Artificial Intelligence Foundations of Artificial Intelligence 7. Propositional Logic Rational Thinking, Logic, Resolution Joschka Boedecker and Wolfram Burgard and Frank Hutter and Bernhard Nebel Albert-Ludwigs-Universität Freiburg

More information

Example. 1 Rows 1,..., m of the simplex tableau remain lexicographically positive

Example. 1 Rows 1,..., m of the simplex tableau remain lexicographically positive 3.4 Anticycling Lexicographic order In this section we discuss two pivoting rules that are guaranteed to avoid cycling. These are the lexicographic rule and Bland s rule. Definition A vector u R n is lexicographically

More information

LOGIC PROPOSITIONAL REASONING

LOGIC PROPOSITIONAL REASONING LOGIC PROPOSITIONAL REASONING WS 2017/2018 (342.208) Armin Biere Martina Seidl biere@jku.at martina.seidl@jku.at Institute for Formal Models and Verification Johannes Kepler Universität Linz Version 2018.1

More information

Propositional Logic: Evaluating the Formulas

Propositional Logic: Evaluating the Formulas Institute for Formal Models and Verification Johannes Kepler University Linz VL Logik (LVA-Nr. 342208) Winter Semester 2015/2016 Propositional Logic: Evaluating the Formulas Version 2015.2 Armin Biere

More information

ANALYTICAL MATHEMATICS FOR APPLICATIONS 2018 LECTURE NOTES 3

ANALYTICAL MATHEMATICS FOR APPLICATIONS 2018 LECTURE NOTES 3 ANALYTICAL MATHEMATICS FOR APPLICATIONS 2018 LECTURE NOTES 3 ISSUED 24 FEBRUARY 2018 1 Gaussian elimination Let A be an (m n)-matrix Consider the following row operations on A (1) Swap the positions any

More information

First-Order Logic First-Order Theories. Roopsha Samanta. Partly based on slides by Aaron Bradley and Isil Dillig

First-Order Logic First-Order Theories. Roopsha Samanta. Partly based on slides by Aaron Bradley and Isil Dillig First-Order Logic First-Order Theories Roopsha Samanta Partly based on slides by Aaron Bradley and Isil Dillig Roadmap Review: propositional logic Syntax and semantics of first-order logic (FOL) Semantic

More information

Lecture 4: Algebra, Geometry, and Complexity of the Simplex Method. Reading: Sections 2.6.4, 3.5,

Lecture 4: Algebra, Geometry, and Complexity of the Simplex Method. Reading: Sections 2.6.4, 3.5, Lecture 4: Algebra, Geometry, and Complexity of the Simplex Method Reading: Sections 2.6.4, 3.5, 10.2 10.5 1 Summary of the Phase I/Phase II Simplex Method We write a typical simplex tableau as z x 1 x

More information

Satisfiability and SAT Solvers. CS 270 Math Foundations of CS Jeremy Johnson

Satisfiability and SAT Solvers. CS 270 Math Foundations of CS Jeremy Johnson Satisfiability and SAT Solvers CS 270 Math Foundations of CS Jeremy Johnson Conjunctive Normal Form Conjunctive normal form (products of sums) Conjunction of clauses (disjunction of literals) For each

More information

CS 486: Lecture 2, Thursday, Jan 22, 2009

CS 486: Lecture 2, Thursday, Jan 22, 2009 CS 486: Lecture 2, Thursday, Jan 22, 2009 Mark Bickford January 22, 2009 1 Outline Propositional formulas Interpretations and Valuations Validity and Satisfiability Truth tables and Disjunctive Normal

More information

7. Propositional Logic. Wolfram Burgard and Bernhard Nebel

7. Propositional Logic. Wolfram Burgard and Bernhard Nebel Foundations of AI 7. Propositional Logic Rational Thinking, Logic, Resolution Wolfram Burgard and Bernhard Nebel Contents Agents that think rationally The wumpus world Propositional logic: syntax and semantics

More information

1111: Linear Algebra I

1111: Linear Algebra I 1111: Linear Algebra I Dr. Vladimir Dotsenko (Vlad) Lecture 5 Dr. Vladimir Dotsenko (Vlad) 1111: Linear Algebra I Lecture 5 1 / 12 Systems of linear equations Geometrically, we are quite used to the fact

More information

Description Logics. Foundations of Propositional Logic. franconi. Enrico Franconi

Description Logics. Foundations of Propositional Logic.   franconi. Enrico Franconi (1/27) Description Logics Foundations of Propositional Logic Enrico Franconi franconi@cs.man.ac.uk http://www.cs.man.ac.uk/ franconi Department of Computer Science, University of Manchester (2/27) Knowledge

More information

Logic: Propositional Logic (Part I)

Logic: Propositional Logic (Part I) Logic: Propositional Logic (Part I) Alessandro Artale Free University of Bozen-Bolzano Faculty of Computer Science http://www.inf.unibz.it/ artale Descrete Mathematics and Logic BSc course Thanks to Prof.

More information

Notes. Corneliu Popeea. May 3, 2013

Notes. Corneliu Popeea. May 3, 2013 Notes Corneliu Popeea May 3, 2013 1 Propositional logic Syntax We rely on a set of atomic propositions, AP, containing atoms like p, q. A propositional logic formula φ Formula is then defined by the following

More information

CS156: The Calculus of Computation Zohar Manna Autumn 2008

CS156: The Calculus of Computation Zohar Manna Autumn 2008 Page 3 of 52 Page 4 of 52 CS156: The Calculus of Computation Zohar Manna Autumn 2008 Lecturer: Zohar Manna (manna@cs.stanford.edu) Office Hours: MW 12:30-1:00 at Gates 481 TAs: Boyu Wang (wangboyu@stanford.edu)

More information

CSC373: Algorithm Design, Analysis and Complexity Fall 2017 DENIS PANKRATOV NOVEMBER 1, 2017

CSC373: Algorithm Design, Analysis and Complexity Fall 2017 DENIS PANKRATOV NOVEMBER 1, 2017 CSC373: Algorithm Design, Analysis and Complexity Fall 2017 DENIS PANKRATOV NOVEMBER 1, 2017 Linear Function f: R n R is linear if it can be written as f x = a T x for some a R n Example: f x 1, x 2 =

More information

Description Logics. Deduction in Propositional Logic. franconi. Enrico Franconi

Description Logics. Deduction in Propositional Logic.   franconi. Enrico Franconi (1/20) Description Logics Deduction in Propositional Logic Enrico Franconi franconi@cs.man.ac.uk http://www.cs.man.ac.uk/ franconi Department of Computer Science, University of Manchester (2/20) Decision

More information

Linear Programming. Linear Programming I. Lecture 1. Linear Programming. Linear Programming

Linear Programming. Linear Programming I. Lecture 1. Linear Programming. Linear Programming Linear Programming Linear Programming Lecture Linear programming. Optimize a linear function subject to linear inequalities. (P) max " c j x j n j= n s. t. " a ij x j = b i # i # m j= x j 0 # j # n (P)

More information

Satisfiability Modulo Theories

Satisfiability Modulo Theories Satisfiability Modulo Theories Summer School on Formal Methods Menlo College, 2011 Bruno Dutertre and Leonardo de Moura bruno@csl.sri.com, leonardo@microsoft.com SRI International, Microsoft Research SAT/SMT

More information

Lesson 27 Linear Programming; The Simplex Method

Lesson 27 Linear Programming; The Simplex Method Lesson Linear Programming; The Simplex Method Math 0 April 9, 006 Setup A standard linear programming problem is to maximize the quantity c x + c x +... c n x n = c T x subject to constraints a x + a x

More information

Decision Procedures. Jochen Hoenicke. Software Engineering Albert-Ludwigs-University Freiburg. Winter Term 2015/16

Decision Procedures. Jochen Hoenicke. Software Engineering Albert-Ludwigs-University Freiburg. Winter Term 2015/16 Decision Procedures Jochen Hoenicke Software Engineering Albert-Ludwigs-University Freiburg Winter Term 2015/16 Jochen Hoenicke (Software Engineering) Decision Procedures Winter Term 2015/16 1 / 436 Organisation

More information

1111: Linear Algebra I

1111: Linear Algebra I 1111: Linear Algebra I Dr. Vladimir Dotsenko (Vlad) Michaelmas Term 2015 Dr. Vladimir Dotsenko (Vlad) 1111: Linear Algebra I Michaelmas Term 2015 1 / 15 From equations to matrices For example, if we consider

More information

Warm-Up Problem. Is the following true or false? 1/35

Warm-Up Problem. Is the following true or false? 1/35 Warm-Up Problem Is the following true or false? 1/35 Propositional Logic: Resolution Carmen Bruni Lecture 6 Based on work by J Buss, A Gao, L Kari, A Lubiw, B Bonakdarpour, D Maftuleac, C Roberts, R Trefler,

More information

EE562 ARTIFICIAL INTELLIGENCE FOR ENGINEERS

EE562 ARTIFICIAL INTELLIGENCE FOR ENGINEERS EE562 ARTIFICIAL INTELLIGENCE FOR ENGINEERS Lecture 10, 5/9/2005 University of Washington, Department of Electrical Engineering Spring 2005 Instructor: Professor Jeff A. Bilmes Logical Agents Chapter 7

More information

LINEAR PROGRAMMING I. a refreshing example standard form fundamental questions geometry linear algebra simplex algorithm

LINEAR PROGRAMMING I. a refreshing example standard form fundamental questions geometry linear algebra simplex algorithm Linear programming Linear programming. Optimize a linear function subject to linear inequalities. (P) max c j x j n j= n s. t. a ij x j = b i i m j= x j 0 j n (P) max c T x s. t. Ax = b Lecture slides

More information

The Calculus of Computation: Decision Procedures with Applications to Verification. Part I: FOUNDATIONS. by Aaron Bradley Zohar Manna

The Calculus of Computation: Decision Procedures with Applications to Verification. Part I: FOUNDATIONS. by Aaron Bradley Zohar Manna The Calculus of Computation: Decision Procedures with Applications to Verification Part I: FOUNDATIONS by Aaron Bradley Zohar Manna 1. Propositional Logic(PL) Springer 2007 1-1 1-2 Propositional Logic(PL)

More information

Lecture slides by Kevin Wayne

Lecture slides by Kevin Wayne LINEAR PROGRAMMING I a refreshing example standard form fundamental questions geometry linear algebra simplex algorithm Lecture slides by Kevin Wayne Last updated on 7/25/17 11:09 AM Linear programming

More information

CO350 Linear Programming Chapter 6: The Simplex Method

CO350 Linear Programming Chapter 6: The Simplex Method CO50 Linear Programming Chapter 6: The Simplex Method rd June 2005 Chapter 6: The Simplex Method 1 Recap Suppose A is an m-by-n matrix with rank m. max. c T x (P ) s.t. Ax = b x 0 On Wednesday, we learned

More information

Propositional Reasoning

Propositional Reasoning Propositional Reasoning CS 440 / ECE 448 Introduction to Artificial Intelligence Instructor: Eyal Amir Grad TAs: Wen Pu, Yonatan Bisk Undergrad TAs: Sam Johnson, Nikhil Johri Spring 2010 Intro to AI (CS

More information

The Theory of the Simplex Method. Chapter 5: Hillier and Lieberman Chapter 5: Decision Tools for Agribusiness Dr. Hurley s AGB 328 Course

The Theory of the Simplex Method. Chapter 5: Hillier and Lieberman Chapter 5: Decision Tools for Agribusiness Dr. Hurley s AGB 328 Course The Theory of the Simplex Method Chapter 5: Hillier and Lieberman Chapter 5: Decision Tools for Agribusiness Dr. Hurley s AGB 328 Course Terms to Know Constraint Boundary Equation, Hyperplane, Constraint

More information

Formal methods in analysis

Formal methods in analysis Formal methods in analysis Jeremy Avigad Department of Philosophy and Department of Mathematical Sciences Carnegie Mellon University May 2015 Sequence of lectures 1. Formal methods in mathematics 2. Automated

More information

Introduce the idea of a nondegenerate tableau and its analogy with nondenegerate vertices.

Introduce the idea of a nondegenerate tableau and its analogy with nondenegerate vertices. 2 JORDAN EXCHANGE REVIEW 1 Lecture Outline The following lecture covers Section 3.5 of the textbook [?] Review a labeled Jordan exchange with pivoting. Introduce the idea of a nondegenerate tableau and

More information

Foundations of Mathematics MATH 220 FALL 2017 Lecture Notes

Foundations of Mathematics MATH 220 FALL 2017 Lecture Notes Foundations of Mathematics MATH 220 FALL 2017 Lecture Notes These notes form a brief summary of what has been covered during the lectures. All the definitions must be memorized and understood. Statements

More information

Linear Algebra I Lecture 10

Linear Algebra I Lecture 10 Linear Algebra I Lecture 10 Xi Chen 1 1 University of Alberta January 30, 2019 Outline 1 Gauss-Jordan Algorithm ] Let A = [a ij m n be an m n matrix. To reduce A to a reduced row echelon form using elementary

More information

Classical Propositional Logic

Classical Propositional Logic Classical Propositional Logic Peter Baumgartner http://users.cecs.anu.edu.au/~baumgart/ Ph: 02 6218 3717 Data61/CSIRO and ANU July 2017 1 / 71 Classical Logic and Reasoning Problems A 1 : Socrates is a

More information

A brief introduction to Logic. (slides from

A brief introduction to Logic. (slides from A brief introduction to Logic (slides from http://www.decision-procedures.org/) 1 A Brief Introduction to Logic - Outline Propositional Logic :Syntax Propositional Logic :Semantics Satisfiability and validity

More information

Logical Agents. Chapter 7

Logical Agents. Chapter 7 Logical Agents Chapter 7 Outline Knowledge-based agents Wumpus world Logic in general - models and entailment Propositional (Boolean) logic Equivalence, validity, satisfiability Inference rules and theorem

More information

MATH 3511 Lecture 1. Solving Linear Systems 1

MATH 3511 Lecture 1. Solving Linear Systems 1 MATH 3511 Lecture 1 Solving Linear Systems 1 Dmitriy Leykekhman Spring 2012 Goals Review of basic linear algebra Solution of simple linear systems Gaussian elimination D Leykekhman - MATH 3511 Introduction

More information

Predicate Logic - Semantic Tableau

Predicate Logic - Semantic Tableau CS402, Spring 2016 Informal Construction of a Valid Formula Example 1 A valid formula: x(p(x) q(x)) ( xp(x) xq(x)) ( x(p(x) q(x)) ( xp(x) xq(x))) x(p(x) q(x)), ( xp(x) xq(x)) x(p(x) q(x)), xp(x), xq(x)

More information

Lecture 2 Propositional Logic & SAT

Lecture 2 Propositional Logic & SAT CS 5110/6110 Rigorous System Design Spring 2017 Jan-17 Lecture 2 Propositional Logic & SAT Zvonimir Rakamarić University of Utah Announcements Homework 1 will be posted soon Propositional logic: Chapter

More information

Model Based Theory Combination

Model Based Theory Combination Model Based Theory Combination SMT 2007 Leonardo de Moura and Nikolaj Bjørner {leonardo, nbjorner}@microsoft.com. Microsoft Research Model Based Theory Combination p.1/20 Combination of Theories In practice,

More information

1.5 Non-linear Real Arithmetic

1.5 Non-linear Real Arithmetic A Simplex variant: Transform the satisfiability problem into the form A x = 0 l x u (where l i may be and u i may be + ). Relation to optimization problem is obscured. But: More efficient if one needs

More information

an efficient procedure for the decision problem. We illustrate this phenomenon for the Satisfiability problem.

an efficient procedure for the decision problem. We illustrate this phenomenon for the Satisfiability problem. 1 More on NP In this set of lecture notes, we examine the class NP in more detail. We give a characterization of NP which justifies the guess and verify paradigm, and study the complexity of solving search

More information

M17 MAT25-21 HOMEWORK 6

M17 MAT25-21 HOMEWORK 6 M17 MAT25-21 HOMEWORK 6 DUE 10:00AM WEDNESDAY SEPTEMBER 13TH 1. To Hand In Double Series. The exercises in this section will guide you to complete the proof of the following theorem: Theorem 1: Absolute

More information

Linear programs, convex polyhedra, extreme points

Linear programs, convex polyhedra, extreme points MVE165/MMG631 Extreme points of convex polyhedra; reformulations; basic feasible solutions; the simplex method Ann-Brith Strömberg 2015 03 27 Linear programs, convex polyhedra, extreme points A linear

More information

An Introduction to SAT Solving

An Introduction to SAT Solving An Introduction to SAT Solving Applied Logic for Computer Science UWO December 3, 2017 Applied Logic for Computer Science An Introduction to SAT Solving UWO December 3, 2017 1 / 46 Plan 1 The Boolean satisfiability

More information

Computational Logic. Davide Martinenghi. Spring Free University of Bozen-Bolzano. Computational Logic Davide Martinenghi (1/30)

Computational Logic. Davide Martinenghi. Spring Free University of Bozen-Bolzano. Computational Logic Davide Martinenghi (1/30) Computational Logic Davide Martinenghi Free University of Bozen-Bolzano Spring 2010 Computational Logic Davide Martinenghi (1/30) Propositional Logic - sequent calculus To overcome the problems of natural

More information

Complexity Theory VU , SS The Polynomial Hierarchy. Reinhard Pichler

Complexity Theory VU , SS The Polynomial Hierarchy. Reinhard Pichler Complexity Theory Complexity Theory VU 181.142, SS 2018 6. The Polynomial Hierarchy Reinhard Pichler Institut für Informationssysteme Arbeitsbereich DBAI Technische Universität Wien 15 May, 2018 Reinhard

More information

Outline. Complexity Theory EXACT TSP. The Class DP. Definition. Problem EXACT TSP. Complexity of EXACT TSP. Proposition VU 181.

Outline. Complexity Theory EXACT TSP. The Class DP. Definition. Problem EXACT TSP. Complexity of EXACT TSP. Proposition VU 181. Complexity Theory Complexity Theory Outline Complexity Theory VU 181.142, SS 2018 6. The Polynomial Hierarchy Reinhard Pichler Institut für Informationssysteme Arbeitsbereich DBAI Technische Universität

More information

AM 121: Intro to Optimization

AM 121: Intro to Optimization AM 121: Intro to Optimization Models and Methods Lecture 6: Phase I, degeneracy, smallest subscript rule. Yiling Chen SEAS Lesson Plan Phase 1 (initialization) Degeneracy and cycling Smallest subscript

More information

Mathematical Logic Propositional Logic - Tableaux*

Mathematical Logic Propositional Logic - Tableaux* Mathematical Logic Propositional Logic - Tableaux* Fausto Giunchiglia and Mattia Fumagalli University of Trento *Originally by Luciano Serafini and Chiara Ghidini Modified by Fausto Giunchiglia and Mattia

More information

Propositional Logic. Methods & Tools for Software Engineering (MTSE) Fall Prof. Arie Gurfinkel

Propositional Logic. Methods & Tools for Software Engineering (MTSE) Fall Prof. Arie Gurfinkel Propositional Logic Methods & Tools for Software Engineering (MTSE) Fall 2017 Prof. Arie Gurfinkel References Chpater 1 of Logic for Computer Scientists http://www.springerlink.com/content/978-0-8176-4762-9/

More information

Topics in Model-Based Reasoning

Topics in Model-Based Reasoning Towards Integration of Proving and Solving Dipartimento di Informatica Università degli Studi di Verona Verona, Italy March, 2014 Automated reasoning Artificial Intelligence Automated Reasoning Computational

More information

Logic: Propositional Logic Truth Tables

Logic: Propositional Logic Truth Tables Logic: Propositional Logic Truth Tables Raffaella Bernardi bernardi@inf.unibz.it P.zza Domenicani 3, Room 2.28 Faculty of Computer Science, Free University of Bolzano-Bozen http://www.inf.unibz.it/~bernardi/courses/logic06

More information

"SYMMETRIC" PRIMAL-DUAL PAIR

SYMMETRIC PRIMAL-DUAL PAIR "SYMMETRIC" PRIMAL-DUAL PAIR PRIMAL Minimize cx DUAL Maximize y T b st Ax b st A T y c T x y Here c 1 n, x n 1, b m 1, A m n, y m 1, WITH THE PRIMAL IN STANDARD FORM... Minimize cx Maximize y T b st Ax

More information

Discrete Mathematics 2007: Lecture 5 Infinite sets

Discrete Mathematics 2007: Lecture 5 Infinite sets Discrete Mathematics 2007: Lecture 5 Infinite sets Debrup Chakraborty 1 Countability The natural numbers originally arose from counting elements in sets. There are two very different possible sizes for

More information

2.5.2 Basic CNF/DNF Transformation

2.5.2 Basic CNF/DNF Transformation 2.5. NORMAL FORMS 39 On the other hand, checking the unsatisfiability of CNF formulas or the validity of DNF formulas is conp-complete. For any propositional formula φ there is an equivalent formula in

More information

Lecture 13: Soundness, Completeness and Compactness

Lecture 13: Soundness, Completeness and Compactness Discrete Mathematics (II) Spring 2017 Lecture 13: Soundness, Completeness and Compactness Lecturer: Yi Li 1 Overview In this lecture, we will prvoe the soundness and completeness of tableau proof system,

More information

Normal Forms of Propositional Logic

Normal Forms of Propositional Logic Normal Forms of Propositional Logic Bow-Yaw Wang Institute of Information Science Academia Sinica, Taiwan September 12, 2017 Bow-Yaw Wang (Academia Sinica) Normal Forms of Propositional Logic September

More information

1 Last time: linear systems and row operations

1 Last time: linear systems and row operations 1 Last time: linear systems and row operations Here s what we did last time: a system of linear equations or linear system is a list of equations a 11 x 1 + a 12 x 2 + + a 1n x n = b 1 a 21 x 1 + a 22

More information

Logic for Computer Scientists

Logic for Computer Scientists Logic for Computer Scientists Pascal Hitzler http://www.pascal-hitzler.de CS 499/699 Lecture, Spring Quarter 2010 Wright State University, Dayton, OH, U.S.A. Final version. Contents 1 Propositional Logic

More information

KE/Tableaux. What is it for?

KE/Tableaux. What is it for? CS3UR: utomated Reasoning 2002 The term Tableaux refers to a family of deduction methods for different logics. We start by introducing one of them: non-free-variable KE for classical FOL What is it for?

More information

LP. Lecture 3. Chapter 3: degeneracy. degeneracy example cycling the lexicographic method other pivot rules the fundamental theorem of LP

LP. Lecture 3. Chapter 3: degeneracy. degeneracy example cycling the lexicographic method other pivot rules the fundamental theorem of LP LP. Lecture 3. Chapter 3: degeneracy. degeneracy example cycling the lexicographic method other pivot rules the fundamental theorem of LP 1 / 23 Repetition the simplex algorithm: sequence of pivots starting

More information

Introduction to Logic in Computer Science: Autumn 2007

Introduction to Logic in Computer Science: Autumn 2007 Introduction to Logic in Computer Science: Autumn 2007 Ulle Endriss Institute for Logic, Language and Computation University of Amsterdam Ulle Endriss 1 Tableaux for First-order Logic The next part of

More information

Syntax of FOL. Introduction to Logic in Computer Science: Autumn Tableaux for First-order Logic. Syntax of FOL (2)

Syntax of FOL. Introduction to Logic in Computer Science: Autumn Tableaux for First-order Logic. Syntax of FOL (2) Syntax of FOL Introduction to Logic in Computer Science: Autumn 2007 Ulle Endriss Institute for Logic, Language and Computation University of Amsterdam The syntax of a language defines the way in which

More information

Language of Propositional Logic

Language of Propositional Logic Logic A logic has: 1. An alphabet that contains all the symbols of the language of the logic. 2. A syntax giving the rules that define the well formed expressions of the language of the logic (often called

More information

ORF 522. Linear Programming and Convex Analysis

ORF 522. Linear Programming and Convex Analysis ORF 5 Linear Programming and Convex Analysis Initial solution and particular cases Marco Cuturi Princeton ORF-5 Reminder: Tableaux At each iteration, a tableau for an LP in standard form keeps track of....................

More information

Clause/Term Resolution and Learning in the Evaluation of Quantified Boolean Formulas

Clause/Term Resolution and Learning in the Evaluation of Quantified Boolean Formulas Journal of Artificial Intelligence Research 1 (1993) 1-15 Submitted 6/91; published 9/91 Clause/Term Resolution and Learning in the Evaluation of Quantified Boolean Formulas Enrico Giunchiglia Massimo

More information

Propositional Logic and Semantics

Propositional Logic and Semantics Propositional Logic and Semantics English is naturally ambiguous. For example, consider the following employee (non)recommendations and their ambiguity in the English language: I can assure you that no

More information

Overview. CS389L: Automated Logical Reasoning. Lecture 7: Validity Proofs and Properties of FOL. Motivation for semantic argument method

Overview. CS389L: Automated Logical Reasoning. Lecture 7: Validity Proofs and Properties of FOL. Motivation for semantic argument method Overview CS389L: Automated Logical Reasoning Lecture 7: Validity Proofs and Properties of FOL Agenda for today: Semantic argument method for proving FOL validity Işıl Dillig Important properties of FOL

More information

Propositional Logic Language

Propositional Logic Language Propositional Logic Language A logic consists of: an alphabet A, a language L, i.e., a set of formulas, and a binary relation = between a set of formulas and a formula. An alphabet A consists of a finite

More information

cis32-ai lecture # 18 mon-3-apr-2006

cis32-ai lecture # 18 mon-3-apr-2006 cis32-ai lecture # 18 mon-3-apr-2006 today s topics: propositional logic cis32-spring2006-sklar-lec18 1 Introduction Weak (search-based) problem-solving does not scale to real problems. To succeed, problem

More information

7 LOGICAL AGENTS. OHJ-2556 Artificial Intelligence, Spring OHJ-2556 Artificial Intelligence, Spring

7 LOGICAL AGENTS. OHJ-2556 Artificial Intelligence, Spring OHJ-2556 Artificial Intelligence, Spring 109 7 LOGICAL AGENS We now turn to knowledge-based agents that have a knowledge base KB at their disposal With the help of the KB the agent aims at maintaining knowledge of its partially-observable environment

More information

Satisfiability Modulo Theories

Satisfiability Modulo Theories Satisfiability Modulo Theories Summer School on Formal Methods Menlo College, 2011 Bruno Dutertre and Leonardo de Moura bruno@csl.sri.com, leonardo@microsoft.com SRI International, Microsoft Research SAT/SMT

More information

Comp487/587 - Boolean Formulas

Comp487/587 - Boolean Formulas Comp487/587 - Boolean Formulas 1 Logic and SAT 1.1 What is a Boolean Formula Logic is a way through which we can analyze and reason about simple or complicated events. In particular, we are interested

More information

Applied Logic. Lecture 1 - Propositional logic. Marcin Szczuka. Institute of Informatics, The University of Warsaw

Applied Logic. Lecture 1 - Propositional logic. Marcin Szczuka. Institute of Informatics, The University of Warsaw Applied Logic Lecture 1 - Propositional logic Marcin Szczuka Institute of Informatics, The University of Warsaw Monographic lecture, Spring semester 2017/2018 Marcin Szczuka (MIMUW) Applied Logic 2018

More information

THE LOGIC OF COMPOUND STATEMENTS

THE LOGIC OF COMPOUND STATEMENTS CHAPTER 2 THE LOGIC OF COMPOUND STATEMENTS Copyright Cengage Learning. All rights reserved. SECTION 2.1 Logical Form and Logical Equivalence Copyright Cengage Learning. All rights reserved. Logical Form

More information

CO350 Linear Programming Chapter 5: Basic Solutions

CO350 Linear Programming Chapter 5: Basic Solutions CO350 Linear Programming Chapter 5: Basic Solutions 1st June 2005 Chapter 5: Basic Solutions 1 On Monday, we learned Recap Theorem 5.3 Consider an LP in SEF with rank(a) = # rows. Then x is bfs x is extreme

More information

Advanced Topics in LP and FP

Advanced Topics in LP and FP Lecture 1: Prolog and Summary of this lecture 1 Introduction to Prolog 2 3 Truth value evaluation 4 Prolog Logic programming language Introduction to Prolog Introduced in the 1970s Program = collection

More information

Leonardo de Moura Microsoft Research

Leonardo de Moura Microsoft Research Leonardo de Moura Microsoft Research Logic is The Calculus of Computer Science (Z. Manna). High computational complexity Naïve solutions will not scale Is formula F satisfiable modulo theory T? SMT solvers

More information

Propositional and First Order Reasoning

Propositional and First Order Reasoning Propositional and First Order Reasoning Terminology Propositional variable: boolean variable (p) Literal: propositional variable or its negation p p Clause: disjunction of literals q \/ p \/ r given by

More information