• No results found

Equivalence Relations

In document Discrete Maths (Page 32-46)

A relation R on a set a is called an equivalence relation if it is reflexive, symmetric, and transitive.

EXAMPLE 1

Let A be the set of triangles in the plane and let R be the relation on A defined as follows:

R = { (a, b) ∈ A X A [ a is congruent to b }.

It is easy to see that R is an equivalence relation.

EXAMPLE 2

Let A = {1, 2, 3, 4 } and let

R = { (1, 1), (1, 2), (2, 1) (2, 2), (3, 4), (4, 3), (3, 3), (4, 4) }.

It is easy to verify that R is an equivalence relation.

EXAMPLE 3

Let A = Z, the set of integers, and let R be defined by a R b if and only if a b ≤ b. Is R an equivalence relation?

Solution

Since a ≤ a, R is reflexive. If a ≤ b, it need not follow that b ≤ a, so R is not symmetric.

Incidentally, R is transitive, since a ≤ b and b ≤ c imply that a ≤ c. We see that R is not an equivalence relation.

EXAMPLE 4

Let A = Z and let

R = { (a, b) ∈ A X A [ a and b yield the same remainder when divided by 2 ].

In this case, we call 2 the modulus and write a ≡ b (mod 2), read “ a is congruent to b mod 2.”

Show that congruence mod 2 is an equivalence relation.

Solution

First, clearly a ≡ a (mod 2). Thus R is reflexive.

Second, if a ≡ b (mod 2), then a and b yield the same remainder when divided by 2, so b ≡ a (mod 2). R is symmetric.

Finally, suppose that a ≡ b (mod 2) and b ≡ c (mod 2). Then a, b, and c yield the same remainder when divided by 2. Thus, a ≡ c (mod 2). Hence congruence mod 2 is an equivalence relation.

EXAMPLE 5

Let A = Z and let n ∈ Z+. We generalize the relation defined in Example 4 as follows. Let R = { (a, b) ∈ A X A ] a ≡ b (mod n) }

That is, a ≡ b (mod n) if and only if a and b yield the same remainder when divided by n.

Proceeding exactly as in Example 4, we can show that congruence mod n is equivalence relation.

We note that if a ≡ b (mod n), then a = qn + r and b = tn + r and a – b is a multiple of n. This, a ≡ b (mod n) if and only if n \ (a – b ).

Partitions on set

Partition or quotient set of a non empty set A in a collection of D of non empty sub set of a such that

1) Each element in a belongs to one of the set in partition D.

2) If A1 and A2 are distinct elements of p then A1 ∩ A2 = ∅ eg:

A1

A4

A2 A3 A5

P = { A1, A2, A3, A4, A5 }

Where each one A1, A2 . . . . A5 are individual set.

Eg : 1

Let A = { 1, 2, 3, 4, 5, 6 }

A1 = {1, 3 } A2 = { 2, 5, 6 }, A3 = { 4 } Her P = { A1, A2, A3 }

Equivalence Relation and Partitions

The following result shows that if P is a partition of a set A then P can be used to construct an equivalence relation on A.

Theorem 1

Let P be a partition of a set A. Recall that the sets in P are called the blocks of P. Define the relation R on A as follows:

a R b if and only if a and b are members of the same block.

Then R is an equivalence relation on A.

Proof

(a) If a ∈ A, then clearly a is in the same block as itself, so a R a.

(b) If a R b, then a and b are in the same block; so b R a.

(c) If a R b and b R c, then a, b, and c must all lie in the same block of P. Thus a R c.

Since R s reflexive, symmetric, and transitive, R is an equivalence relation. R will be called the equivalence relation determined by P.

EXAMPLE 6

Let A = { 1, 2, 3, 4 } and consider the partition P = { ( 1, 2, 3), (4) } of A. Find the equivalence relation R on A determined by P.

Solution

The blocks of P are { 1, 2, 3 } and { 4 }. Each element in a block is related to every other element in the same block and only to those elements. Thus, in this case,

