You are on page 1of 12

SOLUTION SET 2DUE 2/6/2008

Please report any errors in this document to Ian Sammis (isammis@math.berkeley.edu).


Problem 1 (#2.1.8). Determine whether these statements are true or false.
a) {}
b) {, {}}
c) {} {}
d) {} {{}}
e) {} {, {}}
f ) {{}} {, {}}
g) {{}} {{}, {}}
Solution.
a) Truethe empty set is actually a member of the set on the right.
b) True againonce again, the empty set is actually in the set on the right.
c) This ones false. The empty set is in the set on the right, but the set containing
the empty set is not.
d) This is truethe set containing the empty set is an element (in fact, the only
element) of the set on the right.
e) Truesince the empty set is in the set on the right, every element of the rst
set is in the containing set.
f ) True again, for the same reason.
g) False. The set on the right is nothing but a deeply stupid way of writing
{{}}. Thus the two sets are actually equal. In this book (remembernot in all
books!) A B is false if A = B.
Problem 2 (#2.1.16). Find two sets A and B such that A B and A B.
Solution. From the previous problem, A = {}, B = {, {}} works.
Problem 3 (#2.1.32). Explain why (AB) (C D) and A(B C) D are
not the same.
Solution. Let a, b, c, d be members of A, B, C, D, respectively. A typical element
of (A B) (C D) is ((a, b), (c, d))an ordered pair of two ordered pairs. A
typical element of A (B C) D is (a, (b, c), d)an ordered triplet, the center
element of which is an ordered pair. Although each contains the same information
(one element each from A, B, C, and D), the information is organized dierently in
each case.
Problem 4 (#2.1.34). Translate each of these quantications into English and
determine its truth value.
a) x R(x
3
= 1).
b) x Z(x + 1 > x).
c) x Z(x 1 Z).
d) x Z(x
2
Z).
Solution. In English:
1
2 SOLUTION SET 2DUE 2/6/2008
a) There exists some real number whose cube is not -1. Obviously true (0, for
example).
b) There exists an integer such that the next integer is Yesin fact all of them.
c) One less than every integer is, in fact, an integer. Again... obviously, yes.
d) The square of every integer is an integer. Of course it is.
Problem 5 (#2.1.36). Find the truth set of each of these predicates where the
domain is the set of integers.
a) P(x) : x
3
1
b) Q(x) : x
2
= 2
c) R(x) : x < x
2

