CS 512, Spring 2017, Handout 10 Propositional Logic: Conjunctive Normal Forms, Disjunctive Normal Forms, Horn Formulas, and other special forms

Size: px
Start display at page:

Download "CS 512, Spring 2017, Handout 10 Propositional Logic: Conjunctive Normal Forms, Disjunctive Normal Forms, Horn Formulas, and other special forms"

Transcription

1 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

2 conjunctive normal form & disjunctive normal form Assaf Kfoury, CS 512, Spring 2017, Handout 10 page 2 of 28

3 conjunctive normal form & disjunctive normal form CNF L ::= p p D ::= L L D C ::= D D C literal disjuntion of literals conjunction of disjunctions Assaf Kfoury, CS 512, Spring 2017, Handout 10 page 3 of 28

4 conjunctive normal form & disjunctive normal form CNF L ::= p p D ::= L L D C ::= D D C literal disjuntion of literals conjunction of disjunctions DNF L ::= p p C ::= L L C D ::= C C D literal conjunction of literals disjunction of conjunctions Assaf Kfoury, CS 512, Spring 2017, Handout 10 page 4 of 28

5 Why CNF? Assaf Kfoury, CS 512, Spring 2017, Handout 10 page 5 of 28

6 Why CNF? A disjunction of literals L 1 L m is valid (equivalently, is a tautology) iff there are 1 i, j m with i j such that L i is L j. Assaf Kfoury, CS 512, Spring 2017, Handout 10 page 6 of 28

7 Why CNF? A disjunction of literals L 1 L m is valid (equivalently, is a tautology) iff there are 1 i, j m with i j such that L i is L j. A conjunction of disjunctions D 1 D n is valid (equivalently, is a tautology) iff for every 1 i n it is the case that D i is valid. Assaf Kfoury, CS 512, Spring 2017, Handout 10 page 7 of 28

8 Why CNF? A disjunction of literals L 1 L m is valid (equivalently, is a tautology) iff there are 1 i, j m with i j such that L i is L j. A conjunction of disjunctions D 1 D n is valid (equivalently, is a tautology) iff for every 1 i n it is the case that D i is valid. CNF allows for a fast and easy syntactic test of validity. Assaf Kfoury, CS 512, Spring 2017, Handout 10 page 8 of 28

9 Why CNF? A disjunction of literals L 1 L m is valid (equivalently, is a tautology) iff there are 1 i, j m with i j such that L i is L j. A conjunction of disjunctions D 1 D n is valid (equivalently, is a tautology) iff for every 1 i n it is the case that D i is valid. CNF allows for a fast and easy syntactic test of validity. Unfortunately, conversion into CNF may lead to exponential blow-up: (x 1 y 1) (x 2 y 2) (x n y n) becomes (x 1 x n 1 x n) (x 1 x n 1 y n) (y 1 y n 1 y n) i.e., the initial WFF of size O(n) becomes an equivalent WFF of size O(2 n ), because each clause in the latter contains either x i or y i for every i. Converting a WFF into an equivalent WFF in CNF, preserving validity, is NP-hard! (However, converting a WFF into another WFF, not necessarily equivalent, preserving satisfiability can be carried out in linear time more in a later handout.) Assaf Kfoury, CS 512, Spring 2017, Handout 10 page 9 of 28

10 Why DNF? Assaf Kfoury, CS 512, Spring 2017, Handout 10 page 10 of 28

11 Why DNF? A conjunction of literals L 1 L m is satisfiable iff {L 1,..., L m } does not include both a propositional atom P and its negation P. Assaf Kfoury, CS 512, Spring 2017, Handout 10 page 11 of 28

12 Why DNF? A conjunction of literals L 1 L m is satisfiable iff {L 1,..., L m } does not include both a propositional atom P and its negation P. A disjunction of conjunctions C 1 C n is satisfiable iff there is some 1 i n such that C i is satisfiable. Assaf Kfoury, CS 512, Spring 2017, Handout 10 page 12 of 28

13 Why DNF? A conjunction of literals L 1 L m is satisfiable iff {L 1,..., L m } does not include both a propositional atom P and its negation P. A disjunction of conjunctions C 1 C n is satisfiable iff there is some 1 i n such that C i is satisfiable. DNF allows for a fast and easy syntactic test of satisfiability. Assaf Kfoury, CS 512, Spring 2017, Handout 10 page 13 of 28