R = { ( 1, 1), ( 1, 2), ( 1, 3), ( 2, 1), ( 2, 2), ( 2, 3), ( 3, 1), ( 3, 2), ( 3, 3), ( 4, 4).

If P is a partition of A and R is the equivalence relation determined by P, then the blocks of P can easily be described in terms of R. If A1 is a block of P and a ∈ A; We see by definition that A1

consists of all elements X of A with a R x. That is, A1 = R (a). Thus the partition P is { R (a) \ a ∈ A }. In words, P consists of all distinct R – relative sets that arise from elements of A. For instance, in Example 6 the blocks { 1, 2, 3 } and { 4 } can be described, respectively, as R (1) and R (4). Of course, { 1, 2, 3 } could also be described as R (2) or R (3), so this way of representing the blocks is not unique.

The foregoing construction of equivalence relations from partitions is very simple. We might be tempted to believe that few equivalence relations could be produced in this way. The fact is, as we will now show, that all equivalence relations on A can be produced from partitions.

Lemma 1

Let R be an equivalence relation on a set A, and let a ∈ A and b ∈ A. Then a R b if and only if R (a) = R (b).

Proof

First suppose that R (a) = R (b). Since R is reflexive, b ∈ R (b); therefore, b ∈ R (a), so a R b.

-

• A lemma is a theorem whose main purpose is to aid in proving some other theorem.

Conversely, suppose that a R b. Then note that

1. b ∈ R (a) by definition. Therefore, since R is symmetric, 2. a ∈ R (b), by Theorem 2 (b) of Section 9

We must show that R (a) = R (b). First, choose an element x ∈ R (b). Since R is transitive, the fact that x ∈ R (b), together with (1), implies by Theorem 2 (c) of Section 4.4 that x ∈ R (a). Thus R (b) ⊆ R (a). Now choose y ∈ R (a). This fact and (2) imply, as before, that y ∈ R (b). Thus R (a)

⊆ R (b), so we must have R (a) = R (b).

Note the two – part structure of the lemma’s proof. Because we want to prove a biconditional, p

⇔ q, we must show q ⇒ p as well as p ⇒ q.

We now prove our main result.

Theorem 2

Let R be an equivalence relation on A, and let P be the collection of all distinct relative sets R (a) for a in A. Then P is a partition of A, and R is the equivalence relation determined by P.

Proof

According to the definition of a partition, we must show the following two properties:

(a) Every element of A belongs to some relative set.

(b) If R (a) and R (b) are not identical, then R (a) ∩ R (b) = ∅.

Now property (a) is true, since a ∈ R (a) by reflexivity of R. To show property (b) we prove the following equivalent statement:

If R (a) ∩ R (b) ≠ ∅, then R (a) = R (b).

To prove this, we assume that c ∈ R (a) ∩ R (b). Then a R c and b R c.

Since R is symmetric, we have c R b. Then a R c and c R b, o, by transitivity of R, a R b. Lemma 1 then tells us that R (a) = R (b). We have now proved that P is a partition. By Lemma 1 we see that a R b if and only if a and b belong to the same block of P. Thus P determines R, and the theorem is proved.

Note the use of the contrapositive in this proof.

If R is an equivalence relation on A, then the sets R (a) are traditionally called equivalence classes of R. Some authors denote the class R (a) by [a].

The partition P constructed in Theorem 2 therefore consists of all equivalence cases of R, and this partition will be denoted by A / R. Recall that partitions of A are also called quotient sets of A, and the notation A / R reminds us that P is the quotient set of A that is constructed form and determines R.

EXAMPLE 7

Let R be the relation defined in Example 2. Determine A / R.

Solution

From Example 2 we have R (1) = { 1, 2 } = R (2). Also, R (3) = { 3, 4 } = R (4).

Hence A / R = { { 1, 2 }, { 3, 4 } }.

EXAMPLE 8

Let R be the equivalence relation define in Example 4 Determine A / R.

Solution : -

Let R(0) = {. . . . .-4 , -2, 0, 2, 4 . . . . } the set of even integers since reminder is zero when this member divided by 2

R (1) = . . . ., -5, -3, -1, 1, 1, 3, 5, 7 . . . . }, the set of odd integers, since each gives a remainder of 1 when divided by 2. Hence A / R consists of the set of even integers and the set of odd integers.

From Examples 7 and 8 we can extract a general procedure for determining partition A / R for A finite or countable. The procedure is as follows:

Step 1: Choose any element of A and compute the equivalence class R (a).

Step 2: If R (a) ≠ A, choose an element b, not included in R (a), and compute the equivalence class R (b).

Step 3: If A is not the union of previously computed equivalence classes, then choose an element x of A that is not in any of those equivalence classes and compute R (x).

Step 4: Repeat step 3 until all elements of A are included in the computed equivalence classes. If A is countable, this process could continue indefinitely. In that case, continue until a pattern emerges that allows you to describe or give a formula for all equivalence classes.

4.5 Exercises

Operations on Relations

Now that we have investigated the classification of relations by properties they do or do not have, we next define some operations on relations.

Let R and S be relations from a set A to a set B. Then, if we remember that R and S are simply subsets of A X B, we can use set operations on R and S. For example, the complement of R, R, is referred to as the complementary relation. It is, of course, a relation from A to B that can be expressed simply in terms of R:

a R b if and only if a R b.

We can also form the intersection R ∩ S and the union R ∪ S of the relations R and S. In relational terms, we see that a R ∩ S b means that a R b and a S b. All our set-theoretic operations can be used in this way to produce new relations.

A different type of operation on a relation R from A to B is the formation of the inverse, usually written R-1. The relation R –1 is a relation from B to A (reverse order form R) defined by

b R-1 a if and only if a R b.

It is clear from this that (R-1)-1 = R. It is not hard to see that Dom (R-1) = Ran (R) and Ran (R-1) = Dom (R). We leave these simple facts for the reader to check.

EXAMPLE 1

Let A = { 1, 2, 3, 4 } and B = {a, b, c } Let

R = { (1, a), (1, b), (2, b), (2, c), (3, b), (4, a) } And

S = { (1, b), (2, c), (3, b), (4, b) }

Compute (a) R; (b) R ∩ S; c) R ∪ S; and (d) R-1 Solution

a) We first find

A X B = { (1, a), (1, b), (1, c), (2, a), (2, b), (2, c), (3, a), (3, b), (3, c), (4, a), (4, b), (4, c) }.

Then the complement of R in A X B is R = { (1, c), (2, a), (3, a), (3, c), (4, b), (4, c) }.

(b) We have R ∩ S = { (1, b), (3, b), (2, c) } (c) We have

R ∪ S = { (1, a), (1, b), (2, b), (2, c), (3, b), (4, a), (4, b) }.

(d) Since (x, y) ∈ R-1 if and only if (y, x ) ∈ R, we have

R-1 = { ( a, 1), ( b, 1), ( b, 2), ( c, 2), ( b, 3), ( a, 4) } EXAMPLE 2

Let A = R. Let R be the relation ≤ on A and let S be ≥. Then the complement of R is the relation >, Since a ≤ b means that a > b. Similarly, the complement of S is <. On the other hand, R-1 = S, since for any numbers a and b.

A R-1 b if and only if b R a if and only if b ≤ a if and only if a ≥ b. Similarly, we have S -1 = R. Also, we note that R ∩ S is the relation of equality, since a (R ∩ S) b if and only if a ≤ b and a ≥ b if and only if a = b. Since, for any a and b, a ≤ b or a ≥ b must hold, we see that R ∪ S = A X A; that is, R ∪ S is the universal relation in which any a is related to any b.

EXAMPLE 3

Let A = { a, b, c, d, e } and let R and S be two relations on A whose corresponding digraphs are shown in Figure. Then the reader can verify the following facts.

R = { (a, a), (b, b), (a, c), (b, a) (c, b), (c, d), (c, e), (c, a), (d, b), (d, a), (d, e), (e, b), (e, a), (e, d), (e, c) }

R-1 = { (b, a), (e, b), (c, c), (c, d), (d, d), (d, b), (c, b), (d, a), (e, e), (e, a) } R ∩ S = { (a, b), (b, e), (c, c) }.

Figure 7 EXAMPLE 4

Let A = { 1, 2, 3 } and let R and S be relations on A. Suppose that the matrices of R and S are

1 0 1 0 1 1

MR = 0 1 1 and MS = 1 1 0

0 0 0 0 1 0

Then we can verify that

0 1 0 1 0 0

MR = 1 0 0 MR

-1 = 0 1 0

1 1 1 1 1 0

0 0 1 1 1 1

a b

c c

b a

e d e d

MR ∩ S = 0 1 0 M R ∪ S = 1 1 1

0 0 0 0 1 0

Example 4 illustrates some general facts. Recalling the operations on Boolean matrices that if R and S are relations on set A, then

M R ∩ S = MR ∧ Ms M R ∪ S = M R MS M R

-1 = (M R) T.

Moreover, if M is a Boolean matrix, we define the complement M of M as the matrix obtained from M by replacing every 1 in M by a 0 and every 0 by a 1. Thus, if

1 0 0

M = 0 1 1

1 0 0

then

0 1 1

M = 1 0 0

0 1 1

We can also show that if R is a relation on a set A, then MR = MR.

We know that a symmetric relation is a relation R such that MR = (MR) T, and since (MR)T = MR-1, we see that R is symmetric if and only if R = R-1.

We now prove a few useful properties about combinations of relations.

Theorem 1

Suppose that R and S are relations from A to B.

(a) If R ⊆ S, then R-1 ⊆ S-1. (b) If R ⊆ S, then S ⊆ R.

(c) (R ∩ S) –1 = R-1 ∩ S -1 and (R ∪ S) –1 = R –1 ∪ S -1. (d) R ∩ S = R ∪ S and R ∪ S = R ∩ S.

Proof

Parts (b) and (d) are special cases of general set properties we now prove part (a). Suppose that R ⊆ S and let (a, b) ∈ R -1. Then (b, a) ∈ R, so (b, a) ∈ S. This, in turn, implies that (a, b) ∈ S –1. Since each element of R-1 is in S – 1, we are done.

We next prove part (c). For the first part, suppose that (a, b) ∈ (R ∩ S)-1. Then (b, a) ∈ R ∩ S, so (b, a) ∈ R and (b, a) ∈ S. This means that (a, b) ∈ R-1 and ( a, b) ∈ S -1, so (a, b) ∈ R-1 ∩ S -1. The converse containment can be proved by reversing the steps. A similar argument works to show that (R ∪ S)-1 = R-1 ∪ S-1

The relations R and R-1 can be used to check if R has the properties of relations that we presented in Section for instance, we saw earlier that R is symmetric if and only if R = R – 1. Here are some other connections between operations on relations and properties of relations.

Theorem 2

Let R and S be relations on a set A.

(a) If R is reflexive, so is R-1.

(b) If R and S are reflexive, then so are R ∩ s and R ∪ S.

(c) R is reflexive if and only if R is irreflexive.

Proof

Let ∆ be the equality relation on A. We know that R is reflexive if and only it ∆ ⊆ R. clearly, ∆ = ∆

-1, so if ∆ ⊆ R, then ∆ = ∆-1 ⊆ R-1 by Theorem 1, so R-1 is also reflexive. This proves part (a). To prove part (b), we note that if ∆ ⊆ R and ∆ ⊆ S, then ∆ ⊆ R ∩ S and ∆ ⊆ R ∪ S. To show part (c), we note that a relation S is irreflexive if and only if S ∩ ∆ = ∅. Then R is reflexive if and only if ∆ ⊆ R if and only if ∆ ∩ R = ∅ if and only if R is irreflexive.

EXAMPLE 5

Let A = { 1, 2, 3 } and consider the two reflexive relations R = { (1, 1), (1, 2), (1, 3), (2, 2), (3, 3) } And

S = { (1, 1), (1, 2), (2, 2), (3, 2), (3, 3) }.

Then

(a) R-1 = { (1,1), (2, 1), (3, 1), (2, 2), (3, 3) }; R and R-1 are both reflexive.

(b) R = { (2, 1), (2, 3), (3, 1), (3, 2) } is irreflexive while R is reflexive.

