Presentation is loading. Please wait.

Presentation is loading. Please wait.

(CSC 102) Lecture 3 Discrete Structures. Previous Lecture Summary Logical Equivalences. De Morgan’s laws. Tautologies and Contradictions. Laws of Logic.

Similar presentations


Presentation on theme: "(CSC 102) Lecture 3 Discrete Structures. Previous Lecture Summary Logical Equivalences. De Morgan’s laws. Tautologies and Contradictions. Laws of Logic."— Presentation transcript:

1 (CSC 102) Lecture 3 Discrete Structures

2 Previous Lecture Summary Logical Equivalences. De Morgan’s laws. Tautologies and Contradictions. Laws of Logic. Logical Equivalences using Logical Laws.

3 Lecture`s outline Conditional Propositions. Negation, Inverse and Converse of the conditional statements. Contra positive. Bi conditional statements. Necessary and Sufficient Conditions. Conditional statements and their Logical equivalences.

4 Conditional propositions Definition If p and q are propositions, the conditional of q by p is if p then q or p implies q and is denoted by p→q. It is false when p is true and q is false otherwise it is true. Examples If you work hard then you will succeed. If John lives in Islamabad, then he lives in Pakistan.

5 Implication (if - then) Binary Operator, Symbol: Binary Operator, Symbol:  PQ P  Q TTT TFF FTT FFT

6 Examples “The online user is sent a notification of a link error if the network link is down”. The statement is equivalent to “If the network link is down, then the online user is sent a notification of a link error.” Using p : The network link is down, q : the online user is sent a notification of a link error. The statement becomes (q if p) p → q. Interpreting Conditional Statements

7 Examples “When you study the theory, you understand the material”. The statement is equivalent to (using if for ‘‘when’’) “If you study the theory, then you understand the material.” Using p : you study the theory, q : you understand the material. The statement becomes (when p, q) p → q.

8 Examples “Studying the theory is sufficient for solving the exercise”. The statement is equivalent to “If you study the theory, then you can solve the exercise.” Using p : you study the theory, q : you can solve the exercise. The statement becomes (p is sufficient for q) p → q.

9 Other forms of conditional propositions if p and q are statements then “p only if q” means ‘’if p then q”. John will break the world`s record for the mile run only if he runs the mile in under four minutes. is equivalent to If john breaks the world`s record, then he will have to run the mile in under four minutes.

10 Activity Show that  p→q ≡ ¬p  q This shows that a conditional proposition is simple a proposition form that uses a not and an or. Show that  ¬(p→q) ≡ p  ¬q This means that negation of ‘if p then q’ is logically equivalent to ‘p and not q’.

11 Solution From the above table it is obvious that conditional proposition is equivalent to a “not or proposition” and that its negation is not of the form ‘if then’. pq p  q ¬p  q ¬(p  q)  p  ¬q TTTTFF TFFFTT FTTTFF FFTTFF

12 Negations of some Conditionals Proposition: If my car is in the repair shop, then I cannot get the class. Negation: My car is in the repair shop and I can get the class. Proposition: If Sara lives in Athens, then she lives in Greece. Negation: Sara lives in Athens and she does not live in Greece.

13 Converse and inverse of the Conditional Suppose a conditional proposition of the form ‘If p then q’ is given. 1.The converse is ‘if q then p’. 2.The inverse is ‘if ¬p then ¬q’. Symbolically, The converse of p→q is q→p, And The inverse of p→q is ¬p→¬q.

14 Continue ….. Note: that the converse is not equivalent to the given conditional proposition, for instance “ if john is from Chicago then john is from Illinois” is true, but the converse “ if john is from Illinois then john is from Chicago” may be false. Similarly the inverse is also not equivalent to the conditional proposition, for instance “ if an object is triangle then it is a polygon” is true, but the inverse “ if an object is not a triangle then it is not a polygon” is false i.e. square is a polygon.

15 Contraposition Definition The contra positive of a conditional proposition of the form ‘if p then q’ is ‘if ¬q then ¬p’. Symbolically, the contra positive of p→q is ¬q→¬p. A conditional proposition is logically equivalent to its contra- positive. Example If today is Sunday, then tomorrow is Monday. Contra positive: If tomorrow is not Monday, then today is not Sunday.

16 The Biconditional Definition Given proposition variables p and q, the Bi conditional of p and q is p if and only if q and is denoted p↔q. It is true if both p and q have the same truth values and is false if p and q have opposite truth values. The words if and only if are sometime abbreviated iff. Example This computer program is correct iff it produces the correct answer for all possible sets of input data.

17 Truth table pqp↔q TTT TFF FTF FFT pqp→qq→pp↔q  (p→q)  (q→p) TTTTTT TFFTFF FTTFFF FFTTTT

18 Interpreting Necessary and sufficient conditions “If a number is divisible by 10, then it is divisible by 2”. The clause introduced by If A number is divisible by 10” is called the hypothesis. It is what we are given, or what we may assume. The clause introduced by then It is divisible by 2 is called the conclusion. It is the statement that "follows" from the hypothesis. When the If-then sentence is true, we say that the hypothesis is a sufficient condition for the conclusion. Thus it is sufficient to know that a number is divisible by 10, in order to conclude that it is divisible by 2. The conclusion is then called a necessary condition of that hypothesis. For, if a number is divisible by 10, it necessarily follows that it will be divisible by 2.

19 Interpreting Necessary and sufficient conditions Example: Consider the proposition ‘if John is eligible to vote then he is at least 18 year old’. The truth of the condition ‘John is eligible to vote’ is sufficient to ensure the truth of the condition ‘John is at least 18 year old’. In addition, the condition ‘John is at least 18 year old’ is necessary for the condition ‘John is eligible to vote’ to be true. If John were younger than 18, then he would not eligible to vote.

20 Necessary and Sufficient Conditions Let r and s are two propositions r is a sufficient condition for s means ‘if r then s’. r is a necessary condition for s means ‘if not r then not s’ r is necessary and sufficient condition for s means ‘r if and only if s’

21 Prove that ¬[r ∨ (q ∧ (¬r →¬p))] ≡ ¬r ∧ (p ∨ ¬q) Logical Equivalence of Conditional propositions ¬[r ∨ (q ∧ (¬r → ¬p))] ≡ ¬r ∧ ¬(q ∧ (¬r → ¬p)), De Morgan’s law ≡ ¬r ∧ ¬(q ∧ (¬¬r ∨ ¬p)), Conditional rewritten as disjunction ≡ ¬r ∧ ¬(q ∧ (r ∨ ¬p)), Double negation law ≡ ¬r ∧ (¬q ∨ ¬(r ∨ ¬p)), De Morgan’s law ≡ ¬r ∧ (¬q ∨ (¬r ∧ p)), De Morgan’s law, double negation ≡ (¬r ∧ ¬q) ∨ (¬r ∧ (¬r ∧ p)), Distributive law ≡ (¬r ∧ ¬q) ∨ ((¬r ∧ ¬r) ∧ p), Associative law ≡ (¬r ∧ ¬q) ∨ (¬r ∧ p), Idempotent law ≡ ¬r ∧ (¬q ∨ p), Distributive law ≡ ¬r ∧ (p ∨ ¬q), Commutative law

22 Conversion of statements in to symbols Write these system specifications in symbols using the propositions v: “The user enters a valid password,” a: “Access is granted to the user,” c: “The user has contacted the network administrator,” and logical connectives. Then determine if the system specifications are consistent. (i)“The user has contacted the network administrator, but does not enter a valid password.” c ∧ ¬ v

23 Cont…. ii) “Access is granted whenever the user has contacted the network administrator or enters a valid password.” (c ∨ v) → a (iii) “Access is denied if the user has not entered a valid password or has not contacted the network administrator.” (¬v ∨ ¬c) → ¬a

24 Conversion of statements in to symbols Translate this system specification into symbols: “Whenever the file is locked or the system is in executive clearance mode, the user cannot make changes in the data.” l : “the file is locked” e : “the system is in executive clearance mode” u : “the user can make changes in the data” then the statement in symbolic form would be (l ∨ e) → ¬ u

25 Lecture Summary Conditional Propositions. Negation, Inverse and Converse of the conditional statements. Contra positive. Bi conditional statements. Necessary and Sufficient Conditions. Conditional statements and their Logical equivalences. Translating English to Symbols.


Download ppt "(CSC 102) Lecture 3 Discrete Structures. Previous Lecture Summary Logical Equivalences. De Morgan’s laws. Tautologies and Contradictions. Laws of Logic."

Similar presentations


Ads by Google