|
|
Definition 5.1 (Cartesian Product)
A and
the second member of the ordered pair
B is called
the Cartesian Product. Accordingly:
A × B = { (x,y) | x
A and y
B }
are sets.
The set of all n-tuples
with
, 1
i
n,
is denoted by
We write:
= { (
|
, 1
i
n }
Examples:
Definition 5.2 (Relation)
A and y
B.
If (x,y)
R we say x is R-related to y.
To express that R is a relation from A to B we write
R: A
B
Shorthand:
(x,y)
R
xRy
Examples:
Nat and x )< y
2
A relation C can now be defined as a list of pairs (x,y) where x is a supplier and y is a product.
C = { (S1, P1) , (S1, P3), (S2, P2), (S2, P3) }
Relation in tabular form:
+---+----+----+----+
| | P1 | P2 | P3 |
+---+----+----+----+
|S1 | 1 | 0 | 1 |
+---+----+----+----+
|S2 | 0 | 1 | 1 |
+---+----+----+----+
A graphically representation of the relation
board
|
|
Last modified: 27/July/98 (12:14)