(c) R ∩ S = { (1, 1), (1, 2), (2, 2), (3, 3) and R ∪ S = { (1, 1), (1, 2), (1, 3), (2, 2), (3, 2), (3, 3) } are both reflexive.

Theorem 3

Let R be a relation on a set A. Then

(a) R is symmetric if and only if R = R-1.

(b) R is antisymmetric if and only if R ∩ R-1 ⊆ ∆.

(c) R is asymmetric if and only if R ∩ R-1 = ∅.

Theorem 4

Let R and S be relations on A.

(a) If R is symmetric, so are R-1 and R.

(b) If R and S are symmetric, so are R ∩ S and R ∪ S.

Proof

If R is symmetric, R = R-1 and thus (R-1)-1 = R = R-1,which means that R-1 is also symmetric. Also, (a, b) ∈ (R)-1 if and only if (b, a) ∈ R if and only if (b, a) ∉ R if and only if (a, b) ∉ R-1 = R if and only if (a, b) ∈ R, so R is symmetric and part (a) is proved. The proof of part (b) follows immediately from Theorem 1(c).

EXAMPLE 6

Let A = { 1, 2, 3 } and consider the symmetric relations R = { (1,1), (1, 2), (2, 1), (1, 3), (3, 1) }

And

S = { (1, 1), (1, 2), (2, 1), (2, 2), (3, 3) }.

Then

(a) R-1 = {(1,1), (2,1), (1, 2), (3,1), (1, 3) } and R = { (2, 2), (2, 3), (3, 2), (3, 3) }; R-1 and R are symmetric.

(b) R ∩ S = { (1,1), (1, 2), (2,1) } and R ∪ S = { (1,1), (1, 2), (1, 3), (2,1), (2, 2), (3,1), (3, 3) }, which are both symmetric.

Theorem 5

Let R and S be relations on A.

(a) (R ∩ S)2 ⊆ R2 ∩ S2.

(b) If R and S are transitive, so is R ∩ S.

(c) If R and S are equivalence relations, so is R ∩ S.

Proof

We prove part (a) geometrically. We have a (R ∩ S)2 b if and only if there is a path of length 2 from a to b in R ∩ S. Both edges of this path lie in R and in S, so a R2 b and a S2 b, which implies that a (R2 ∩ S2) b. To show part (b), recall from Section 4.4 that a relation T is transitive if and only if T2 ⊆ T. If R and S are transitive, then R2 ⊆ R, S2 ⊆ S, so (R ∩ S)2 R2 ∩ S2 [by part (a) ] ⊆ R ∩ S, so R ∩ S is transitive. We next prove part (c). Relations R and S are each reflexive, symmetric, and transitive. The same properties hold for R ∩ S from Theorems 2(b), 4(b), and 5(b), respectively. Hence R ∩ S is an equivalence relation.

EXAMPLE 7

Let R and S be equivalence relations on a finite set A, and let A / R and A/s be the corresponding partitions (see Section 4.5). Since R ∩ S is an equivalence relation, it corresponds to a partition A / (R ∩ S). We now describe A / (R ∩ S) in terms of A / R and A / S. Let W be a block of A / (R ∩

S) and suppose that a and b belong to W. Then a (R ∩ S) b, so a R b and a s b. Thus a and b properties discussed in Section 4.4, especially reflexivity, symmetry, and transitivity. If R does not possess a particular property, we may wish to add pain to R until we get a relation that does have the required property. Naturally, we want to add as few new pairs as possible, so what we need to find is the smallest relation R1 on A that contains R and possesses the property we desire.

Sometimes R1 does not exist. If a relation such as R1 does exist, we call it the closure of R with respect to the property in question.

EXAMPLE 8

Suppose that R is a relation on a set A, and R is not reflexive. This can only occur because some pairs of the diagonal relation ∆ are not in R. Thus R1 ∪ = R ∆ is the smallest reflexive relation on A containing R; that is, the reflexive closure of R is R ∪∆.

EXAMPLE 9

Suppose now that R is a relation on A that is not symmetric. Then there must exist pairs (x, y) in R such that (y, x) is not in R. Of course, ( y, x) ∈ R-1, so if R is to be symmetric we must add all pairs from R-1; that is, we must enlarge R to R ∪ R-1. Clearly, (R ∪ R-1)-1 = R ∪ R-1, so R ∪ R-1 the smallest symmetric relation containing R; that is, R ∪ R-1 is the symmetric closure of R.

If A = { a, b, c, d } and R = { (a, b), (b, c), (a, c), (c, d)}, then R-1 = \ (b, a), (c, b), (c, a), (d, c) }, so the symmetric closure of R is

R ∪ R-1 = { (a, b), (b, a), (b, c), (c, b), (a, c), (c, a), (c, d), (d, c) }.

