CSNB143 – Discrete Structure Topic 4 – Logic. Learning Outcomes Students should be able to define statement. Students should be able to identify connectives.

Slides:



Advertisements
Similar presentations
Logic The study of correct reasoning.
Advertisements

TRUTH TABLES The general truth tables for each of the connectives tell you the value of any possible statement for each of the connectives. Negation.
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.
Chapter 2. Logic Weiqi Luo ( 骆伟祺 ) School of Software Sun Yat-Sen University : Office : A309
CS128 – Discrete Mathematics for Computer Science
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.
1 Section 1.2 Propositional Equivalences. 2 Equivalent Propositions Have the same truth table Can be used interchangeably For example, exclusive or and.
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.
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
3.2 – Truth Tables and Equivalent Statements
Copyright 2013, 2010, 2007, Pearson, Education, Inc. Section 3.2 Truth Tables for Negation, Conjunction, and Disjunction.
Lecture 8 Introduction to Logic CSCI – 1900 Mathematics for Computer Science Fall 2014 Bill Pine.
The Foundations: Logic and Proofs
Discrete Mathematics Goals of a Discrete Mathematics Learn how to think mathematically 1. Mathematical Reasoning Foundation for discussions of methods.
Propositions and Truth Tables
Chapter 1 Section 1.4 More on Conditionals. There are three statements that are related to a conditional statement. They are called the converse, inverse.
Section 1.5 Implications. Implication Statements If Cara has a piano lesson, then it is Friday. If it is raining, then I need to remember my umbrella.
Section 1-4 Logic Katelyn Donovan MAT 202 Dr. Marinas January 19, 2006.
Discrete Maths 2. Propositional Logic Objective
CSCI 115 Chapter 2 Logic. CSCI 115 §2.1 Propositions and Logical Operations.
Discrete Mathematics and Its Applications
Mathematical Structures A collection of objects with operations defined on them and the accompanying properties form a mathematical structure or system.
Chapter 1 The Logic of Compound Statements. Section 1.1 Logical Form and Logical Equivalence.
BY: MISS FARAH ADIBAH ADNAN IMK. CHAPTER OUTLINE: PART III 1.3 ELEMENTARY LOGIC INTRODUCTION PROPOSITION COMPOUND STATEMENTS LOGICAL.
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.
Fall 2002CMSC Discrete Structures1 Let’s get started with... Logic !
Logical Form and Logical Equivalence Lecture 2 Section 1.1 Fri, Jan 19, 2007.
Chapter 1, Part II: Predicate Logic With Question/Answer Animations.
Discrete Mathematics Lecture1 Miss.Amal Alshardy.
2.3Logical Implication: Rules of Inference From the notion of a valid argument, we begin a formal study of what we shall mean by an argument and when such.
Barnett/Ziegler/Byleen Finite Mathematics 11e1 Chapter 7 Review Important Terms, Symbols, Concepts 7.1. Logic A proposition is a statement (not a question.
Chapter 3 section 3. Conditional pqpqpq TTT TFF FTT FFT The p is called the hypothesis and the q is called the conclusion.
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 Propositional Equivalences. Compound Propositions Compound propositions are made by combining existing propositions using logical operators.
January 30, 2002Applied Discrete Mathematics Week 1: Logic and Sets 1 Let’s Talk About Logic Logic is a system based on propositions.Logic is a system.
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.
Chapter 7 Logic, Sets, and Counting
Chapter 3: Introduction to Logic. Logic Main goal: use logic to analyze arguments (claims) to see if they are valid or invalid. This is useful for math.
MAIN TOPIC : Statement, Open Sentences, and Truth Values Negation Compound Statement Equivalency, Tautology, Contradiction, and Contingency Converse, Inverse,
Lecture 9 Conditional Statements CSCI – 1900 Mathematics for Computer Science Fall 2014 Bill Pine.
How do I show that two compound propositions are logically equivalent?
Chapter 7 Logic, Sets, and Counting Section 1 Logic.
Propositional Logic ITCS 2175 (Rosen Section 1.1, 1.2)
Logical Form and Logical Equivalence Lecture 1 Section 1.1 Wed, Jan 12, 2005.
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.
Conditional Statements – Page 1CSCI 1900 – Discrete Structures CSCI 1900 Discrete Structures Conditional Statements Reading: Kolman, Section 2.2.
Section 1.1. Section Summary Propositions Connectives Negation Conjunction Disjunction Implication; contrapositive, inverse, converse Biconditional Truth.
Logical Operations – Page 1CSCI 1900 – Discrete Structures CSCI 1900 Discrete Structures Logical Operations Reading: Kolman, Section 2.1.
Chapter 2 Symbolic Logic. Section 2-1 Truth, Equivalence and Implication.
Joan Ridgway. If a proposition is not indeterminate then it is either true (T) or false (F). True and False are complementary events. For two propositions,
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.
Mathematics for Computing Lecture 2: Computer Logic and Truth Tables Dr Andrew Purkiss-Trew Cancer Research UK
Spring 2003CMSC Discrete Structures1 Let’s get started with... Logic !
3/6/20161 Let’s get started with... Logic !. 3/6/20162 Logic Crucial for mathematical reasoningCrucial for mathematical reasoning Used for designing electronic.
Conditional statement or implication IF p then q is denoted p ⇒ q p is the antecedent or hypothesis q is the consequent or conclusion ⇒ means IF…THEN.
Section 1.4. Propositional Functions Propositional functions become propositions (and have truth values) when their variables are each replaced by a value.
Discrete Mathematical Structures: Theory and Applications 1 Logic: Learning Objectives  Learn about statements (propositions)  Learn how to use logical.
Propositional and predicate logic
Chapter 1. Chapter Summary  Propositional Logic  The Language of Propositions (1.1)  Logical Equivalences (1.3)  Predicate Logic  The Language of.
Chapter 1 Logic and proofs
Logical Operators (Connectives) We will examine the following logical operators: Negation (NOT,  ) Negation (NOT,  ) Conjunction (AND,  ) Conjunction.
CSNB 143 Discrete Mathematical Structures
2.1 Propositions and Logical Operations
CMSC Discrete Structures
Information Technology Department
CHAPTER 1: LOGICS AND PROOF
Presentation transcript:

CSNB143 – Discrete Structure Topic 4 – Logic

Learning Outcomes Students should be able to define statement. Students should be able to identify connectives and compound statements. Students should be able to use the Truth Table without difficulties

Topic 4 – Logic Logic - explanation Statements are the basic building block of logic Statements or propositions is a declarative sentence with the value of true or false but not both. Which one is a statement? The world is round = 5 Have you taken your lunch? 3 - x = 5 The temperature on the surface of Mars is 800F. Tomorrow is a bright day. Read this!

Topic 4 – Logic Logical Connectives and Compound Statements Many mathematical statements are constructed by combining one or more statements Statement usually will be replaced by variables such as p, q, r or s. Example : p: The sun will shine today q: It is a cold weather. Statements can be combined by logical connectives to obtain compound statements. Example : AND (p and q): The sun will shine today and it is a cold weather.

Topic 4 – Logic Logical Connectives - Conjunction Connectives AND is what we called conjunction for p and q, written p  q. The compound statement is true if both statements are true. To prove the value of any statement (or compound statements), we need to use the Truth Table. pq p  q TT TF FT FF

Topic 4 – Logic Logical Connectives – Disjunction Connectives OR is what we called disjunction for p and q, written p  q. The compound statement is false if both statements are false. To prove the value of any statement (or compound statements), we need to use the Truth Table. pq p  q TT TF FT FF

Topic 4 – Logic Logical Connectives - Negation Negation for any statement p is not p, written as ~p or  p. The Truth Table for negation is: p~p TF FT

Topic 4 – Logic Truth Table – work this out: Find the value of the following compound statements using Truth Table. – p  ~ q – (~ p  q)  p – ~ p  ~ q

Topic 4 – Logic Conditional Statements If p and q are statements, the compound statement if p then q, denoted by p  q is called a conditional statement or implication. Statement p is called the antecedent or hypothesis (let say); and statement q is called consequent or conclusion. The connective if … then is denoted by the symbol . Example a) p : I am hungryq : I will eat b) p : It is cold q : = 8 The implication would be: a) If I am hungry, then I will eat. b) If it is cold, then = 8.

