Вы находитесь на странице: 1из 40

1

|

Set Theory

1.1 – Sets and Functions

Exercise: 1 Section 1.1

Question: Let U = {n N | n 10} and consider the subsets A = {1, 3, 5, 7, 9}, B = {1, 2, 3, 4, 5}, and

C = {1, 2, 5, 7, 8}. Calculate the following operations.

a) A B

b) (B C) A

c) (A B) (A C) (B C)

d) ((A B) C) (A (B C))

Solution:

We apply the deﬁnitions of set operations:

a) A B = {1, 3, 5}

b) (B C) A = {1, 2, 3, 4, 5, 7, 8} − {1, 3, 5, 7, 9} = {2, 4, 8}

c) A BA CB C = {1, 3, 5}∩{1, 5, 7}∩{1, 2, 5} = {2, 4, 6, 7, 8, 9, 10}∩{2, 3, 4, 6, 8, 9, 10}∩{4, 6, 8, 9, 10}

d) ((A B) C) (A (B C)) = ({7, 9} − C) (A − {3, 4}) = {9} ∩ {1, 5, 7, 9} = {9}

Exercise: 2 Section 1.1 Question: Let U = {a, b, c, d, e, f, g} and consider the Calculate the following operations.

a) C (A B)

b) (A C) B

c) (A B C) (A B C)

d) (A B) (B C)

subsets A = {a, b, d}, B = {b, c, e}, and C =

Solution:

We apply the deﬁnitions of set operations:

a) C (A B) = C ∩ {a, b, c, d, e} = {c, d}

b) C) B = {a, b, c, d, f } − B = {a, d, f }

(A

c) B C) (A B C) =

(A

{a, b, c, d, e, f } − ∅ = {a, b, c, d, e, f }

d) (A B) (B C) = {a, d} ∪ {b, e} = {a, b, d, e}

{c, d, f }.

Exercise: 3 Section 1.1

Question:

Solution: The set {3, 5} contains the integers 3 and 5. The closed interval [3, 5] contains all real numbers between 3 and 5 including 3 and 5, while the open interval (3, 5) contains all real numbers between 3 and 5 not including 3 and 5.

As subsets of the reals, describe the diﬀerences between the sets {3, 5}, [3, 5] and (3, 5).

Exercise: 4 Section 1.1

Question:

Prove that the following are true for all sets A and B.

a)

b)

A B

A

A.

A B.

Solution:

We use the deﬁnitions of subsets and the intersection and union of sets.

 a) x Let ∈ A ∩ B. Then x ∈ A and x ∈ B =⇒ x ∈ A, so A ∩ B ⊆ A. b) x ∈ A. We know that A ∪ B = {y | y ∈ A or y ∈ B }, so Let x ∈ A =⇒ x ∈ A ∪ B . Hence A ⊆ A ∪ B .

Exercise: 5 Section 1.1

Question:

Let A and B be subsets of a set S.

a) Prove that A B if and only if P(A) P(B)

b) Prove that P(A B) = P(A) P(B).

c) Show that P(A B) = P(A) P(B) if and only if A B or B A.

Solution:

1

2

CHAPTER 1.

SET THEORY

a) (=): Suppose A B. Then, a A, a B. Since P(B) contains all the possible subsets of B, all the possible subsets of A must be in P(B) because A B. Therefore, P(A) P(B).

(=): Suppose P(A) P(B). Then ∀{a} ∈ P(A), {a} ∈ P(B). Therefore, there must exist a subset C of P(B) that contains every {a} from P(A). The subset C leads to the conclusion that every a A must also be in B. Therefore, A B.

This implies {t i } ∈ P(A) and {t i } ∈ P(B).

Therefore, by deﬁnition of intersection, P(A B) = P(A) P(B).

and

Therefore by the

Then the set {a, b} is in P(A B) but not in P(A) or in P(B).

c) (=):

b) By deﬁnition, P(A B) = {{t 1 ,

t 2 ,

, t n } | t i A, t i B}.

Suppose there are two sets A and B such that neither A B nor B A.

b

B A.

Let a A B

contrapositive, P(A B) = P(A) P(B) if A B or B A.

(=): Suppose A B. Then, A B = B so P(A B) = P(B). Now suppose B A. Then A B = A so P(A B) = P(A). Either way, P(A B) = P(A) P(B).

Exercise: 6 Section 1.1

 Question: Give the list description of P({1, 2, 3, 4}). Solution: Using the deﬁnition of a power set,

