Download presentation
Presentation is loading. Please wait.
Published byElaine Wright Modified over 9 years ago
1
Chapter 5 – Logic CSNB 143 Discrete Mathematical Structures
2
OBJECTIVES Student should be able to know what is it means by statement. Students should be able to identify its connectives and compound statements. Students should be able to use the Truth Table without difficulties.
3
Logic Statement or proposition is a declarative sentence with the value of true or false but not both. Ex 1: Which one is a statement? The world is round. 2 + 3 = 5 Have you taken your lunch? 3 - x = 5 The temperature on the surface of Mars is 800F. Tomorrow is a bright day. Read this!
4
Statement usually will be replaced by variables such as p, q, r or s. Ex 2: p: The sun will shine today. q: It is a cold weather. Statements can be combined by logical connectives to obtain compound statements. Ex 3: AND (p and q): The sun will shine today and it is a cold weather.
5
Connectives AND is what we called conjunction for p and q, written p q. The compound statement is true if both statements are true. Connectives OR is what we called disjunction for p and q, written p q. The compound statement is false if both statements are false. To prove the value of any statement (or compound statements), we need to use the Truth Table.
6
PQ P QP Q TTTT TFFT FTFT FFFF
7
Negation for any statement p is not p. written as ~p or p. The Truth Table for negation is: Ex 4: Find the value of (~p q) p using Truth Table. P˜ P TF FT
8
PQ ˜ P Q(˜ P Q) P TTFFT TFFFT FTTTT FFTFF
9
Conditional Statements If p and q are statements, the compound statement if p then q, denoted by p q is called a conditional statement or implication. Statement p is called the antecedent or hypothesis; and statement q is called consequent or conclusion. The connective if … then is denoted by the symbol . Ex 5: a) p : I am hungryq : I will eat b) p : It is cold q : 3 + 5 = 8 The implication would be: a) If I am hungry, then I will eat. b) If it is cold, then 3 + 5 = 8.
10
Take note that, in our daily lives, Ex 5 b) has no connection between statements p and q, that is, statement p has no effect on statement q. However, in logic, this is acceptable. It shows that, in logic, we use conditional statements in a more general sense. Its Truth Table is as below: To understand, use:p = It is raining q = I used umbrella PQP Q TTT TFF FTT FFT
11
Another meaning that use the symbol includes: if p, then q p implies q if p, q p only if q p is sufficient for q q if p q is necessary for p
12
If p q is an implications, then the converse of it is the implication q p, and the contrapositive of it is ~q ~p. Ex 6: p = It is rainingq = I get wet Get its converse and contrapositive.
13
If p and q are statements, compound statement p if and only if q, denoted by p q, is called an equivalence or biconditional. Its Truth Table is as below: To understand, use:p = It is raining q = I used umbrella Notis that p q is True in two conditions: both p and q are True, or both p and q are false. PQ P Q TTT TFF FTF FFT
14
Another meaning that use the symbol includes: p is necessary and sufficient for q if p, then q, and conversely In general, compound statement may contain few parts in which each one of it is yet a statement too. Ex 7: Find the truth value for the statement (p q) (~q ~p)
15
PQP Q (A) ˜Q˜P˜Q ˜P (B) (A) (B) TTTFFTT TFFTFFT FTTFTTT FFTTTTT A statement that is true for all possible values of its propositional variables is called a tautology.
16
A statement that is always false for all possible values of its propositional variables is called a contradiction. A statement that can be either true or false, depending on the truth values of its propositional variables is called a contingency
17
Logically Equivalent Two statements p and q are said to be logically equivalent if p q is a tautology. Ex 8: Show that statements p q and (~p) q are logically equivalent.
18
Quantifier Quantifier is used to define about all elements that have something in common. Such as in set, one way of writing it is {x | P(x)} where P(x) is called predicate or propositional function, in which each choice of x will produces a proposition P(x) that is either true or false.
19
There are two types of quantifier being used: a) Universal Quantification ( ) of a predicate P(x) is the statement “For all values of x, P(x) is true” In other words: for every x every x for any x
20
b) Existential Quantification ( ) of a predicate P(x) is the statement “There exists a value of x for which P(x) is true” In other words: there is an x there is some x there exists an x there is at least one x
21
Theorem 1 Operations on statements are: Commutative p q q p p q q p Associative p (q r) (p q) r p (q r) (p q) r Distributive p (q r) (p q) (p r) p (q r) (p q) (p r)
22
Idempotent p p p p p p Negation’s ~(~p) p ~(p q) (~p) (~q) ~(p q) (~p) (~q)
23
Theorem 2 Operations on implications are: (p q) ((~p) q) (p q) ((~q) ~p) (p q) ((p q) (q p)) ~(p q) (p ~q) ~(p q) ((p ~q) (q ~p))
24
Theorem 3 Operations on quantifier are: ~( x P(x)) x ~P(x) ~( x ~P(x)) x P(x) x (P(x) Q(x)) x P(x) x Q(x) x P(x) x Q(x) x (P(x) Q(x))
25
x (P(x) Q(x)) x P(x) x Q(x) x (P(x) Q(x)) x P(x) x Q(x) (( x P(x)) ( x Q(x))) x (P(x) Q(x))tautology x (P(x) Q(x)) x P(x) x Q(x)tautology
26
Theorem 4 All of these are tautology: a) (p q) p f) (p q) p b) (p q) qg) (p (p q)) q c) p (p q)h) (~p (p q)) q d) q (p q) i) (~q (p q)) ~p e) ~p (p q) j) ((p q) (q r)) (p r)
Similar presentations
© 2024 SlidePlayer.com. Inc.
All rights reserved.