Professional Documents
Culture Documents
Topic 1: Logic
Objectives
Students should be able to
Define statements (simple and compound
statements).
Construct truth tables of statements
Determine whether two compound
statements are logically equivalent
Negate a statement
Statement
A statement is a sentence that is either definitely true (T) or false (F).
Example 1:
Decide whether or not the following are statements. In the case of a
statement, say if it is true or false.
a) Kuala Lumpur is the capital of Malaysia
b) 5 6
c) x + 1 = 2
d) Hello !
Solution:
a) Statement. True
b) Statement. False
c) Not a statement
d) Not a statement
Compound statements
A compound statement is a combination of two or more
simple statement. Statements a) and b) in Example 1 are
simple statements. There are many ways of combining
simple statements to form compound statement, but only
five connectives that are commonly used.
Connectives:
1) Negation ~ (this symbol is called tilde)
2) Conjunction
3) Disjunction (this symbol is called wedge)
4) Implication
5) Equivalence
Examples
Example 2:
Let p be the statement “I am 8 feet tall”.
What is the negation of p?
Solution:
The negation of p denoted by ~p is “I am
not 8 feet tall”.
Examples
Example 3
Let p be the statement “They are talking”
and q be the statement “The door is
closed”. Write the conjunction statement.
Solution:
The conjunction statement (denoted by p
q) is “They are talking and the door is
closed”.
Examples
Example 4
Let p be the statement “A policeman has to
cross a river using a small boat” and q be the
statement “A thief has to cross a river using a
small boat”. Write the disjunction statement.
Solution:
The disjunction statement (denoted by p q)
is “Either a policeman or a thief has to cross
a river using a small boat”.
Examples
Example 5
Let p be the statement “you participate in
class” and q be the statement “you will
get extra points”. Write the implication
statement p q.
Solution:
The implication statement p q is “If
you participate in class then you will get
extra points”.
Remark
The implication statement is also called the
conditional statement. In the “If…then” statements,
the “if-part” is called the antecedent while the “then-
part” is called the consequent. Other ways to say “If
you participate in class then you will get extra
points” are
“You participate in class only if you will get extra
points”
“You will get extra points if you participate in class”
“You participate in class implies you will get extra
points”
Examples
Example 6
Let p be the statement “He will push
button A” and q be the statement “The red
light flashes”. Write the statement p q.
Solution:
The statement p q is “He will push
button A if and only if the red light
flashes”.
Remark
The statement p q is called
equivalence or biconditional. Some other
books use “” instead.
Quantifiers
Two quantifiers: Universal and Existential
: “There exists a” or “There is a” or
“There is at least one” (existential)
: “For all” or “For every” (universal)
Some symbols: N : Set of positive integers
T F
F T
Truth tables
Conjunction:
p q pq
T T T
T F F
F T F
F F F
Truth tables
Disjunction:
p q pq
T T T
T F T
F T T
F F F
Truth tables
Implication:
p q pq
T T T
T F F
F T T
F F T
Truth tables
Biconditional
p q pq
T T T
T F F
F T F
F F T
Logically equivalent
Two compound statements are called
logically equivalent if they have the same
truth value for every possible truth value
assignment to the component statements.
Example 11
Determine whether p q is logically
equivalent to ~q ~p.
Logically equivalent
Solution:
Step 1: Construct truth tables for each
statement
Step 2: Compare the truth values
The statements p q and ~q ~p have
the same truth values.
Therefore, p q is logically equivalent
to
~q ~p.
Exercises
Determine whether p q is logically
equivalent to ~p q
Determine whether p q is logically
equivalent to p ~q
Negate the following statements: