View
217
Download
0
Category
Preview:
Citation preview
7/29/2019 UNISZA:TAF3023: DISCRETE MATHEMATICS PRESENTATION 1:FORESPEC GROUP
1/29
DISCRETE MATHEMATICS
FORESPEC MEMBER:
Nor Farahana Zainul Hisham (032291)
Nurul Syazwani Kamarulzaman(032691)
Nor Shila Latif (032840)
Nor Farahin Rosli (032963)
Nor Irma Fariza Mohd Zamri (033053)
Sam Tau Siong (032261)Muhammad Husni Ideris (032500)
7/29/2019 UNISZA:TAF3023: DISCRETE MATHEMATICS PRESENTATION 1:FORESPEC GROUP
2/29
CHAPTER 1
PROPOSITIONAL LOGIC
Definition : proposition and example
Definition propositional variable
Types of the true table
PROPOSITIONAL EQUIVALENCES Definition : Tautology, contradiction, contingency
Logical equivalences
PREDICATES AND QUANTIFIERS
Introduction of predicates Quantifies (definition and example)
Example of using quantifiers in reality
7/29/2019 UNISZA:TAF3023: DISCRETE MATHEMATICS PRESENTATION 1:FORESPEC GROUP
3/29
PROPOSITIONAL LOGIC
What is
proposition?
Proposition or sometimes called statement.
A proposition is a declaration statement which is
either true or false, but not both simultaneously.
7/29/2019 UNISZA:TAF3023: DISCRETE MATHEMATICS PRESENTATION 1:FORESPEC GROUP
4/29
PROPOSITIONAL LOGIC
This rose is red
Triangles have 4 vertices
9+2=11
6
7/29/2019 UNISZA:TAF3023: DISCRETE MATHEMATICS PRESENTATION 1:FORESPEC GROUP
5/29
Logic Connectives
7/29/2019 UNISZA:TAF3023: DISCRETE MATHEMATICS PRESENTATION 1:FORESPEC GROUP
6/29
Negation
While negation is an operation which involves only a singleproposition, logical connectives are used to link pairs of
propositions.
We can summarize this in table. Ifp symbolizes a
proposition ~p symbolizes the negation ofp.
7/29/2019 UNISZA:TAF3023: DISCRETE MATHEMATICS PRESENTATION 1:FORESPEC GROUP
7/29
5 commonly used logical
connectives:
1. Conjunction
If p and q are two propositions p ^ q (or p.q ) symbolizes the
conjunction of p and q. p q is true when both p and q are true.
Otherwise the conjunction is false. For example:
p : The sun is shining.
q : Cow eat grass.
p ^ q: The sun is shining and cow eat grass.
http://3.bp.blogspot.com/-0ZXtAdn0qIY/USdB9JP3CQI/AAAAAAAAABo/mk29ojiZ4yk/s1600/n.pnghttp://3.bp.blogspot.com/-0ZXtAdn0qIY/USdB9JP3CQI/AAAAAAAAABo/mk29ojiZ4yk/s1600/n.png7/29/2019 UNISZA:TAF3023: DISCRETE MATHEMATICS PRESENTATION 1:FORESPEC GROUP
8/29
5 commonly used logical
connectives:
2. Inclusive Disjunction
Given the two propositions p and q, p V q symbolizes
the Inclusive Disjunction of p and q. This
compound propositions is true when either or both of its
components are true and false otherwise. Thus the true tablefor p V q is given by:
7/29/2019 UNISZA:TAF3023: DISCRETE MATHEMATICS PRESENTATION 1:FORESPEC GROUP
9/29
5 commonly used logical
connectives:
3. Exclusive Disjunction
The exclusive disjunction ofp and q is symbolizes by p V q. This
compound propositions is true when exactly one of the
compound is true. Example :
"Tomorrow i will go swimming or play golf"seems to suggest
that will not do both and therefore points to exclusive
disjunction.
The truth table forp V q is given by:
7/29/2019 UNISZA:TAF3023: DISCRETE MATHEMATICS PRESENTATION 1:FORESPEC GROUP
10/29
5 commonly used logical
connectives:
4. Conditional Propositions
The conditional connective (implication) is symbolized by
().The linguistic expression of a conditional proposition is
normally accepted as utilizing ' if...then..' as in the following
example:
p : I eat breakfast.q : I don't eat lunch
pq :If eat breakfast then i don't eat lunch.
Notice that the proposition 'if p then q ' is false only whenp is true
and q is false. A true statement cannot imply a false one. Ifp is false, thecompound proposition is true no matter what the truth value q .
7/29/2019 UNISZA:TAF3023: DISCRETE MATHEMATICS PRESENTATION 1:FORESPEC GROUP
11/29
5 commonly used logical
connectives:
5. Biconditional Propositions
The biconditional connective is symbolized by (),and
expressed by 'if and only if...then...'.Using the previous example:
p : I eat breakfast.
q : I don't eat lunch.
pq :If eat breakfast if and only if i don't eat lunch.
Note that for pq tobe true, p and q must both have same truthvalues. Both must be true or both must be false.
7/29/2019 UNISZA:TAF3023: DISCRETE MATHEMATICS PRESENTATION 1:FORESPEC GROUP
12/29
PROPOSITIONAL VARIABLEWhat is
propositional
variable?
variable which can either be true or false.
we use letters p,q,r,to denote propositional
variables.
7/29/2019 UNISZA:TAF3023: DISCRETE MATHEMATICS PRESENTATION 1:FORESPEC GROUP
13/29
TYPE OF TRUTH TABLE
1. Constant true
in example: it is always return
true
P value returned
T TF T
2. Identity
in example: it is always return
the value of p
P value returned
T TF F
3. Negation
P value returned
T F
F T
4. Constant false
in example: it is always return
false
P value returned
T F
F F
7/29/2019 UNISZA:TAF3023: DISCRETE MATHEMATICS PRESENTATION 1:FORESPEC GROUP
14/29
TAUTOLOGY
Tautology is ..
A compound proposition or statement form that is true and
never false for every assignment of truth values to its
components
Example: q q / q or not q
q q q qTrue False True
False True True
7/29/2019 UNISZA:TAF3023: DISCRETE MATHEMATICS PRESENTATION 1:FORESPEC GROUP
15/29
CONTRADICTION
A compound proposition or statement form that is false
and never true for every assignment of truth values to
its components.
q q / q and not q
Example:
q q q qTrue False False
False True False
7/29/2019 UNISZA:TAF3023: DISCRETE MATHEMATICS PRESENTATION 1:FORESPEC GROUP
16/29
A compound proposition or statement that isneither tautology nor contradiction.
CONTIGENCY
Example:
(p q) r / p and q or not r
p q r p q r (p q) r
True True True True False True
True True False True True True
True False True False False False
True False False False True True
False True True False False False
False True False False True True
False False True False False False
False False False True True True
7/29/2019 UNISZA:TAF3023: DISCRETE MATHEMATICS PRESENTATION 1:FORESPEC GROUP
17/29
LOGICAL EQUIVALANCE
The proposition p and q are called logically equivalentif p q is a tautology.
The notation of p q denotes that p and q are logically
equivalent.
The symbol is not logical connective since p q is
not a compound proposition, but rather is the
statement that p q is a tautology.
The symbolis sometimes used instead of todenotes logical equivalence.
7/29/2019 UNISZA:TAF3023: DISCRETE MATHEMATICS PRESENTATION 1:FORESPEC GROUP
18/29
How to determine the equivalence?
One way to determine whether two
propositions are equivalent is to use a truth
table.
The propositions p and q are equivalent if and
only if the columns giving their truth values
agree.
7/29/2019 UNISZA:TAF3023: DISCRETE MATHEMATICS PRESENTATION 1:FORESPEC GROUP
19/29
List of Equivalences
pT p; pF p Identity Laws
pT T; pF F Domination Laws
pp p; pp p Idempotent Laws
(p) p Double Negation Law
pq qp; pq qp Commutative Laws
pq qp; pq qp Commutative Laws
(pq) r p (qr)
(pq) r p (qr) Associative Laws
7/29/2019 UNISZA:TAF3023: DISCRETE MATHEMATICS PRESENTATION 1:FORESPEC GROUP
20/29
p(qr) (pq)(pr)
p(qr) (pq)(pr)
Distribution Laws
(pq)(p q)
(pq)(p q)
De Morgans Laws
p p T
p p F
(pq) (p q)
Or Tautology
And Contradiction
Implication Equivalance
pq(pq) (qp)
Biconditional
Equivalence
7/29/2019 UNISZA:TAF3023: DISCRETE MATHEMATICS PRESENTATION 1:FORESPEC GROUP
21/29
Truth Tables for (p q) and (p q)
p q P q (p q) p q p qT T T F F F F
T F T F F T F
F T T F T F F
F F F T T T T
7/29/2019 UNISZA:TAF3023: DISCRETE MATHEMATICS PRESENTATION 1:FORESPEC GROUP
22/29
Truth Tables for (p q) and p q
p q p (p q) p qT T F T T
T F F F F
F T T T TF F T T T
7/29/2019 UNISZA:TAF3023: DISCRETE MATHEMATICS PRESENTATION 1:FORESPEC GROUP
23/29
Logical Equivalences involving Implications
p q p q
p q q p
p
q pqp q (pq)
p q p q
(p q ) (p r) p (q r)
(p r) (q r) (p q)r(p q) (p r) p(q r)
(p r) (q r) (pq)r
7/29/2019 UNISZA:TAF3023: DISCRETE MATHEMATICS PRESENTATION 1:FORESPEC GROUP
24/29
Logical Equivalence involving Biconditionals
p q (p q)(q p)
p q p q
p q (p q) (p q)
p q p q
7/29/2019 UNISZA:TAF3023: DISCRETE MATHEMATICS PRESENTATION 1:FORESPEC GROUP
25/29
PREDICATESPredicates is study of
propositional logic.
For example:
I have more than 5 candy
The statement is I.
While more than 5 candyis predicates.
With the instruction above, we know that I
have more than 5 candy,
it's cannot be 4 or a3,because it cannot be less.
7/29/2019 UNISZA:TAF3023: DISCRETE MATHEMATICS PRESENTATION 1:FORESPEC GROUP
26/29
QUANTIFIER
Here is a (true) statement about real numbers:
Every real number is either rational or irrational
I could try to translate the statement as follows: let
b = x real number
c = x is irrational
d = x is rational
The statement can be expressed as the implication b (c V d)
but as you can see that Im cheating in making my translation:
x is a real number
Which is not uniquely specified object x. Which different from
is a real number
Which talk a specific real number
7/29/2019 UNISZA:TAF3023: DISCRETE MATHEMATICS PRESENTATION 1:FORESPEC GROUP
27/29
QUANTIFIER
So that I can useQuantifiers to translate statement like those so as tocapture this meaning. Mathematicians use two quantifier:
, the universal quantifier, which is read "for all", "for every", or "for each".
, the existential quantifier, which is read "there is" or "there exists".
7/29/2019 UNISZA:TAF3023: DISCRETE MATHEMATICS PRESENTATION 1:FORESPEC GROUP
28/29
QUANTIFIER
Eg Let mean x likes pizza. Then :
means Everyone likes pizza
means Someone likes pizza
If Someone likes pizza is true
It maytrue that everyone like pizza(by assuming the set of people is nonempty)It mustbe true that Someone likes pizza
means Not everyone likes pizza.
means No one likes pizza
Again it same as above.
7/29/2019 UNISZA:TAF3023: DISCRETE MATHEMATICS PRESENTATION 1:FORESPEC GROUP
29/29
Example Of Using Of Quantifiers In Reality
Program Verification
-proving or disproving the correctnessSystem Specification
-explain on function and description of the system
Logic Programming-execute by user
Recommended