14 Why DNF? A conjunction of literals L 1 L m is satisfiable iff {L 1,..., L m } does not include both a propositional atom P and its negation P. A disjunction of conjunctions C 1 C n is satisfiable iff there is some 1 i n such that C i is satisfiable. DNF allows for a fast and easy syntactic test of satisfiability. Unfortunately, conversion into DNF may lead to exponential blow-up: (x 1 y 1) (x 2 y 2) (x n y n) becomes (x 1 x n 1 x n) (x 1 x n 1 y n) (y 1 y n 1 y n) i.e., the initial WFF of size O(n) becomes an equivalent WFF of size O(2 n ), because each clause in the latter contains either x i or y i for every i. Converting a WFF into an equivalent WFF in DNF, preserving satisfiability, is NP-hard! Assaf Kfoury, CS 512, Spring 2017, Handout 10 page 14 of 28

15 further comments on CNF and DNF, summing up: propositional WFF s can be partitioned into three disjoint subsets: 1. tautologies, or unfalsifiable WFF s 2. contradictions, or unsatisfiable WFF s 3. WFF s that are both satisfiable and falsifiable satisfiability of: CNF is in NP DNF is in P tautology of: CNF is in P DNF is in co-np falsifiability of: CNF is in P DNF is in NP Assaf Kfoury, CS 512, Spring 2017, Handout 10 page 15 of 28

16 other special forms of propositional WFF s: One such form is that of the WFF s in negation normal form (NNF): the negation operator ( ) is only applied to variables, and the only logical operators are conjunction ( ) and disjunction ( ). Assaf Kfoury, CS 512, Spring 2017, Handout 10 page 16 of 28

17 other special forms of propositional WFF s: One such form is that of the WFF s in negation normal form (NNF): the negation operator ( ) is only applied to variables, and the only logical operators are conjunction ( ) and disjunction ( ). More formally: L ::= p p ϕ ::= L ϕ ψ ϕ ψ Assaf Kfoury, CS 512, Spring 2017, Handout 10 page 17 of 28

18 other special forms of propositional WFF s: One such form is that of the WFF s in negation normal form (NNF): the negation operator ( ) is only applied to variables, and the only logical operators are conjunction ( ) and disjunction ( ). More formally: L ::= p p ϕ ::= L ϕ ψ ϕ ψ Fact: Every WFF in CNF or in DNF is also in NNF, but the converse is not true in general. See next slide for an example. Fact: NNF is not a canonical form, in contrast to CNF and DNF. Example: x (y z) and (x y) (x z) are equivalent and both in NNF. Fact: Every propositional WFF ϕ can be translated in linear time into an equivalent propositional WFF ψ in NNF such that ψ < (3/2) ϕ. Proof. Left to you. Assaf Kfoury, CS 512, Spring 2017, Handout 10 page 18 of 28

19 example of a WFF in NNF, which is neither in CNF nor in DNF ( (( p q) ( q p) ) ( (r s) ( s r) ) ) ( (( p q) (q p) ) ( (r s) (s r) ) ) Assaf Kfoury, CS 512, Spring 2017, Handout 10 page 19 of 28

20 example of a WFF in NNF, which is neither in CNF nor in DNF ( (( p q) ( q p) ) ( (r s) ( s r) ) ) ( (( p q) (q p) ) ( (r s) (s r) ) ) and its parse tree after merging identical leaf nodes, turning it into a more compact dag: p q q p r s s r Assaf Kfoury, CS 512, Spring 2017, Handout 10 page 20 of 28

21 another special form of propositional WFFs: Decomposable Negation Normal Form (DNNF) Assaf Kfoury, CS 512, Spring 2017, Handout 10 page 21 of 28

22 another special form of propositional WFFs: Decomposable Negation Normal Form (DNNF) A propositional WFF ϕ is a decomposable negation normal form (DNNF) if it is a NNF satisfying the decomposability property: for every conjunction ψ = ψ 1 ψ n which is a sub-wff of ϕ, no propositional variable/atom is shared by any two distinct conjuncts of ψ: Var(ψ i) Var(ψ j) = for every i j Assaf Kfoury, CS 512, Spring 2017, Handout 10 page 22 of 28

23 another special form of propositional WFFs: Decomposable Negation Normal Form (DNNF) A propositional WFF ϕ is a decomposable negation normal form (DNNF) if it is a NNF satisfying the decomposability property: for every conjunction ψ = ψ 1 ψ n which is a sub-wff of ϕ, no propositional variable/atom is shared by any two distinct conjuncts of ψ: Var(ψ i) Var(ψ j) = for every i j Example: The NNF shown on page 19 is in fact a DNNF. Assaf Kfoury, CS 512, Spring 2017, Handout 10 page 23 of 28