The symmetric closure of a relation R is very easy to visualize geometrically. All edges in the digraph of R become “two-way streets” in R ∪ R-1. Thus the graph of the symmetric closure of R is simply the digraph of R with all edges made bi-directional. We show in Figure 8 (a) the digraph of the relation R of Example 9. Figure (b)shows the graph of the symmetric closure R ∪ R-1.

b

(a) R (b) R ∪ R-1

The transitive closure of a relation R is the smallest transitive relation containing R. We will discuss the transitive closure in the next section.

Composition

Now suppose that A, B,. and C are sets, R is a relation from A to B, and S is a relation from B to C. We can then define a new relation, the composition of R and S, written S ° R. The relation S ° R is a relation from A to C and is defined as follows. If a is in A and C is in C, then a (S ° R) c if and only if for some b in B, we have a R b and b s c. In other words, a is related to c by S ° R if we can get from a to c in two stages: first to an intermediate vertex b by relation R and then from b to c by relation S. The relation S ° R might be thought of as “S following R” since it represents the combined effect of two relations, first R, then S.

EXAMPLE 10

Let A = {1, 2, 3, 4 }, R = { (1, 2), (1,1), (1, 3), (2, 4), (3, 2) }, and S = { (1, 4), (1, 3), (2, 3),(3, 1),(4, 1) }. Since (1, 2) ∈ R and (2, 3) ∈ S, we must have (1, 3) ∈ S ° R. Similarly, since (1, 1) ∈ R and (1, 4) ∈ S, we see that (1, 4) ∈ S ° R. Proceeding in this way, we find that S ° R = { (1, 4), (1, 3), (1, 1), (2, 1), (3, 3) }.

The following result shows how to compute relative sets for the composition of two relations.

Theorem 7

Let R be a relation from A to B and let S be a relation from B to C. Then, if A1 is any subset of A, we have

(S ° R) (A1) = S (R (A1) ). (1) Proof

If an element z ∈ C is in (S ° R) (A1), then x (S ° R) for some x in A1. By the definition of compositions, this means that x R y and y S z for some y in B. Thus y ∈ R (x), so z ∈ S(R (x)).

Since (x) ⊆ A1, Theorem 1 (a) of Section 4 tells us that S (R (x) ) ⊆ S (R (A1) ). Hence z ∈ S (R (A1) ), so (S ° R) (A1) S (R (A1) ).

Conversely , suppose that z ∈ S (R (A1) ). Then z ∈ S (y) for some y in R (A1) and, similarly, y ∈ R(x) for some x in A1. This means that x R y and y s z, so x (S ° R ) z. Thus z ∈ (S ° R) (A1), so S (R (A1) ) (S ° R) (A1). This proves the theorem.

EXAMPLE 11

Let A = {a, b, c } and let R and S be relations on A whose matrices are

1 0 1 1 0 0

MR = 1 1 1 Ms = 0 1 1

0 1 0 1 0 1

We see from the matrices that

(a, a) ∈ R and (a, a) ∈ S, so (a, a) ∈ S ° R (a, c) ∈ R and (c, a) ∈ S, so (a, a) ∈ S ° R (a, c) ∈ R and (c, c) ∈ S, so (a, c) ∈ S ° R.

It is easily seen that (a, b) ∉ S ° R since, if we had (a, x) ∈ R and (x, b) ∈ S, then matrix MR tells us that x would have to be a or c; but matrix Ms tells us that neither (a, b) nor (c, b) is an element of S.

We see that the first row of Ms ° R is 1 0 1. The reader may show by similar analysis that

1 0 1

MS ° R = 1 1 1

0 1 1

We note that MS ° R = MR Θ MS (verify this).

Example 11 illustrates a general and useful fact. Let A, B, and C be finite sets with n, p, and m elements, respectively, let R be a relation from A to B, and let S be a relation from B to C. Then R and S have Boolean matrices MR and MS with respective sizes n X p and p X m. Thus MR Θ Ms can be computed, and it equals MS ° R.

