Discrete Mathematics, Chapter : Propositional Logic

Similar documents
CSL105: Discrete Mathematical Structures. Ragesh Jaiswal, CSE, IIT Delhi

Propositional Logic. A proposition is a declarative sentence (a sentence that declares a fact) that is either true or false, but not both.

Handout #1: Mathematical Reasoning

p: I am elected q: I will lower the taxes

CHAPTER 2. Logic. 1. Logic Definitions. Notation: Variables are used to represent propositions. The most common variables used are p, q, and r.

Likewise, we have contradictions: formulas that can only be false, e.g. (p p).

CS510 Software Engineering

Resolution. Informatics 1 School of Informatics, University of Edinburgh

def: An axiom is a statement that is assumed to be true, or in the case of a mathematical system, is used to specify the system.

Logic in general. Inference rules and theorem proving

DISCRETE MATH: LECTURE 3

Math 3000 Section 003 Intro to Abstract Math Homework 2

Mathematical Induction

CHAPTER 7 GENERAL PROOF SYSTEMS

Logic in Computer Science: Logic Gates

Beyond Propositional Logic Lukasiewicz s System

Boolean Algebra Part 1

Chapter 3. Cartesian Products and Relations. 3.1 Cartesian Products

Predicate logic Proofs Artificial intelligence. Predicate logic. SET07106 Mathematics for Software Engineering

Logic Appendix. Section 1 Truth Tables CONJUNCTION EXAMPLE 1

Lecture Notes in Discrete Mathematics. Marcel B. Finan Arkansas Tech University c All Rights Reserved

INTRODUCTORY SET THEORY

WRITING PROOFS. Christopher Heil Georgia Institute of Technology

Basic Proof Techniques

CHAPTER 3. Methods of Proofs. 1. Logical Arguments and Formal Proofs

Logical Agents. Explorations in Artificial Intelligence. Knowledge-based Agents. Knowledge-base Agents. Outline. Knowledge bases

The Mathematics of GIS. Wolfgang Kainz

Mathematics for Computer Science/Software Engineering. Notes for the course MSM1F3 Dr. R. A. Wilson

196 Chapter 7. Logical Agents

Certamen 1 de Representación del Conocimiento

3. Mathematical Induction

Switching Algebra and Logic Gates

Invalidity in Predicate Logic

Introduction to Logic: Argumentation and Interpretation. Vysoká škola mezinárodních a veřejných vztahů PhDr. Peter Jan Kosmály, Ph.D

Mathematics Review for MS Finance Students

CSEE 3827: Fundamentals of Computer Systems. Standard Forms and Simplification with Karnaugh Maps

MATHEMATICAL INDUCTION. Mathematical Induction. This is a powerful method to prove properties of positive integers.

Cartesian Products and Relations

Incenter Circumcenter

Lecture 16 : Relations and Functions DRAFT

Arkansas Tech University MATH 4033: Elementary Modern Algebra Dr. Marcel B. Finan

Undergraduate Notes in Mathematics. Arkansas Tech University Department of Mathematics

A simple solution to the hardest logic puzzle ever

WOLLONGONG COLLEGE AUSTRALIA. Diploma in Information Technology

MAT Program Verication: Exercises

Introduction. The Quine-McCluskey Method Handout 5 January 21, CSEE E6861y Prof. Steven Nowick

Solutions for Practice problems on proofs

Continued Fractions and the Euclidean Algorithm

Hypothetical Syllogisms 1

Introduction to Logic in Computer Science: Autumn 2006

Lecture 17 : Equivalence and Order Relations DRAFT

Correspondence analysis for strong three-valued logic

Degrees of Truth: the formal logic of classical and quantum probabilities as well as fuzzy sets.

The last three chapters introduced three major proof techniques: direct,

BOOLEAN ALGEBRA & LOGIC GATES

(LMCS, p. 317) V.1. First Order Logic. This is the most powerful, most expressive logic that we will examine.

1.2 Solving a System of Linear Equations

Applied Liberal Arts Mathematics MAT-105-TE

Clue Deduction: an introduction to satisfiability reasoning

Predicate Logic. For example, consider the following argument:

Math 55: Discrete Mathematics

Conjunction is true when both parts of the statement are true. (p is true, q is true. p^q is true)

Solutions to Homework 6 Mathematics 503 Foundations of Mathematics Spring 2014

Practice with Proofs

Continuous Compounding and Discounting

A Few Basics of Probability

Math 223 Abstract Algebra Lecture Notes

Solutions Q1, Q3, Q4.(a), Q5, Q6 to INTLOGS16 Test 1

Introduction. Appendix D Mathematical Induction D1

Schedule. Logic (master program) Literature & Online Material. gic. Time and Place. Literature. Exercises & Exam. Online Material

Discrete Mathematics and Probability Theory Fall 2009 Satish Rao, David Tse Note 2

Math Week in Review #4. A proposition, or statement, is a declarative sentence that can be classified as either true or false, but not both.