Solution. Its important here to remember that were on the integers, not the reals.
a) Since every integer except zero has a cube thats at least one, the truth set is
Z \ {0}.
b) There arent any integers that square to 2, so the truth set is just .
c) Every negative integer is less than its (positive) square, as is every integer 2
or larger. The truth set is N \ {0, 1}.
Problem 6 (#2.1.38). This exercise presents Russells paradox. Let S be the
set that containsa set x if the set x does not belong to itself, so S = {x|x x}.
a) Show that the assumption that S is a member of S leads to a contradiction.
b) Show tha t the assumption that S is not a member of S leads to a contradic-
tion.
Solution. Russells paradox boils down to a set-theory version of This proposition
is false.
a) Suppose S were in S. Then, by the denition of S, S would not be in S.
Contradiction.
b) Suppose S were not in S. Then, by the denition of S, S must be a member
of S. Contradiction.
(These days set theory doesnt allow the universal set to include anything so
absurdly vast as all sets.)
Problem 7 (#2.2.2). Suppose that A is the set of sophomores at your school and
B is the set of students in discrete mathematics at your school. Express each of
these sets in terms of A and B.
a) The set of sophomores taking discrete mathematics in your school.
b) The set of sophomores in your school who are not taking discrete mathematics.
c) The set of students at your school who are either sophomores or are taking
discrete mathematics.
d) The set of students at your school who are either not sophomores or are not
taking discrete mathematics.
Solution. These are simple enough to not need much further comment:
a) A B.
b) A \ B.
c) A B.
d) A B
Problem 8 (#2.2.8). Prove the idempotent laws by showing
a) A A = A.
SOLUTION SET 2DUE 2/6/2008 3
b) A A = A.
Solution. In each case, we want to move back to logic, where we already have the
idempotent laws.
a) AA = {x|(x A) (x A)}. But we know p p = p, so this is just the set
{x|x A}, or A itself.
b)AA = {x|(x A) (x A)}. But we know p p = p, so this is just the set
{x|x A}, or A itself.
Problem 9 (#2.2.16). Let A and B be sets. Show that
a) (A B) A.
b) A (A B).
c) A \ B A.
d) A (B \ A) = .
e) A (B \ A) = A B.
Proof. Again, write the sets using symbolic logic.
a) For x (A B), x A and x B. So, x A. Since x (A B) x A,
we have (A B) A.
b) Suppose x A. Then certainly (x A) (x B). So, x A B. Since
x A x A B, we have A A B
c) Suppose x A\B. Then (x A) (x B). So x A. Thus (x (A\B))
x A, so A \ B A.
d) Suppose x A (B \ A). So x A and x B \ A. Since x B \ A, x B
and x A. But x A! Contradiction, so our assumption x A (B \ A) must be
wrong. Thus A (B \ A) must be empty.
e) Suppose x A (B \ A). Then x A or x B \ A. If x B \ A,
(x B) (x A), so x B. So x A or x B, which implies x A B. Thus,
x A (B \ A) x A B, or A (B \ A) A B.
Now, suppose x A B. Either x A or x A. If x A, then x B by
disjunctive syllogism. Thus, x A, or (x A) (x B), so x A (B \ A).
Thus, AB A(B \ A). Since A B A (B \ A) and A (B \ A) A B),
A B = A (B \ A).
Problem 10 (#2.4.30). Can you conclude that A = B, if A, B,, and C are sets,
such that
a) A C = B C?
b) A C = B C?
c) A C = B C and A C = B C?
Solution. a) No, this isnt sucient. Consider A = {1}, B = {2}, C = {1, 2}.
b) This doesnt suce either. Consider A = {1, 10}, B = {1, 11}, C = {1}.
c) This works. Suppose x A. Then either x C or x C. If x C, then
x A C = B C, so x B. If x C, x A C, so x B C. This means
x Bx C. Since x C, by disjunctive syllogism x B. Since x A x B,
A B.
Now, x B x A by an analogous argument (swap the As and Bs). Thus
B A, so A = B.
Problem 11 (2.2.40). Determine whether the symmetric dierence is associative;
that is, if A, B, and C are sets, does it follow that A(B C) = (A B) C?
4 SOLUTION SET 2DUE 2/6/2008
Solution. The symmetric dierence is dened x (A B) if and only if (x
A) (x B), where the logical is exclusive or. Now, we can verify by a quick
truth table:
p q r p q (p q) r q r p (q r)
T T T F T F T
T T F F F T F
T F T T F T F
T F F T T F T
F T T T F F F
F T F T T T T
F F T F T T T
F F F F F F F
So exclusive or is associative. Thus,
x A (B C) (x A) ((x B) (x C))
((x A) (x B)) (x C)
x (A B) C.
So A(B C) = (A B) C.
Problem 12 (#2.2.44). Show that if A, B, and C are sets, then
|A B C| =|A| +|B| +|C| |A B|
|B C| |A C| +|A B C|.
Proof. This ones more or less straightforward symbol manipulation. We use the
result that |A B| = |A| +|B| |A B, and the fact that set union is associative:
|A B C| =|A (B C)|
=|A| +|B C| |A (B C)|
=|A| +|B| +|C| |B C| |(A B) (A C)|
=|A| +|B| +|C| |B C| |A B| |A C| +|A B C|.
Problem 13 (#2.3.10). Determine whether each of these functions from {a,b,c,d}
to itself are one-to-one.
a) f(a) = b, f(b) = a, f(c) = c, f(d) = d,
b) f(a) = b, f(b) = b, f(c) = d, f(d) = c,
c) f(a) = d, f(b) = b, f(c) = c, f(d) = d.
Solution. Part (a) is one-to-oneeach element maps to a distinct element. In part
(b), f(a) = f(b) but a = b, so this isnt one-to-one. Similarly, in (c), f(a) = f(d),
so that function isnt one-to-one either.
Problem 14 (#2.3.14). Determine whether f : Z Z Z is onto if
a) f(m, n) = 2mn,
b) f(m, n) = m
2
n
2
,
c) f(m, n) = m + n + 1,
d) f(m, n) = |m| |n|,
e) f(m, n) = m
2
4.
SOLUTION SET 2DUE 2/6/2008 5
Solution. Remember, a function like this is onto if for every i Z, we can nd an
(a, b) such that f(a, b) = i.
a) This function is ontofor example, f(0, i) = i.
b) This function is not onto. Suppose it were. Then there must be an m and n
such that (m + n)(m n) = 2. Since m + n and m n are integers, one must be
1 and the other 2. It can be quickly veried that in any of these cases, m fails
to be an integer. Thus, there are no such integers, and f is not onto.
c) This function is onto: f(i 1, 0) = i, for example.
d) This function is onto. For i 0, then f(i, 0) = i; for i < 0, f(0, i) = i.
e) This function is clearly not ontofor example, nothing maps to 10 (even if
you cheat and plug reals in).
Problem 15 (#2.3.30). If f and f g are one-to-one, does it follow that g must
be one-to-one? Justify your answer.
Solution. Yes, g must be one-to-one. Suppose g(a) = g(b). Then f(g(a)) = f(g(b)).
Since f g is one to one, this implies a = b. So g(a) = g(b) implies a = b, and g is
one-to-one.
Problem 16 (#2.3.34). Let f(x) = ax + b, and g(x) = cx + d. Find a condition
on the constants a, b, c, d such that f g = g f.
Proof. By denition, f g(x) = a(cx + d) + b = acx + ad + b, and g f(x) =
c(ax + b) + d = acx + bc + d. Setting the two equal, we see
acx + ad + b =acx + bc + d
ad + b =bc + d
(a 1)d =(c 1)b
That last step was merely added for aesthetic reasons.
Problem 17 (#2.3.72). Let x be a real number. Show that 3x = x +x+
1
3
+
x +
2
3
.
Proof. We can write any real number x as x = x + d, where d = x x is the
fractional part of x, and lies in the range 0 d < 1. For this problem we need
to know the integer part of 3d, so we should work by cases: Either 0 d <
1
3
, or
1
3
d <
2
3
, or
2
3
d < 1.
First, suppose 0 d <
1
3
. Then 3x = 3x + 3d = 3x, since 3d < 1.
Similarly, because d <
1
3
, x = x +
1
3
= x +
2
3
, so their sum is also 3x.
Next, suppose
1
3
d <
2
3
. Then 1 3d < 2, so 3x = 3x + 1. We also have
x +
1
3
= x and x +
2
3
= x + 1. So, again, 3x = x +x +
1
3
+x +
2
3
.
Next, suppose
2
3
d < 1. Then 2 3d < 3, so 3x = 3x + 2. We also have
x+
1
3
= x +1 and x+
2
3
= x +1. So, again, 3x = x +x+
1
3
+x+
2
3
.
In any case, 3x = x +x +
1
3
+x +
2
3
.
Problem 18 (#2.3.78).
Consider the functions f : Z
+
Z
+
Z
+
by f(m, n) = (m + n 2)(m + n
1)/2 +m and g : ZZ Z
+
Z
+
by g(m, n) = ((3m+1)
2
, (3n+1)
2
). Show that
f g is one-to-one.
6 SOLUTION SET 2DUE 2/6/2008
Solution. Lets show that each separately is one-to-one rst.
Looking at that rst function, one is immediately struck by the form (m + n
2)(m+n1)/2. If our brainwashing is proceeding properly, you should immediately
notice that
m+n2

i=1
i =
(m + n 2)(m + n 1)
2
So, why would you be interested in such a sum? Well, if you arrange Z
+
Z
+
in a
grid (as in the proof that it is countable), you have:
.
.
.
.
.
.
.
.
.
.
.
.
(4, 1) (4, 2) (4, 3) (4, 4)
(3, 1) (3, 2) (3, 3) (3, 4)
(2, 1) (2, 2) (2, 3) (2, 4)
(1, 1) (1, 2) (1, 3) (1, 4)
Remember, in the usual proof that Z
+
Z
+
is countable, we traverse each of
the diagonals indicated in the above diagram in turn up and to the left, starting at
m+n = 2 and moving through increasing m+n. Lets write down the function that
maps us from (m, n) to its list index in that traverse. (If you have all the elements
of a set in an ordered list, the map to a given elements list index is necessarily
one-to-one and onto; every element appears exactly once in the list.)
To reach a given (m, n) on the list, one must rst traverse all elements of lower
m+n. A given diagonal has m+n1 elements; we must sum from 1 to m+n2
to sum all previous diagonals. In the current diagonal the element (m, n) is in
position m, so we must add m to reach the current list index. Thus, the list index
of element (m, n) is
m+n2

i=1
i + m =
(m + n 2)(m + n 1)
2
+ m
Since f(m, n) is the list index of (m, n) in the standard traverse, it is one-to-one.
SOLUTION SET 2DUE 2/6/2008 7
Now consider g. It clearly suces to show that h(m) = |3m + 1| is one-to-one,
since g(m, n) = (h
2
(m), h
2
(n)), and elements of ZZ are equal only if the are equal
in each component of the tuple. Its clear that no two distinct m 0 can map to
the same value, since the function is an increasing linear function for those values.
Consider m < 0, so h(m) = 1 3m. Its clear that no two distinct negative
m can map to the same value eithernow, we have a decreasing linear function.
The only remaining question is whether it is possible that h(m) = h(n) for m > 0
and n < 0. Well, h(m) = 3m + 1, which is one more than a multiple of three.
h(n) = 1 3m = 3(1 m) + 2, which is two more than a multiple of three. A
number cant be both, so h is one-to-one, and so g is as well.
Finally, suppose f(g(m
1
, n
1
)) = f(g(m
2
, n
2
)). Since f is one-to-one, g(m
1
, n
1
) =
g(m
2
, n
2
). Since g is also one-to-one, (m
1
, n
1
) = (m
2
, n
2
). Thus f g is one-to-one,
as desired.
Problem 19 (#2.4.12). Let a
n
be the n-th term of the sequence 1, 2, 2, 3, 3, 3,
4, 4, 4, 4, 5, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, . . ., constructed by including the integer k
exactly k times. Show that a
n
=

2n +
1
2
.
Solution. The function

2n +
1
2
is strictly increasing with n > 0. Let n
0
(a
n
) be
the rst index in which a
n
appears, and let n
f
(a
n
) be the last index in which a
n
appears. It suces to show that a
n

_
2n
0
(a
n
) +
1
2
(since the inequality will hold
for the remaining larger n containing a
n
, and that
_
2n
f
(a
n
) +
1
2
< a
n
+ 1 (since
the inequality will hold for the remaining smaller n containing a
n
.
Lets worn out n
0
(a
n
). First, we must have passed all previous a
i
the 1 one,
the 2 twos, and so forth. This takes

an1
i=1
i indices, or (a
n
1)a
n
/2 indices. We
then must advance one more index, to reach the next number. Thus,
n
0
(a
n
) =
a
2
n
2

a
n
2
+ 1.
The nal index of a
n
is just the sum of all the natural numbers up and including
a
n
, so
n
f
(a
n
) =
an

i=1
i =
a
n
(a
n
+ 1)
2
Since we have
a
n

_
2n
0
(a
n
) +
1
2
a
n

_
a
2
n
a
n
+ 1 +
1
2
a
n

1
2

_
a
2
n
a
n
+ 1
a
2
n
+ a
n
+
1
4
a
2
n
a
n
+ 1
1
4
1
8 SOLUTION SET 2DUE 2/6/2008
and
_
2n
f
(a
n
) +
1
2
<a
n
+ 1
_
a
2
n
+ a
n
<a
n
+
1
2
a
2
n
+ a
n
<a
2
n
+ a
n
+
1
4
0 <
1
4
we have that a
n
=

2n +
1
2
, as desired.
Problem 20 (#2.4.16). Find the value of each of these sums
a)

8
j=0
(1 + (1)
j
)
b)

8
j=0
(3
j
2
j
)
c)

8
j=0
(2 3
j
+ 3 2
j
)
d)

8
j=0
(2
j+1
2
j
)
Solution. In each case, we can make some headway by rearranging the sums. For
example,
a) Lets split the summation into two:
8

j=0
(1 + (1)
j
) =
8

j=0
1 +
8

j=0
(1)
j
The rst sum is simply 9. The second alternates between 1 (for even indices) and
0 (for odd indices); since it ends at 8 it is 1. Thus, the sum is 9+1=10.
b) Splitting this one up, we arrive at a dierence of geometric sums, each of
which we have a formula for:
8

j=0
(3
j
2
j
) =
8

j=0
3
j

j=0
2
j
=
3
9
1
2

2
9
1
1
=9841 511 = 9330.
c) Again, split up the sum:
8

j=0
(2 3
j
3 2
j
) =2
8

j=0
3
j
3
8

j=0
2
j
=2
3
9
1
2
3
2
9
1
1
=2 9841 3 511
=19682 1533 = 18149
d) There are lots of neat ways to do this problem. Heres a fun one:
SOLUTION SET 2DUE 2/6/2008 9
8

