Discrete Structures - Lecture 3
Discrete Structures - Lecture 3
LECTURE 3
Conditional Statements, Bit
Operations & Fuzzy Logic
Course Instructor:
1 Rida Memon
Recap
2
Conditional Statement
4
Translation Summary
of p → q
5
Translation of p → q
p: You will attend the classes.
q: You will be allowed to participate in the exams.
If p, then q.
If you will attend the classes, then you will be allowed to participate in
the exams.
6
Translation of p → q
p: You will attend the classes.
q: You will be allowed to participate in the exams.
If p, q.
If you will attend the classes, you will be allowed to participate in the
exams.
7
Translation of p → q
p: You will attend the classes.
q: You will be allowed to participate in the exams.
q, if p.
You will be allowed to participate in the exams if you will attend the
classes.
8
Translation of p → q
p: You will attend the classes.
q: You will be allowed to participate in the exams.
q when p.
You will be allowed to participate in the exams when you will attend the
classes.
9
Translation of p → q
p: You will attend the classes.
q: You will be allowed to participate in the exams.
q whenever p.
You will be allowed to participate in the exams whenever you will attend
the classes.
10
Translation of p → q
p: You will attend the classes.
q: You will be allowed to participate in the exams.
q follows from p.
p implies q.
You will attend the classes implies that you will be allowed to participate
in the exams.
12
Translation of p → q
p: You will attend the classes.
q: You will be allowed to participate in the exams.
If p, then q.
If you will attend the classes, then you will be allowed to participate in
the exams.
13
Translation of p → q
p: You will attend the classes.
q: You will be allowed to participate in the exams.
p is sufficient for q.
You will attend the classes is sufficient to allow you to participate in the
exams.
14
Translation of p → q
p: You will attend the classes.
q: You will be allowed to participate in the exams.
q is necessary for p.
To allow you to participate in the exams is necessary for you to attend the
classes.
16
Translation of p → q
p: You will attend the classes.
q: You will be allowed to participate in the exams.
p only if q.
You will attend the classes only if you will be allowed to participate in the
exams.
18
Translation of p → q
p: You will attend the classes.
q: You will be allowed to participate in the exams.
q unless ~p.
You will be allowed to participate in the exams unless you don’t attend
the classes.
19
Remarks
20
BICONDITIONAL STATEMENTS
21
Truth Table
22
BICONDITIONAL STATEMENT
It is the conjunction of
p → q and q → p
i.e. (p → q) ^ (q → p)
T T T T T
T F F T F
F T T F F
F F T T T
23
Bit Operations
25
Example
26
Example 1:
The truth value of the negation of a proposition in fuzzy
logic is 1 minus the truth value of the proposition. What are
the truth values of the statements “Fred is not happy” and
“John is not happy?”
27
Example 2:
The truth value of the conjunction of two propositions in
fuzzy logic is the minimum of the truth values of the two
propositions. What are the truth values of the statements
“Fred and John are happy” and “Neither Fred nor John is
happy?”
For “Fred and John are happy” the truth value is min(0.8, 0.4) = 0.4.
For 'Neither Fred nor John is happy?," the truth value is min(0.2, 0.6) = 0.2
28
Example 3:
The truth value of the disjunction of two propositions in
fuzzy logic is the maximum of the truth values of the two
propositions. What are the truth values of the statements
“Fred is happy, or John is happy” and “Fred is not happy,
or John is not happy?”
29
Thanks
End of Lecture
Q/A
30
Next Lecture
Converse
Contrapositive
Inverse
Simplification of Complex Propositions
Examples
31
Practice Questions
Chapter 1, Section 1.1
Problems (21 – 26),(36 – 47)
32
Practice Questions
33
Practice Questions
34
Reading Assignment
Chapter 1
Page 11 to 16
35
Thanks
End of Lecture
Q/A
36