24 another special form of propositional WFFs: Decomposable Negation Normal Form (DNNF) A propositional WFF ϕ is a decomposable negation normal form (DNNF) if it is a NNF satisfying the decomposability property: for every conjunction ψ = ψ 1 ψ n which is a sub-wff of ϕ, no propositional variable/atom is shared by any two distinct conjuncts of ψ: Var(ψ i) Var(ψ j) = for every i j Example: The NNF shown on page 19 is in fact a DNNF. Fact: Satisfiability of WFF in DNNF is decidable in linear time. Assaf Kfoury, CS 512, Spring 2017, Handout 10 page 24 of 28

25 an important restricted class: Horn formulas Assaf Kfoury, CS 512, Spring 2017, Handout 10 page 25 of 28

26 an important restricted class: Horn formulas P ::= p A ::= P P A C ::= A P Horn clause H ::= C C H Horn formula Assaf Kfoury, CS 512, Spring 2017, Handout 10 page 26 of 28

27 an important restricted class: Horn formulas P ::= p A ::= P P A C ::= A P Horn clause H ::= C C H Horn formula Fact: Satisfiability of Horn clauses is decidable in linear time. Proof: To see this, rewrite a Horn clause into an equivalent disjunction of literals: L 1 L n L L 1 L n L. Fact: Satisfiability of Horn formulas is decidable in linear time. Assaf Kfoury, CS 512, Spring 2017, Handout 10 page 27 of 28

28 Exercise Search the Web to identify one or two applications, or areas of computer science, where each of the following forms are encountered: 1. Propositional WFF s in NNF. 2. Propositional WFF s in DNNF. 3. Propositional WFF s that are Horn formulas. Assaf Kfoury, CS 512, Spring 2017, Handout 10 page 28 of 28

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

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

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

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

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

Tecniche di Verifica. Introduction to Propositional Logic

Tecniche di Verifica. Introduction to Propositional Logic Tecniche di Verifica Introduction to Propositional Logic 1 Logic A formal logic is defined by its syntax and semantics. Syntax An alphabet is a set of symbols. A finite sequence of these symbols is called

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

Part 1: Propositional Logic

Part 1: Propositional Logic Part 1: Propositional Logic Literature (also for first-order logic) Schöning: Logik für Informatiker, Spektrum Fitting: First-Order Logic and Automated Theorem Proving, Springer 1 Last time 1.1 Syntax

More information

Propositional Logic: Models and Proofs

Propositional Logic: Models and Proofs Propositional Logic: Models and Proofs C. R. Ramakrishnan CSE 505 1 Syntax 2 Model Theory 3 Proof Theory and Resolution Compiled at 11:51 on 2016/11/02 Computing with Logic Propositional Logic CSE 505

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

Propositional Resolution

