Information Technology Department

Slides:



Advertisements
Similar presentations
Propositional Equivalences
Advertisements

CS128 – Discrete Mathematics for Computer Science
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
From Chapter 4 Formal Specification using Z David Lightfoot
1 Section 1.1 Logic. 2 Proposition Statement that is either true or false –can’t be both –in English, must contain a form of “to be” Examples: –Cate Sheller.
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
Adapted from Discrete Math
Propositions and Truth Tables
Propositions and Truth Tables. Proposition: Makes a claim that may be either true or false; it must have the structure of a complete sentence.
The Foundations: Logic and Proofs
Discrete Maths 2. Propositional Logic Objective
Mathematical Structures A collection of objects with operations defined on them and the accompanying properties form a mathematical structure or system.
Chapter 1: The Foundations: Logic and Proofs
Review I Rosen , 3.1 Know your definitions!
Chap. 2 Fundamentals of Logic. Proposition Proposition (or statement): an declarative sentence that is either true or false, but not both. e.g. –Margret.
Chapter 5 – Logic CSNB 143 Discrete Mathematical Structures.
(CSC 102) Lecture 3 Discrete Structures. Previous Lecture Summary Logical Equivalences. De Morgan’s laws. Tautologies and Contradictions. Laws of Logic.
Chapter 2: The Logic of Compound Statements 2.2 Conditional Statements
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.
Lecture Propositional Equivalences. Compound Propositions Compound propositions are made by combining existing propositions using logical operators.
1 CMSC 250 Discrete Structures CMSC 250 Lecture 1.
CS 381 DISCRETE STRUCTURES Gongjun Yan Aug 25, November 2015Introduction & Propositional Logic 1.
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.
Propositional Logic ITCS 2175 (Rosen Section 1.1, 1.2)
Chapter 1: The Foundations: Logic and Proofs
Mathematics for Comter I Lecture 2: Logic (1) Basic definitions Logical operators Translating English sentences.
Symbolic Logic The Following slide were written using materials from the Book: The Following slide were written using materials from the Book: Discrete.
ARTIFICIAL INTELLIGENCE Lecture 2 Propositional Calculus.
LECTURE 1. Disrete mathematics and its application by rosen 7 th edition THE FOUNDATIONS: LOGIC AND PROOFS 1.1 PROPOSITIONAL LOGIC.
رياضيات متقطعة لعلوم الحاسب MATH 226. Text books: (Discrete Mathematics and its applications) Kenneth H. Rosen, seventh Edition, 2012, McGraw- Hill.
Section 1.1. Propositions A proposition is a declarative sentence that is either true or false. Examples of propositions: a) The Moon is made of green.
1 Georgia Tech, IIC, GVU, 2006 MAGIC Lab Rossignac Lecture 01: Boolean Logic Sections 1.1 and 1.2 Jarek Rossignac.
Chapter 1. Chapter Summary  Propositional Logic  The Language of Propositions (1.1)  Logical Equivalences (1.3)  Predicate Logic  The Language of.
Propositional Logic. Logic Logic: the science of reasoning, proof, thinking or inference. Logic allows us to analyze a piece of reasoning and determine.
Logical Operators (Connectives) We will examine the following logical operators: Negation (NOT,  ) Negation (NOT,  ) Conjunction (AND,  ) Conjunction.
Simple Logic.
2. The Logic of Compound Statements Summary
The Foundations: Logic and Proofs
Propositional Logic.
Discrete Mathematics Lecture 1 Logic of Compound Statements
CSNB 143 Discrete Mathematical Structures
Discrete Mathematics Logic.
CSCE 235 Introduction to Discrete Structures
CS 202, Spring 2008 Epp, sections 1.1 and 1.2
6/20/2018 Arab Open University Faculty of Computer Studies M131 - Discrete Mathematics 6/20/2018.
MATH 245 Spring 2009 This is mathematics for computer science
COT 3100, Spr Applications of Discrete Structures
(CSC 102) Discrete Structures Lecture 2.
Mathematics for Computing
The Foundations: Logic and Proofs
Principles of Computing – UFCFA3-30-1
Propositional Equivalences
Propositional Equivalence (§1.2)
CS 220: Discrete Structures and their Applications
CS201: Data Structures and Discrete Mathematics I
CSE 311 Foundations of Computing I
Applied Discrete Mathematics Week 1: Logic
CSS 342 Data Structures, Algorithms, and Discrete Mathematics I
Discrete Mathematics and Its Applications Kenneth H
Lecture 2: Propositional Equivalences
Discrete Mathematics Logic.
Cs Discrete Mathematics
Logic Logic is a discipline that studies the principles and methods used to construct valid arguments. An argument is a related sequence of statements.
Discrete Structures Prepositional Logic 2
CS201: Data Structures and Discrete Mathematics I
The Foundations: Logic and Proofs
Presentation transcript:

Information Technology Department Propositional Logic Information Technology Department SKN-SITS,Lonavala.

Proposition A proposition is a statement that is either true or false, but not both. Atlanta was the site of the 1996 Summer Olympic games. 1+1 = 2 3+1 = 5 What will my CS1050 grade be?