Topic 4 – Logic Truth table for Conditional Statements pq p  q TTT TFF FTT FFT Note that whenever p is false, p  q is always true, whenever p and q are both true, p  q is true. If p is true and q is false, p  q is false. Remember that p is hypothesis and q is the conclusion. A little help: To remember the layout of the conditional statement truth table, imagine you are dealing with the statements if it is raining (as the hypothesis), I use an umbrella (as the conclusion)

Topic 4 – Logic Biconditional statements If p and q are statements, compound statement p if and only if q, denoted by p  q, is called an equivalence or biconditional. Its Truth Table is as below: pq p  q TTT TFF FTF FFT Note that p  q is True in two conditions: both p and q are True, or both p and q are false.

Topic 4 – Logic Work this out: Find the truth value for the statement(p  q)  (~q  ~p)

Topic 4 – Logic A statement that is true for all possible values of its propositional variables is called a tautology. A statement that is always false for all possible values of its propositional variables is called a contradiction. A statement that can be either true or false, depending on the truth values of its propositional variables is called a contingency pq p  q (A) ~q~p ~q  ~p (B) (A)  (B) TT T FF T T TF F TF F T FT T FT T T FF T TT T T

Topic 4 – Logic Logically Equivalent Two statements p and q are said to be logically equivalent if p  q is a tautology. Example : Show that statements p  q and (~p)  q are logically equivalent. pq p  q (A) ~p (~p)  q (B) (A)  (B) TT T F T TF F F F FT T T T FF T T T

Topic 4 – Logic Quantifier Quantifier is used to define about all elements that have something in common. Such as in set, one way of writing it is {x | P(x)} where P(x) is called predicate or propositional function, in which each choice of x will produces a proposition P(x) that is either true or false. There are two types of quantifier being used: Universal Quantification (  ) of a predicate P(x) is the statement “For all values of x, P(x) is true” In other words: for every x every x for any x Example: For the propositional function P(x) : - (-x) = x, where x is a positive integer determine if  x P(x) is a true or false statement

Topic 4 – Logic Quantifier (continued) Existential Quantification (  ) of a predicate P(x) is the statement “There exists a value of x for which P(x) is true” In other words: – there is an x – there is some x – there exists an x – there is at least one x Example: For the propositional function Q(x) : x + 1 < 4, find out if  x Q(x) is a true or false statement

Topic 4 – Logic Work this out (Universal Quantifier), where x is a positive integer larger than 0 Let Q(x): x + 1 < 4. Determine the truth value of  x Q(x) Let P(x) : x + 1 > 4. Determine the truth value of  x P(x) Let R(x) : x < 2. Determine the truth value of  x R(x) Work this out (Existential Quantifier) Let P(x): x > 3. Determine the truth value of  x P(x) Let R(x) : x= x + 1. Determine the truth value of  x R(x), where x is a positive integer. Let S(x) : x 2 > 10, where x is a positive integer not exceeding 3, determine the truth value of  x S(x),