1 / 49

Discrete Mathematical الرياضيات المتقطعة

Discrete Mathematical الرياضيات المتقطعة. Dr. Ahmad Tayyar Al Israa University ahmad_tayyar@iu.edu.jo. Propositional Logic ( فرضيات المنطق ). A proposition is a declarative statement that’s either TRUE or FALSE (but not both). What’s a proposition?. Propositional Logic. Extra examples.

tuckerr
Download Presentation

Discrete Mathematical الرياضيات المتقطعة

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Discrete Mathematicalالرياضيات المتقطعة Dr. Ahmad Tayyar Al Israa University ahmad_tayyar@iu.edu.jo

  2. Propositional Logic (فرضيات المنطق) A proposition is a declarative statement that’s either TRUE or FALSE (but not both). What’s a proposition?

  3. Propositional Logic Extra examples

  4. Example: (Propositions) • 13 is an odd number. • 1 + 1 = 2. • 8  square root of (8 + 8). • There is monkey in the moon. • Today is Wednesday. • For any integer n 0, there exists 2n which is an even number. • x + y = y + x for any real number x and y.

  5. Example: (Not Propositions) • What time does Argo Bromo train arrive at Gambir Station? • Do the quiz without cooperating! • x = 3 + 8. • x > 5. • I am heavy. Conclusion: Propositions are declarative sentences. Conclusion: If a proposition is made out of mathematical equations, then the equations must posses an answer so that its truth value can be evaluated.

  6. Proposition Propositions are denoted with lower case letters starting with p such as p, q, r, … • Example: • p : 13 is an odd number. • q : Ir. Soekarno was graduated from UGM. • r : 2 + 2 = 4.

  7. Notice that p is a proposition! Propositional Logic - negation • Suppose p is a proposition. • The negation of p is written p and has meaning: • “It is not the case that p.” • Ex. CS107 is NOT Leen’s favorite class. Truth table for negation:

  8. Propositional Logic - conjunction • Conjunction corresponds to English “and.” • p  q is true exactly when p and q are both true. • Ex. Amy is curious AND clever. Truth table for conjunction:

  9. Propositional Logic - disjunction • Disjunction corresponds to English “or.” • p  q is when p or q (or both) are true. • Ex. Michael is brave OR nuts. Truth table for disjunction:

  10. Combining Propositions Example: The following prepositions are known p : Today is rainy. q : The class is cancelled. pq : Today is rainy andthe class is cancelled. pq : Today is rainy orthe class is cancelled. p : It is not truethat today is rainy.(or: Today is not rainy)

  11. Combining Propositions Example: Given the following propositions, p : The girl is beautiful. q : The girl is smart. Express the following proposition combinations using symbolic notation. The girl is beautiful and smart. The girl is beautiful but not smart. The girl is neither beautiful nor smart. It is not true that the girl is ugly or not smart. The girl is beautiful, or ugly and smart. That the girl is ugly as well as smart, is not true. pq pq pq (pq) p(pq) (pq)

  12. T F F Truth Table Negation Conjunction Disjunction Example: p : 17 is a prime number. q : Prime number is always odd. pq : 17 is a prime number and prime number is always odd.

  13. Compound Proposition Excercice: Build the truth table of the proposition (pq)  (qr).

  14. Propositional Logic - implication • Implication: pq corresponds to English “if p then q,” or “p implies q.” • If it is raining then it is cloudy. • If I pass the exams, then I will get presents from my parents. • If p then 2+2=4. Truth table for implication:

  15. Conditional Proposition Lecturer: “If your final exam grade is 80 or more, then you will get an A for this subject.” Case 1: Your final exam grade is higher than 80 (true hypothesis) and you get an A for the subject (true conclusion). The lecturer tells the truth.TRUE Case 2: Your final exam grade is higher than 80 (true hypothesis)but you do not get an A (false conclusion). The lecturer tells a lie.FALSE Case 3: Your final exam grade is lower than 80 (false hypothesis) and you get an A (true conclusion). The lecturer cannot be said to be wrong or telling a lie.Maybe he/she see your extra efforts and high motivation and thus without any doubt to give you an A. TRUE Case 4: Your final exam grade is lower than 80 (false hypothesis) and you do not get an A (false conclusion). The lecturer tells the truth.TRUE

  16. Conditional Proposition • Various ways to express implication pq: • If p, then q. • If p, q. • p implies/causes q. • q if p. • p only if q. • p is the sufficient condition for q. • p is sufficient for q. • q is the necessary condition for p. • q is necessary for p. • q whenever p.

  17. Conditional Proposition Example: Show that pq is logically equivalent with ~pq. “If p, then q”  “Not p or q” Example: Determine the negation of pq. ~(pq)  ~(~pq)  ~(~p)  ~q  p ~q

  18. Biconditional • If p and q are propositions, then we can form the biconditionalproposition p ↔q, read as “p if and only if q ” • Example: If p denotes “You can take a flight” and q denotes “You buy a ticket” then p ↔q denotes “You can take a flight if and only if you buy a ticket” • True only if you do both or neither • Doing only one or the other makes the proposition false

  19. Expressing the Biconditional • Alternative ways to say “p if and only if q”: • pis necessary and sufficient for q • ifpthenq, and conversely • piffq

  20. Propositional Logic - logical equivalence p is logically equivalent to q if their truth tables are the same. We write p q.

  21. Equivalence of Compound Proposition Two compound proposition P(p,q,…) and Q(p,q,…) are said to be logicallyequivalent if they have identical truth table. Notation: P(p,q,…) Q(p,q,…) Example: De Morgan’s Law (pq)  pq

  22. Logical Equivalence Exercise: Show that p ~(pq) and p ~q are logically equivalent.

  23. Propositional Logic - logical equivalence Challenge: Try to find a proposition that is equivalent to pq, but that uses only the connectives , , and .

  24. All truth assignments for p, q, and r. I could say “prove a law of distributivity.” Propositional Logic - proof of 1 famous  Distributivity: p (qr)  (p q)  (pr)

  25. One of these things is not like the others. Hint: In one instance, the pair of propositions is equivalent. pq q  p Propositional Logic - special definitions Contrapositives: pq and q  p • Ex. “If it is noon, then I am hungry.” “If I am not hungry, then it is not noon.” Converses: pq andq  p • Ex. “If it is noon, then I am hungry.” “If I am hungry, then it is noon.” Inverses: pq and p  q • Ex. “If it is noon, then I am hungry.” “If it is not noon, then I am not hungry.”

  26. Exercise: Prove thatp ~q  q ~p p ~q  q ~p

  27. Some Examples Example: Given a proposition “It is not true that he learns Technical Drawing but not State Philosophy.”, a) Express the proposition above in symbolic notation (logical expression). b) Write a logically equivalent proposition as the proposition above (Hint: Use De Morgan’s Law). Solution: Taking p: He learns Technical Drawing.q: He learns State Philosophy. then: a) ~ (p ~q) b) ~ (p ~q)  ~ pq “He does not learn Technical Drawing or indeed learns State Philosophy.”

  28. Some Examples Example: Three propositions are given to describe the quality of a hotel:p : The service is good.q : The room rate is low.r : The hotel is a three star hotel. Translate the following proposition into symbolic notation using p, q, and r : a) “The room rate is low but the service is bad.” b) “Either the room rate is high or the service is good, but not both.” c) “It is not true that if a hotel is a three star hotel, then the room rate is low and the service is bad.” Solution: a) q  ~p b) ~q p c) ~ (r  (q ~p)) (~q ~p)  (q p)

  29. Some Examples Example: Express the following statement in symbolic notation:“If you are below 17 years old, then you may not vote in a general election, unless you are already married.” Solution: Defining:p : You are below 17 years old.q : You are already married.r : You may vote in a general election. then the statement above can be express in symbolic notation as: (p ~q)  ~r “If you are below 17 years old and are not already married, then you may not vote in a general election.”  r  (~pq)

  30. Propositional Logic - 2 more defn… A tautology is a proposition that’s always TRUE. A contradiction is a proposition that’s always FALSE. T T F F

  31. Some Examples Example: Proof that [~p (p q)] q is a tautology. Solution: To proof the tautology, we construct the truth table: True in all cases [~p (p q)] q is a tautology.

  32. Some Examples Example: Express the following statement in symbolic notation:“If you are below 17 years old, then you may not vote in a general election, unless you are already married.” Solution: Defining:p : You are below 17 years old.q : You are already married.r : You may vote in a general election. then the statement above can be express in symbolic notation as: (p ~q)  ~r “If you are below 17 years old and are not already married, then you may not vote in a general election.”  r  (~pq)

  33. Argument Argument is a list of propositions written as: In this case, p1, p2, …, pn are denoted as hypothesis (premise) and q as conclusion (consequence) The value of an argument may be validorinvalid. It should be emphasized that valid does not necessarily means true.

  34. Argument Definition: An argument is valid if the conclusion is true, then all the hypotheses are true; otherwise the argument is invalid. If an argument is true, then we can say “the conclusion logically follows the hypotheses; or equivalently showing that the implication:is true. An invalid argument shows false reasoning. (p1p2 pn) q

  35. Argument Example: Show that the argument below is valid:“If the last digit of this number is a 0, then this number is divisible by 10.”“The last digit of this number is a 0.”“Therefore, this number is divisible by 10.” Solution: Assume:p : A last digit of this number is a 0.q : this number is divisible by 10. then the argument can be written as: pq p q There are two ways to proof the validity of the argument, both using the truth table, and will be discussed now.

  36. Argument pq p q 1st way: Constructing the truth table of p, q, and pq, and analyzing case by case. : • If each case “If all hypotheses are true, then the conclusion is true” applies, then the argument is valid. • Let us check whether if hypotheses p  q and p are true, then the conclusion q is also true. • See line 1: p  q and p are true at the same time, and q in line 1 is also true. • The argument is v a l i d.

  37. Argument 2nd way: pq p q Showing that the truth table of[(pq) p] qis a tautology. If the compound proposition is a tautology, then the argument is valid. • The argument is v a l i d.

  38. Argument Show that the reasoning of the following argument is false, or the argument is invalid:“If the last digit of this number is a 0, then this number is divisible by 10.”“A number is divisible by 10.”“A last digit of this number is a 0.” Solution: Assume:p : A last digit of this number is a 0.q : A number is divisible by 10. then the argument can be written as: pq q  p • See line 3. • Conclusion pis false, even though all the hypotheses are true. • Thus, the argument is inval i d.

  39. Argument 2nd way: pq q p Showing that the truth table of[(pq) q] pis a tautology. If the compound proposition is a tautology, then the argument is valid. • The argument is i n v a l i d.

  40. The Connective Or in English • In English “or” has two distinct meanings. • InclusiveOr: For p ∨q to be T, either p or q or both must be T Example: “CS202 or Math120 may be taken as a prerequisite.” Meaning: take either one or both • ExclusiveOr (Xor). In p⊕q , eitherporq but not both must be T Example: “Soup or salad comes with this entrée.” Meaning: do not expect to get both soup and salad

  41. Exclusive Disjunction Logical operator for exclusive disjunction is xor, with the notation .

  42. Homework(1) for Monday 4/11 Pages: 39, 40(Discrete mathematics and its applications, Sussana S.epp,2007) 1) Use truth tables to determine whether the following argument forms are valid

  43. 2) Some of the following arguments are valid while the others exhibit the converse or the inverse error. Use symbols to write the logical form of each argument. If the argument is valid, identify the rule of inference that guarantees its validity. Otherwise state whether the converse or the inverse error is made. a) If Jules solved his problem correctly, then Jules obtained the answer 2. Jules obtained the number 2 Jules solved this problem correctly b) This real number is rational or it is irrational. This real number is rational This real number is irrational

  44. c) If this number is larger than 2, then its square is larger than 4. This number is not larger than 2. The square of this number is not larger than 4.

  45. Homework(1) Solution

  46. First Exam

  47. Remember

More Related