chapter 1 part 1 new - stud
DESCRIPTION
MMU's Discrete Structure.Notes provided for IT students.TRANSCRIPT
-
5/25/2018 Chapter 1 Part 1 New - Stud
1/33
DCS5028: DISCRETE STRUCTURE
CHAPTER 1
(PART 1)
Introduction to Logic
1
-
5/25/2018 Chapter 1 Part 1 New - Stud
2/33
LEARNING OBJECTIVES
Differentiate between propositions andcompound proposition.
Write the compound propositions.
Differentiate and write the PropositionalEquivalences.
2DCS5028
-
5/25/2018 Chapter 1 Part 1 New - Stud
3/33
LOGI Logic
The discipline that deals with the methods of
reasoning.
Provides rules and techniques for determiningwhether a given argument is valid.
3DCS5028
-
5/25/2018 Chapter 1 Part 1 New - Stud
4/33
LOGIC
4
All cats have four legs.
I have four legs.
I am a cat.
DCS5028
-
5/25/2018 Chapter 1 Part 1 New - Stud
5/33
PROPOSITIONS Proposition
Is a declarative sentence that is either TRUEor
FALSE, but NOT BOTH
5DCS5028
-
5/25/2018 Chapter 1 Part 1 New - Stud
6/33
EXAMPLE
Which of the following sentences is proposition?
Determine the truth value(true or false) of thesentence if it is a proposition.
1. Singapore is not an ASEAN Country.
2. Apple is a fruit.3. Just follow the step-by-step instructions, which will guide
you through the questionnaire.4. In the film, Captain Jack Sparrow (Johnny Depp) is joined
by Angelica (Lady Gaga) in his search for the Fountain ofYouth.
5. 6 + 12 * 5 = 3666. x + y = 3337. Cat can fly.8. What a beautiful evening!
6DCS5028
(P, FALSE)
(P, TRUE)
Not a Proposition
(P, FALSE)
(P, FALSE)
Not a Proposition
(P, FALSE)(P, TRUE/ FALSE)
-
5/25/2018 Chapter 1 Part 1 New - Stud
7/33
EXERCISE
Which of the following are propositions?
The earth is round.
2 + 3 = 5
Listen!
5- x =3
Are you sleeping?
DCS50287
-
5/25/2018 Chapter 1 Part 1 New - Stud
8/33
COMPOUND PROPOSITIONS
In logic,letters p, q, rdenote propositional
variables.
Example:
p : Today is a windy day.
q: It is cold.
Propositional variables can be combined by
logical connectives to obtain compound
proposition.DCS5028
8
-
5/25/2018 Chapter 1 Part 1 New - Stud
9/33
OMPOUND PROPOSITIONS1. Negation
2. Conjunction
2. Disjunction3. Exclusive Disjunction (exor)
5. Implication/Conditional
6. Biconditional
9
The above words are known as connect ives
DCS5028
-
5/25/2018 Chapter 1 Part 1 New - Stud
10/33
Connectives Symbol Name
not ~ negationand conjunction
or disjunction
exclusive Or exclusive
disjunction(or)
ifthen. Implication
/conditional
if and only if biconditional 10DCS5028
-
5/25/2018 Chapter 1 Part 1 New - Stud
11/33
NEGATION
Let pbe a proposition.
The negationof p, denoted as ~p or p, read as not
p.
Can be written in English as this is not the case that
p.
The operator is a unary operator on propositions.
The truth value of the proposition p is defined by thetruth table
11DCS5028
-
5/25/2018 Chapter 1 Part 1 New - Stud
12/33
NEGATION
Example 1:
Let q: Ali can swim.
Answer : q
Example 2:
Let r: Amy is a dance instructor.
Answer: r
12
Ali could not swim.Ano ther answer: It is not the case that Ali can swim
Amy is not a dance instructor
Ano ther answer: It is not the case that Amy is a dance instructor
DCS5028
-
5/25/2018 Chapter 1 Part 1 New - Stud
13/33
EXERCISE
Give the negation of the following
statements:
a) p : 2+3>1
b) q: It is cold
DCS502813
-
5/25/2018 Chapter 1 Part 1 New - Stud
14/33
CONJUNCTION
Let p and q be propositions, The propositionof p and q, denoted by p q. The proposition that is TRUEwhen both p and q
are TRUEand is FALSE otherwise.
The proposition p q is called a conjunct ion of pand q.
14DCS5028
p q p q
T T TT F F
F T F
F F F
-
5/25/2018 Chapter 1 Part 1 New - Stud
15/33
CONJUNCTION
Example 3:Form the conjunction of p and q for the following.
Let p: Ali enjoys running. Let q: Ali likes hiking.Answer:
QUESTIONWhat is the truth value of compound proposition above,
if the p proposition is TRUEand q proposition is
FALSE?
15
Ali likes running and hiking. OrAli enjoys running and hiking.
FALSE
DCS5028
-
5/25/2018 Chapter 1 Part 1 New - Stud
16/33
EXERCISE:
Form the conjunction of p and q for each of
the following and determine the truth value
for the compound proposition:
a) p: 2 < 3 q: -5 > -8
b) p: 2 + 5 7 q: 2
-
5/25/2018 Chapter 1 Part 1 New - Stud
17/33
DISJUNCTION
Let p and q be propositions. The disjunction of p or q, denoted by p q, is a
compound proposition means p or q.
Disjunction of p or q is the proposition that is FALSE
when p and q are both false and TRUE otherwise.
17DCS5028
p q p V q
T T TT F T
F T T
F F F
-
5/25/2018 Chapter 1 Part 1 New - Stud
18/33
DISJUNCTION
Example 4Let p: John is at the library.Let q: John is studying.
Answer:
QUESTION
What is the truth value of propositions in example
above, if the pproposition is falseand the qproposition
is true?
18
John is at the library or John is studyingOr
John is either at the library or he is studying
TRUEDCS5028
-
5/25/2018 Chapter 1 Part 1 New - Stud
19/33
EXERCISE:
Form the disjunction of p and q for each of
the following and determine the truth value
for the compound proposition:
a) p: 2 < 3 q: 2 is a positive integer
b) p: 2 + 5 7 q: 2 is a positive integer
DCS502819
-
5/25/2018 Chapter 1 Part 1 New - Stud
20/33
EXCLUSIVE DISJUNCTION(EXOR)
Let p and q be propositions.
The exclusive or of p and q, is denoted by p q.
Exclusive OR of p q is the proposition that is
TRUE when EXACTLY ONE of the propositions(p,q)
is TRUE and is FALSE otherwise.
Example:
p: I left for Singapore on Monday
q: I left for Singapore on Wednesday
Exactly one of the two possibilities could haveoccurred. Both could not have occurred.
20
DCS5028
-
5/25/2018 Chapter 1 Part 1 New - Stud
21/33
EXCLUSIVE-OR
DCS502821
p q p q
T T F
T F TF T T
F F F
-
5/25/2018 Chapter 1 Part 1 New - Stud
22/33
EXCLUSIVE DISJUNCTION(EXOR)
Example 5:Let p: Muthu likes to eat. q: Muthu likes to watch
movies.
Answer:
QUESTION
What is the truth value of propositions in exampleabove, if both p and qpropositions are false?
22
Muthu likes to eat exclusive or watching movies
FALSE
DCS5028
-
5/25/2018 Chapter 1 Part 1 New - Stud
23/33
IMPLICATION
Let p and q be propositions.
The implication of p and q, denoted by pq, is a
compound proposition that means if p then q.
In this implication, p is called the hypothesis and q is
called the conclusion (or consequence).
23DCS5028
-
5/25/2018 Chapter 1 Part 1 New - Stud
24/33
EXERCISE
Form the implication pq for each of the
following:
a) p: I am hungry q: I will eat
b) p: It is raining q: 3+ 5 = 8
DCS502824
-
5/25/2018 Chapter 1 Part 1 New - Stud
25/33
IMPLICATION
For an implication :
Theconverse of it is q p
The contrapositiveof it is q p
The proposition of p q is called the inverseof pq.
25
Example 6
Let p: Muthu likes to eat. q: Muthu likes to watch movies.
1. pq:
2. Converse:
3. Contrapositive:
4. Inverse:
Answer:
1. If Muthu likes to eat, then he likes to watch movies.
2. If Muthu likes to watch movies, then he likes to eat.3. If Muthu doesnt like to watch movies, then he doesnt
like to eat
4. If Muthu doesnt like to eat, then he doesnt like to
watch movies
DCS5028
-
5/25/2018 Chapter 1 Part 1 New - Stud
26/33
IMPLICATION (CONTINUED)
What is the truth value for (1) to (4) in
Example 6, if pis TRUE and qis FALSE?
DCS502826
-
5/25/2018 Chapter 1 Part 1 New - Stud
27/33
JUST FOR FUN
27
IF
THEN
1 1 11
DCS5028
What is the truth value for this implication?
Answer: TF = F
-
5/25/2018 Chapter 1 Part 1 New - Stud
28/33
BICONDITIONAL
Let p and q be propositions. The biconditional of p if and only if q, denoted by p
q.
The Biconditional for p q is TRUE when p and q have
the same truth values, and is FALSE otherwise.
28DCS5028
-
5/25/2018 Chapter 1 Part 1 New - Stud
29/33
BICONDITIONAL
Example 7Let p: Muthu likes to eat. q: Muthu likes to watch
movies.
Answer:
QUESTION
What is the truth value of propositions in example given,
if both pand qproposition are FALSE?
29
Muthu likes to eat if and only if he likes to watch movies.
TRUE
DCS5028
-
5/25/2018 Chapter 1 Part 1 New - Stud
30/33
EXERCISE
Is the following biconditional a true
statement?
3 > 2 if and only if 0 < 3-2.
DCS502830
-
5/25/2018 Chapter 1 Part 1 New - Stud
31/33
REVIEW QUESTIONS
1. Which of these sentences are propositions? What are the
truth-values of those that are propositions?
2 * 4 = 8
Stand UP!!!.
Mr. Mat Aris is the Manager for CDP.
2. What is the negationfor each of the propositions below? PHP is an Open Source Software.
(24 * 12) / 3 = 36.
3. Given that proposition ris true, proposition sis trueandproposition mis false, determine whether each
proposition below is true or false.
r m
r (m s)31
DCS5028
-
5/25/2018 Chapter 1 Part 1 New - Stud
32/33
REVIEW QUESTIONS
4. Let p and q be the propositions Michael likes scuba
diving and Michael likes hiking. Express each of these
compound propositions as an English sentence. q
p q
p q
p
q5. State the inverse, converse and contrapositive of the
following proposition: If an object is a triangle then it is a
polygon.
6. Construct a truth table for each of these compoundpropositions.
p q
p (q r )
(p q) (pq)
32DCS5028
-
5/25/2018 Chapter 1 Part 1 New - Stud
33/33
REVIEW QUESTIONS
7. Letpand qbe the propositions
p: Your car is out of gas.
q: You can't drive your car.
Write the following propositions using p and qand logical
connectives.
Your car is not out of gas.
You can't drive your car if it is out of gas. Your car is not out of gas if you can drive it.
If you can't drive your car then it is out of gas.
8. Given that proposition pis false, proposition qis true, and
proposition ris false, determine whether each propositionbelow is true or false.
p q
p q
(p q) (p r)33
DCS5028