Presentation is loading. Please wait.

Presentation is loading. Please wait.

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.

Similar presentations


Presentation on theme: "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."— Presentation transcript:

1 Discrete Mathematics Lecture # 4

2 Conditional Statements or Implication  If p and q are statement variables, the conditional of q by p is “If p then q” or “p implies q”  and is denoted p  q.

3 Conditional statements or implication  The arrow "  " is the conditional operator  p is called the hypothesis(or antecedent)  q is called the conclusion (or consequent).

4 Alternative ways of expressing implications  “if p then q”  “not p unless q”  “p implies q”  “q follows from p”  “if p, q”  “q if p”  “p only if q”

5 Alternative ways of expressing implications  “q whenever p”  “p is sufficient for q”  “a sufficient condition for q is p”  “q is necessary for p”  “a necessary condition for p is q”

6 Conditional Statements  " If you earn an A in Math, then I'll buy you a computer." p: “you earn an A in Math” and q: “I'll buy you a computer”

7 Conditional Statements  “if p then q”  If you earn A grade then I’ll buy you a computer  “not p unless q”  You didn’t earn A grade in maths unless I’ll buy you a computer.  “p implies q”  Earning A grade in maths implies buying a computer  “q follows from p”  Buying a computer follows from earning A grade in maths

8 Conditional Statements  “if p, q”  If you get A grade in maths, I’ll buy you a computer.  “q if p”  I’ll buy you a computer if you get A grade in maths.  “p only if q”  Getting A grade in maths only if I’ll buy you a computer.

9 Conditional Statements  “q whenever p”  I’ll buy you a computer whenever you get A grade in maths.  “p is sufficient for q”  Getting A grade in maths is sufficient for buying a computer  “a sufficient condition for q is p”  Buying a computer is sufficient for getting an A in maths.

10 Conditional Statements  “q is necessary for p”  Buying a computer is necessary for getting A grade in maths  “a necessary condition for p is q”  Getting A garde in maths is necessary for buying a computer.

11 Conditional Statements p: “Aslam lives in Multan” and q: “Aslam lives in Pakistan”

12 Conditional Statements  “if p then q”  If Aslam lives in Multan then he lives in Pakistan.  “not p unless q”  Aslam won’t lives in Multan unless he lives in Pakistan.  “p implies q”  Aslam lives in Multan implies that he lives in Pakistan.  “q follows from p”  Aslam lives in Pakistan follows from he lives in Multan.

13 Conditional Statements  “if p, q”  If Aslam lives in Multan, he lives in Pakistan.  “q if p”  Aslam lives in Pakistan if he lives in Multan.  “p only if q”  Aslam lives in Multan only if he lives in Pakistan.

14 Conditional Statements  “q whenever p”  Aslam lives in Pakistan whenever he lives in Multan.  “p is sufficient for q”  Aslam lives in Multan is sufficient for living in Pakistan.  “a sufficient condition for q is p”  To live in Pakistan is sufficient for living in Multan.

15 Conditional Statements  “q is necessary for p”  Living in Pakistan is necessary for living in Multan.  “a necessary condition for p is q”  Living in Pakistan is necessary for living in Multan.

16 Translating English Sentences to Symbols Let p and q be propositions: p = “you get an A on the final exam” q = “you do every exercise in this book” r = “you get an A in this class” 1. To get an A in this class it is necessary for you to get an A on the final. SOLUTION p  r

17 Translating English Sentences to Symbols 2. You do every exercise in this book; You get an A on the final, implies, you get an A in the class. SOLUTION p  q  r 3. Getting an A on the final and doing every exercise in this book is sufficient for getting an A in this class. SOLUTION p  q  r

18 Translating Symbolic Proposition to English Let p, q, and r be the propositions: p = “you have the flu” q = “you miss the final exam” r = “you pass the course” 1. p  q If you have flu, then you will miss the final exam

19 Translating Symbolic Proposition to English 2. ~q  r If you don’t miss the final exam, you will pass the course. 3. ~p  ~q  r If you neither have flu nor miss the final exam, then you will pass the course.

20 Truth Table for  Construct a truth table for the statement form p  ~ q  ~ p means (p  (~ q))  (~ p)

21 Truth Table for  Construct a truth table for the statement form ( p  q)  (~ p  r)

22 Logical Equivalence Involving Implication  Use truth table to show p  q  ~q  ~p Same truth values

23 Negation of Conditional Statement Since p  q  ~p  q therefore ~ (p  q)  ~ (~ p  q)  ~ (~ p)  (~ q) De Morgan’s law  p  ~ q Double Negative law

24 Implication Law  p  q  ~p  q

25 Example Write negations of each of the following statements: 1. If Ali lives in Pakistan then he lives in Lahore. Solution Ali lives in Pakistan and he does not live in Lahore.

26 Example Write negations of each of the following statements: 2. If my car is in the repair shop, then I cannot get to class. Solution My car is in the repair shop and I can get to class.

27 Example 3. If x is prime then x is odd or x is 2. Solution x is prime but x is not odd and x is not 2. 4. If n is divisible by 6, then n is divisible by 2 and n is divisible by 3. Solution n is divisible by 6 but n is not divisible by 2 or by 3.

28 Inverse of Conditional Statement The inverse of the conditional statement p  q is ~p  ~q

29 Inverse of Conditional Statement p  q is not equivalent to ~p  ~q Different truth values

30 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.

31 Converse of Conditional Statement  The converse of the conditional statement p  q is q  p  A conditional and its converse are not equivalent.

32 Converse of 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.

33 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.

34 Contrapositive of a Conditional Statement  The contrapositive of the conditional statement p  q is ~ q  ~ p  A conditional and its contrapositive are equivalent. Symbolically p  q  ~q  ~p 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.

35 Contrapositive of a Conditional Statement 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 get to the class, then my car is not in the repair shop.

36 Bi conditional  If p and q are statement variables, the bi conditional of p and q is  “ p if, and only if, q ” and is denoted p  q. if and only if abbreviated iff.  The double headed arrow "  " is the bi conditional operator.

37 Rephrasing Bi conditional p  q is also expressed as:  “p is necessary and sufficient for q”  “if p then q, and conversely”  “p is equivalent to q”

38 Truth Table

39 Examples

40  “ 1+1 = 3 if and only if earth is flat ”  TRUE  “ Sky is blue iff 1 = 0 ”  FALSE  “ Milk is white iff birds lay eggs ”  TRUE  “ 33 is divisible by 4 if and only if horse has four legs ”  FALSE  “ x > 5 iff x2 > 25 ”  FALSE


Download ppt "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."

Similar presentations


Ads by Google