Professional Documents
Culture Documents
PROPOSITION
A statement or a proposition, is a declarative sentence that is either true or false, but not both. example 4 is less than 3 7 is an even integer Washington, DC, is the capital of United State
Example
Is 2 a positive number? Study logic What is your name? Quiet, please.
The above sentences are not propositions. Why ? (i) & (iii) : is question, not a statement Roselina Sallehuddin and (ii)& (iv) : is aprepared byRazana Alwee command
Examples
i) x is an integer ii)The sun will come out tomorrow
CONJUNCTIONS
Conjunctions are: compound propositions formed in English with the word and, formed in logic with the caret symbol ( ), and true only when both participating propositions are true.
p q
T T F F
T F T F
T F F F
EXAMPLE
p : 2 is an even integer q : 3 is an odd number pq 2 is an even integer and 3 is an odd number p : today is Monday q : it is hot pq today is Monday and it is hot
prepared by Roselina Sallehuddin and Razana Alwee 8
EXAMPLES
p : 2 divides 4 q : 2 divides 6 pq 2 divides 4 and 2 divides 6. is also written as, 2 divides both 4 and 6.
p : 5 is an integer q : 5 is not an odd integer pq 5 is an integer and 5 is not an odd integer. is also written as, 5 is an integer but 5 is not an odd integer.
prepared by Roselina Sallehuddin and Razana Alwee 9
DISJUNCTION
compound propositions formed in English with the word or, formed in logic with the caret symbol ( V ), and true when one or both participating propositions are true. Let p and q be propositions The disjunction of p and q, written p q is the statement formed by putting statements p and q together using the word or. The symbol is called or
prepared by Roselina Sallehuddin and Razana Alwee 10
DISJUNCTION
TRUTH TABLE FOR p V q
P q pV q
T T F F
T F T F
T T T F
11
EXAMPLES
p : 2 is an integer q : 3 is greater than 5 pq 2 is an integer or 3 is greater thanp : 1+1=3 5 q : A decade is 10 years pq 1+1=3 or a decade is 10 years p : 3 is an even integer q : 3 is an odd integer pq 3 is an even integer or 3 is an odd integer or 3 is an even integer or an oddSallehuddin and integer prepared by Roselina
Razana Alwee 12
NEGATION
Negating a proposition simply flips its value. Symbols representing negation include: x , x , x (NOT) x, Let p be a proposition. The negation of p, written p is the statement obtained by negating statement p.
prepared by Roselina Sallehuddin and Razana Alwee
13
P T F
P F T
14
EXAMPLES
p : 2 is positive p, It is not the case that 2 is positive or 2 is not positive
15
EXERCISES
GIVE THE NEGATION OF EACH OF THE FOLLOWING STATEMENTS i) It will rain tomorrow ii)5 is an even number
16
Exercises
In each of the following, form the conjunction and the disjunction of p and q P: I will drive my car q: I will be late
P : NUM > 10
q : NUM 15
17
Conditional Propositions
Let p and q be propositions. if p, then q is a statement called a conditional proposition, written pq
18
CONDITIONAL PROPOSITIONS
False if p = True and q=fal se
T T F F
T F T F
T F T T
19
example
p : today is Sunday q : I will go for a walk pq If today is Sunday, then I will go for a walk p : I get a bonus q : I will buy a new car pq If I get a bonus, then I will buy a new car
20
Biconditional
Let p and q be propositions. p if and only if q is a statement called a biconditional proposition, written pq
21
Biconditional
The truth table of p q p q p q
T T F F
T F T F
T F F T
22
EXAMPLES
p : my program will compile q : it has no syntax error pq My program will compile if and only if it has no syntax error. p : x is divisible by 3 q : x is divisible by 9 pq p:x<6 x is divisible by 3 if and only if x q : x3 < is divisible by 9
exercises
Propositions p, q, r and s are defined as follows: p is "I shall finish my Coursework Assignment" q is "I shall work for forty hours this week" r is "I shall pass Maths" s is "I like Maths" Write each sentence in symbols: (a) I shall not finish my Coursework Assignment. (b) I dont like Maths, but I shall finish my Coursework Assignment. (c) If I finish my Coursework Assignment, I shall pass Maths. (d) I shall pass Maths only if I work for forty hours this week and finish my Coursework Assignment. Write each expression as a sensible (if untrue!) English sentence: (e) q p (f) p r
24
solution
(a) p (b) s p (c) p r (d) r (q p) (e) I shall work for forty hours this week, or Ill finish my Coursework Assignment. (f) If I shall not finish my Coursework Assignment, then I shant pass Maths.
25
26
27
28
Truth table
p q (pV q) (pVq) (q p) A
T T F F
T F T F
T T T F
F F F T
T F F F
T T T F
29
EXERCISES
Construct the truth table for each of the following statements: pq (p q) q ( p q) q (p q) ( q p)
30
Logical Equivalence
The compound propositions Q dan R are made up of the propositions p1, , pn. Q and R are logically equivalent and write,
QR
provided that given any truth values of p1, , pn, either Q and R are both true or Q and R are both false.
31
32
example
The truth table shows that, Q R p q pq q p
T T F F
T F T F
T F T T
prepared by Roselina Sallehuddin and Razana Alwee
T F T T
33
example
Show that, (p q) p q
34
example
The truth table shows that, (p q) p q p q (p q) pq
T T F F
T F T F
F T F F
prepared by Roselina Sallehuddin and Razana Alwee
F T F F
35
EXERCISE
Given, R = p ( q r) Q = p (q r) State whether or not R Q.
36
exercise
For each pair of expressions, construct truth tables to see if the two compound propositions are logically equivalent: (a) (i) p (q p) (ii) p q (b) (i) (p q) (p q) (ii) (p q) (p q)
37
(a) Yes; both results columns give T, T, T, F (b) No; first is F, T, T, F; second is T, F, F, T
38
39
40
PROVE
PROVE
solution
42
solution
43
44
45
46
47
48
49
Propositional functions p, q and r are defined as follows: p is "n = 7" q is "a > 5" r is "x = 0" Write the following expressions in terms of p, q and r, and show that each pair of expressions is logically equivalent. State carefully which of the above laws are used at each stage
(a) ((n = 7) (a > 5))(x = 0) ((n = 7) (x = 0)) ((a > 5)(x = 0)) (b) ((n = 7) (a 5)) (n 7) (a > 5) (c) (n = 7) (((a 5) (x = 0))) ((nprepared by (a Sallehuddin (x 0) = 7) Roselina > 5)) and
Razana Alwee
50
solution
(a) (p q) r (p r) (q r) (p q) r= r (p q) Commutative Law = (r p) (r q) Distributive Law = (p r) (qr) Commutative Law (twice) (b) First, we note that q is "a 5"; and p is "n 7". So the expressions are: (p q) p q (p q)= p (q) De Morgan's Law = p q Involution Law
prepared by Roselina Sallehuddin and Razana Alwee 51
First, we note that r is "x 0". So the expressions are: p ((q r)) (p q) r p ((q r))= p ((q) r)De Morgan's Law = p (q r) = (p q) r Double negation Law Associative Law
52
Proof Techniques
Direct Proof or Proof by Direct Method
Proof of those theorems that can be expressed in the form x (P(x) Q(x)), D is the domain of discourse Select a particular, but arbitrarily chosen, member a of the domain D Show that the statement P(a) Q(a) is true. (Assume that P(a) is true Show that Q(a) is true By the rule of Universal Generalization (UG), x (P(x) Q(x)) is true
Proof Techniques
Direct Proof - Example for all integer x, if x is odd, then x2 is odd Or P(x) = x is an odd integer Q(x) = x2 is an odd integer
integer
Proof Techniques
a is an odd integer
a 2n 1
Proof Techniques
Indirect Proof
The implication p q is equivalent to the implication (q p) Therefore, in order to show that p q is true, one can also show that the implication (q p) is true To show that (q p) is true, assume that the negation of q is true and prove that the negation of p is true
Indirect Proof - Example P(n) : n2+3 is an odd number Q(n) : n is even numbern 3 (2k 1)
2 2
n ( P ( n ) Q ( 4k)) 4k 1 3 n
4k 2 4 k 4
2
2k 2 P ( n ) Q ( n ) ~ Q ( n)2(~k 2)( n ) P
3 (2 k 1)
2 2
4 k 4 k
4 k 1 3 4 k 4
2
2 (2 k
2 k 2 )
t 2k 2 2k 2 n 2 3 2t
t is integer
Proof Techniques
Proof by Contradiction Assume that the conclusion is not true and then arrive at a contradiction Example: Prove that there are infinitely many prime numbers Proof: Assume there are not infinitely many prime numbers, therefore they are listable, i.e. p1,p2,,pn Consider the number q = p1p2pn+1. q is not divisible by any of the listed primes Therefore, q is a prime. However, it was not listed. Contradiction! Therefore, there are infinitely many primes
Proof Techniques