Definition 1. Negation of p Let p be a proposition. The statement “It is not the case that p” is also a proposition, called the “negation of p” or ¬p (read “not p”) Table 1. The Truth Table for the Negation of a Proposition p ¬p T F F T p = The sky is blue. p = It is not the case that the sky is blue. p = The sky is not blue.

Definition 2. Conjunction of p and q Let p and q be propositions. The proposition “p and q,” denoted by pq is true when both p and q are true and is false otherwise. This is called the conjunction of p and q. Table 2. The Truth Table for the Conjunction of two propositions p q pq T T T T F F F T F F F F

Definition 3. Disjunction of p and q Let p and q be propositions. The proposition “p or q,” denoted by pq, is the proposition that is false when p and q are both false and true otherwise. Table 3. The Truth Table for the Disjunction of two propositions p q pq T T T T F T F T T F F F

Definition 4. Exclusive or of p and q Let p and q be propositions. The exclusive or of p and q, denoted by pq, is the proposition that is true when exactly one of p and q is true and is false otherwise. Table 4. The Truth Table for the Exclusive OR of two propositions p q pq T T F T F T F T T F F F

Definition 5. Implication pq Let p and q be propositions. The implication pq is the proposition that is false when p is true and q is false, and true otherwise. In this implication p is called the hypothesis (or antecedent or premise) and q is called the conclusion (or consequence). Table 5. The Truth Table for the Implication of pq. p q pq T T T T F F F T T F F T

Implications If p, then q p implies q if p,q p only if q p is sufficient for q q if p q whenever p q is necessary for p Not the same as the if- then construct used in programming languages such as If p then S

Related Implications Converse of p  q is q  p Contrapositive of p  q is the proposition q  p Inverse of p  q Is the proposition p  q

Example implication: “If it rains today, I will go to college tomorrow” Converse: I will go to college tomorrow only if it rains today Contrapositive : If I do not go to college tomorrow, then it will not have rained today Inverse : If it does not rain today, then I will not go to college tomorrow

Definition 6. Biconditional Let p and q be propositions. The biconditional pq is the proposition that is true when p and q have the same truth values and is false otherwise. “p if and only if q, p is necessary and sufficient for q” Table 6. The Truth Table for the biconditional pq. p q pq T T T T F F F T F F F T

Practice p p: You learn the simple things well. q: The difficult things become easy. You do not learn the simple things well. If you learn the simple things well then the difficult things become easy. If you do not learn the simple things well, then the difficult things will not become easy. The difficult things become easy but you did not learn the simple things well. You learn the simple things well but the difficult things did not become easy. p q  p pq p  q p  q

Well formed Formula (WFF) A well formed formula can be produced using following rules: Rule 1 : A statement variable itself is a WFF Rule 2 : If p is WFF, then p is WFF Rule 3 : If p and q are WFF then (p q), (p  q), (p  q) and (p  q) are also WFF Rule 4 : A string of symbols consisting of statement variables, connectives and parentheses is said to be WFF iff it can be produced by applying rule 1, 2 and 3 finitely many times

Bit Operations A computer bit has two possible values: 0 (false) and 1 (true). A variable is called a Boolean variable is its value is either true or false. Bit operations correspond to the logical connectives:  OR  AND  XOR Information can be represented by bit strings, which are sequences of zeros and ones, and manipulated by operations on the bit strings.

Truth tables for the bit operations OR, AND, and XOR  0 1 0 0 1 1 1 1  0 1 0 0 1 1 1 0  0 1 0 0 0 1 0 1

Logical Equivalence An important technique in proofs is to replace a statement with another statement that is “logically equivalent.” Tautology: compound proposition that is always true regardless of the truth values of the propositions in it. Eg. p  p Contradiction: Compound proposition that is always false regardless of the truth values of the propositions in it. Eg. p  p

Logically Equivalent Compound propositions P and Q are logically equivalent if PQ is a tautology. In other words, P and Q have the same truth values for all combinations of truth values of simple propositions. This is denoted: PQ (or by P Q)

Example: DeMorgans Prove that (pq)  (p  q) p q (pq) (pq) p q (p  q) T T T F F T F F T F F F F T F F T F T F T F F F T T T T

Illustration of De Morgan’s Law (pq) p q

Illustration of De Morgan’s Law p p

Illustration of De Morgan’s Law q q

Illustration of De Morgan’s Law p  q p q

Example: Distribution Prove that: p  (q  r)  (p  q)  (p  r) p q r qr p(qr) pq pr (pq)(pr) T T T T T T T T T T F F T T T T T F T F T T T T T F F F T T T T F T T T T T T T F T F F F T F F F F T F F F T F F F F F F F F F

Prove: pq(pq)  (qp) p q pq pq qp (pq)(qp) T T T T T T T F F F T F F T F T F F F F T T T T We call this biconditional equivalence.

List of Logical Equivalences pT  p; pF  p Identity Laws pT  T; pF  F Domination Laws pp  p; pp  p Idempotent Laws (p)  p Double Negation Law pq  qp; pq  qp Commutative Laws (pq) r  p (qr); (pq)  r  p  (qr) Associative Laws

List of Equivalences p(qr)  (pq)(pr) Distribution Laws (pq)(p  q) De Morgan’s Laws (pq)(p  q) Miscellaneous p  p  T Or Tautology p  p  F And Contradiction (pq)  (p  q) Implication Equivalence pq(pq)  (qp) Biconditional Equivalence