Anda di halaman 1dari 18

LOGIC

LECTURE 2 TR1333 DISCRETE MATHEMATICS


Synopsis & • Logic is the basis for mathematical
reasoning. In this topic, we begin with

Outline propositional logic. We can represent


propositions as variables such as p, q
or r. If p and q are propositions, new
compound Propositions can be
formed by using connectives. We are
interested in the truth values of
propositions and compound
propositions. We will show that the
truth values of compound propositions
can be determined by truth tables.
Applications of propositional logic for
example in translating sentences are
also discussed.
Learning By the end of the lecture, you should be
able to:
Outcomes 1. Explain the concept of proposition,
connectives and compound
propositions;
2. Formulate a proposition in words into a
symbolic expression; and
3. Solve the truth value of compound
propositions using truth tables.
Proposition • A statement that is either true or false,
but not both, is called a proposition. It
is expressed as a declarative
sentence. Questions and instructions
are not proposition.

• In propositional logic, a proposition is


represented by using a lower case
letter, such as p, q or r. For example,
we can use the notation
p : The Earth is round
to define p as a proposition “The Earth
is round”.
Proposition
Which of the following are propositions?
(a) The Earth is round.

Example (b) Malaysia is a country in South East Asia.


(c) Do you speak English?
(d) 6 + 2x = 5.
(e) Take two panadol tablets.
(f) The temperature in Malaysia is between 28F to 38F.

Solutions
Question (a) and (b) are statements that happen to be true.
Question (c) is a question, so it is not a statement that is either
true or false.
Question (d) is not a statement, since it is true or false
depending on the value of x.
Question (e) is not a statement, it is a command.
Question (f) is a declarative sentence whose truth or falsity
we do not know at this time; however, we can (in principle)
determine if it is true or false; so it is a statement.
Conjunction
AND 

Biconditional
Proposition Disjunction
…IF AND OR 
ONLY IF… 

CONNECTIVES

Conditional
Negation
Proposition
NOT 
IF…THEN… 
Conjunction • Let p and q be propositions.
• The conjunction of p and q,
AND ‘’ denoted p  q,
is the proposition p and q.

p q pq
• The value of this proposition is true (T)
T T T
if both p and q are true,
T F F otherwise the proposition is false (F ).
F T F
F F F
Disjunction • Let p and q be propositions.
The disjunction of p and q,
OR ‘’ denoted p  q,
is the proposition p or q.

p q pq
• The value of this proposition is true (T )
T T T if p or q is true (T ).
T F T It is false if both p and q are false (F ).
F T T
F F F
Conjunction • Then the conjunction of p and q is
• p  q: The Earth is round and a
Disjunction decade is 100 years.

Example • Since p is true and q is false, p  q is


false.

• If
p: The Earth is round • The disjunction of p and q is

q: A decade is 100 years • p  q: The Earth is round or a decade is


100 years.
• Since p is true and q is false, p  q is
true.
Negation • The negation of p,
denoted p is the proposition not p.
NOT ‘’
• Example
 If p : The earth is round.
 The negation of p is
p : The earth is not round.
p p
 Since p is true, p is false.
T F
F T
CONDITIONAL • If p and q are propositions, the compound
proposition if p then q is called a conditional
PROPOSITION proposition and is denoted p  q.
“If…then…” • In a conditional proposition p  q,
p is called the hypothesis
(antecedent)/sufficient condition

p q pq q is called the conclusion


(consequent)/necessary condition
T T T • If "p then q" is considered logically the same as
T F F "p only if q“
• The value of this proposition is true (T ) if p and
F T T q is true (T ) and when p is false.
F F T
CONDITIONAL • If we define
p : The government is allocated another scholarship.
PROPOSITION q : Radhie can further his studies at UKM.

“If…then…” • The conditional statement p  q means

Example “If the government is allocated another scholarship, then


Radhie can further his studies at UKM”.

• Let
p : 1 > 2,
q : 4 < 8.
• Then p is false and q is true.
• The proposition p  q, that is,
“If 1 > 2 then 4 < 8” is true.
BICONDITIONAL • If p and q are propositions, the
PROPOSITION compound proposition
“…if and only if…” p if and only if q is called a
biconditional proposition and is
denoted as p  q.
p q pq
T T T • The value of this proposition is true (T )
T F F when both p and q is true (T ) and
when both p and q is false.
F T F
F F T
BICONDITIONAL • If we define
p: 1 < 5
PROPOSITION q: 2 < 8
“…if and only if…”
Example • Then the statement “1 < 5 if and only if 2 < 8” can be
written symbolically as p  q. Since p and q are both true,
the statement p  q is true.

• If we define
p: Ammar can buy shoes online.
q: Ammar has a credit card.

• Then the statement “Ammar can buy shoes online if and


only if Ammar has a credit card” can be written
symbolically as p  q.
TRANSLATE • Formulate the compound propositions
symbolically. Let
Compound p: I study hard.
Proposition q: I get A’s.
r: I get rich.
• Solution
1. If I study hard, then I get A’s.
1. pq
2. I study hard if and only if I get rich.
2. pq
3. (p  r)  q 3. If I study hard or I get rich, then I
4. p  (q  r) get A’s.
5. q  r 4. If I study hard, then I get A’s and I
get rich.
5. I don’t get A’s and I don’t get rich.
ACTIVITY 1 • Translate the quotes into the symbolically
expression.
TRUE TABLE • Find the truth value of each compound proposition.
1. q  r
Compound 2. (p  r)  q
Proposition
q r q r q  r p q r pr (p  r)  q
T T T T T
T T F F F T T F T T
T F F T F T F T T F
F T T F F T F F T F
F F T T T F T T T T
F T F T T
F F T F T
F F F F T
ACTIVITY 2 • Find the truth value of each
compound proposition.
1. (p → q)
2. p  (q  r)
3. (p → q ) → r
4. p  (q → r )
5. ( p → q ) ^ ( q → r )

Anda mungkin juga menyukai