Sie sind auf Seite 1von 9

Chapter 3: Relations and Functions

3.1 Cartesian Products and Relations


A relation is a correspondence between two sets. If x and y are two elements in these
sets and if a relation exists between x and y, then we say that x corresponds to y or that y
depends on x, and we write x → y . We may also write x → y the ordered pair (x, y).

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):

Note: A relation is just a subset of the Cartesian product.

Example 1: Given that A = {2,4,6} and B ={a, b} . Find

a) A × B
b) B × A

+ and x3 < 1 0 }0. Find R ×Q .


Example 2: Given that Q = {α, β} and
R = {x | x ∈ Z
3.2 Equivalence Relation

Let X be a set and let x, y, and z be elements of X. An equivalence relation, ~, on X is a


relation on X such that:

Three properties of equivalence relation as follows:

i. Reflexive Property: (x, x) is in ~ for all x in X.

1 SBMA 3024/NS/Jan 09
ii. Symmetric Property: if (x, y) is in ~, then (y, x) is in ~.

iii. Transitive Property: if (x, y) and (y, z) are in ~, then (x, z) is in ~.

A relation that is reflexive, symmetric and transitive on a set X is called an equivalence


relation on X.

Example: 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) , ( 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)}

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

Which of these relations are reflexive?

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.

Which of the relations are symmetric and which are antisymmetric?

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.

Which of the relations are transitive?

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.

A relation R on a set A is called transi

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.

Examples: Which of the following are equivalence relation?

a) "Has the same birthday as" on the set of all people.


b) "Has the same image under a function" on the elements of the domain of the
function.
c) The relation "≥" between real numbers.
d) The relation "has a common factor greater than 1 with" between natural numbers
greater than 1.
e) A= {1,2,3} and R={(1,1), (2,1),(2,3),(1,3),(2,2), (3,3)}
f) A= {a,b,c} and R={(a,a), (b,b),(c,c)}

a) is an equivalence relation.

A has the same birthday as A. (Reflexivity)

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)

b) is an equivalence relation. For example, {(1,1), (2,2), (3,3)}

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

d) is not an equivalence relation, because although it is reflexive and symmetric, it is not


transitive (2 and 6 have a common factor, and 6 and 3 have a common factor, but 2
and 3 do not have a common factor)

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

input Rule output

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.

This is a function. You can tell by tracing from each x to


each y. There is only one y for each x; there is only one
arrow coming from each x.

This is a function. There is only one arrow coming from


each x; there is only one y for each x. It just so happens
that it's always the same y for each x, but it is only that one
y. So this is a function; it's just an extremely boring function!

This one is not a function: there are two arrows coming


from the number 1; the number 1 is associated with two
different range elements. So this is a relation, but it is not a
function.

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}

Not a function since 2 gets sent to more than one value.

(b) {(–3, 5), (–2, 5), (–1, 5), (0, 5), (1, 5), (2, 5)}

Yes. Each element of the domain is assigned exactly one element of


the range.

The "Vertical Line Test"

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.

If we graph this relation, it looks like:

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:

This graph shows a function, because


there is no vertical line that will cross
this graph twice.

This graph does not show a function,


because any number of vertical lines
will intersect this oval twice. For
instance, the y-axis intersects (crosses)
the line twice.

3.4 Floor and ceiling functions

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

Floor and ceiling may be defined by the set equations

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.

**With explanation of pdf 34[1] note last slides

9 SBMA 3024/NS/Jan 09

Das könnte Ihnen auch gefallen