WOLLONGONG COLLEGE AUSTRALIA. Diploma in Information Technology

Formal Engineering for Industrial Software Development

Vocabulary. Term Page Definition Clarifying Example. biconditional statement. conclusion. conditional statement. conjecture.

We would like to state the following system of natural deduction rules preserving falsity:

P1. All of the students will understand validity P2. You are one of the students C. You will understand validity

Fundamentele Informatica II

simplicity hides complexity

24. PARAPHRASING COMPLEX STATEMENTS

Reasoning and Proof Review Questions

alternate interior angles

2. The Language of First-order Logic

1. Implication. Example 1. Each of the following statements is an implication: You can view Statement 1 above as a promise.

Discrete Mathematics, Chapter 4: Number Theory and Cryptography

6.080/6.089 GITCS Feb 12, Lecture 3

C H A P T E R. Logic Circuits

Lecture 7: NP-Complete Problems

1. True or False? A voltage level in the range 0 to 2 volts is interpreted as a binary 1.

Basic Logic Gates Richard E. Haskell

NP-Completeness and Cook s Theorem

Elementary Number Theory and Methods of Proof. CSE 215, Foundations of Computer Science Stony Brook University

IAEA Training Course on Safety Assessment of NPPs to Assist Decision Making. System Analysis. Lecturer. Workshop Information IAEA Workshop

Set Theory Basic Concepts and Definitions

Logic is a systematic way of thinking that allows us to deduce new information

MATRIX ALGEBRA AND SYSTEMS OF EQUATIONS

6.2 Permutations continued

v w is orthogonal to both v and w. the three vectors v, w and v w form a right-handed set of vectors.

Examination paper for MA0301 Elementær diskret matematikk

Quotient Rings and Field Extensions

Transcription:

Discrete Mathematics, Chapter 1.1.-1.3: Propositional Logic Richard Mayr University of Edinburgh, UK Richard Mayr (University of Edinburgh, UK) Discrete Mathematics. Chapter 1.1-1.3 1 / 21

Outline 1 Propositions 2 Logical Equivalences 3 Normal Forms Richard Mayr (University of Edinburgh, UK) Discrete Mathematics. Chapter 1.1-1.3 2 / 21

Propositions A proposition is a declarative sentence that is either true or false. Examples of propositions: The Moon is made of green cheese. Trenton is the capital of New Jersey. Toronto is the capital of Canada. 1 + 0 = 1 0 + 0 = 2 Examples that are not propositions. Sit down! What time is it? x + 1 = 2 x + y = z Richard Mayr (University of Edinburgh, UK) Discrete Mathematics. Chapter 1.1-1.3 3 / 21

Propositional Logic Constructing Propositions Propositional Variables: p, q, r, s,... The proposition that is always true is denoted by T and the proposition that is always false is denoted by F. Compound Propositions; constructed from logical connectives and other propositions Negation Conjunction Disjunction Implication Biconditional Richard Mayr (University of Edinburgh, UK) Discrete Mathematics. Chapter 1.1-1.3 4 / 21

Disjunction The disjunction of propositions p and q is denoted by p q and has this truth table: p q p q T T T T F T F T T F F F Richard Mayr (University of Edinburgh, UK) Discrete Mathematics. Chapter 1.1-1.3 5 / 21

Conjunction The disjunction of propositions p and q is denoted by p q and has this truth table: p q p q T T T T F F F T F F F F Richard Mayr (University of Edinburgh, UK) Discrete Mathematics. Chapter 1.1-1.3 6 / 21

Implication If p and q are propositions, then p q is a conditional statement or implication which is read as if p, then q and has this truth table: p q p q T T T T F F F T T F F T In p q, p is the hypothesis (antecedent or premise) and q is the conclusion (or consequence). Implication can be expressed by disjunction and negation: p q p q Richard Mayr (University of Edinburgh, UK) Discrete Mathematics. Chapter 1.1-1.3 7 / 21

Understanding Implication In p q there does not need to be any connection between the antecedent or the consequent. The meaning depends only on the truth values of p and q. This implication is perfectly fine, but would not be used in ordinary English. If the moon is made of green cheese, then I have more money than Bill Gates. One way to view the logical conditional is to think of an obligation or contract. If I am elected, then I will lower taxes. Richard Mayr (University of Edinburgh, UK) Discrete Mathematics. Chapter 1.1-1.3 8 / 21

Different Ways of Expressing p q if p, then q if p, q q unless p q if p p is sufficient for q q is necessary for p a sufficient condition for q is p p implies q p only if q q when p q whenever p q follows from p a necessary condition for p is q Richard Mayr (University of Edinburgh, UK) Discrete Mathematics. Chapter 1.1-1.3 9 / 21

