Law of logic Lecture 4.

Slides:



Advertisements
Similar presentations
Propositional Equivalences
Advertisements

Propositional Equivalences
Goals Determine the true value of statements with AND, OR, IF..THEN. Negate statements with the connectives above Construct truth tables Understand when.
Copyright © Cengage Learning. All rights reserved. CHAPTER 2 THE LOGIC OF COMPOUND STATEMENTS THE LOGIC OF COMPOUND STATEMENTS.
The Foundation: Logic Conditional Statements Muhammad Arief download dari
2.2 Conditional Statements. Goals Identify statements which are conditional Identify the antecedent and consequent of a conditional statement Negate conditional.
Logic 1 Statements and Logical Operators. Logic Propositional Calculus – Using statements to build arguments – Arguments are based on statements or propositions.
Logic Chapter 2. Proposition "Proposition" can be defined as a declarative statement having a specific truth-value, true or false. Examples: 2 is a odd.
Discrete Mathematics Lecture 1 Logic of Compound Statements Harper Langston New York University.
Syllabus Every Week: 2 Hourly Exams +Final - as noted on Syllabus
1 Section 1.2 Propositional Equivalences. 2 Equivalent Propositions Have the same truth table Can be used interchangeably For example, exclusive or and.
Introduction to Logic Sections 1.1 and 1.2 of Rosen Spring 2010
Introduction to Logic Sections 1.1 and 1.2 of Rosen Fall 2010 CSCE 235 Introduction to Discrete Structures URL: cse.unl.edu/~cse235 Questions:
Introduction to Logic Logical Form: general rules
Copyright © Cengage Learning. All rights reserved.
CSE 311 Foundations of Computing I Autumn 2011 Lecture 2 More Propositional Logic Application: Circuits Propositional Equivalence.
Chapter 2: The Logic of Compound Statements 2.1 Logical Forms and Equivalence 12.1 Logical Forms and Equivalences Logic is a science of the necessary laws.
CSCI2110 – Discrete Mathematics Tutorial 8 Propositional Logic Wong Chung Hoi (Hollis)
Propositions and Truth Tables
The Foundations: Logic and Proofs
Discrete Mathematics and Its Applications
Review I Rosen , 3.1 Know your definitions!
(CSC 102) Lecture 3 Discrete Structures. Previous Lecture Summary Logical Equivalences. De Morgan’s laws. Tautologies and Contradictions. Laws of Logic.
CSci 2011 Discrete Mathematics Lecture 6
Lecture 4. CONDITIONAL STATEMENTS: Consider the statement: "If you earn an A in Math, then I'll buy you a computer." This statement is made up of two.
1 CMSC 250 Discrete Structures CMSC 250 Lecture 1.
Reading: Chapter 4 (44-59) from the text book
CS 381 DISCRETE STRUCTURES Gongjun Yan Aug 25, November 2015Introduction & Propositional Logic 1.
Propositional Logic. Propositions Any statement that is either True (T) or False (F) is a proposition Propositional variables: a variable that can assume.
1 Introduction to Abstract Mathematics Expressions (Propositional formulas or forms) Instructor: Hayk Melikya
Lecture 9 Conditional Statements CSCI – 1900 Mathematics for Computer Science Fall 2014 Bill Pine.
Section 1.2: Propositional Equivalences In the process of reasoning, we often replace a known statement with an equivalent statement that more closely.
Propositional Logic ITCS 2175 (Rosen Section 1.1, 1.2)
Logical Form and Logical Equivalence M Logical Form Example 1 If the syntax is faulty or execution results in division by zero, then the program.
Venn Diagrams Truth Sets & Valid Arguments Truth Sets & Valid Arguments Truth Tables Implications Truth Tables Implications Truth Tables Converse, Inverse,
Chapter 2 Logic 2.1 Statements 2.2 The Negation of a Statement 2.3 The Disjunction and Conjunction of Statements 2.4 The Implication 2.5 More on Implications.
What is Reasoning  Logical reasoning is the process of drawing conclusions from premises using rules of inference.  These inference rules are results.
Symbolic Logic The Following slide were written using materials from the Book: The Following slide were written using materials from the Book: Discrete.
Week 4 - Friday.  What did we talk about last time?  Floor and ceiling  Proof by contradiction.
Discrete Mathematics Lecture # 7. Bi conditional  If p and q are statement variables, the bi conditional of p and q is  “ p if, and only if, q ” and.
رياضيات متقطعة لعلوم الحاسب MATH 226. Text books: (Discrete Mathematics and its applications) Kenneth H. Rosen, seventh Edition, 2012, McGraw- Hill.
Mathematics for Comter I Lecture 3: Logic (2) Propositional Equivalences Predicates and Quantifiers.
Discrete Mathematics Lecture # 4. Conditional Statements or Implication  If p and q are statement variables, the conditional of q by p is “If p then.
1 Georgia Tech, IIC, GVU, 2006 MAGIC Lab Rossignac Lecture 01: Boolean Logic Sections 1.1 and 1.2 Jarek Rossignac.
Foundations of Discrete Mathematics Chapter 1 By Dr. Dalia M. Gil, Ph.D.
Introduction to Predicates and Quantified Statements I Lecture 9 Section 2.1 Wed, Jan 31, 2007.
CS-7081 Application - 1. CS-7082 Example - 2 CS-7083 Simplifying a Statement – 3.
Simple Logic.
Chapter 1 Propositional Logic
2. The Logic of Compound Statements Summary
Propositional Logic.
Logic Day #2 Math Studies IB NPHS Miss Rose
The Foundations: Logic and Proofs
DISCRETE MATHEMATICS CHAPTER I.
Discrete Mathematics Lecture 1 Logic of Compound Statements
CSNB 143 Discrete Mathematical Structures
Discrete Mathematics Logic.
Citra Noviyasari, S.Si, MT
Logical Equivalence of Propositions
(CSC 102) Discrete Structures Lecture 2.
Discrete Mathematics Lecture # 2.
Mathematics for Computing
Propositional Equivalences
Information Technology Department
CS 220: Discrete Structures and their Applications
CS201: Data Structures and Discrete Mathematics I
Discrete Mathematics Logic.
Discrete Mathematics Lecture # 3.
CS201: Data Structures and Discrete Mathematics I
Concepts of Computation
Presentation transcript:

Law of logic Lecture 4

Tautology A tautology is a statement form that is always true regardless of the truth values of the statement variables. A tautology is represented by the symbol “t”. EXAMPLE: The statement form p ∨ ~ p is tautology

CONTRADICTION: A contradiction is a statement form that is always false regardless of the truth values of the statement variables. A contradiction is represented by the symbol “c”. EXAMPLE: The statement form p ∧ ~ p is a contradiction.

REMARKS: – Most statements are neither tautologies nor contradictions. – The negation of a tautology is a contradiction and vice versa. – In common usage we sometimes say that two statement are contradictory. By this we mean that their conjunction is a contradiction: they cannot both be true.

Laws of logic 1) Commutative Laws p ∧ q = q ∧ p 5) Negation Laws 2) Associative Laws ( p ∧ q ) ∧ r = p ∧ ( q ∧ r ) ( p ∨ q ) ∨ r = p ∨ ( q ∨ r ) 3) Distributive Laws p ∧ ( q ∨ r ) = ( p ∧ q ) ∨ ( p ∧ r ) p ∨ ( q ∧ r ) = ( p ∨ q ) ∧ ( p ∨ r ) 4) Identity Laws p ∧ t = p p ∨ c = p 0) Absorption Laws p ∨ ( p ∧ q ) = p p ∧ ( p ∨ q ) = p 11) Negation of t and c ~ t = c ~ c = t 5) Negation Laws p ∨ ~p = t p ∧ ~p = c 6) Double Negation Law ~( ~p) = p 7) Idempotent Laws p ∧ p = p p ∨ p = p 8) DeMorgan’s Laws ~ ( p ∧ q ) = ~p ∨ ~q ~ ( p ∨ q ) = ~p ∧ ~q 9) Universal Bound Laws p ∨ t = t p ∧ c = c

Applying the law of logic Example 1: Using law of logic, simplify the statement form p ∨ [~(~p ∧ q)] Solution: p ∨ [~(~p ∧ q)] = p ∨ [~(~p) ∨ (~q)] DeMorgan’s Law = p ∨ [p∨(~q)] Double Negative Law: ~(~p) = p = [p ∨ p]∨(~q) Associative Law for ∨ = p ∨ (~q) Idempotent Law: p ∨ p = p That is the simplified statement form.

. Example: Using Laws of Logic, verify the logical equivalence ~ (~ p ∧ q) ∧ (p ∨ q) = p Solution: ~(~p ∧ q) ∧ (p∨q) = (~(~p) ∨ ~q) ∧(p ∨ q) DeMorgan’s Law = (p ∨ ~q) ∧ (p∨q) Double Negative Law = p ∨ (~q ∧ q) Distributive Law = p ∨ c Negation Law = p Identity Law