P({1, 2, 3, 4}) ={∅, {1}, {2}, {3}, {4}, {1, 2}, {1, 3}, {1, 4}, {2, 3}, {2, 4}, {3, 4},

{1, 2, 3}, {1, 2, 4}, {1, 3, 4}, {2, 3, 4}, {1, 2, 3, 4}}.

Exercise: 7 Section 1.1 Question: Give the list description of {{a 1 , a 2 ,

, a k }

P({1, 2, 3, 4, 5}) a 1 + a 2 + ··· + a k = 8}.

Solution:

subset has repeated elements so {4, 4, } does not make sense. The set is

We need to ﬁnd all the subsets of {1, 2, 3, 4, 5} whose elements add to a total of 8. Recall that no

{{1, 2, 5}, {1, 3, 4}, {3, 5}} .

Exercise: 8 Section 1.1

Question:

Let A, B, and C be subsets of a set S.

a) Prove that

b) Find and prove a similar formula for A (B C).

(A B) C = (A C) (B C).

Solution:

a)

B
A C

S

B
A C

S

In the ﬁrst Venn diagram, the lighter shade represents (A B), and the darker shade, which overlaps some of (A B), represents (A B) C. In the second Venn diagram, the lighter shade represents (A C), while the darker shade represents (A C ) (B C ). We observe from the diagrams that the darker regions are equal.

1.1.

SETS AND FUNCTIONS

3

b)

B
A C

S

B
A C

S

In the Venn diagram above, the lighter shade represents B C, and the darker shade represents A(B C).

In the second diagram, the lighter region represents A B, and the darker region represents A C, which

overlaps some of A B. Thus, (A B) (A C) = A (B C).

Exercise: 9 Section 1.1

Question:

Let A, B, and C be subsets of a set S.

a) Prove that A B = if and only if A = B.

b) Prove that A (B C) = (A B) (A C).

Solution:

Let A, B, and C be subsets of a set S.

a) Suppose that A B = . Then by deﬁnition of the symmetric diﬀerence

(A B) (B A) = .

If the union of two sets is the empty set, then each of the two sets must be empty. Hence we deduce that A B = and B A = . Now for and two sets U and T , the identity U T = is equivalent to U T . Hence we deduce that A B and B A. Consequently, A = B. The argument of the opposite direction is identical. Suppose that A = B. Then A B and B A. Thus A B = and B A = . We deduce that A B = (A B ) (B A) = .

b) There are a variety of ways to prove the identity A (B C ) = (A B ) (A C ). We could use a well designed Venn diagram. We could also use a membership table which lists all possibilities of an element whether it is in or not in one of the given three sets. Here is a membership table for both side of the equality. In this table, we put an in a column to indicate membership and nothing to indicate non-membership. Hence if there is a in the A and C column and nothing in the B column, that refers to the situations of an element in A, not in B and in C.

 A B C (B C) A ∩ (B C) (A ∩ B) (A ∩ C) (A ∩ B) (A ∩ C) √ √ √ √ √ √ √ √ √ √ √ √ √ √ √ √ √ √ √ √ √ √ √ √

Since the A (B C) and column and the (A B) (A C) of this membership table are the same, then the sets are equal.

Exercise: 10 Section 1.1

Question:

Let S be a set and let {A i } iI be a collection of subsets of S. Prove the following.

a)

A i = A i .

i∈I

i∈I

b) A i = A i .

i∈I

i∈I

Solution:

Let S be a set and let {A i } iI be a collection of subsets of S.

4

CHAPTER 1.

SET THEORY

a) We will prove the equation by proving set inclusion in both directions.

(=) Let a A i .

Then a /

A i or a / A i for every i ∈ I.

i∈I

i∈I

i ∈ I. So then a A i . And so A i A i .

i∈I

i∈I

i∈I

And this implies that a A i for every

(=) Let a A i .

Then a A i for every i ∈ I.

Which implies that a / A i for eversy i ∈ I. And so

i∈I

a / A i . Which implies a

i∈I

A i . So A i A i .

i∈I

i∈I

i∈I

And so A i = A i .

i∈I

i∈I

b) We will prove this equation by proving set inclusion in both directions.

(=) Let a A i .

So a /

A i .

So a / A i for at least one i ∈ I.

i∈I

i∈I

a A i . Which implies that

A i A i .

i∈I

i∈I

i∈I

So a A i for at least one i ∈ I.

So

(=) Let a A i .

Then a A i for at least one i ∈ I.

This implies that a / A i for at least one i ∈ I.

i∈I

It follows that a / A i . Which implies that a A i . So A i A i .

i∈I

i∈I

i∈I

i∈I

So A i = A i .

i∈I