j=0
(2
j+1
2
j
) =
8

j=0
2
j+1

j=0
2
j
=
9

j=1
2
j

j=0
2
j
= 2
9
+
8

j=1
2
j
2
0

j=1
2
j
= 2
9
1 = 511
Problem 21 (#2.4.18). Compute each of these double sums.
a)

3
i=1

2
j=1
(i j)
b)

3
i=1

2
j=1
(3i + 2j)
c)

3
i=1

2
j=1
j
d)

3
i=1

2
j=1
i
2
j
3
Solution. In each case, be careful not to lose a sum over an index thats not
actually in the expression being summed.
a) Lets split it up:
3

i=1

j = 1
2
(i j) =
3

i=1
2

j=1
i
3

i=1
2

j=1
j
= 2
3

i=1
i
3

i=1
2(3)
2
= 2
3(4)
2
3 3
= 12 9 = 3.
b) Again splitting it up:
3

i=1
2

j=1
(3i + 2j) = 3
3

i=1

j = 1
2
i + 2
3

i=1
2

j=1
j
= 6 6 + 6 3 = 36 + 18 = 54.
c) Lets reverse the order of summation:
3

i=1
2

j=1
j =
2

j=1
3

i=1
j
=3 3 = 9.
10 SOLUTION SET 2DUE 2/6/2008
d) We can factor the i
2
past the summation over j:
3

