LECTURE 1. Disrete mathematics and its application by rosen 7 th edition THE FOUNDATIONS: LOGIC AND PROOFS 1.1 PROPOSITIONAL LOGIC.

Slides:



Advertisements
Similar presentations
Copyright 2008, Scott Gray1 Propositional Logic 3) Truth Tables.
Advertisements

Chapter 1: The Foundations: Logic and Proofs
Grading Lecture attendance: -1% per 2 unexcused absences
1. Propositions A proposition is a declarative sentence that is either true or false. Examples of propositions: The Moon is made of green cheese. Trenton.
Propositional Equivalences. L32 Agenda Tautologies Logical Equivalences.
CS128 – Discrete Mathematics for Computer Science
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.
Discrete Mathematics Math 6A Instructor: M. Welling.
CSE115/ENGR160 Discrete Mathematics 01/17/12 Ming-Hsuan Yang UC Merced 1.
First Order Logic. Propositional Logic A proposition is a declarative sentence (a sentence that declares a fact) that is either true or false, but not.
Adapted from Discrete Math
The Foundations: Logic and Proofs
CS104 : Discrete Structures
Discrete Mathematics Goals of a Discrete Mathematics Learn how to think mathematically 1. Mathematical Reasoning Foundation for discussions of methods.
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.
Chapter 3 Section 4 – Slide 1 Copyright © 2009 Pearson Education, Inc. AND.
MATERI II PROPOSISI. 2 Tautology and Contradiction Definition A tautology is a statement form that is always true. A statement whose form is a tautology.
Discrete Mathematics and Its Applications
Discrete Mathematics CS 285. Lecture 12 Section 1.1: Logic Axiomatic concepts in math: Equals Opposite Truth and falsehood Statement Objects Collections.
Mathematical Structures A collection of objects with operations defined on them and the accompanying properties form a mathematical structure or system.
1 Logic Logic is a discipline that studies the principles and methods used in correct reasoning It includes: A formal language for expressing statements.
CS 285- Discrete Mathematics Lecture 2. Section 1.1 Propositional Logic Propositions Conditional Statements Truth Tables of Compound Propositions Translating.
Chapter 1: The Foundations: Logic and Proofs
BY: MISS FARAH ADIBAH ADNAN IMK. CHAPTER OUTLINE: PART III 1.3 ELEMENTARY LOGIC INTRODUCTION PROPOSITION COMPOUND STATEMENTS LOGICAL.
Discrete Mathematics. Propositional Logic 10/8/2015 What’s a proposition? PropositionsNot Propositions = 32Bring me coffee! CS173 is Bryan’s favorite.
Chapter 5 – Logic CSNB 143 Discrete Mathematical Structures.
Discrete Mathematics Lecture1 Miss.Amal Alshardy.
The Foundations Logic and Proofs by raedRASHEED 2014.
CSNB143 – Discrete Structure LOGIC. Learning Outcomes Student should be able to know what is it means by statement. Students should be able to identify.
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.
Reading: Chapter 4 (44-59) from the text book
LOGIC Lesson 2.1. What is an on-the-spot Quiz  This quiz is defined by me.  While I’m having my lectures, you have to be alert.  Because there are.
CS100 : Discrete Structures
MAIN TOPIC : Statement, Open Sentences, and Truth Values Negation Compound Statement Equivalency, Tautology, Contradiction, and Contingency Converse, Inverse,
Thinking Mathematically
1/10/ Math/CSE 1019N: Discrete Mathematics for Computer Science Winter 2007 Suprakash Datta Office: CSEB 3043 Phone:
Discrete Mathematics CS 285. Lecture 12 Quick Overview The conceptual center of computer science is the ALGORITHM.
Propositional Logic ITCS 2175 (Rosen Section 1.1, 1.2)
Chapter 1: The Foundations: Logic and Proofs
The Foundations: Logic and Proof, Sets, and Foundations PROPOSITIONS A proposition is a declarative sentence that is either True or False, but not the.
Section 1.1. Section Summary Propositions Connectives Negation Conjunction Disjunction Implication; contrapositive, inverse, converse Biconditional Truth.
CSNB143 – Discrete Structure Topic 4 – Logic. Learning Outcomes Students should be able to define statement. Students should be able to identify connectives.
رياضيات متقطعة لعلوم الحاسب 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.
CS104 The Foundations: Logic and Proof 1. 2 What is Discrete Structure?  Discrete Objects  Separated from each other (Opposite of continuous)  e.g.,
Chapter 1. Chapter Summary  Propositional Logic  The Language of Propositions (1.1)  Logical Equivalences (1.3)  Predicate Logic  The Language of.
Simple Logic.
Chapter 1 Propositional Logic
2. The Logic of Compound Statements Summary
CSNB 143 Discrete Mathematical Structures
Niu Kun Discrete Mathematics Chapter 1 The Foundations: Logic and Proof, Sets, and Functions Niu Kun 离散数学.
Logic.
(CSC 102) Discrete Structures Lecture 2.
Ch.1 (Part 1): The Foundations: Logic and Proofs
The Foundations: Logic and Proofs
Principles of Computing – UFCFA3-30-1
Chapter 8 Logic Topics
Information Technology Department
Chapter 1 The Foundations: Logic and Proof, Sets, and Functions
(1.4) An Introduction to Logic
Discrete Mathematics and Its Applications Kenneth H
Discrete Mathematics Lecture 2: Propositional Logic
MAT 3100 Introduction to Proof
Discrete Mathematics Lecture 2: Propositional Logic
Logic Logic is a discipline that studies the principles and methods used to construct valid arguments. An argument is a related sequence of statements.
1.3 Propositional Equivalences
Presentation transcript:

LECTURE 1

Disrete mathematics and its application by rosen 7 th edition THE FOUNDATIONS: LOGIC AND PROOFS 1.1 PROPOSITIONAL LOGIC

 A proposition is a declarative sentence (that is, a sentence that declares a fact) that is either true or false, but not both  = 2 (true)  = 13 (true)  Islamabad is capital of Pakistan (true)  Karachi is the largest city of Pakistan (true)  = 111 (false)  Some sentences are not prepositions  Where is my class? (un decelerated sentence)  What is the time by your watch? (un decelerated sentence)  x + y = ? ( will be prepositions when value is assigned)  Z +w * r = p PROPOSITIONS

 We use letters to denote propositional variables (or statement variables).  The truth value of a proposition is true, denoted by T, if it is a true proposition.  The truth value of a proposition is false, denoted by F, if it is a false proposition.  Many mathematical statements are constructed by combining one or more propositions. They are called compound propositions, are formed from existing propositions using logical operators. PROPOSITIONS

 Definition: Let p be a proposition. The negation of p, denoted by ¬ p (also denoted by p), is the statement “It is not the case that p.”  The proposition ¬ p is read “not p.” The truth value of the negation of p, ¬ p, is the opposite of the truth value of p.  Also denoted as “ ′ ”  Examples:  p := Sir PC is running Windows OS  ¬ p := sir PC is not running Windows OS  p := a + b = c  p := a + b ≠ c NEGATION The Truth Table for the Negation of a Proposition p ¬p¬p TFTF FTFT

 Definition: Let p and q be propositions. The conjunction of p and q, denoted by p ∧ q, is the proposition “p and q.” The conjunction p ∧ q is true when both p and q are true and is false otherwise.  Also known as UNION, AND, BIT WISE AND, AGREGATION  Denoted as ^, &, AND CONJUNCTION The Truth Table for the conjunction of a Proposition p qp ^ q T T F F T F TFFFTFFF

 Definition: Let p and q be propositions. The disjunction of p and q, denoted by p ∨ q, is the proposition “p or q.” The disjunction p ∨ q is false when both p and q are false and is true otherwise.  Also known as OR, BIT WISE OR, SEGREGATION  Denoted as v, ||, OR DISJUNCTION The Truth Table for the conjunction of a Proposition p qp v q T T F F T F TTTFTTTF

 Definition: 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.  Also known as ZORING  Denoted as XOR, Ex OR, ⊕ EXCLUSIVE OR The Truth Table for the conjunction of a Proposition p q p ⊕ q T T F F T F FTTFFTTF

 Let p and q be propositions. The conditional statement p → q is the proposition “if p, then q.” The conditional statement p → q is false when p is true and q is false, and true otherwise.  In the conditional statement p → q, p is called the hypothesis (or antecedent or premise) and q is called the conclusion (or consequence).  Denoted by  CONDITIONAL STATEMENT The Truth Table for the conjunction of a Proposition p qp → q T T F F T F TFTTTFTT

 The proposition q → p is called the converse of p → q.  The converse, q → p, has no same truth value as p → q for all cases.  Formed from conditional statement. CONVERSE

 The contrapositive of p → q is the proposition ¬ q → ¬ p.  only the contrapositive always has the same truth value as p → q.  The contrapositive is false only when ¬ p is false and ¬ q is true.  Formed from conditional statement. CONTRAPOSITIVE The Truth Table for the CONTRAPOSITIVE of a Proposition p q ¬ p ¬ q ¬ p → ¬ q T T F F T F F T F T T F F F T T TTFTTTFT

 Formed from conditional statement.  The proposition ¬ p → ¬ q is called the inverse of p → q.  The converse, q → p, has no same truth value as p → q for all cases. INVERSE

 Let p and q be propositions. The biconditional statement p ↔ q is the proposition “p if and only if q.” The biconditional statement p ↔ q is true when p and q have the same truth values, and is false otherwise.  Biconditional statements are also called bi-implications. BICONDITIONAL The Truth Table for the CONTRAPOSITIVE of a Proposition q pq ↔ p T T F F T F TFFTTFFT

 Definition: When more that one above defined preposition logic combines it is called as compound preposition.  Example:  (p^q)v(p’)  (p ⊕ q) ^ (r v s) COMPOUND PROPOSITIONS

 (p ∨¬ q) → (p ∧ q) COMPOUND PROPOSITIONS (TRUTH TABLE) The Truth Table of (p ∨¬ q) → (p ∧ q) pq ¬q¬qp ∨¬ qp ∧ q(p ∨¬ q) → (p ∧ q) TTFFTTFF TFTFTFTF FTFTFTFT TTFTTTFT TFFFTFFF TFTFTFTF

Precedence of Logical Operators. OperatorPrecedence ¬ 1 ^2 v3 →4 ↔5 XOR6 PRECEDENCE OF LOGICAL OPERATORS

 Computers represent information using bits  A bit is a symbol with two possible values, namely, 0 (zero) and 1 (one).  A bit can be used to represent a truth value, because there are two truth values, namely, true and false.  1 bit to represent true and a 0 bit to represent false. That is, 1 represents T (true), 0 represents F (false).  A variable is called a Boolean variable if its value is either true or false. Consequently, a Boolean variable can be represented using a bit. LOGIC AND BIT OPERATIONS Truth ValueBit T1 F0

 Computer bit operations correspond to the logical connectives.  By replacing true by a one and false by a zero in the truth tables for the operators ∧ (AND), ∨ (OR), and ⊕ (XOR), the tables shown for the corresponding bit operations are obtained. LOGIC AND BIT OPERATIONS Table for the Bit Operators OR, AND, and XOR. pqp ^ qp v qp XOR q

 bitwise OR bitwise AND bitwise XOR  bitwise OR bitwise AND bitwise XOR BITWISE OR, BITWISE AND, AND BITWISE XOR