i∈I

Exercise: 11 Section 1.1

Let P be the parabola in the plane whose equation is y = x 2 . Let {A q } qP be the collection of

subsets of R 2 where A q is the tangent line to P at q. Determine with proof qP A q .

Solution: Sketching a picture of the standard parabola, we see that all the tangent lines are in some sense beneath the parabola. Also, taking the (inﬁnite, uncountable) union of all the tangent lines to the parabola, we might guess that we would get all points (a, b) in the plane such that b a 2 . We need to prove this hypothesis. Label the coordinates of a point q P as q = (x 0 , x 0 ). From calculus, the tangent line to P at q has the equation

Question:

2

2

y = x 0

+ 2x 0 (x x 0 ) =y = 2x 0 x x

2

0 .

Now suppose that some point (a, b) in the plane is on a tangent line. Then, for some x 0 , we have b = 2x 0 a x Since a, b are given and x 0 is unknown, this is an equation in x 0 . The quadratic formula gives for x 0

2

0 .

x 0 = 2a ± 4a 2 4b

2

= a ± a 2 b.

In particular, we note that there exists an x 0 if and only if a 2 b 0, conﬁrming the hypothesis that b a 2 .

Exercise: 12 Section 1.1

Let {A k } kN be the collection of subsets of R 3 such that A k = {(x, y, z) R 3 | z ky}. Determine

both kN A k and kN A k .

Solution: Each subset A k represents all points greater than the plane that is bound on the line z = ky. In the diagram below, imagine the x-axis is coming out of the page, and let k 1 , k 2 , and k 3 represent the bounds of the subsets A 1 , A 2 , and A 3 respectively. We note that the larger k gets, the more steep the plane becomes. However, the condition does not hold true for z < 0 when y is 0. Therefore, kN A k = {(x, y, z) | z y}∪{(x, y, z) | x < 0}, and kN A k = {(x, y, z) | z y} ∩ {(x, y, z) | x 0}.

Question:

1.1.

SETS AND FUNCTIONS

5

z k 3 k 2
k 1

y

Exercise: 13 Section 1.1

Question:

pq connecting p and q is a subset of S. Prove that the intersection of two convex sets is a convex set.

Solution:

Case 1: If S R is empty, than it is trivially a convex set.

In geometry of the plane, a subset S of the plane is called convex if for all p, q S the line segment

Let S and R both be convex sets. Consider S R.

Case 2: If it is non-empty, for any p, q S R, consider the line segment pq. Since p, q S and S is convex,

we know that pq S. By the same reasoning, since p, q R and R is convex, this implies that pq R.

Since pq is a subset of both S and R, we have pq S R. So S R is convex.

This proves that S R is convex.

Exercise: 14 Section 1.1

Question:

Inclusion-Exclusion Principle. Let A, B, and C be ﬁnite subsets of a set S.

a) Prove that |A B| = |A| + |B| − |A B|.

b) (*) Prove that |A B C| = |A| + |B| + |C| − |A B| − |A C| − |B C| + |A B C|.

Solution:

a) Let |A| = n and |B| = m. Now A B is all of the elements that are either in A or B. If we say that

|A B| = |A| + |B| = n + m, for any element c that exists in both A and B,

account for that element twice, once in |A| and the second in |B|. So we must subtract 1 for the |A B|

or equivalently A B, we

elements we account for twice. So |A B| = |A| + |B| − 1(|A B|) = |A| + |B| − |A B|.

b) Let D = AB and consider |DC|. By applying the ﬁrst result of this exercise, |DC| = |D|+|C|−|DC|. And if we put A B back in for D and apply the ﬁrst result again we get |A B| + |C | − |(A B) C | = |A| + |B| − |A B| + |C | − |(A B) C |. Now we will consider |(A B) C |. (A B) C contains all the elements that are in (A or B) and C. If A and C have n elements in common, or equivalently |A C| = n, and likewise |B C| = m, then |(AB)C| is certainly at most m+n. However, we should not double count whatever elements are in both A C and B C , or A B C . So we must subtract out that amount, and we

our original equation

we get |A| + |B|−|A B| + |C |−|(A B) C | = |A| + |B| + |C |−|A B|− (|A C | + |B C |−|A B C |) = |A| + |B| + |C| − |A B| − |A C| − |B C| + |A B C|.

arrive at |(A B) C| = |A C| + |B C|−|A B C|. Plugging this result back into

Exercise: 15 Section 1.1

Question:

Let U be a set and A, B U .

a) Show by any means that A B = A B.

b) Show by any means that A B = A B.

Solution:

6