Simplifying statements “You will get an A if you are hardworking and the sun shines, or you are hardworking and it rains.” Rephrase the condition more simply. Solution: Let p = “You are hardworking’ q = “The sun shines” r = “It rains” . The condition is (p ∧ q) ∨ (p ∧ r) Using distributive law in reverse, (p ∧ q) ∨ (p ∧ r) = p ∧ (q ∨ r) Putting p ∧ (q ∨ r) back into English, we can rephrase the given sentence as “You will get an A if you are hardworking and the sun shines or it rains.

Negation of a conditional statement Since p →q = ~ p∨q So ~ (p → q) = ~ (~ p ∨ q) = ~ (~ p) ∧ (~ q) by De Morgan’s law = p ∧ ~ q by the Double Negative law Thus the negation of “if p then q” is logically equivalent to “p and not q”. Accordingly, the negation of an if-then statement does not start with the word if.

Examples Write negations of each of the following statements: 1.If Ali lives in Pakistan then he lives in Lahore. 2.If my car is in the repair shop, then I cannot get to class. 3.If x is prime then x is odd or x is 2. 4.If n is divisible by 6, then n is divisible by 2 and n is divisible by 3. SOLUTIONS: 1. Ali lives in Pakistan and he does not live in Lahore. 2. My car is in the repair shop and I can get to class. 3. x is prime but x is not odd and x is not 2. 4. n is divisible by 6 but n is not divisible by 2 or by 3.

Inverse of a conditional statement The inverse of the conditional statement p → q is ~p → ~q A conditional and its inverse are not equivalent as could be seen from the truth table.

WRITING INVERSE: 1. If today is Friday, then 2 + 3 = 5. If today is not Friday, then 2 + 3 ≠ 5. 2. If it snows today, I will ski tomorrow. If it does not snow today I will not ski tomorrow. 3. If P is a square, then P is a rectangle. If P is not a square then P is not a rectangle. 4. If my car is in the repair shop, then I cannot get to class. If my car is not in the repair shop, then I shall get to the class.

CONVERSE OF A CONDITIONAL STATEMENT: The converse of the conditional statement p → q is q →p. A conditional and its converse are not equivalent. i.e., → is not a commutative operator.

WRITING CONVERSE: 1.If today is Friday, then 2 + 3 = 5. If 2 + 3 = 5, then today is Friday. 2.If it snows today, I will ski tomorrow. I will ski tomorrow only if it snows today. 3. If P is a square, then P is a rectangle. If P is a rectangle then P is a square. 4. If my car is in the repair shop, then I cannot get to class. If I cannot get to the class, then my car is in the repair shop.

CONTRAPOSITIVE OF A CONDITIONAL STATEMENT: The contra-positive of the conditional statement p → q is ~ q → ~ p A conditional and its contra-positive are equivalent. Symbolically p →q = ~q → ~p

Examples 1.If today is Friday, then 2 + 3 = 5. If 2 + 3 ≠ 5, then today is not Friday. 2.If it snows today, I will ski tomorrow. I will not ski tomorrow only if it does not snow today. 3. If P is a square, then P is a rectangle. If P is not a rectangle then P is not a square. 4. If my car is in the repair shop, then I cannot get to class. If I can get to the class, then my car is not in the repair shop.

Biconditional Rephrase the following propositions in the form “p if and only if q” in English. 1. If it is hot outside, you buy an ice cream cone, and if you buy an ice cream cone, it is hot outside. Sol You buy an ice cream cone if and only if it is hot outside. 2. For you to win the contest it is necessary and sufficient that you have the only winning ticket. Sol You win the contest if and only if you hold the only winning ticket. 3. If you read the news paper every day, you will be informed and conversely. Sol You will be informed if and only if you read the news paper every day.

Examples 4. It rains if it is a weekend day, and it is a weekend day if it rains. Sol It rains if and only if it is a weekend day. 5. The train runs late on exactly those days when I take it. Sol The train runs late if and only if it is a day I take the train. 6. This number is divisible by 6 precisely when it is divisible by both 2 and 3. Sol This number is divisible by 6 if and only if it is divisible by both 2 and 3.

Laws of logic 1.Commutative Law: p ↔ q = q ↔ p 2.Implication Laws: p → q = ~ p ∨ q= ~ ( p ∧ ~ q) 3.Exportation Law: (p ∧ q)→r = p →(q →r) 4.Equivalence: p ↔ q = (p →q)∧(q →p) 5.Reductio ad absurdum p →q = (p ∧ ~q) →c

. Any questions