Propositional Resolution Artificial Intelligence Propositional Resolution Marco Piastra Propositional Resolution 1] Deductive systems and automation Is problem decidible? A deductive system a la Hilbert (i.e. derivation using

More information

Decision Procedures for Satisfiability and Validity in Propositional Logic

Decision Procedures for Satisfiability and Validity in Propositional Logic Decision Procedures for Satisfiability and Validity in Propositional Logic Meghdad Ghari Institute for Research in Fundamental Sciences (IPM) School of Mathematics-Isfahan Branch Logic Group http://math.ipm.ac.ir/isfahan/logic-group.htm

More information

Propositional and Predicate Logic - V

Propositional and Predicate Logic - V Propositional and Predicate Logic - V Petr Gregor KTIML MFF UK WS 2016/2017 Petr Gregor (KTIML MFF UK) Propositional and Predicate Logic - V WS 2016/2017 1 / 21 Formal proof systems Hilbert s calculus

More information

Propositional Logic Basics Propositional Equivalences Normal forms Boolean functions and digital circuits. Propositional Logic.

Propositional Logic Basics Propositional Equivalences Normal forms Boolean functions and digital circuits. Propositional Logic. Propositional Logic Winter 2012 Propositional Logic: Section 1.1 Proposition A proposition is a declarative sentence that is either true or false. Which ones of the following sentences are propositions?

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

Section 1.2 Propositional Equivalences. A tautology is a proposition which is always true. A contradiction is a proposition which is always false.

Section 1.2 Propositional Equivalences. A tautology is a proposition which is always true. A contradiction is a proposition which is always false. Section 1.2 Propositional Equivalences A tautology is a proposition which is always true. Classic Example: P P A contradiction is a proposition which is always false. Classic Example: P P A contingency

More information

A New 3-CNF Transformation by Parallel-Serial Graphs 1

A New 3-CNF Transformation by Parallel-Serial Graphs 1 A New 3-CNF Transformation by Parallel-Serial Graphs 1 Uwe Bubeck, Hans Kleine Büning University of Paderborn, Computer Science Institute, 33098 Paderborn, Germany Abstract For propositional formulas we

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

CS206 Lecture 03. Propositional Logic Proofs. Plan for Lecture 03. Axioms. Normal Forms

CS206 Lecture 03. Propositional Logic Proofs. Plan for Lecture 03. Axioms. Normal Forms CS206 Lecture 03 Propositional Logic Proofs G. Sivakumar Computer Science Department IIT Bombay siva@iitb.ac.in http://www.cse.iitb.ac.in/ siva Page 1 of 12 Fri, Jan 03, 2003 Plan for Lecture 03 Axioms

More information

Compiling Knowledge into Decomposable Negation Normal Form

Compiling Knowledge into Decomposable Negation Normal Form Compiling Knowledge into Decomposable Negation Normal Form Adnan Darwiche Cognitive Systems Laboratory Department of Computer Science University of California Los Angeles, CA 90024 darwiche@cs. ucla. edu

More information

ECE473 Lecture 15: Propositional Logic

ECE473 Lecture 15: Propositional Logic ECE473 Lecture 15: Propositional Logic Jeffrey Mark Siskind School of Electrical and Computer Engineering Spring 2018 Siskind (Purdue ECE) ECE473 Lecture 15: Propositional Logic Spring 2018 1 / 23 What

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

COMP219: Artificial Intelligence. Lecture 20: Propositional Reasoning

COMP219: Artificial Intelligence. Lecture 20: Propositional Reasoning COMP219: Artificial Intelligence Lecture 20: Propositional Reasoning 1 Overview Last time Logic for KR in general; Propositional Logic; Natural Deduction Today Entailment, satisfiability and validity Normal

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

CS 512, Spring 2016, Handout 02 Natural Deduction, and Examples of Natural Deduction, in Propositional Logic

CS 512, Spring 2016, Handout 02 Natural Deduction, and Examples of Natural Deduction, in Propositional Logic CS 512, Spring 2016, Handout 02 Natural Deduction, and Examples of Natural Deduction, in Propositional Logic Assaf Kfoury January 19, 2017 Assaf Kfoury, CS 512, Spring 2017, Handout 02 page 1 of 41 from

More information

CS250: Discrete Math for Computer Science. L6: CNF and Natural Deduction for PropCalc

CS250: Discrete Math for Computer Science. L6: CNF and Natural Deduction for PropCalc CS250: Discrete Math for Computer Science L6: CNF and Natural Deduction for PropCalc How to Simplify a PropCalc Formula: (p q) ((q r) p) How to Simplify a PropCalc Formula: 1. Get rid of s using def. of

More information

Propositional and Predicate Logic - II

Propositional and Predicate Logic - II Propositional and Predicate Logic - II Petr Gregor KTIML MFF UK WS 2016/2017 Petr Gregor (KTIML MFF UK) Propositional and Predicate Logic - II WS 2016/2017 1 / 16 Basic syntax Language Propositional logic

More information

Propositional Logic. Testing, Quality Assurance, and Maintenance Winter Prof. Arie Gurfinkel

Propositional Logic. Testing, Quality Assurance, and Maintenance Winter Prof. Arie Gurfinkel Propositional Logic Testing, Quality Assurance, and Maintenance Winter 2018 Prof. Arie Gurfinkel References Chpater 1 of Logic for Computer Scientists http://www.springerlink.com/content/978-0-8176-4762-9/

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

Propositional logic. Programming and Modal Logic

Propositional logic. Programming and Modal Logic Propositional logic Programming and Modal Logic 2006-2007 4 Contents Syntax of propositional logic Semantics of propositional logic Semantic entailment Natural deduction proof system Soundness and completeness

More information

A Collection of Problems in Propositional Logic

A Collection of Problems in Propositional Logic A Collection of Problems in Propositional Logic Hans Kleine Büning SS 2016 Problem 1: SAT (respectively SAT) Instance: A propositional formula α (for SAT in CNF). Question: Is α satisfiable? The problems

More information

Propositional Calculus: Formula Simplification, Essential Laws, Normal Forms

Propositional Calculus: Formula Simplification, Essential Laws, Normal Forms P Formula Simplification, Essential Laws, Normal Forms Lila Kari University of Waterloo P Formula Simplification, Essential Laws, Normal CS245, Forms Logic and Computation 1 / 26 Propositional calculus

More information

Tautologies, Contradictions, and Contingencies

Tautologies, Contradictions, and Contingencies Section 1.3 Tautologies, Contradictions, and Contingencies A tautology is a proposition which is always true. Example: p p A contradiction is a proposition which is always false. Example: p p A contingency

More information

COMP9414: Artificial Intelligence Propositional Logic: Automated Reasoning

COMP9414: Artificial Intelligence Propositional Logic: Automated Reasoning COMP9414, Monday 26 March, 2012 Propositional Logic 2 COMP9414: Artificial Intelligence Propositional Logic: Automated Reasoning Overview Proof systems (including soundness and completeness) Normal Forms

More information

Tutorial 1: Modern SMT Solvers and Verification

Tutorial 1: Modern SMT Solvers and Verification University of Illinois at Urbana-Champaign Tutorial 1: Modern SMT Solvers and Verification Sayan Mitra Electrical & Computer Engineering Coordinated Science Laboratory University of Illinois at Urbana

More information

Solvers for the Problem of Boolean Satisfiability (SAT) Will Klieber Aug 31, 2011

Solvers for the Problem of Boolean Satisfiability (SAT) Will Klieber Aug 31, 2011 Solvers for the Problem of Boolean Satisfiability (SAT) Will Klieber 15-414 Aug 31, 2011 Why study SAT solvers? Many problems reduce to SAT. Formal verification CAD, VLSI Optimization AI, planning, automated

More information

Exercises 1 - Solutions

Exercises 1 - Solutions Exercises 1 - Solutions SAV 2013 1 PL validity For each of the following propositional logic formulae determine whether it is valid or not. If it is valid prove it, otherwise give a counterexample. Note

More information

Supplementary exercises in propositional logic

Supplementary exercises in propositional logic Supplementary exercises in propositional logic The purpose of these exercises is to train your ability to manipulate and analyze logical formulas. Familiarize yourself with chapter 7.3-7.5 in the course

More information

Automated Program Verification and Testing 15414/15614 Fall 2016 Lecture 2: Propositional Logic

Automated Program Verification and Testing 15414/15614 Fall 2016 Lecture 2: Propositional Logic Automated Program Verification and Testing 15414/15614 Fall 2016 Lecture 2: Propositional Logic Matt Fredrikson mfredrik@cs.cmu.edu October 17, 2016 Matt Fredrikson Propositional Logic 1 / 33 Propositional

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

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

Propositional Resolution Part 1. Short Review Professor Anita Wasilewska CSE 352 Artificial Intelligence

Propositional Resolution Part 1. Short Review Professor Anita Wasilewska CSE 352 Artificial Intelligence Propositional Resolution Part 1 Short Review Professor Anita Wasilewska CSE 352 Artificial Intelligence SYNTAX dictionary Literal any propositional VARIABLE a or negation of a variable a, a VAR, Example

More information

PROPOSITIONAL LOGIC. VL Logik: WS 2018/19

PROPOSITIONAL LOGIC. VL Logik: WS 2018/19 PROPOSITIONAL LOGIC VL Logik: WS 2018/19 (Version 2018.2) Martina Seidl (martina.seidl@jku.at), Armin Biere (biere@jku.at) Institut für Formale Modelle und Verifikation BOX Game: Rules 1. The game board

More information

INPUT INDEPENDENCE AND COMPUTATIONAL COMPLEXITY

INPUT INDEPENDENCE AND COMPUTATIONAL COMPLEXITY INPUT INDEPENDENCE AND COMPUTATIONAL COMPLEXITY KOJI KOBAYASHI Abstract. This paper describes about complexity of PH problems by using problem input independence, and provide new approach to solve P vs

More information

Propositional logic. Programming and Modal Logic

Propositional logic. Programming and Modal Logic Propositional logic Programming and Modal Logic 2006-2007 4 Contents Syntax of propositional logic Semantics of propositional logic Semantic entailment Natural deduction proof system Soundness and completeness

More information

Propositional Resolution Introduction

Propositional Resolution Introduction Propositional Resolution Introduction (Nilsson Book Handout) Professor Anita Wasilewska CSE 352 Artificial Intelligence Propositional Resolution Part 1 SYNTAX dictionary Literal any propositional VARIABLE

More information

Computation and Logic Definitions

Computation and Logic Definitions Computation and Logic Definitions True and False Also called Boolean truth values, True and False represent the two values or states an atom can assume. We can use any two distinct objects to represent

More information

Formal Modeling with Propositional Logic

Formal Modeling with Propositional Logic Formal Modeling with Propositional Logic Assaf Kfoury February 6, 2017 (last modified: September 3, 2018) Contents 1 The Pigeon Hole Principle 2 2 Graph Problems 3 2.1 Paths in Directed Graphs..................................

More information

Theory of Computer Science

Theory of Computer Science Theory of Computer Science B2. Propositional Logic II Gabriele Röger University of Basel March 7, 2018 Logic: Overview Logic Propositional Logic Predicate Logic The Story So Far propositional logic based

More information

Propositional Logic: Methods of Proof (Part II)

Propositional Logic: Methods of Proof (Part II) Propositional Logic: Methods of Proof (Part II) You will be expected to know Basic definitions Inference, derive, sound, complete Conjunctive Normal Form (CNF) Convert a Boolean formula to CNF Do a short

More information

Sec$on Summary. Tautologies, Contradictions, and Contingencies. Logical Equivalence. Normal Forms (optional, covered in exercises in text)

Sec$on Summary. Tautologies, Contradictions, and Contingencies. Logical Equivalence. Normal Forms (optional, covered in exercises in text) Section 1.3 1 Sec$on Summary Tautologies, Contradictions, and Contingencies. Logical Equivalence Important Logical Equivalences Showing Logical Equivalence Normal Forms (optional, covered in exercises

More information

Logic: First Order Logic

Logic: First Order Logic Logic: First Order Logic 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

Conjunctive Normal Form and SAT

Conjunctive Normal Form and SAT Notes on Satisfiability-Based Problem Solving Conjunctive Normal Form and SAT David Mitchell mitchell@cs.sfu.ca October 4, 2015 These notes are a preliminary draft. Please use freely, but do not re-distribute

More information

Reduced Ordered Binary Decision Diagram with Implied Literals: A New knowledge Compilation Approach

Reduced Ordered Binary Decision Diagram with Implied Literals: A New knowledge Compilation Approach Reduced Ordered Binary Decision Diagram with Implied Literals: A New knowledge Compilation Approach Yong Lai, Dayou Liu, Shengsheng Wang College of Computer Science and Technology Jilin University, Changchun

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

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

Conjunctive Normal Form and SAT

Conjunctive Normal Form and SAT Notes on Satisfiability-Based Problem Solving Conjunctive Normal Form and SAT David Mitchell mitchell@cs.sfu.ca September 10, 2014 These notes are a preliminary draft. Please use freely, but do not re-distribute

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

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

Equivalences. Proposition 2.8: The following equivalences are valid for all formulas φ, ψ, χ: (φ φ) φ. Idempotency Idempotency Commutativity

Equivalences. Proposition 2.8: The following equivalences are valid for all formulas φ, ψ, χ: (φ φ) φ. Idempotency Idempotency Commutativity Substitution Theorem Proposition 2.7: Let φ 1 and φ 2 be equivalent formulas, and ψ[φ 1 ] p be a formula in which φ 1 occurs as a subformula at position p. Then ψ[φ 1 ] p is equivalent to ψ[φ 2 ] p. 84

More information

Non-Deterministic Time

Non-Deterministic Time Non-Deterministic Time Master Informatique 2016 1 Non-Deterministic Time Complexity Classes Reminder on DTM vs NDTM [Turing 1936] (q 0, x 0 ) (q 1, x 1 ) Deterministic (q n, x n ) Non-Deterministic (q

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

Solutions to Sample Problems for Midterm

Solutions to Sample Problems for Midterm Solutions to Sample Problems for Midterm Problem 1. The dual of a proposition is defined for which contains only,,. It is For a compound proposition that only uses,, as operators, we obtained the dual

More information

Truth-Functional Logic

Truth-Functional Logic Truth-Functional Logic Syntax Every atomic sentence (A, B, C, ) is a sentence and are sentences With ϕ a sentence, the negation ϕ is a sentence With ϕ and ψ sentences, the conjunction ϕ ψ is a sentence

More information

Duality in Knowledge Compilation Techniques

Duality in Knowledge Compilation Techniques Duality in Knowledge Compilation Techniques Neil V. Murray 1 and Erik Rosenthal 2 1 Department of Computer Science, State University of New York, Albany, NY 12222, USA, nvm@cs.albany.edu 2 Department of

More information

CSC Discrete Math I, Spring Propositional Logic

CSC Discrete Math I, Spring Propositional Logic CSC 125 - Discrete Math I, Spring 2017 Propositional Logic Propositions A proposition is a declarative sentence that is either true or false Propositional Variables A propositional variable (p, q, r, s,...)

More information

INPUT RELATION AND COMPUTATIONAL COMPLEXITY

INPUT RELATION AND COMPUTATIONAL COMPLEXITY INPUT RELATION AND COMPUTATIONAL COMPLEXITY KOJI KOBAYASHI Abstract. This paper describes about complexity of PH problems by using Almost all monotone circuit family and Accept input pair that sandwich

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

CSE507. Introduction. Computer-Aided Reasoning for Software. Emina Torlak courses.cs.washington.edu/courses/cse507/17wi/

CSE507. Introduction. Computer-Aided Reasoning for Software. Emina Torlak courses.cs.washington.edu/courses/cse507/17wi/ Computer-Aided Reasoning for Software CSE507 courses.cs.washington.edu/courses/cse507/17wi/ Introduction Emina Torlak emina@cs.washington.edu Today What is this course about? Course logistics Review of

More information

Knowledge base (KB) = set of sentences in a formal language Declarative approach to building an agent (or other system):

Knowledge base (KB) = set of sentences in a formal language Declarative approach to building an agent (or other system): Logic Knowledge-based agents Inference engine Knowledge base Domain-independent algorithms Domain-specific content Knowledge base (KB) = set of sentences in a formal language Declarative approach to building

More information

NP-Completeness Part II

NP-Completeness Part II NP-Completeness Part II Recap from Last Time NP-Hardness A language L is called NP-hard iff for every L' NP, we have L' P L. A language in L is called NP-complete iff L is NP-hard and L NP. The class NPC

More information

Critical Reading of Optimization Methods for Logical Inference [1]

Critical Reading of Optimization Methods for Logical Inference [1] Critical Reading of Optimization Methods for Logical Inference [1] Undergraduate Research Internship Department of Management Sciences Fall 2007 Supervisor: Dr. Miguel Anjos UNIVERSITY OF WATERLOO Rajesh

More information

Conjunctive Normal Form and SAT

Conjunctive Normal Form and SAT Notes on Satisfiability-Based Problem Solving Conjunctive Normal Form and SAT David Mitchell mitchell@cs.sfu.ca September 19, 2013 This is a preliminary draft of these notes. Please do not distribute without

More information

Propositional Resolution

Propositional Resolution Computational Logic Lecture 4 Propositional Resolution Michael Genesereth Spring 2005 Stanford University Modified by Charles Ling and TA, for CS2209 Use with permission Propositional Resolution Propositional

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, Winter Quarter 2011 Wright State University, Dayton, OH, U.S.A. [final version: 03/10/2011] Contents 1 Propositional

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

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

Formal Verification Methods 1: Propositional Logic

Formal Verification Methods 1: Propositional Logic Formal Verification Methods 1: Propositional Logic John Harrison Intel Corporation Course overview Propositional logic A resurgence of interest Logic and circuits Normal forms The Davis-Putnam procedure

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

CHAPTER 10. Gentzen Style Proof Systems for Classical Logic

CHAPTER 10. Gentzen Style Proof Systems for Classical Logic CHAPTER 10 Gentzen Style Proof Systems for Classical Logic Hilbert style systems are easy to define and admit a simple proof of the Completeness Theorem but they are difficult to use. By humans, not mentioning

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

PL: Truth Trees. Handout Truth Trees: The Setup

PL: Truth Trees. Handout Truth Trees: The Setup Handout 4 PL: Truth Trees Truth tables provide a mechanical method for determining whether a proposition, set of propositions, or argument has a particular logical property. For example, we can show that

More information

Resolution Lower Bounds for the Weak Pigeonhole Principle

Resolution Lower Bounds for the Weak Pigeonhole Principle Electronic Colloquium on Computational Complexity, Report No. 21 (2001) Resolution Lower Bounds for the Weak Pigeonhole Principle Ran Raz Weizmann Institute, and The Institute for Advanced Study ranraz@wisdom.weizmann.ac.il

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

Solutions to Homework I (1.1)

Solutions to Homework I (1.1) Solutions to Homework I (1.1) Problem 1 Determine whether each of these compound propositions is satisable. a) (p q) ( p q) ( p q) b) (p q) (p q) ( p q) ( p q) c) (p q) ( p q) (a) p q p q p q p q p q (p

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

Announcements. CS243: Discrete Structures. Propositional Logic II. Review. Operator Precedence. Operator Precedence, cont. Operator Precedence Example

Announcements. CS243: Discrete Structures. Propositional Logic II. Review. Operator Precedence. Operator Precedence, cont. Operator Precedence Example Announcements CS243: Discrete Structures Propositional Logic II Işıl Dillig First homework assignment out today! Due in one week, i.e., before lecture next Tuesday 09/11 Weilin s Tuesday office hours are

More information

A Lower Bound of 2 n Conditional Jumps for Boolean Satisfiability on A Random Access Machine

A Lower Bound of 2 n Conditional Jumps for Boolean Satisfiability on A Random Access Machine A Lower Bound of 2 n Conditional Jumps for Boolean Satisfiability on A Random Access Machine Samuel C. Hsieh Computer Science Department, Ball State University July 3, 2014 Abstract We establish a lower

More information

Part 1: Propositional Logic

Part 1: Propositional Logic Part 1: Propositional Logic Literature (also for first-order logic) Schöning: Logik für Informatiker, Spektrum Fitting: First-Order Logic and Automated Theorem Proving, Springer 1 Last time 1.1 Syntax

More information

Learning Goals of CS245 Logic and Computation

Learning Goals of CS245 Logic and Computation Learning Goals of CS245 Logic and Computation Alice Gao April 27, 2018 Contents 1 Propositional Logic 2 2 Predicate Logic 4 3 Program Verification 6 4 Undecidability 7 1 1 Propositional Logic Introduction

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

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

Propositional Fragments for Knowledge Compilation and Quantified Boolean Formulae

Propositional Fragments for Knowledge Compilation and Quantified Boolean Formulae 1/15 Propositional Fragments for Knowledge Compilation and Quantified Boolean Formulae Sylvie Coste-Marquis Daniel Le Berre Florian Letombe Pierre Marquis CRIL, CNRS FRE 2499 Lens, Université d Artois,

More information

Inference in Propositional Logic

Inference in Propositional Logic Inference in Propositional Logic Deepak Kumar November 2017 Propositional Logic A language for symbolic reasoning Proposition a statement that is either True or False. E.g. Bryn Mawr College is located

More information

A Resolution Method for Modal Logic S5

A Resolution Method for Modal Logic S5 EPiC Series in Computer Science Volume 36, 2015, Pages 252 262 GCAI 2015. Global Conference on Artificial Intelligence A Resolution Method for Modal Logic S5 Yakoub Salhi and Michael Sioutis Université

More information

Reasoning with Quantified Boolean Formulas

Reasoning with Quantified Boolean Formulas Reasoning with Quantified Boolean Formulas Martina Seidl Institute for Formal Models and Verification Johannes Kepler University Linz 1 What are QBF? Quantified Boolean formulas (QBF) are formulas of propositional

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

On propositional definability

On propositional definability Artificial Intelligence 172 (2008) 991 1017 www.elsevier.com/locate/artint On propositional definability Jérôme Lang a, Pierre Marquis b, a IRIT, CNRS / Université Paul Sabatier, 118 route de Narbonne,

More information

CS1021. Why logic? Logic about inference or argument. Start from assumptions or axioms. Make deductions according to rules of reasoning.

CS1021. Why logic? Logic about inference or argument. Start from assumptions or axioms. Make deductions according to rules of reasoning. 3: Logic Why logic? Logic about inference or argument Start from assumptions or axioms Make deductions according to rules of reasoning Logic 3-1 Why logic? (continued) If I don t buy a lottery ticket on

More information

CSE 20 DISCRETE MATH WINTER

CSE 20 DISCRETE MATH WINTER CSE 20 DISCRETE MATH WINTER 2016 http://cseweb.ucsd.edu/classes/wi16/cse20-ab/ Reminders Exam 1 in one week One note sheet ok Review sessions Saturday / Sunday Assigned seats: seat map on Piazza shortly

More information