CHAPTER 1.

SET THEORY

a) Observe the Venn diagrams below:

A
B
A
B

In

the A B diagram,

represented by the union of these shaded regions. We can observe the shaded regions from both diagrams

In the above diagrams, the left diagram represents A B, and the right diagram represents A B.

represents A,

represents B, and

represents where they overlap. A B is

describes the same set, thus A B = A B.

b) Observe the Venn diagrams below:

A B
A
B

In the above diagrams, the left diagram represents A B, and the right diagram represents A B. In the

A B diagram,

region describes the same set that is shaded in the A B diagram, hence A B = A B.

represents A,

represents B, and

represents A B.

Notice, the

Exercise: 16 Section 1.1

Question:

accomplish a task) to list all the subsets of {1, 2, 3,

Solution:

Let S = {{∅}} and k = 1. For every set in S, add a new set to S representing the union of {k} and the set in S. Once this process is completed union {k} to S. Increase k by 1. Repeat this process until k = n. In other words, while k < n, S = S ∪ {s | t ∪ {k}, t S} ∪ {k}.

(*) Let n be a positive integer. Describe an algorithm (a ﬁnite list of well-deﬁned instructions to

, n}.

Exercise: 17 Section 1.1

Question:

and then prove whether f : D R is an injection, surjection, both, or neither.

For each of these real-valued functions determine the largest possible domain D as a subset of R

a) f (x) = 3x + 4

b)

f (x) = 3x 2 + 7

c) f (x) = (x + 1)/(x + 2)

d)

f (x) = x 5 + 1

Solution:

We decide if the function is an injection, surjection, both, or neither.

a) Let f (x) = 3x + 4. This function can be deﬁned over the whole domain R. Suppose that f (x 1 ) = f(x 2 ).

Then 3x 1 + 4 = 3x 2 + 4. This implies that 3x 1 = 3x 2 so x 1 = x 2 . This shows that f (x) is injective. To prove surjectivity, we attempt to solve for x in the expression y = f (x) for an arbitrary y . We get

x = 4y

3

. Since there is a solution in x for any y, then f is surjective. (f is bijective.)

b) Let f (x) = 3x 2 + 7. The largest possible domain of deﬁnition is R. Note that f (1) = 4 = f (1). This shows that f is not injective. To test for surjectivity, we attempt to solve for x in y = f (x). The equation

y = 3x 2 + 7 leads to x = ± (7 y)/3. However, if y > 7 there is no solution for x. Hence, since the

codomain of f is R, f is not surjective. (f is neither.)

1.1.

SETS AND FUNCTIONS

7

suppose that f (x 1 ) = f(x 2 ). Then we have

1

+ 1

x

x 1 + 2 = x

x 1 + + 2 1 =(x 1 + 1)(x 2 + 2) = (x 1 + 2)(x 2 + 1)

1

=x 1 x 2 + 2x 1 + x 2 + 2 = x 1 x 2 + x 1 + 2x 2 + 2

=2x 1 + x 2 = x 1 + 2x 2

=x 1 = x 2 .

This shows that f is injective. To test for surjectivity, we attempt to solve y = f (x) for x given arbitrary

y . We have

y = x + 1 x +

2 =yx + 2y = x + 1 =xy x = 1 2y =x = 1 2y

y 1 .

We see that there is no solution for x if y = 1. Hence f (x) is not surjective.

d) Consider the function f (x) = x 5 + 1. This is deﬁned over all R so this is the largest possible domain in R. To check for injectivity, consider the equality f (x 1 ) = f(x 2 ). This gives

x 5 + 1 = x 5 2 + 1 =x 5 x 5 2 = 0 =(x 1 x 2 )(x 4 + x 3 x 2 + x 2 2 + x 1 x 3 + x 4 ) = 0.

1

1

1

1

1 x

2

2

2

Obviously the equation holds if x 1 = x 2 . Now we look for solutions of the second term. Note that if

x 2 = 0, then the quartic equation implies that x 1 = 0. But then x 1 = x 2 , which we already know to be a

possibility. Assuming that x 1

= x 2 , after division by x 4 the quartic term implies

2

x 2 4

x

1

+ x 2 3 + x 2 2 +

x

1

x

1

2 + 1 = 0

x

1

x

A graph of the function g(x) = x 4 + x 3 + x 2 + x + 1 shows that g(x) has no solutions. Thus, the only solution to f (x 1 ) = f(x 2 ) is x 1 = x 2 . Thus f is injective. For surjectivity, we see that y = f (x) implies

that x =

5 y 1, which is deﬁned for all y. Hence f is surjective. (f is bijective.)

