Conditional Statements – Page 1CSCI 1900 – Discrete Structures CSCI 1900 Discrete Structures Conditional Statements Reading: Kolman, Section 2.2.

Slides:



Advertisements
Similar presentations
Logic Day Two.
Advertisements

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.
Chapter 2. Logic Weiqi Luo ( 骆伟祺 ) School of Software Sun Yat-Sen University : Office : A309
John Rosson Thursday February 15, 2007 Survey of Mathematical Ideas Math 100 Chapter 3, Logic.
Inference Methods Propositional and Predicate Calculus.
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.
Logic: Connectives AND OR NOT P Q (P ^ Q) T F P Q (P v Q) T F P ~P T F
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.
1 Math 306 Foundations of Mathematics I Math 306 Foundations of Mathematics I Goals of this class Introduction to important mathematical concepts Development.
Conditional Statements
TRUTH TABLES. Introduction Statements have truth values They are either true or false but not both Statements may be simple or compound Compound statements.
Chapter 1, Part I: Propositional Logic With Question/Answer Animations.
The Foundations: Logic and Proofs
Propositions and Truth Tables
1.1 Sets and Logic Set – a collection of objects. Set brackets {} are used to enclose the elements of a set. Example: {1, 2, 5, 9} Elements – objects inside.
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.
Conditional Statements M Deductive Reasoning Proceeds from a hypothesis to a conclusion. If p then q. p  q hypothesis  conclusion.
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.
The Foundations: Logic and Proofs
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.
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.
Logical Form and Logical Equivalence Lecture 2 Section 1.1 Fri, Jan 19, 2007.
Discrete Mathematics Lecture1 Miss.Amal Alshardy.
CSNB143 – Discrete Structure LOGIC. Learning Outcomes Student should be able to know what is it means by statement. Students should be able to identify.
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.
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
Conditional Statements
MAIN TOPIC : Statement, Open Sentences, and Truth Values Negation Compound Statement Equivalency, Tautology, Contradiction, and Contingency Converse, Inverse,
Propositional Logic. Propositions Any statement that is either True (T) or False (F) is a proposition Propositional variables: a variable that can assume.
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.
Lesson 20 INTERPRETING TRUTH TABLES. Review Conditional Statements (Less. 17) Original If p, then q. Converse If q, then p. Inverse If ~p, then ~q. Contrapositive.
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.
Logical Operations – Page 1CSCI 1900 – Discrete Structures CSCI 1900 Discrete Structures Logical Operations Reading: Kolman, Section 2.1.
CSNB143 – Discrete Structure Topic 4 – Logic. Learning Outcomes Students should be able to define statement. Students should be able to identify connectives.
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,
Mathematics for Comter I Lecture 2: Logic (1) Basic definitions Logical operators Translating English sentences.
Methods of Proof – Page 1CSCI 1900 – Discrete Structures CSCI 1900 Discrete Structures Methods of Proof Reading: Kolman, Section 2.3.
ARTIFICIAL INTELLIGENCE Lecture 2 Propositional Calculus.
رياضيات متقطعة لعلوم الحاسب 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.
Conditional Statements Lecture 2 Section 1.2 Fri, Jan 20, 2006.
Thinking Mathematically Logic 3.4 Truth Tables for the Conditional and Biconditional.
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.
1 Statements and Operations Statements and operators can be combined in any way to form new statements. PQ PQPQPQPQ  (P  Q) (  P)  (  Q) TTTFF.
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.
Simple Logic.
DISCRETE MATHEMATICS CHAPTER I.
CSNB 143 Discrete Mathematical Structures
Chapter 8 Logic Topics
Information Technology Department
Discrete Mathematics and Its Applications Kenneth H
Presentation transcript:

Conditional Statements – Page 1CSCI 1900 – Discrete Structures CSCI 1900 Discrete Structures Conditional Statements Reading: Kolman, Section 2.2

Conditional Statements – Page 2CSCI 1900 – Discrete Structures Conditional Statement/Implication "if p then q" Denoted p  q –p is called the antecedent or hypothesis –q is called the consequent or conclusion Example: –p: I am hungry q: I will eat –p: It is snowing q: 3+5 = 8

