0% found this document useful (0 votes)
15 views15 pages

DS 11

Uploaded by

Awais Javed
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
15 views15 pages

DS 11

Uploaded by

Awais Javed
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 15

Discrete Structure

Links:
1. https://www.geeksforgeeks.org/discrete-mathematics-tuto
rial/?ref=header_search
2. https://www.csd.uwo.ca/~abrandt5/teaching/DiscreteStruc
tures/intro.html
CONDITIONAL STATEMENTS OR
IMPLICATIONS:

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.
p → q is false when p is true and q is false; otherwise it
is true.
The arrow "→ " is the conditional operator.
In p → q, the statement p is called the hypothesis (or
antecedent) and q is called the conclusion (or consequent).
Truth Table
LOGICAL EQUIVALENCE
INVOLVING IMPLICATION
 Use truth table to show p→q ≡ ~q → ~p

 Hence the given two expressions are equivalent.


IMPLICATION LAW
p→q ≡ ~p∨q
NEGATION OF A CONDITIONAL
STATEMENT:

 Since p→q ≡ ~ p∨q


 So ~ (p → q) ≡ ~ (~ p ∨ q)
 ≡ ~ (~ p) ∧ (~ q) by De Morgan’s law
 ≡ p ∧ ~ q by the Double Negative law
 Thus the negation of “if p then q” is logically
equivalent to “p and not q”.
EXAMPLES

 Write negations of each of the following statements:


1.If Ali lives in Pakistan then he lives in Lahore.
2.If my car is in the repair shop, then I cannot get to
class.
3.If x is prime then x is odd or x is 2.
4.If n is divisible by 6, then n is divisible by 2 and n is
divisible by 3.
SOLUTIONS:

1. Ali lives in Pakistan and he does not live in Lahore.


2. My car is in the repair shop and I can get to class.
3. x is prime but x is not odd and x is not 2.
4. n is divisible by 6 but n is not divisible by 2 or by 3.
INVERSE OF A CONDITIONAL
STATEMENT:

 The inverse of the conditional statement p → q is ~p


→ ~q
 A conditional and its inverse are not equivalent as
could be seen from the truth table.
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.
CONVERSE OF A 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.
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.
CONTRAPOSITIVE OF A
CONDITIONAL STATEMENT:

 The contra-positive of the conditional statement


p → q is ~ q → ~ p
 A conditional and its contra-positive are equivalent.
 Symbolically
p→q ≡ ~q → ~p
WRITING CONTRAPOSITIVE:

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.
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 can get to the class, then my car is not in the repair
shop.
EXERCISE:

1. Show that p→q ≡ ~ q → ~ p ( Use the truth table. )


2. Show that q→ p ≡ ~ p → ~ q ( Use the truth table. )

You might also like