Exercise: 18 Section 1.1

Question:

Given an explicit example of a function f : Z Z that is

a) bijective;

b) surjective but not injective;

c) injective but not surjective;

d) neither injective nor surjective.

Solution: Recall that x takes x and returns the nearest integer less than or equal to x. The solutions presented here are not the only options!

 a) (x) = −x. f b) (x) = x/2 . f f c) (x) = x ∗ 2. d) (x) = x 2 . f

Exercise: 19 Section 1.1

Question:

Given an explicit example of a function f : N N that is

a) bijective;

b) surjective but not injective;

c) injective but not surjective;

d) neither injective nor surjective.

Solution: Recall that x takes x and returns the nearest integer less than or equal to x. The answers presented here are not the only options!

a)

b)

f (x)

f (x) = x/2 .

= x.

8

CHAPTER 1.

SET THEORY

d)

f (x) = 2 ( x/2 ).

Exercise: 20 Section 1.1 Question: Let f : A B and g : B C be functions. Prove that if f and g are bijective, then g f is bijective and

(g f) 1 = f 1 g 1 .

Solution:

g

notice that g(b 1 ) = g(b 2 ), but b 1

Now assume that g f is not surjective. Then there would exist at least one c C such that a A, g(f (a))

By substituting we observe b B, g(b)

g f is surjective. Hence, g f is bijective. Let f (a) = b and g(b) = c. Then g(f (a)) = c so (g f ) 1 (c) = a. Therefore,

Assume g f is not injective. Then there would exist a 1 , a 2 A such that a 1

Let b 1 = f(a 1 ) and b 2 = f(a 2 ).

We know that b 1

= a 2 and g f (a 1 ) =

f(a 2 ).

= b 2 because f is bijective. Using substitution, we

= c.

= b 2 . This creates a contradiction since g is bijective. Thus, g f is injective.

= c. However, since g is bijective, this creates a contradiction. Therefore

(g f) 1 (c) = a = f 1 (b) = f 1 (g 1 (c))

so (g f ) 1 = f 1 g 1 .

Exercise: 21 Section 1.1

Question:

Suppose that f and g are functions and that f g is injective.

a) Prove that g is injective.

b) Does it also follow that f is injective? Justify your answer (with a proof or counter-example).

Solution:

a) For the sake of contradiction, we assume g is not injective. Then for some a, b that exist in the domain of

g, g(a) = g(b). However, then f (g(a)) = f (g(b)) as well. This contradicts the injectivity of f g. Therefore

g must be injective.

b) No it does not. Consider the following functions f, g : Z −→ Z:

g(x) =

2x

2|x| + 1

if

if

x 0 x < 0.

f(x) = x 2 .

Now, g sends non-negative numbers to a unique, non-negative, even number and negative numbers to a unique, positive, odd number. However, f is injective on non-negative numbers so that f g is injective, but is not injective on all of Z. (Note: What is necessary is that f be injective on the range of g (in our case, the nonnegative numbers) but not necessarily the codomain of g(in our case, all of Z))

Exercise: 22 Section 1.1

Question:

Suppose that f and g are functions and that f g is surjective.

a) Prove that f is surjective.

b) Does it also follow that g is surjective? Justify your answer (with a proof or counter-example).

Solution:

a) Consider any a in the codomain of f . Since a is also in the codomain of f g and f g is a surjective function, there must exist some b in the domain of f g so that a = (f g)(b). Set c = g(b). Then (f g)(b) = f (g(b)) = f (c) = a. So every element of the codomain is hit by f and f is surjective.

b) No it does not. Consider the functions f, g : N −→ N where f (x) = x/2 and g(x) = 2x. Then for any

So f g is surjective, but g is certainly not

y N, (f g)(y) = f (g(y)) = f (2 y) = (2 y)/2 = y = y. since no odd, positive numbers will be hit.

Exercise: 23 Section 1.1

Question:

of properties of the sets f 1 ({b}).

Solution:

Restate the deﬁnition of (a) injective and (b) surjective as applied to a function f : A B in terms

1.1.

SETS AND FUNCTIONS

9

a) injectivity, |f 1 ({b})| ≤ 1.

b) surjectivity, |f 1 {b})| ≥ 1.

For

For

Exercise: 24 Section 1.1 Question: For the following functions f , ﬁnd the pre-image (or ﬁber) f 1 (T ) of the given set T in the codomain.

a) : R R with f (x) = sin x and T = { 3/2}.

f

b) g(x) = x 2 2 and T = [1, 2].

f

: R R with

c)