To see this let A = {a1,…,an}, B = {b1,…,bp}, and C= {c1,…,cm}, Also, suppose that MR, = [rij], Ms = [Sij], and Ms0R = [tij]. Then tij = 1 if and only if (ai, cj) S 0 R, which means that for some k, (ai, bk) ∈ R and (bk, cj) S. In other words, rik = 1 and skj = 1 for some k between 1 and p. This condition is identical to the condition needed for MR MS to have a 1 in position I, j, and thus MSOR

and MR MS are equal.

In th special case where R and S are equal, we have S O R = R2 and MSOR = MR2 = MR MR, as was shown

Let us redo Example 10 using matrices. We see that

1 1 1 0

0 0 0 1

MR = 0 1 0 0

0 0 0 0

To see this let A = { a1 . . . . an], B = {b1 . . . bp}, and C = {c1 . . . . .. CR} Also, suppose that MR = [ rij ], MS = [ sij ], and MS OR = [ tij ]. Then tij = 1 if and only if (ai, cj) ∈ S O R, which means that for some k, (ai, bk) ∈ R and (bk, cj) ∈ S. In other words, rik = 1 and Skj = 1 for some k between 1 and p. This condition is identical to the condition needed for MR Θ MS to have a 1 in position I, j and thus MSOR and MR Θ Ms are equal.

In the special case where R and S are equal, we have S O R = R2 and MS O R = MR

2 = MR Θ MR, as was shown

EXAMPLE 12

Let Us redo example 10 using matrices. We see that

1 1 1 0 0 0 1 1

0 0 0 1 0 0 1 0

MR = 0 1 0 0 and MS = 1 0 0 0

0 0 0 0 1 0 0 0

Then

1 0 1 1

1 0 0 0

MRΘ Ms = 0 0 1 0

0 0 0 0

so

S O R = { (1,1), (1, 3), (1, 4), (2, 1), (3, 3) }

As we found before. In cases where the number of pairs in R and S is large, the matrix method is much more reliable.

Theorem 7

Let A, B, C, and D be sets, R a relation from A to B, S a relation from B to C and T a relation from C to D. Then

T O (S O R) = T O S) O R.

Proof

The relations R, S and T are determined by their Boolean matrices MR, Ms, and MT, respectively.

As we showed after Example 11, the matrix of the composition is the Boolean matrix product; that is, MS O R = MR Θ Ms. Thus

MTO (S O R) = MSO R Θ MT = (MRΘ MS) Θ MT. Similarly,

M (T O S) O R = MRΘ (MSΘ MT).

Since Boolean matrix multiplication is associative [see Exercise 37 of Section 1,5] we must have (MRΘ Ms) Θ MT = MRΘ (MSΘ MT),

and therefore

MTO (S O R) = M (T O S) O R.

Then

T O (S O R) = (T O S) O R Since these relations have the same matrices.

The proof illustrates the advantages of having several ways to represent a relation. Here using the matrix of the relation produces a simple proof.

In general, R O S ≠ S O R, as shown in the following example.

EXAMPLE 13

Let A = {a, b}, R = { (a, a), (b, a), (b, b)}, and S = { (a, b), (b, a), (b, b) }. Then S O R = { (a, b), (b, a), (b, b)}, While R O S = { (a, a), (a, b), (b, a), (b, b) }.

Theorem 8

Let A, B, and C be sets, R a relation from A to B, and S a relation from B to C. Then (S O R)-1 = R

-1 O S-1. Proof

Let c ∈ C and a ∈ A. Then (c, a) ∈ (S O R)-1 if and only if (a, c) ∈ S O R, that is, if and only if there is a b ∈ B with (a, b) ∈ R and (b, c) ∈ S. Finally, this is equivalent to the statement that (c, b) ∈ S

-1 and (b, a) ∈ R-1; that is, (c, a) ∈ R-1 O S-1.

Here we will discuss relations, called binary relations between a pair of objects. Let A and B be two nonempty sets. A relation R from A to B is a subset of A X B. If R A X B and <a, b> Є R we say that a is related to b by R, we write

a

R

b

. If a is not related to b by R, we write

a

R

b.

If A and B are equal we will say A is a relation on A, instead of a relation from A to A e.g.

Example

Let A = {1, 2, 3, 4, 5}. Define the following relation(less than) on A

a

R

b iff

a < b.

Example

In document Discrete Maths (Page 32-46)

Related documents