This preview shows pages 1–3. Sign up to view the full content.
This preview has intentionally blurred sections. Sign up to view the full version.
View Full Document
Unformatted text preview: SECTlON 8.3 Representing Relations
2. 112's 8 Relating ir consisting~ of
from the oth the domain of n — 1 domains, In each case we use a 1 x 4 matrix. putting a 1 in position (i,j) if the pair (i,_j) is in the relation and a 0 in position (i,j) if the pair (1',j) is not in the relation. _0111 .1001 .0111 0000
a) 0011 b) 0100 C) 1011 d) 0 0 01
0001 0010 1101 1101
0000 1000 1110 0000 a) Since the (1,1)‘ll entry is a 1. (1,1) is in the relation. Since (1.3)“1 entry a t), (1,3) not in the
relation. Continuing in this manner. we see that the relation contains (1,1), (1, 2), (1, 4), (2,1), (‘2, 313), (3,2),
(3,3), (3,4), (4,1), (41,3), and (4.4). An asymmetric relation the preamhle to Exercise 16 in Section 8.1) is one for which ((1,1)) E R and
((1.0) E I? can never hold simultaneously. even if a = b. 1n the matrix, this means that there no is on the
main diagonal (position 111;, for some i), and there is no pair of 1’s symmetrically placed around the main diagonal (i.e., we cannot have Infj = Illﬂ = 1 for any yalues of i and For reflexivity "we want all on the main diagonal; for irretlexiyity we want all Us on the main diagonal; for
symmetry, we want the matrix to he symmetric about the main diagonal (equi'xr'alently, the matrix equals transpose); for antisymmetry we "want there never to be two 1’s symn‘ietrically placed aliiout the main (:liagonal
(equivalently. the meet of the matrix and its tra ispose has no 15 oil the main diagonal); and for transititity we want the Boolean square of the matrix (the Boolean product of the matrix and itself) to be "less than or equal to“ the original matrix in the sense that tl ere a 1 in the original matrix at every location Where their? a 1 in the Boolean square.
21) Since some 1’s and some 0's on the main diagonal, this relation is neither reflexive nor irreﬂexive. Sim??? at the matrix is symmetric, the relation is synnnetric. The relation is not. antisymmetricmlook at positions (1. w and 1). Finally, the relation is not transitive; for example, the 1's in positions (1,2) and (2.3) WWI:
require a 1 in position (1, if the relation were to be transitive. 1)) Since there are all 1’s on the main diagonal, this relation is reflexive and not lrreﬁexiye. Since the niatrIK not symmetric, the relation is not symmetric (look at positions (1.2) and (2,1). for example). The relatio11 antisymmetric since there are never two 1’s symmetrically placed with respect to the main diagonal. Finally
the Boolean square of this matrix is not itself (look at position (1,4) in the square), so the relation is 1101
transitlye. c) Since there are all 0's on the main diagonal, this relation is not reﬂexive but is irreﬁexive. Since ll
matrix is symmetric, the relation is symmetric. T he relation is not antisymmetric—look at positions 1
and ‘2, 1), for example. Finally, the Boolean square of this matrix has a 1 in position (1,1), so the relation is not transitive. Representing Relations 213 ‘e that the total number of entries in the matrix is 10003 2 1.000000.
)There is a 1 in the matrix for each pair of distinct positive integers not exceeding 100, namely in position b”; where (I S b, as well as 1‘s along the diagonal. Thus the answer is the number of subsets of size
set of 100 elements. plus 1000, i.e,., C’(1000, 2) + 1000 : 199500 + 1000 = 500.500 2 from H here two 1’s in each row of the matrix except the ﬁrst and last rows, in Which there is one 1. Therefore
16 answer is 998  ‘2 + 2 = 1098. w ) There is a 1 in the matrix at each entry just above and to the left of the “anti—diagonal” (1e, in positions
‘ 99‘), (’2, 998), . . . , (999. Therefore the answer is 99.9. ) There is a 1 in the matrix at each entry on or above ( to the left of) the “anti—diagonal.” This is the same
ﬁmnher of 1’s as in part (a), so the answer is again 500,500. m
M , 311 S? 6) Every row has all 18 except for the ﬁrst row, so the answer is 999  1000 2 999,500. take the transpose of the matrix, since we want the (ii,j’)‘h entry of the matrix for R71 to he 1 if and
Guiy if the Mfr)”1 entry of R is 1. 0 1 0 The matrix for the union formed by taking the join: 1 1 1
1 1
U 1 l The matrix for the intersection formed by taking the meet: 0 1 1
1 0 0
0 1 1
The matrix is the Boolean product 1V1 R1 BER: = 1 1 1
0 1 0
e ,_ 1 1 1
1‘s 5, The. matrix the Boolean product h1g3! N131 : 1 1 1
l the 0 1 0 0 0 0 The matrix is the entrywise XOR: 1 0 0
(l 1 1 Ge the matrix for R“ just the transpose of the matrix for R (see Exercise 1‘2), the entries are the same
’ is and 1’s, so there are I; nonzero entries in h’iR—i as well. E.
M
('0
('3
or
M.
O
p...
.4
O
p—K
A draw the directed graphs. in each case With the vertex set being 27 3} and an edge from 2' to j Vx’llE‘llE?\'€’1' is in the relation. (6) (b) (c) (d) ’J aCh case we draw a directed graph on three vertices “with an edge from a to I) for each pair ((1,0) in the I. ,4
re
p.
O
M.
H
t.
’D Whenever there is a 1 in position ((1,1)) in the matrix. In part (a), for instance, we need an edge _ II 1 to itself since there is a 1 in position (1,1) in the matrix: and an edge from 1 to 3., but no edge from
o 2. 2 1 I. Chapter 8 22. We draw the directed graph with the vertex set being {(1, I), e. d} and an edge from 2' to j Whenever (‘7‘ ﬂ
in the relation. " We list all the pairs (1:, g) for which there is an edge from .r to y in the directed graph: {(0.0), ((1,0). (I), a), (b,b), (b, c), (c, 0)}. We list all the pairs (1‘, y) for which there is an edge from .r to y in the directed graph:
{(a, a), (a, b), (I), (I), (b, 1)). (0,0). 0), (c, (I), (d, (1)}. \\"e list all the pairs (.1331) for which there an edge from :r to y in the directed graph:
{(a, a). (\a, 12). (bad). (b, by), (c, c). (c, (l), ((1, c), ((1, (1’)}. Clearly R irreflexix‘e if and only if there are no loops in the directed graph for R . Recall that the relation is reflexive if there is a loop at each vertex; irreflexiye if there are no loops at all;
symmetric if edges appear only in antiparallel pairs (edges from one vertex to a second ~vertex and from the second hack to the first); antisymnietric it “here no pair of antiparallel edges: asymmetric if is m: antisymmetric and irreflexiye: and transitive if all paths of length 2 (a pair of edges (my) and (141,]..3)‘; are accompanied by the corresponding path of length l (the edge (:,1f,;)). The relation drawn in Exercise ‘26} is
reflexive but not irreflexiye since there are loops at each vertex. It is not symmetric, since, for instance. the
edge (do) is present but not the edge (am). It, not antisymmetric, since both edges ((1,1)) and {an} are,
present. So it not asymmetric either. It is not transitive, since the path (0,0,). ((1.1),) from c to f,» is not
accompanied by the edge (3.1)). The relation drawn in Exercise '27 is neither reflexive nor il‘l‘Gl‘lCXth‘ since there
are some loops but not a loop at each vertex. It is symmetric. since the edges appear in antiparallcl pairs. it not antisymmetric, since, for instance, both edges (a. b) and ((2.0) are present. 80 it not asynimm‘rii' either.
It is not transitive, since edges ((3,0) and c) are present, but not (c, The relation (glrawn in Exwrrisv ‘28
is reflexive and not irreflcxive since there are loops at all vertices. It is symmetric but not antisynnnci ric or asymmetric. It is transitive; the only nontrivial paths of length 2 have the necessary loop shortcuts. For each pair ((1.11) of yertices (including the pairs ((1.0) in which the two vertices are the same). ‘ an edge from a to b, then erase it, and if there is no edge from a to I), put add it in. We assume that the two relations are on the same For the union, we simply take the union of the directed
graphs. i.e., take. the directed graph on the same vertices and put in an edge from i to j Whenever there is 2111
edge from 1' to j in either of them. For intersection, we simply take the intersection of the dircctcd Léi‘nl'llb‘s
i.e., take the directed graph on the same vertices and put in an edge from i to j Whenever there are cdllﬁt‘é“
from i to j in both of them. For symmetric difference, we simply take the symmetric difference of the «liri‘i‘it‘kl
graphs, i.e., take the directed graph on the same yertices and put in an edge from 1' to j Whenever there" is all
edge from 2' to j in one, but not both, of them. Similarly, to form the difference, we take the diltcrcnw of the
directed graphs, i.e.. take the directed graph on the same Vertices and put in an edge from 1‘ to j whvncvcl‘
there is an edge from i to j in the ﬁrst but not the second. To form the directed graph for the (‘<.>li!}>i>5ill‘m
S o R of relations H and S . we draw a directed graph on the same set of vertices and put in an edge from i ,‘v to j Whenever there is a vertex A" such that there is an edge from ‘1' to I; in R, and an edge from I; to in 3 ...
View
Full
Document
This note was uploaded on 02/15/2011 for the course ICS 6B taught by Professor Meenakshisundaram during the Winter '09 term at UC Irvine.
 Winter '09
 Meenakshisundaram

Click to edit the document details