Presentation is loading. Please wait.

Presentation is loading. Please wait.

Discrete Mathematical

Similar presentations


Presentation on theme: "Discrete Mathematical"— Presentation transcript:

1 Discrete Mathematical
Al Israa University

2 Propositional Logic What’s a proposition? Propositions
A proposition is a declarative statement that’s either TRUE or FALSE (but not both). Propositions Not Propositions 3 + 2 = 32 Bring me coffee! CS173 is Leen’s favorite class. Every cow has 4 legs. 3 + 2 There is other life in the universe. Do you like Cake? 20 April 2018

3 Propositional Logic Extra examples Propositions Not Propositions
Toronto is the capital of Canada. Sit down! The Moon is made of green cheese. What time is it? 1 + 0 = 1 x + 1 = 2 0 + 0 = 2 x + y = z 20 April 2018

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. 20 April 2018

5 Example: (Not Propositions)
What time does Argo Bromo train arrive at Gambir Station? Do the quiz without cooperating! x = x > 5. 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. 20 April 2018

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 : = 4. 20 April 2018

7 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. p p T F Truth table for negation: Notice that p is a proposition! 20 April 2018

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. p q p  q T F Truth table for conjunction: 20 April 2018

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. p q p  q T F Truth table for disjunction: 20 April 2018

10 Combining Propositions
Example: The following prepositions are known p : Today is rainy. q : The class is cancelled. p  q : Today is rainy and the class is cancelled. p  q : Today is rainy or the class is cancelled. p : It is not true that today is rainy (or: Today is not rainy) 20 April 2018

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) 20 April 2018

12 Truth Table Example: T F F Negation Conjunction Disjunction
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. T F F 20 April 2018

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

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. p q p  q T F Truth table for implication: 20 April 2018

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). 20 April 2018

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. 20 April 2018

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 20 April 2018

18 Biconditional If p and q are propositions, then we can form the biconditional proposition 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 p q p ↔q T F

19 Expressing the Biconditional
Alternative ways to say “p if and only if q”: p is necessary and sufficient for q if p then q, and conversely p iff q

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

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

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

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

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

25 Propositional Logic - special definitions
One of these things is not like the others. 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 and q  p “If I am hungry, then it is noon.” Inverses: p  q and p  q “If it is not noon, then I am not hungry.” Hint: In one instance, the pair of propositions is equivalent. p  q  q  p 20 April 2018

26 Exercise: Prove that p  ~q  q  ~p

27 Some Examples Example: Solution:
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: Solution:
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: Solution:
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. p p p  p p  p T F T F 20 April 2018

31 Some Examples Example: Solution:
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: Solution:
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 valid or invalid. 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: Solution:
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 1st way: p  q
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]  q is 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 p is false, even though all the hypotheses are true. Thus, the argument is i n v a l i d.

39 Argument 2nd way: p  q q  p
Showing that the truth table of [(p  q)  q]  p is 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. Inclusive Or: 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 Exclusive Or (Xor). In p⊕q , either p or q 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 p q p ⊕q T F 20 April 2018

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

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
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 SOLUTION Homework(1) 20 April 2018

46 20 April 2018

47 20 April 2018

48 First Exam 20 April 2018

49 Remember 20 April 2018


Download ppt "Discrete Mathematical"

Similar presentations


Ads by Google