Conditional Statements – Page 3CSCI 1900 – Discrete Structures Conditional Statement/Implication (continued) In English, we would assume a cause- and-effect relationship, i.e., the fact that p is true would force q to be true. If “it is snowing,” then “3+5=8” is meaningless in this regard since p has no effect at all on q At this point it may be easiest to view the operator “  ” as a logic operationsimilar to AND or OR (conjunction or disjunction).

Conditional Statements – Page 4CSCI 1900 – Discrete Structures Truth Table Representing Implication If viewed as a logic operation, p  q can only be evaluated as false if p is true and q is false This does not say that p causes q Truth table pq p  q TTT TFF FTT FFT

Conditional Statements – Page 5CSCI 1900 – Discrete Structures Examples where p  q is viewed as a logic operation If p is false, then any q supports p  q is true. –False  True = True –False  False = True If “2+2=5” then “I am the king of England” is true

Conditional Statements – Page 6CSCI 1900 – Discrete Structures Converse and contrapositive The converse of p  q is the implication that q  p The contrapositive of p  q is the implication that ~q  ~p

Conditional Statements – Page 7CSCI 1900 – Discrete Structures Converse and Contrapositive Example Example: What is the converse and contrapositive of p: "it is raining" and q: I get wet? –Implication: If it is raining, then I get wet. –Converse: If I get wet, then it is raining. –Contrapositive: If I do not get wet, then it is not raining.

Conditional Statements – Page 8CSCI 1900 – Discrete Structures Equivalence or biconditional If p and q are statements, the compound statement p if and only if q is called an equivalence or biconditional Denoted p  q

Conditional Statements – Page 9CSCI 1900 – Discrete Structures Equivalence Truth table The only time that the expression can evaluate as true is if both statements, p and q, are true or both are false pQ pqpq TTT TFF FTF FFT

Conditional Statements – Page 10CSCI 1900 – Discrete Structures Proof of the Contrapositive Compute the truth table of the statement (p  q)  (~q  ~p) pq p  q ~q~p ~q  ~p(p  q)  (~q  ~p) TTTFFTT TFFTFFT FTTFTTT FFTTTTT

Conditional Statements – Page 11CSCI 1900 – Discrete Structures Tautology and Contradiction A statement that is true for all of its propositional variables is called a tautology. (The previous truth table was a tautology.) A statement that is false for all of its propositional variables is called a contradiction or an absurdity

Conditional Statements – Page 12CSCI 1900 – Discrete Structures Contingency A statement that can be either true or false depending on its propositional variables is called a contingency Examples –(p  q)  (~q  ~p) is a tautology –p  ~p is an absurdity –(p  q)  ~p is a contingency since some cases evaluate to true and some to false.

Conditional Statements – Page 13CSCI 1900 – Discrete Structures Contingency Example The statement (p  q)  (p  q) is a contingency pq p  qp  q(p  q)  (p  q) TTTTT TFFTF FTTTT FFTFF

Conditional Statements – Page 14CSCI 1900 – Discrete Structures Logically equivalent Two propositions are logically equivalent or simply equivalent if p  q is a tautology. Denoted p  q

Conditional Statements – Page 15CSCI 1900 – Discrete Structures Example of Logical Equivalence Columns 5 and 8 are equivalent, and therefore, p “if and only if” q pqr q  rp  (q  r) p  qp  r(p  q)  ( p  r) p  (q  r)  ( p  q)  ( p  r) TTTTTTTTT TTFFTTTTT TFTFTTTTT TFFFTTTTT FTTTTTTTT FTFFFTFFT FFTFFFTFT FFFFFFFFT

Conditional Statements – Page 16CSCI 1900 – Discrete Structures Additional Properties (p  q)  ((~p)  q) pq (p  q) ~p ((~p)  q)(p  q)  ((~p)  q) TTTFTT TFFFFT FTTTTT FFTTTT

Conditional Statements – Page 17CSCI 1900 – Discrete Structures Additional Properties (p  q)  (~q  ~p) pq (p  q) ~q~p (~q  ~p)(p  q)  (~q  ~p) TTTFFTT TFFTFFT FTTFTTT FFTTTTT