0% found this document useful (0 votes)
25 views8 pages

Sample Solutions On HW11

Uploaded by

sftamman1029
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
25 views8 pages

Sample Solutions On HW11

Uploaded by

sftamman1029
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 8

Sample Solutions on HW11 (57 exercises in total)

Sec. 9.4 2, 6, 9(6), 11(6), 20, 28(a), 29

2 When we add all the pairs (x,x) to the given relation we have all of Z×Z; in other
words, we have the relation that always holds.

6 We form the reflexive closure by taking the given directed graph and appending
loops at all vertices at which there are not already loops.

a b

c d

9(6) We form the symmetric closure by taking the given directed graph and
appending an edge pointing in the opposite direction for every edge already in the
directed graph (unless it is already there); in other words, we append the edge (b, a)
whenever we see the edge (a, b).
a
b

c d

11(6) We are asked for the symmetric and reflexive closure of the given relation. We
form it by taking the given directed graph and appending (1) a loop at each vertex at
which there is not already a loop and (2) an edge pointing in the opposite direction for
every edge already in the directed graph (unless it is already there).
a
b

d
c
20(a) The pair (a,b) is in R2 precisely when there is a city c such that there is a direct
flight from a to c and a direct flight from c to b – in other words, when it is possible to
fly from a to b with a scheduled stop (and possibly a plane change) in some
intermediate city.

20(b) The pair (a,b) is in R3 precisely when there are cities c and d such that there is a
direct flight from a to c, a direct flight from c to d, and a direct flight from d to b – in
other words, when it is possible to fly from a to b with two scheduled stops (and
possibly a plane change at one or both) in intermediate cities.

20(c) The pair (a,b) is in R* precisely when it is possible to fly from a to b.

28(a) We compute the matrices Wi for i = 0, 1, 2, 3, 4, 5, and then W5 is the answer.


0 0 1 0 0  0 0 1 0 0  0 0 1 0 0 
0 0 0 1 0  0 0 0 1 0  0 0 0 1 0 
     
W0 = 1 0 0 0 0 W1 = 1 0 1 0 0 W2 = 1 0 1 0 0
     
0 1 0 0 0  , 0 1 0 0 0  , 0 1 0 1 0 
0 0 0 1 0 0 0 0 1 0 0 0 0 1 0
1 0 1 0 0 1 0 1 0 0
0 0 0 1 0 0 1 0 1 0
 
W3 = 1 0 1 0 0 W4 = 1 0 1 0 0 = W5
   
0 1 0 1 0
, 0 1 0 1 0
0 0 0 1 0 0 1 0 1 0

29(a) We need to include at least the transitive closure, which we can compute by
1 1 0 1
0 0 0 0 
Algorithm 1 or Algorithm 2 to be   . All we need in addition is the pair
0 0 1 0 
 
1 1 0 1
(2,2) in order to make the relation reflexive. Note that the result is still transitive (the
addition of a pair (a,a) cannot make a transitive relation no longer transitive), so our
1 1 0 1
0 1 0 0
answer is  .
0 0 1 0
 
1 1 0 1

0 1 0 1
1 0 0 0
29(b) The symmetric closure of the original relation is represented by  .
0 0 1 0
 
1 0 0 0
1 1 1
0
1 1 1
0
We need at least the transitive closure of this relation, namely  . Since it
0 0 0
1
 
1 1 1
0
is also symmetric, we are done. Note that it would not have been correct to find first
the transitive closure of the original matrix and then make it symmetric, since the pair
(2,2) would be missing. What is going on here is that the transitive closure of a
symmetric relation is still symmetric, but the symmetric closure of a transitive relation
might not be transitive.

29(c) Since the answer to part (b) was already reflexive, it must be the answer to this
part as well.

Sec. 9.5 3, 10, 16, 36(b), 39, 41

3(a) This is an equivalence relation, one of the general form that two things are
considered equivalent if they have the same “something” (see Exercise 9 for a
formalization of this idea). In this case the “something” is the value at 1.

3(b) This is not an equivalence relation because it is not transitive. Let f(x) = 0, g(x) =
x, and h(x) = 1 for all x ∈ Z . Then f is related to g since f(0) = g(0), and g is related to
h since g(1) = h(1), but f is not related to h since they have no values in common. By
inspection we see that this relation is reflexive and symmetric.

3(c) This relation has none of the three properties required for an equivalence relation.
It is not reflexive, since f(x) – f(x) = 0≠1. It is not symmetric, since if f(x) – g(x) = 1,
then g(x) – f(x) = -1≠1. It is not transitive, since if f(x) – g(x) = 1 and g(x) – h(x) =
1, then f(x) – h(x) = 2≠1.

3(d) This is an equivalence relation. Two functions are related if they differ by a
constant. It is clearly reflexive (the constant is 0). It is symmetric, since if f(x) – g(x) =
C, then g(x) – f(x) = -C. It is transitive, since if f(x) –g(x) = C1 and g(x) –h(x) = C2,
then f(x) – h(x) = C3, where C3 = C1 + C2.

3(e) This relation is not reflexive, since there are lots of functions f (for instance, f(x)
= x) that do not have the property that f(0) = f(1). It is symmetric by inspection (the
roles of f and g are the same). It is not transitive. For instance, let f(0) = g(1) = h(0) =
7, and let f(1) = g(0) = h(1) = 3; fill in the remaining values arbitrarily. Then f and g
are related, as are g and h, but f is not related to h since 7≠3.

