Beruflich Dokumente
Kultur Dokumente
Propositions
A proposition is a declarative sentence (a sentence that declares a fact) that is either true
or false, but not both.
Example 1: All the following declarative sentences are propositions.
i. Kuala Lumpur is the capital of Malaysia. (True)
ii. Perak is the biggest state in Malaysia. (False)
iii. 1 + 1 = 2 (True)
iv. 2 + 2 = 3 (False)
Example 2: All the following not declarative sentences are not propositions.
i. What time is it?
ii. Read this carefully.
iii. x + 1 = 2
iv. x+y=z
Letter (p, q, r, s,) are used to denote the propositional variable.
True propositional truth value is True and denoted by T.
False propositional truth value is False and denoted by F.
Compound Propositions
The combination of one or more propositions.
Are formed from existing propositions using logical operators.
The types of compound propositions:-
I. Negation
II. Conjunction
III. Disjunction inclusive or
IV. Disjunction exclusive or
V. Conditional statements
- Converse
- Contrapositive
- Inverse
VI. Biconditional statements
Negation
Let p be a proposition. The negation of p, denoted by p (also denoted by ), read as not
p, is the statement It is not the case that p.
Example 3:
Conjunction
Let p and q be a proposition. The conjunction of p and q, denoted by p q, is the
proposition p and q. The conjunction p q is true when both p and q are true and is
false otherwise.
Example 4:
p : It is raining.
q : It is cold.
The proposition It is raining and cold. (p q) is consider as TRUE when it is
raining (p is True) and it is cold (q is True). Otherwise or other situation is FALSE.
In Logic the word but sometimes is used instead of and in a conjunction. For example,
the statement The sun is shining, but it is raining. is another way of saying The sun is
shining and it is raining.
TABLE 2: The Truth Table for the conjunction of two propositions:-
p q pq
T T T
T F F
F T F
F F F
Disjunction inclusive or
Let p and q be a proposition. The disjunction of p and q, denoted by p q, is the
proposition p or q. The disjunction p q is false when both p and q are false and is
true otherwise.
Example 5:
p : It is raining.
q : It is cold.
The proposition It is raining and cold. (p q) is consider as FALSE when it is not
raining (p is False) and it is not cold (q is False). Otherwise or other situation is
TRUE.
TABLE 3: The Truth Table for the disjunction of two propositions:-
p q pq
T T T
T F T
F T T
F F F
Disjunction exclusive or
Let p and q be a proposition. The exclusive or of p and q, denoted by p q, is the
proposition that is true when exactly one of p and q is true and is false otherwise.
TABLE 4: The Truth Table for the Exclusive Or of two propositions:-
p q pq
T T F
T F T
F T T
F F F
Conditional statements
Let p and q be a proposition. The conditional statement (or implication) p q is the
proposition if p, then q. The conditional statement p q is false when p is true and q
is false and true otherwise.
In the conditional statement p q, p is called the hypothesis (or antecedent or premise)
and q is called the conclusion (or consequence).
The following common ways to express the conditional statement p q:
if p, then q p implies q
if p, q p only if q
p is sufficient for q a sufficient condition for q is p
q if p q whenever p
q when p q is necessary for p
a necessary condition for p is q q follows from p
q unless p
Example 6:
p : Maria learns Discrete Mathematics.
q : Maria will find a good job..
There are many ways to represent this conditional statement in English:
If Maria learns Discrete Mathematics, then she will find a good job.
Maria will find a good job when she learns Discrete Mathematics.
A sufficient condition for Maria to find a good job is learns Discrete Mathematics.
Maria will find a good job unless she does not learn Discrete Mathematics.
The conditional statement If Maria learns Discrete Mathematics, then she will find a
good job. (p q) is consider as FALSE when Maria learns Discrete Mathematics (p
is True) but she does not get a good job (q is False). Otherwise or other situation is
TRUE.
TABLE 5: The Truth Table for the conditional statement p q:
p q pq
T T T
T F F
F T T
F F T
q p is called the converse of p q.
q p is called the contrapositive of p q.
p q is called the inverse of p q.
Example 7: What are the converse, the contrapositive and the inverse of the conditional
statement The home team wins whenever it is raining.?
Because q whenever p is one of the ways to express the conditional statement, thus
p : It is raining.
q : The home team wins.
The converse is If the home team wins, then it is raining.
The contrapositive is If the home team does not win, then it is not raining.
The inverse is If it is not raining, then the home team does not win.
Only the contrapositive is equivalent to the original statement.
Biconditional Statements
Let p and q be propositions. The biconditional statement (or bi-implications) p q is the
proposition p if and only if q. The biconditional statement p q is true when p and q
have the same truth values, and is false otherwise.
There are some other common ways to express p q:
p is necessary and sufficient for q
if p then q, and conversely
p iff q
p q has exactly the same truth value as (p q) (q p).
Example 8:
p : You can take the flight.
q : You buy a ticket.
The statement You can take the flight if and only if you buy a ticket (p q) is
consider as TRUE if p and q are either both true or both false, that is
- If you buy a ticket (q is True) and you can take a flight (p is True).
- If you do not buy a ticket (q is False) and you cannot take the flight (p is False).
The statement You can take the flight if and only if you buy a ticket (p q) is
consider as FALSE if p and q have opposite truth values, that is
- When you do not buy a ticket (q is False) but you can take the flight (p is True).
- When you buy a ticket (q is True) but you cannot take the flight (p is False).
TABLE 6: The Truth Table for the biconditional statement p q:
p q pq
T T T
T F F
F T F
F F T
Propositional Equivalences
A tautology is the compound proposition that is always true.
A contradiction is the compound proposition that is always false.
A contingent statement is one that is neither a tautology nor a contradiction.
Example 11: Show that p q q p is tautology.
p q p q pq q p p q q p
T T F F T T T
T F F T F F T
F T T F T T T
F F T T T T T
Because all the truth values are True, thus p q q p is tautology.
1. Which of these sentences are propositions? What are the truth values of those that are
proposition?
a) Malaysia is the biggest century in Asia.
b) 2 + 3 = 5.
c) Do not pass go.
d) 5 + 7 < 10
e) 4 + x = 5.
f) Polytechnic Ungku Omar is the Polytechnic Premier.
8. State the converse, contrapositive, and inverse of each of these conditional statements.
a) If it raining tonight, then I will stay at home.
b) I come to class whenever there is going to be a quiz.
9. Construct a truth table for each of these compound propositions and determine whether
these compound propositions are a tautology.
a) (p q) (q p)
b) (p q) (p q)
c) (p q) (p r)
d) (p q) p
e) [(p q) (q r)] (p r)
Premises Conclusion
p q pq q p
T T T T T
T F F F T
F T
T
T
F This is not a valid argument because
the premises are true but the conclusion
F F T F F
is false.
Another way, the argument form with premises P1, P2, , Pn and conclusion q is valid
when (P1 P2 Pn) q is a tautology.
Example 14: show that the argument below is valid with using tautology.
p (q r)
r
Step 2:
Steps Reasons
1) p q Hypothesis / Premise
2) q p Use step (1) and Contrapositive
3) p r Hypothesis / Premise
4) q r Use step (2), (3), and Hypothetical Syllogism
5) r s Hypothesis / Premise
6) q s Use step (4), (5), and Hypothetical Syllogism
This argument form shows that the hypotheses lead to the desired conclusion.
2. Explain the rules of inference used to show that the hypotheses lead to the desired
conclusion.
a) Cindy works hard. If Cindy works hard, then she is a hardworking girl. If Cindy
is a hardworking girl, then she will get the job. Therefore, Cindy will get the job.
b) I am either lucky or clever. I am not lucky. If I am clever, then I will get a good
result in SPM. I will get a good result in SPM.
c) If Mary has free times, then she will go shopping. Mary buys a new skirt if she
goes shopping. Mary does not buy a new skirt. Therefore, Mary does not have
free times.
The proposition logic is not powerful enough to represent all types of assertions that are
used in computer science and mathematics.
Predicate logic is a more powerful type of logic to express the meaning of a wide range of
statements in mathematics and computer science in ways to reason and explore
relationships between objects.
Predicate Logic
Statement involving variables, such as:-
x > 3
x = y +3
x + y = z
computer x is functioning properly.
are often found in mathematical assertions, in computer programs, and in system
specifications.
These statements are neither true nor false when the values of the variables are not
specified.
The statement x is greater than 3 has two part:-
First part the variable x, is the subject of the statement.
Second part the predicate, is greater than 3
The statement x is greater than 3 denote by P(x), where P denotes the predicate is
greater than 3 and x is the variable.
Example 17: Let P(x) denote the statement x > 3. What are the truth values of P(4) and
P(2)?
For P(4), the x = 4, thus the truth value is T since 4 > 3 is a true statement.
For P(2), the x = 2, thus the truth value is F since 2 > 3 is a false statement.
Example 18: Let Q(x, y) denote the statement x = y +3. What are truth values of the
propositions Q(1, 2) and Q(3, 0)?
For Q(1, 2), set x = 1 and y = 2 in the statement Q(x, y). Hence the truth value is F
since 1 = 2 + 3 is a false statement.
For Q(3, 0), set x = 3 and y = 0 in the statement Q(x, y). Hence the truth value is T
since 3 = 0 + 3 is a true statement.
Quantifiers
Quantification is another important way to create a proposition from a propositional
function.
Quantification expresses the extent to which a predicate is true over a range of elements.
In English, the words all, some, many, none, and few are used in quantification.
Two types of quantification:-
a) Universal Quantifier (a predicate is true for every element under consideration.)
b) Existential Quantifier (there is one or more element under consideration for which
predicate is true.)
Universal Quantifier
The universal quantifier of P(x) is the statement P(x) for all values of x in the domain,
denoted by , which read as for all x P(x) or for every x P(x)and called the
universal quantifier.
An element for which P(x) is false is called a counterexample of .
is same as conjunction.
Example 19: Let P(x) be the statement x + 1 > x. What is the truth value of the
quantification , where the domain consists of all real numbers?
The quantification is true since P(x) is true for all real numbers x.
Example 20: Let Q(x) be the statement x < 2.What is the truth value of the
quantification , where the domain consists of all real numbers?
Q(x) is not true for every real number x, because, for instance Q(3) is false. That is,
x = 3 is a counterexample for the statement . Thus is false.
Existential Quantifier
The existential quantifier of P(x) is the proposition There exist an element x in the
domain such that P(x), denoted by , which read as there is an x such that P(x) ,
there is at least one x such that P(x) or for some x P(x). is called the existential
quantifier.
is false if and only if P(x) is false for every element of the P(x).
is same as disjunction.
Example 21: Let P(x) denote the statement x > 3. What is the truth value of the
quantification , where the domain consists of all real numbers?
Because x > 3 is sometimes true for instance, when x = 4, thus is true.
Let Q(x) denote the statement x = x + 1. What is the truth value of the quantification
, where the domain consists of all real numbers?
Because Q(x) is false for every real number x, the existential quantifier of Q(x), which
is , is false.
First step: Rewrite the statement so that can identify the appropriate quantifiers to use.
For every student in this class, that student has studied calculus.
Second step: Introduce a variable x so that the statement becomes
For every student x in this class, x has studied calculus.
Third step: Introduce C(x), which is the statement x has studied calculus. If the
domain for x consists of the students in the class, then the statement translate as
.
Example 23: Express the statements Some student in this class has visited Malacca
using predicates and quantifiers.
First step: Rewrite the statement so that can identify the appropriate quantifiers to use.
There is a student in this class, that the student has visited Malacca.
Second step: Introduce a variable x so that the statement becomes
There is a student in x this class, that x has visited Malacca.
Third step: Introduce M(x), which is the statement x has visited Malacca. If the
domain for x consists of the students in the class, then the statement translate as
.
Example 24: Let C(x, y) be the predicate x clever than y and let the universe of
discourse be the set of all students. Use quantifiers to express the statement Not
everyone is not clever than someone.
First step: Rewrite the statement so that can identify the appropriate quantifiers to use.
Not every students is not clever than some students.
Second step: Introduce a variable x so that the statement becomes
Not every x is not clever than some y.
Third step: Hence, the statement translate as .
Example 25: Let P(x, y) be the predicate x loves y and let the universe of discourse be
the set of all people in Malaysia. Express the quantification in sentences.
express to someone in Malaysia.
express to everyone in Malaysia.
Because P(x, y) is the predicate x loves y, thus express to x not love y
Combine all the sentences and will become Someone in Malaysia not love everyone
in Malaysia.
1. Let P(x) be the statement the word x contains the letter a. What are the truth values?
a) P(Discrete)
b) P(Mathematics)
c) P(True)
d) P(False)
2. Let Q(x, y) denote the statement x2 > y. What are the truth values?
a) Q(1, 2)
b) Q(-3, 8)
c) Q( , 3)
3. Let P(x) be the statement x likes subject mathematics, where the domain for x consists
of all students. Express each of these quantifications in English.
a)
b)
c)
d)
4. Let Q(x) denote the statement x + 1 = 2x. If the universe of discourse is all integers,
what are these truth values?
a) Q(0)
b) Q(-1)
c) Q(1)
d)
e)
f)
g)
5. Let C(x, y) be the statement x is a friend of y, where the domain for x and y consists of
all people. Use quantifications to express each of the following statements.
a) Everyone is a friend of everyone.
b) Not everyone is a friend of someone.
c) Someone is not a friend of someone.
d) There is a friend of John.
e) Mary is not a friend of everyone.
6. Let P(x, y) be the statement x dislike y, where the domain for x is all students and the
domain for y consists of all subjects. Express each of these quantifications in English.
a) xy P(x, y)
b) xy P(x, y)
c) xy P(x, y)
d) x P(x, Mathematics)
e) y P(Maria, y)
7. Let H(x) be the statement x is hardworking, N(x) be the statement x is naughty and
C(x) be the statement x is clever, where the domain for x consists of all students. Use
quantifications to express each of the following statements.
a) Some students are clever but naughty.
b) Not all students are clever and hardworking.
c) Some students are clever, hardworking and not naughty.
d) All students are clever, or hardworking or naughty.