Course Instructors: Dr. Victor T. Odumuyiwa Dr. Ufuoma C. Ogude Department of Computer Sciences University of Lagos
Course Instructors: Dr. Victor T. Odumuyiwa Dr. Ufuoma C. Ogude Department of Computer Sciences University of Lagos
Discrete Mathematics II
Course Instructors:
Dr. Victor T. Odumuyiwa
Dr. Ufuoma C. Ogude
•Lectures:
– E 304, Wednesday 10:00 am to 11:00 am
– Lab 203, Thursday 10:00 am to 12:00 am
Course Outline
We study topics in such areas as:
Sets and logic
proof techniques
discrete probability,
NP-Completeness.
Course Material
Textbook
Discrete Mathematics
and Its Applications
by Kenneth H. Rosen
Properties:
Combining relations:
, , \, composite of relations
Representing relations:
Definition:
A relation R on a set A is called reflexive if (a, a)R for
every element aA.
Are the following relations on {1, 2, 3, 4} reflexive?
R = {(1, 1), (1, 2), (2, 3), (3, 3), (4, 4)} No.
R = {(1, 1), (2, 2), (2, 3), (3, 3), (4, 4)} Yes.
Definition:
A relation on a set A is called irreflexive if (a, a)R for
every element aA.
Example (A):
Consider the following relations on {1, 2, 3, 4}
R1 = {(1,1), (1,2), (2,1), (2,2), (3,4), (4,1), (4,4)}
R2 = {(1,1), (1,2), (2,1)}
R3 = {(1,1), (1,2), (1,4), (2,1), (2,2), (3,3), (3,4), (4,1), (4,4)}
R4 = {(2,1), (3,1), (3,2), (4,1), (4,2), (4,3)}
R5 = {(1,1), (1,2), (1,3), (1,4), (2,2), (2,3), (2,4), (3,3), (3,4),
(4,4)}
R6 = {(3,4)}
R1, R2, R4 and R6: not reflexive not contain all of these
ordered pairs.
Example:
Which of the relations from Example (A) are symmetric
and which are antisymmetric?
Solution:
R2 & R3: symmetric each case (b, a) belongs to the
relation whenever (a, b) does.
For R2: only thing to check that both (1,2) & (2,1) belong
to the relation
R = {(1, 1), (1, 2), (2, 1), (3, 3), (4, 4)} symmetric
R = {(1, 1)} sym. and antisym.
R = {(1, 3), (3, 2), (2, 1)} antisym. and asym.
Example:
Are the following relations on {1, 2, 3, 4} transitive?
Solution:
R = {(1, 1), (1, 2), (2, 2), (2, 1), (3, 3)} Yes.
Definition:
Let R be a relation from a set A to a set B and S a
relation from B to a set C.
Solution:
S R is constructed using all ordered pairs in R and
ordered pairs in S, where the second element of the
ordered in R agrees with the first element of the ordered
pair in S.
For example, the ordered pairs (2,3) in R and (3,1) in S
produce the ordered pair (2,1) in S R. Computing all the
ordered pairs in the composite, we find
S R = ((1,0), (1,1), (2,1), (2,2), (3,0), (3,1)}
Power of Relations
Definition:
Let R be a relation on the set A. The powers Rn, n = 1,
2, 3, …, are defined inductively/recursively by
R1 = R
Rn+1 = RnR
In other words:
Rn = RR … R (n times the letter R)
Power of Relations
Example:
Let R={(1,1),(2,1),(3,2),(4,3)}.
Find the powers Rn, n=2,3,4,…
Example:
Let R be the relation on N * N * N consisting of triples (a, b,
c) where a, b, and c are integers with a<b<c.