10 The function that sends each x ∈ A to its equivalence class [x] is obviously such a
function.
16 This follows from Exercise 9, where f is the function from the set of pairs of
positive integers to the set of positive rational numbers that takes (a,b) to a/b, since
clearly ad = bc if and only if a/b = c/d.
If we want an explicit proof, we can argue as follows. For reflexivity,
((a, b), (a, b)) ∈ R because a·b = b·a. If ((a, b), (c, d )) ∈ R then ad = bc, which also

means that cb = da, so ((c, d ), (a, b)) ∈ R ; this tells us that R is symmetric. Finally, if

((a, b), (c, d )) ∈ R and ((c, d ), (e, f )) ∈ R then ad = bc and cf = de. Multiplying these

equations gives acdf = bcde, and since all these numbers are nonzero, we have af =
be, so ((a, b), (e, f )) ∈ R ; this tells us that R is transitive.

36(b) The equivalence class of 4 is the set of all integers congruent to 4, modulo m.
{4 + 3n | n ∈ Z } = {2 ,−2,1,4,7,2}

39(a) We observed in the solution to Exercise 15 that (a,b) is equivalent to (c,d) if a –


b = c – d. Thus because 1 – 2 = -1, we have [(1,2)]={(a,b)|a – b = -1}={(1,2), (2,3),
(3,4), (4,5), (5,6),…}.

39(b) Since the equivalence class of (a,b) is entirely determined by the integer a –b,
which can be negative, positive, or zero, we can interpret the equivalences classes as
being the integers. This is a standard way to define the integers once we have defined
the whole numbers.

41 The sets in a partition must be nonempty, pairwise disjoint, and have as there union
all of the underlying set.
41(a) This is not a partition, since the sets are not pairwise disjoint (the elements 2
and 4 each appear in two of the sets).

41(b) This is a partition.

41(c) This is a partition.

41(d) This is not a partition, since none of the sets includes the element 3.

Sec. 9.6 5, 10, 23(a), (c), 32, 44, 66

5 The question in each case is whether the relation is reflexive, antisymmetric, and
transitive.
5(a) The equality relation on any set satisfies all three conditions and is therefore a
partial ordering. (It is the smallest partial ordering; reflexivity insures that every
partial order contains at least all the pairs (a,a).)

5(b) This is not a poset, since the relation is not reflexive, not antisymmetric, and not
transitive (the absence of one of these properties would have been enough to give a
negative answer).

5(c) This is a poset, as explained in Example 1 in this section.

5(d) This is not a poset. The relation is not reflexive, since it is not true, for instance,
that 2 does not divide 2. (It also is not antisymmetric and not transitive.)

10 This relation is not transitive (there is no arrow from c to b), so it is not a partial
order.

23(a)

4 6

3 5 7
2

23(c)
48
36
24

12

2 3

32(a) The maximal elements are the ones with no other elements above them, namely
l and m.

32(b) The minimal elements are the ones with no other elements below them, namely
a, b and c.
32(c) There is no greatest element, since neither l nor m is greater than the other.
32(d) There is no least element, since none of a, b, and c is less than the other two.

32(e) We need to find elements from which we can find downward paths to all of a, b,
and c. It is clear that k, l, and m are the elements fitting this description.

32(f) Since k is less than both l and m, it is the least upper bound of a, b, and c.

32(g) No element is less than both f and h, so there are no lower bounds.

32(h) Since there are no lower bounds, there can be no greatest lower bound.

44 In each case, we need to decide whether every pair of elements has a least upper
bound and a greatest lower bound.
44(a) This is not a lattice, since the elements 6 and 9 have no upper bound (no
element in our set is a multiple of both of them).

44(b) This is a lattice; in fact it is a linear order, since each element in this list divides
the next one. The least upper bound of two numbers in the list is the larger, and the
greatest lower bound is the smaller.

44(c) Again, this is a lattice because it is a linear order. The least upper bound of two
numbers in this list is the smaller number (since here “greater” really means “less”),
and the greatest lower bound is the larger of the two numbers.

44(d) This is similar to Example 24 of this section, with the roles of subset and
superset reversed. Here the g.l.b. of two subsets A and B is A  B , and their l.u.b. is
A B.

64 There are many compatible total orders here. We just need to work from the
bottom up. One answer is to take
Foundation < Framing < Roof < Exterior siding < Wiring < Plumbing < Flooring <
Wall-board < Exterior painting < Interior painting < Carpeting < Interior fixtures <
Exterior fixtures < Completion.

Sec. 10.1 1, 3-9

1 In part (a) we have a simple graph, with undirected edges, no loops or multiple
edges. In part (b) we have a multigraph, since there are multiple edges. In part (c)
we have the same picture as in part (b) except that there is now a loop at one vertex,
thus this is a pesudograph. In part (d) we have a directed graph, the directions of the
edges telling the directions of the flights. In part (e) we have a directed multigraph,
since there are parallel edges.
Detroit Boston
(a)

Washington Newark

Miami

Detroit
(b) Boston

Newark
Washington

Miami

Detroit
(c) Boston

Newark
Washington

Miami

Detroit Boston
(d)

Newark
Washington

Miami
Detroit
(e) Boston

Newark
Washington

Miami

3 This is a simple graph; the edges are undirected, and there are no parallel edges or
loops.

4 This is a multigraph; the edges are undirected, and there are no loops, but there are
parallel edges.

5 This is a pseudograph; the edges are undirected, but there are loops and parallel
edges.

6 This is a multigraph; the edges are undirected, and there are no loops, but there are
parallel edges.

7 This is a directed multigraph; the edges are directed, and there are no parallel edges,
but there are loops.

8 This is a directed multigraph; the edges are directed, and there are parallel edges.

9 This is a directed multigraph; the edges are directed, and there is a set of parallel
edges.

You might also like