i=1
2

j=1
i
2
j
3
=
3

i=1
i
2
2

j=1
j
3
=
3

i=1
i
2
2
2
3
2
4
= 9
(3)(4)(7)
6
= 9 14 = 126.
Problem 22 (#2.4.22). Use the technique given in exercise 19 together with the
formula

n
k=1
k =
k(k+1)
2
, to derive a formula for

n
k=1
k
2
.
Solution. Lets look at a telescoping series for k
3
:
n

k=1
_
k
3
(k 1)
3

=n
3
0
3
= n
3
n
3
=
n

k=1
_
k
3
k
3
+ 3k
2
3k + 1

n
3
= 3
n

k=1
k
2
3
n

k=1
k +
n

k=1
1
n
3
=3
n

k=1
k
2
3
(n)(n + 1)
2
+ n
n
3
=3
n

k=1
k
2
3
(n)(n + 1)
2
+ n
n
3
+
3n(n + 1)
2
n =3
n

k=1
k
2
n

k=1
k
2
=
2n
3
+ 3n
2
+ n
6
n

k=1
k
2
=
n(n + 1)(2n + 1)
6
Problem 23 (#2.4.34). Determine whether each of these sets is countable or un-
countable For those that are countable, exhibit a one-to-one correspondence between
the natural numbers and that set.
a) integers not divisible by 3
b) integers divisible by 5 but not by 7
c) The real numbers with decimal representations consisting of all 1s
d) The real numbers with decimal representations consisting of all 1s and 9s.
Solution. Its important to realize that the 1-1 correspondence need not be in closed-
formit suces to exhibit an algorithm that would assign natural numbers to all
the set elements.
a) We know that there exists a 1-1, onto map from the natural number to the
integers. This lets us sensibly speak of the ith integer, for examplesuch a map is
SOLUTION SET 2DUE 2/6/2008 11
equivalent to putting all the integers into a list. Thus, we could make a map from
N to the set here using that list, such as:
(1) f(n) = nth integer not divisible by 3.
Such a map is clearly 1-1 and onto. Note that there was nothing special about
the integers here (other than that they were countable) or the particular subset in
use herewe could make a construction like the one in (1) for any subset of any
countable set. So, in general, any subset of a countable set is countable.
b) Countable, by the same general construction:
f(n) = nth integer divisible by 5 but not by 7.
c) I assume that were not counting trailing zeros here. Such a real number then
consists of a nite number of ones, followed by a decimal point, followed by a nite
or countable number of ones. We can then make a map from N N to this set by
specifying the number of 1s before and after the decimal point. Because an innite
repeating 1 is allowed, we need to kludge it in a bit, with some stupid trick like
this:
f(m, n) =
_

