EppDM5e 08 01
EppDM5e 08 01
EppDM5e 08 01
PROPERTIES OF RELATIONS
3
Example 8.1.1 – Solution
a. No, 57 > 53. b. Yes, −17 < −14.
c. No, 143 = 143. d. Yes, −35 < 1.
e. For each value of x, all the points (x, y) with y > x are on
the graph. So the graph consists of all the points above
the line x = y.
4
Example 8.1.2 – The Congruence Modulo 2 Relation
a. Is 4 E 0? Is 2 E 6? Is 3 E (−3)? Is 5 E 2?
b. List five integers that are related by E to 1.
c. Prove that if n is any odd integer, then n E 1.
5
Example 8.1.2 – Solution (1/4)
a. Yes, 4 E 0 because 4 − 0 = 4 and 4 is even.
6
Example 8.1.2 – Solution (2/4) continued
1 because 1 − 1 = 0 is even.
3 because 3 − 1 = 2 is even.
5 because 5 − 1 = 4 is even.
−1 because −1 − 1 = −2 is even.
−3 because −3 − 1 = −4 is even.
7
Example 8.1.2 – Solution (3/4) continued
But by substitution,
n − 1 = (2k + 1) − 1 = 2k,
8
Example 8.1.2 – Solution (4/4) continued
9
Example 8.1.3 – A Relation on a Power Set
10
Example 8.1.3 – Solution
a. Yes, both sets have two elements.
b. Yes, {a} has one element and has zero elements, and
1 ≥ 0.
11
The Inverse of a Relation
12
The Inverse of a Relation (1/1)
If R is a relation from A to B, then a relation from B to A
can be defined by interchanging the elements of all the
ordered pairs of R.
13
Example 8.1.4 – The Inverse of a Finite Relation
b. Describe in words.
14
Example 8.1.4 – Solution (1/3)
a. R = {(2, 2), (2, 6), (2, 8), (3, 6), (4, 8)}
15
Example 8.1.4 – Solution (2/3) continued
16
Example 8.1.4 – Solution (3/3) continued
y x ⇔ y is a multiple of x.
17
Example 8.1.5 – The Inverse of an Infinite Relation
18
Example 8.1.5 – Solution (1/2)
A point (v, u) is on the graph of if, and only if, (u, v) is on
the graph of R.
19
Example 8.1.5 – Solution (2/2) continued
21
Directed Graph of a Relation (1/2)
22
Directed Graph of a Relation (2/2)
As with an ordinary arrow diagram,
23
Example 8.1.6 – Directed Graph of a Relation
24
Example 8.1.6 – Solution (1/2)
Note that 3 R 3 because 3 − 3 = 0 and since 0 = 2 · 0.
Thus there is a loop from 3 to itself. Similarly, there is a loop
from 4 to itself, from 5 to itself, and so forth, since the
difference of each integer with itself is 0, and
25
Example 8.1.6 – Solution (2/2) continued
26
N-ary Relations and Relational
Databases
27
N-ary Relations and Relational Databases (1/1)
28
Example 8.1.7 – A Simple Database (1/6)
29
Example 8.1.7 – A Simple Database (2/6)
30
Example 8.1.7 – A Simple Database (3/6)
31
Example 8.1.7 – A Simple Database (4/6)
32
Example 8.1.7 – A Simple Database (5/6)
33
Example 8.1.7 – A Simple Database (6/6)
34