Professional Documents
Culture Documents
Specifically, the Cartesian product of two sets X (for example the points on an x-axis)
and Y (for example the points on a y-axis), denoted X × Y, is the set of all possible
ordered pairs whose first component is a member of X and whose second component is a
member of Y (e.g. the whole of the x-y plane):
a) A × B
b) B × A
1 SBMA 3024/NS/Jan 09
ii. Symmetric Property: if (x, y) is in ~, then (y, x) is in ~.
1 1 0 0 1 1 0 0 1 1 0 1
R1 = 1 1 0 0 R2 = 1 0 0 0 R3 = 1 1 0 0
0 0 0 1 0 0 0 0 0 0 1 0
1 0 0 1 0 0 0 0 1 0 0 1
0 0 0 0
R4 = 1 0 0 0
1 1 0 0
1 1 1 0
1 1 1 1 0 0 0 0
R5 = 0 1 1 1 R6 = 0 0 0 0
0 0 1 1 0 0 0 1
0 0 0 1 0 0 0 0
Solution: The relations R3 and R5 are reflexive because they both contain all pairs of the
form (a, a), namely, (1, 1), (2, 2), (3, 3), and (4, 4). The other relations are not reflexive
because they do not contain all of these ordered pairs. In particular, R1, R2, R4 and R6 are
not reflexive because (3, 3) is not in any of these relations.
Solution: the relations R2 and R3 are symmetric, because in each case (b, a) belongs to the
relation whenever (a, b) does. For R2, the only thing to check is that both (2, 1) and (1, 2)
are in the relation. For R3, it is necessary to check that both (1, 2) and (2, 1) belong to the
relation, and (1, 4) and (4, 1) belong to the relation.
2 SBMA 3024/NS/Jan 09
R4, R5, and R6 are all antisymmetric. For each of these relations there is no pair of
elements a and b with a ≠ b such that both (a, b) and (b, a) belong to the relation.
Solution: R4, R5 and R6 are transitive. For each of these relations, we can show that it is
transitive by verifying that if (a,b) and (b,c) belong to this relation, then (a, c) also does.
For instance, R4 is transitive, because (3,2) and (2,1), (4,2) and (2,1), (4,3) and (3,1), and
(4,3) and (3,2) are the only such sets of pairs, and (3,1), (4,1) and(4,2) belong to R4.
R1 is not transitive since (3, 4) and (4, 1) belong to R1, but (3, 1) does not. R2 is not
transitive since (2, 1) and (1, 2) belong to R2, but (2, 2) does not. R3 is not transitive since
(4, 1) and (1, 2) belong to R3, but (4, 2) does not.
Both the less-than relation and the less-than-or-equal-to relation are transitive.
a) is an equivalence relation.
A has the same birthday as B, then B has the same birthday as A. (symmetric)
A has the same birthday as B, B has the same birthday as C, then A has the same
birthday as C. (Transitive)
3 SBMA 3024/NS/Jan 09
c) is not an equivalence relation, because although it is reflexive and transitive, it is not
symmetric. E.g. 7≥ 5 does not imply that 5 ≥ 7
1 0 1 0
1 1 1 0
e) R = 0 0 1 0 not symmetric
0 0 0 0
1 0 0
f) R = 0 1 0 is an equivalent relation
0 0 1
3.3 Functions
A function is a special relation that has a rule which operates on an input and produces a
single output from that input.
function
Let A and B be two nonempty sets. A function, f is a rule that assigns to each element a
in set A exactly one element called f(a) in set B.
4 SBMA 3024/NS/Jan 09
Domain A B Codomain
f
• •
•
• •
•
• • •
• •
Range ( f ( A) )
Examples:
1.
5 SBMA 3024/NS/Jan 09
Each element of the domain that has a pair in the range is
nicely well-behaved. But what about that 16? It is in the
domain, but it has no range element that corresponds to it!
So then this is not a function.
2. State the domain and range of the following relation. Is the relation a function?
(a) {(2, –3), (4, 6), (3, –1), (6, 6), (2, 3)}
Domain = { 2, 4, 3, 6}
Range = {− 3, 6, −1, 3}
(b) {(–3, 5), (–2, 5), (–1, 5), (0, 5), (1, 5), (2, 5)}
Looking at this function stuff graphically, what if we had the relation that consists of a set
containing just two points: {(2, 3), (2, –2)}? We already know that this is not a function,
since x = 2 goes to each of y = 3 and y = –2.
6 SBMA 3024/NS/Jan 09
Notice that you can draw a vertical line
through the two points, like this:
Given the graph of a relation, if you can draw a vertical line that crosses the graph in
more than one place, then the relation is not a function. Here are a couple examples:
In mathematics and computer science, the floor and ceiling functions map a real number
to the next smallest or next largest integer. More precisely, floor(x) is the largest integer
not greater than x and ceiling(x) is the smallest integer not less than x.
Definitions
7 SBMA 3024/NS/Jan 09
Solve:
a) 22.3
b) 22.3
c) 1.999
d) 1.999
e) e
f) π
Solution:
a) 22 .3 = 22
b) 22 .3 = 23
c) 1.999 =1
d) 1.999 = 2
e) e = 2.71828 .... = 2
f) π = 3.14159 ... = 4
Examples:
a) └2.7┘
└2.7┘= 2
b) ┌2.7┐
┌2.7┐= 3
c) ┌-0.01┐
┌-0.01┐= 0
8 SBMA 3024/NS/Jan 09
d) └-0.01┘
└-0.01┘= ̶ 1
e) └2∏┘
└2∏┘= └6.283…┘= 6
f) 2└∏┘
2└∏┘= 2└3.14159…┘ = 2 ×3 = 6
g) ┌-7┐
┌-7┐ = ̶ 6
A relation on a set S is merely a subset of S×S. For example, the relation < on the set {1,2,3}
can be identified as {(1,2), (1,3), (2,3)}, the set of all (a, b) with a < b.
A relation is transitive if, whenever it has both (a, b) and (b, c), it also has (a, c).
For the last week I've been trying to find a good way to calculate the number of transitive
relations on a set with three elements.
There are 13 transitive relations on a set with 2 elements. This is easy to see. There are 16
relations in all. The only way a relation can fail to be transitive is to contain both (1, 2) and (2,
1). There are clearly four such relations. Of these four, the only one that is transitive has (1,
1) and (2, 2) also. Similarly it's quite easy to see that there are only 2 relations on a 1-
element set, and both are transitive.
9 SBMA 3024/NS/Jan 09