_
m ones
..
111 111 .111 . . . if n = 0
m ones
..
111 111 .
n1 ones
..
111 111 if n > 0
This is 1-1 and onto. Moreover, since N N is countable, there exists a 1-1, onto
map g : N N N.
Compositions of 1-1, onto functions are 1-1 and onto. We showed 1-1 in a
previous problem. Let f : B C and g : A B that are 1-1 and onto. Let c C.
Then there exists b B such that f(b) = c, since f is onto. Then there exists a A
such that g(a) = b, since g is also onto. Then f(g(a)) = c, so f is onto.
Let g be the 1-1, onto map that exists from N to N N. Then f g is a 1-1,
onto map from N to the real numbers whose decimal representation is all 1s. Thus,
the latter set is countable.
d) This set is uncountablethe usual diagonal argument works just as well with
only two digits.
Problem 24 (#2.4.40). Show that the union of two countable sets is countable.
Proof. Let A and B be two countable sets. Then B \ A is also countable, since its
a subset of a countable set. We already proved that A B = A (B \ A). Let f
A
be a 1-1, onto map from N to A, and let f
B\A
be a 1-1, onto map from N to B \ A.
Then, dene g : N A B as follows:
g(i) =
_
f
A
_
i
2
_
if i is even.
f
B\A
_
i1
2
_
if i is odd.
Since g is 1-1 and onto (by denition), A B is countable.
Problem 25 (#2.4.44). Show that the set of real numbers that are solutions of
quadratic equations ax
2
+ bx + c = 0, where a, b, c are integers, is countable.
Proof. The statement isnt true if we allow a, b, c = 0, so well simply exclude that
case. Lets start by making an onto map from a countable set to the set of all
complex solutions of quadratic equations with integral coecients. The proof we
used to show that NN is countable works just as well to show that the cartesian
12 SOLUTION SET 2DUE 2/6/2008
product of any countable sets is countable, so {1, 2}ZZZ is countable. Dene
s : {1, 2} Z Z Z C by
s(n, a, b, c) =
_

_
b+(1)
n

b
2
4ac
2a
if a = 0

c
b
if b = 0
0 otherwise.
Let g be the 1-1, onto map from N to {1, 2} Z Z Z that exists by dint of
the latter set being countable. Then s(g)) gives us a list of complex solutions of
quadratic equations with integral coecents, with many repetitions.
Now, let f(i) be the ith distinct real element in the list created by s g. f(i) is
a 1-1, onto map from N to the set of interest, which is therefore countable.
Problem 26 (#2.4.48). Show that if S is a set, then there does not exist an onto
function f from S to P(S), the power set of S.
Solution. Suppose there were such an f, from some set S onto f(s). Then the set
T = {s S|s f(s)} is a well-dned subset of S, and so there must be at least one
t S such that f(t) = T. Now, either t f(t) or not. If t f(t), then it is in T,
an so by the denition of T must not be in f(t). Contradiction. If t f(t), then
by the denition of T t T, so t f(t). Again, contradiction. Thus our original
assumption must be wrong, and there must be no onto function f from a set S onto
the power set f(S).

You might also like