Converse, Contrapositive, and Inverse q p is the converse of p q q p is the contrapositive of p q p q is the inverse of p q Example: Find the converse, inverse, and contrapositive of It is raining is a sufficient condition for my not going to town. Solution: converse: If I do not go to town, then it is raining. inverse: If it is not raining, then I will go to town. contrapositive: If I go to town, then it is not raining. How do the converse, contrapositive, and inverse relate to p q? Clicker 1 converse contrapositive? 2 converse inverse? 3 contrapositive inverse? Richard Mayr (University of Edinburgh, UK) Discrete Mathematics. Chapter 1.1-1.3 10 / 21

Biconditional If p and q are propositions, then the biconditional proposition p q has this truth table p q p q T T T T F F F T F F F T p q also reads as p if and only if q p iff q. p is necessary and sufficient for q if p then q, and conversely p implies q, and vice-versa Richard Mayr (University of Edinburgh, UK) Discrete Mathematics. Chapter 1.1-1.3 11 / 21

Precedence of Logical Operators 1 2 3 4 5 Thus p q r is equivalent to (p q) r. If the intended meaning is p (q r) then parentheses must be used. Richard Mayr (University of Edinburgh, UK) Discrete Mathematics. Chapter 1.1-1.3 12 / 21

Satisfiability, Tautology, Contradiction A proposition is satisfiable, if its truth table contains true at least once. Example: p q. a tautology, if it is always true. Example: p p. a contradiction, if it always false. Example: p p. a contingency, if it is neither a tautology nor a contradiction. Example: p. Richard Mayr (University of Edinburgh, UK) Discrete Mathematics. Chapter 1.1-1.3 13 / 21

Logical Equivalence Definition Two compound propositions p and q are logically equivalent if the columns in a truth table giving their truth values agree. This is written as p q. It is easy to show: Fact p q if and only if p q is a tautology. Richard Mayr (University of Edinburgh, UK) Discrete Mathematics. Chapter 1.1-1.3 14 / 21

De Morgan s Laws (p q) p q (p q) p q Truth table proving De Morgan s second law. p q p q (p q) (p q) p q T T F F T F F T F F T T F F F T T F T F F F F T T F T T Richard Mayr (University of Edinburgh, UK) Discrete Mathematics. Chapter 1.1-1.3 15 / 21

Important Logical Equivalences Domination laws: Identity laws: Idempotent laws: Double negation law: Negation laws: p T T, p F F p T p, p F p p p p, p p p ( p) p p p T, p p F The first of the Negation laws is also called law of excluded middle. Latin: tertium non datur. Commutative laws: p q q p, p q q p Associative laws: (p q) r p (q r) (p q) r p (q r) Distributive laws: p (q r) (p q) (p r) p (q r) (p q) (p r) Absorption laws: p (p q) p, p (p q) p Richard Mayr (University of Edinburgh, UK) Discrete Mathematics. Chapter 1.1-1.3 16 / 21

More Logical Equivalences Richard Mayr (University of Edinburgh, UK) Discrete Mathematics. Chapter 1.1-1.3 17 / 21

A Proof in Propositional Logic To prove: (p ( p q)) p q (p ( p q)) p ( p q) by De Morgan s 2nd law p ( ( p) q) by De Morgan s first law p (p q) by the double negation law ( p p) ( p q) by the 2nd distributive law F ( p q) because p p F ( p q) F by commutativity of disj. p q by the identity law for F Richard Mayr (University of Edinburgh, UK) Discrete Mathematics. Chapter 1.1-1.3 18 / 21

Conjunctive and Disjunctive Normal Form A literal is either a propositional variable, or the negation of one. Examples: p, p. A clause is a disjunction of literals. Example: p q r. A formula in conjunctive normal form (CNF) is a conjunction of clauses. Example: (p q r) ( p r) Similarly, one defines formulae in disjunctive normal form (DNF) by swapping the words conjunction and disjunction in the definitions above. Example: ( p q r) ( q r) (p r). Richard Mayr (University of Edinburgh, UK) Discrete Mathematics. Chapter 1.1-1.3 19 / 21

Transformation into Conjunctive Normal Form Fact For every propositional formula one can construct an equivalent one in conjunctive normal form. 1 Express all other operators by conjunction, disjunction and negation. 2 Push negations inward by De Morgan s laws and the double negation law until negations appear only in literals. 3 Use the commutative, associative and distributive laws to obtain the correct form. 4 Simplify with domination, identity, idempotent, and negation laws. (A similar construction can be done to transform formulae into disjunctive normal form.) Richard Mayr (University of Edinburgh, UK) Discrete Mathematics. Chapter 1.1-1.3 20 / 21

Example: Transformation into CNF Transform the following formula into CNF. (p q) (r p) 1 Express implication by disjunction and negation. ( p q) ( r p) 2 Push negation inwards by De Morgan s laws and double negation. (p q) ( r p) 3 Convert to CNF by associative and distributive laws. (p r p) ( q r p) 4 Optionally simplify by commutative and idempotent laws. (p r) ( q r p) and by commutative and absorbtion laws (p r) Richard Mayr (University of Edinburgh, UK) Discrete Mathematics. Chapter 1.1-1.3 21 / 21