Docsity

Math 61 Practice Problems, Lecture notes of Algebra

Toggle sidebar
bg1
Math 61 Practice Problems
[With Solutions]
Ben Spitz
Fall 2019
FAQ
1. Are these questions representative of the content/difficulty/format/etc. of the midterm?
I make no such guarantees and had no such intentions when making this worksheet.
These questions are only designed to be instructive, i.e. so that solving them requires
understanding some important concept from the course.
2. What does ((?)) mean?
I’ve used the symbol ((?)) to mark problems which are particularly challenging or
outside the scope of the course. I recommend at least thinking about how you could
solve them, but don’t stress if you find it difficult to tackle those problems.
3. Should I do all of these problems in order?
Probably not; there’s a variety of questions here, intended to cover most of the topics
we’ve discussed so far. If you want to work on a particular concept, you should look
for a question about that concept! Feel free to ask me for recommendations.
4. Are your proofs the only correct proofs for their corresponding claims?
Definitely not.
5. Would all of your proofs be good enough to get full credit if the question was asked
on a midterm?
Certainly not all; I’m not infallible and may have made mistakes (if so, email me!),
and more importantly some of the solutions below are just proof sketches, or just
answers without justification. However, I’ve tried to make most of the proofs below
of reasonably high quality.
Problems
Topic: Troubleshooting Faulty Proofs
The following few problems have to do with finding flaws in invalid proofs.
1
pf3
pf4
pf5
pf8
pf9
pfa
pfd
pfe
pff
pf12
pf13
pf14
pf15
pf16
pf17
pf18
pf19
pf1a
pf1b
pf1c
pf1d
pf1e

Partial preview of the text

Download Math 61 Practice Problems and more Lecture notes Algebra in PDF only on Docsity!

Math 61 Practice Problems

[With Solutions]

Ben Spitz

Fall 2019

FAQ

  1. Are these questions representative of the content/difficulty/format/etc. of the midterm? I make no such guarantees and had no such intentions when making this worksheet. These questions are only designed to be instructive, i.e. so that solving them requires understanding some important concept from the course.
  2. What does ((?)) mean? I’ve used the symbol ((?)) to mark problems which are particularly challenging or outside the scope of the course. I recommend at least thinking about how you could solve them, but don’t stress if you find it difficult to tackle those problems.
  3. Should I do all of these problems in order? Probably not; there’s a variety of questions here, intended to cover most of the topics we’ve discussed so far. If you want to work on a particular concept, you should look for a question about that concept! Feel free to ask me for recommendations.
  4. Are your proofs the only correct proofs for their corresponding claims? Definitely not.
  5. Would all of your proofs be good enough to get full credit if the question was asked on a midterm? Certainly not all; I’m not infallible and may have made mistakes (if so, email me!), and more importantly some of the solutions below are just proof sketches, or just answers without justification. However, I’ve tried to make most of the proofs below of reasonably high quality.

Problems

Topic: Troubleshooting Faulty Proofs

The following few problems have to do with finding flaws in invalid proofs.

  1. Consider the following purported proof.

Claim. Let X ⊆ Z such that X is finite, |X| ≥ 2 , and the elements of X sum to 0. Then there is some x ∈ X such that −x ∈ X.

Proof. We use induction on X. For the base case, let X ⊆ Z have 2 elements and be such that the elements of X sum to 0. This means that the two elements of X are negatives of each other, as desired. For the inductive step, suppose the claim holds whenever |X| = n for some n ≥ 2. Then X has an element x such that −x ∈ X. If we add an element to X so that the sum of the elements is still 0, then x and −x are both still elements of the set, so we are done.

(a) This proof is not valid. Find the flaw(s) in the proof.

Solution: The technical issue is that the inductive step is structured incor- rectly. In this inductive proof, we are aiming to show that P (n) is true for all n ∈ { 2 , 3 , 4 ,... }, where P (n) denotes the statement “If X ⊆ Z such that |X| = n and the elements of X sum to 0, then there is some x ∈ X such that −x ∈ X.” In the inductive step, where we are meant to show that P (n) =⇒ P (n + 1), we should begin by assuming that P (n) is true (i.e. that the claim holds whenever |X| = n), then show that P (n + 1) is true. To prove that P (n + 1) is true, we should start by taking an arbitrary X ⊆ Z such that |X| = n + 1 and such that the elements of X sum to 0. However, this is not the way that the inductive step above is written. The first line of the inductive proof, “suppose the claim holds whenever |X| = n for some n ≥ 2”, is exactly right. But the following claim, that “X has an element x such that −x ∈ X” doesn’t even make sense: our inductive hypothesis doesn’t single out a specific set X (rather, it is a statement about all sets). In other words, the set X has not been defined or instantiated, so it doesn’t make sense to say it has an element. Ignoring this, the strategy used the in the inductive step is invalid. The proof tries to show that P (n + 1) holds by taking a set which satisfied the hypotheses of P (n), enlarging to a set which satisfies the hypotheses of P (n + 1), using the inductive hypothesis to get that the smaller set satisfies the conclusion of P (n), then reinterpreting that to see that the larger set satisfies the conclusion of P (n + 1). But P (n + 1) is a statement that must be proven for all sets X ⊆ Z such that |X| = n + 1 and the elements of X sum to 0, not just the the sets that can be produced by this enlarging process. This is a specific example of a fairly common mistake in inductive proofs, where it can be tempting to prove a statement about mathematical objects of size n + 1 by enlarging objects of size n. Imagine we have a set S of mathematical objects, and a function λ : S → N. For n ∈ N, let Sn = {s ∈ S : λ(s) = n}. If we want to prove some statement about each element of

Case 2 y′Sy. Since mRy′, mSy′, so mSy. If x ∈ Y \ {y} = X then mSx by assumption, so we have shown that mSx for all x ∈ Y , as desired. In each case, we found the desired conclusion, and these cases are exhaustive, so this completes the inductive step.

(a) This proof is not valid. Find the flaw(s) in the proof.

Solution: The answer here is the same as in question 1: this process of constructing larger relations from smaller relations does not produce every larger relation, hence the inductive step doesn’t prove the desired statement.

(b) Is the claim true? If so, provide a valid proof. If not, find a counterexample to the claim.

Solution: The claim is false. The smallest counterexample looks like X = { 0 , 1 , 2 , 3 }, R = {(0, 0), (0, 1), (1, 1), (2, 2), (2, 3), (3, 3)}.

  1. Consider the following purported proof

Claim. The set S = {(x, y) ∈ Q × Q : x^2 + y^2 = 1} is infinite.

Proof. Suppose for contradiction that S is finite with |S| = n. Write

S = {(x 1 , y 1 ),... , (xn, yn)}

for some x 1 ,... , xn, y 1 ,... , yn ∈ Q. Define

a =

x^21 + x^22 + · · · + x^2 n n

b =

y 12 + y^22 + · · · + y^2 n n and note that

a^2 + b^2 =

x^21 + x^22 + · · · + x^2 n n

y 12 + y 22 + · · · + y^2 n n

x^21 + · · · + x^2 n + y 12 + · · · + y^2 n n

=

x^21 + y^21 + · · · + x^2 n + y^2 n n

n

n n

This means that (a, b) ∈ S is an element we didn’t list before, which is impossible! Thus, S must be infinite.

(a) This proof is not valid. Find the flaw(s) in the proof.

Solution: There are two flaws, both of which come from the line “(a, b) ∈ S is an element we didn’t list before”. First of all, to know that (a, b) ∈ S, we would need to know that a, b ∈ Q, which was not shown. Indeed, if n = 2

and x 1 = 3/ 5 , y 1 = 4/ 5 , x 2 = 1, y 2 = 0, then a =

17 / 25 ∈/ Q (you may wish to think about how to prove that

17 /25 is irrational!). Furthermore, since we also didn’t show that (a, b) wasn’t already listed! Indeed, if n = 1 and x 1 = 1, y 1 = 0 then (a, b) = (x 1 , y 1 ) was already listed.

(b) ((?)) Is the claim true? Prove that your answer is correct.

Solution: The claim is true, which can be seen as follows: Let f : Q → X be the function

f (x) =

1 − x^2 1 + x^2

2 x 1 + x^2

This is well-defined because ( 1 − x^2 1 + x^2

2 x 1 + x^2

(1 − x^2 )^2 + (2x)^2 (1 + x^2 )^2

1 − 2 x^2 + x^4 + 4x^2 1 + 2x^2 + x^4

for any x ∈ Q (notably, 1 − x^2 , 2 x, 1 + x^2 ∈ Q when x ∈ Q and 1 + x^2 6 = 0 for all x ∈ Q so these are indeed tuples of well-defined rational numbers). To show that f is injective, suppose f (x) = f (y) for some x, y ∈ Q. Then we have

1 − x^2 1 + x^2

1 − y^2 1 + y^2 2 x 1 + x^2

2 y 1 + y^2

If x = 0 then the second equation tells us y = 0, as desired. Otherwise, the equations tells us that

x = 2 x^2 2 x

2 x^2 1+x^2 2 x 1+x^2

1 − 1 −x

2 1+x^2 2 y 1+y^2

1 − 1 −y

2 1+y^2 2 y 1+y^2

2 y^2 1+y^2 2 y 1+y^2

2 y^2 2 y

= y,

as desired. Now f : Q → X is an injection from an infinite set, telling us that its codomain (X) is infinite as well.

  1. Consider the following purported proof.

Claim. Let f : X → Y be an injection. Then there exists a surjection g : Y → X.

Proof. First, pick any x ∈ X and let S be the range of f. For each s ∈ S, there is (by definition of range) at least one element of X which is sent to s by f. By injectivity of f , there can’t be more than one element of X which is sent to s by f , so there is exactly one element of X which is sent to s by f. Let this element be called ps.

We now return to general questions about discrete math itself.

Other Problems

  1. Let A, B, and C be sets such that A ⊆ B, B ⊆ C, and C ⊆ A. Show that A = B = C.

Solution: Since A ⊆ B and B ⊆ C, A ⊆ C. We also know that C ⊆ A, so A = C. Likewise, B ⊆ C ⊆ A so B ⊆ A, while also A ⊆ B. Thus, we have A = B. By transitivity of equality, A = B = C.

  1. Prove that any set X with at least two elements has a subset Y such that Y 6 = ∅ and Y 6 = X.

Solution: Since X has at least two elements, there is some x such that x ∈ X. Now {x} ⊆ X is nonempty and {x} 6 = X since {x} has one element while X has at least 2.

  1. How many elements does the set Z ∩ {x ∈ Q : − 10 < x < 10 } have?

Solution: This intersection is simply {x ∈ Z : − 10 < x < 10 }, or in other words {− 9 , − 8 ,... , 8 , 9 }, which has 19 elements.

  1. If X and Y are sets, X 4 Y (called the symmetric difference of X and Y ) is defined to be the set (X ∪ Y ) \ (X ∩ Y ). (a) Prove that X 4 X = ∅ for any set X.

Solution: X 4 X = (X ∪ X) \ (X ∩ X) = X \ X = ∅.

(b) Prove that (X ∪ Y ) \ (X 4 Y ) = X ∩ Y for any sets X and Y.

Solution:

(X ∪ Y ) \ (X 4 Y ) = {a ∈ X ∪ Y : a /∈ X 4 Y } = {a ∈ X ∪ Y : a /∈ {a′^ ∈ X ∪ Y : a′^ ∈/ X ∩ Y }} = {a ∈ X ∪ Y : a ∈ X ∩ Y } = X ∩ Y.

(c) Prove that (X 4 Y ) ∩ Z = (X ∩ Z) 4 (Y ∩ Z) for any sets X, Y , and Z.

Solution: Let a ∈ (X 4 Y ) ∩ Z be arbitrary. Then a ∈ X ∪ Y so a ∈ X or a ∈ Y. Since a ∈ Z, we have a ∈ X ∩ Z or a ∈ Y ∩ Z, thus a ∈ (X ∩ Z) ∪ (Y ∩ Z). Suppose for contradiction that a ∈ (X ∩ Z) ∩ (Y ∩ Z) = X ∩ Y ∩ Z. Then a ∈ X ∩ Y so a /∈ X 4 Y , which contradicts the assumption to that a ∈ (X 4 Y ) ∩ Z. Thus, a /∈ (X ∩ Z) ∩ (Y ∩ Z), i.e. we can conclude a ∈ (X ∩Z) 4 (Y ∩Z). Since a was arbitrary, (X 4 Y )∩Z ⊆ (X ∩Z) 4 (Y ∩Z).

Now let b ∈ (X ∩ Z) 4 (Y ∩ Z) be arbitrary. Then b ∈ (X ∩ Z) ∪ (Y ∩ Z) = (X ∪ Y ) ∩ Z so b ∈ X ∪ Y and b ∈ Z. Suppose for contradiction that b ∈ X ∩ Y. Then b ∈ X ∩ Y ∩ Z = (X ∩ Z) ∩ (Y ∩ Z), which contradicts our assumption that b ∈ (X ∩ Z) 4 (Y ∩ Z). Thus, b /∈ X ∩ Y , so b ∈ X 4 Y. We now conclude that b ∈ (X 4 Y ) ∩ Z, and since b was arbitrary we have that (X ∩ Z) 4 (Y ∩ Z) ⊆ (X 4 Y ) ∩ Z.

We have shown both directions of inclusion, so

(X 4 Y ) ∩ Z = (X ∩ Z) 4 (Y ∩ Z).

(d) Prove that (X 4 Y ) 4 Z = X 4 (Y 4 Z) for any sets X, Y , and Z.

Solution: I claim that

(X 4 Y ) 4 Z = {a ∈ X ∪Y ∪Z : a is in all or exactly one of the sets X, Y, Z}.

To see this, suppose a ∈ (X 4 Y ) ∪ Z. Then a ∈ X 4 Y or a ∈ Z. In the former case, a ∈ X or a ∈ Y , so a ∈ X ∪ Y ⊆ X ∪ Y ∪ Z. In the latter case, a ∈ Z ⊆ X ∪ Y ∪ Z. Thus, a ∈ X ∪ Y ∪ Z, telling us that a is in at least one of the sets X, Y, Z. Suppose for contradiction that a is in exactly two of the sets X, Y, Z. Without loss of generality (since X 4 Y = Y 4 X), we have either a ∈ (X ∩ Z) \ Y or a ∈ (X ∩ Y ) \ Z. In the former case, a ∈ X \ Y tells us that a ∈ X 4 Y so a ∈ Z tells us that a /∈ (X 4 Y ) 4 Z. In the latter case, a ∈ X ∩ Y tells us that a /∈ X 4 Y so a /∈ Z tells us that a /∈ (X 4 Y ) 4 Z. This contradicts the fact that a ∈ (X 4 Y ) 4 Z, so it is not the case that a is in exactly two of the sets X, Y, Z. Thus, a is in all or exactly one of the sets X, Y, Z. In the other direction, suppose a is an element of all of or exactly one of the sets X, Y, Z. If a is in all of the sets then a ∈ Z and a ∈ X ∩ Y , so a /∈ X 4 Y , whence a ∈ (X 4 Y ) 4 Z. Now suppose a is in exactly one of the sets X, Y, Z. If a ∈ X then since a /∈ Y we have a ∈ X 4 Y , so since a /∈ Z we have a ∈ (X 4 Y ) 4 Z. If a ∈ Y then since a /∈ X we have a ∈ X 4 Y , so since a /∈ Z we have a ∈ (X 4 Y ) 4 Z. If a ∈ Z then since a /∈ X and a /∈ Y we have a /∈ X ∪ Y ⊇ X 4 Y , so a ∈ (X 4 Y ) 4 Z. We have now shown the desired inclusions, so

(X 4 Y ) 4 Z = {a ∈ X ∪Y ∪Z : a is in all or exactly one of the sets X, Y, Z}.

  1. Let X be a set. For each function f : X → Y , we define

∼f = {(a, b) ∈ X × X : f (a) = f (b)}.

(a) Show that ∼f is always an equivalence relation on X.

Solution: If a ∈ X then f (a) = f (a), so a ∼f a. This means that ∼f is reflexive. If a, b ∈ X such that a ∼f b, then f (a) = f (b), so f (b) = f (a), so b ∼f a. Thus, ∼f is symmetric. If a, b, c ∈ X such that a ∼f b and b ∼f c, then f (a) = f (b) and f (b) = f (c), so f (a) = f (c), whence a ∼f c. This shows that ∼f is transitive. Since ∼f is reflexive, symmetric, and transitive, it is an equivalence relation.

(b) Show that every equivalence relation on X is equal to ∼f for some function f : X → Y.

Solution: Let Y be the set of equivalence classes of R. Define f : X → Y be the function which send an element x ∈ X to its equivalence class with respect to R. Then, for a, b ∈ X, we have a ∼f b if and only if [a]R = f (a) = f (b) = [b]R, which is true if and only if aRb. Thus, R =∼f , as desired.

(c) Define Mf to be the set of equivalence classes of ∼f. Suppose that Mf is finite and that each element of Mf is finite. Prove that X is finite.

Solution: Note that Mf is a partition of X. We will induction on the size of Mf.

Base Case If |Mf | = 0 then X = ∅ is finite.

Inductive Step Suppose that the claim holds whenever |Mf | = n. Let f : X → Y be a function such that |Mf | = n + 1. Then Mf is nonempty, so we may pick some S ∈ Mf. Let A = X \ S. Then X = A ∪ S, so it suffices to prove that A and S are finite. S is finite by the assumption that all elements of M are finite. To see that A is finite, let g : A → Y be the restriction of f. I claim that Mg = Mf \ {S}. If T ∈ Mg , then

T = [a]∼g = {x ∈ A : a ∼g x} = {x ∈ A : g(a) = g(x)} = {x ∈ A : f (a) = f (x)} = {x ∈ A : a ∼f x} = {x ∈ X : a ∼f x} ∩ A = [a]∼f ∩ A.

for some a ∈ A. Since Mf is a partition of X and S ∈ Mf , A is the union of all equivalence classes of ∼f besides S. Therefore, [a]∼f ⊆ A, so T = [a]∼f ∈ Mf \ {S}. In fact, we showed in the above argument that [a]∼g = [a]∼f whenever a ∈ A. If a ∈ X \ A then a ∈ S, so

[a]∼f = S. Thus, Mg = Mf \ {S}. This means that |Mg | = n, so our inductive hypothesis applies to g, telling us that A is finite. This completes the inductive step.

  1. Let X and Y be finite sets such that |X| = |Y |. Let f : X → Y be a function. Prove that the following are equivalent (i.e. the three statements below are either all true or all false).

i. f is injective ii. f is surjective iii. f is bijective

Solution: Suppose first f is injective and let y ∈ Y be arbitrary. Suppose for contradiction that y is not in the range of f. Then f : X → Y \ {y}, where |Y \ {y}| = n < n + 1 = |X|. The pigeonhole principle tells us that f cannot be injective, which is a contradiction. Thus, y is in the range of f. Since y was arbitrary, f is surjective. Thus i implies ii. Now suppose f is surjective and let x, x′^ ∈ X such that f (x) = f (x′). Suppose for contradiction that x 6 = x′. Let g : X \ {x′} → Y be the restriction of f. Since x ∈ X \ {x′}, g is surjective. Since Y is finite, Problem 5(a) tells us that there exists an injection h : Y → X \ {x′}. But |Y | > |X \ {x′}|, so the pigeonhole principle tells us that this is impossible. Thus, x = x′, so f is injective. Since f was already surjective, f is bijective. This shows that ii implies iii. Finally, if f is bijective, then f is injective, so iii implies i. Thus, all three conditions are equivalent.

  1. Let R = {(x, y) ∈ R : sin(xy) = 0}. As a relation on R, which of the following properties does R have? Select all that apply.  Reflexive  Symmetric  Antisymmetric  Transitive

Solution: R is not reflexive because (

π/ 2 ,

π/2) ∈/ R. R is symmetric because if (x, y) ∈ R then sin(xy) = 0 so sin(yx) = 0 so (y, x) ∈ R. R is not antisymmetric because (0, 1) ∈ R and (1, 0) ∈ R but 0 6 = 1. R is not transitive because (1, 0) ∈ R and (0, π/2) ∈ R but (1, π/2) ∈/ R.

  1. Determine if sine is injective, surjective, both, or neither, when viewed as a function with following domains and codomains:

(a) sin : { 0 } → { 0 } A. Neither B. Just injective C. Just surjective D. Both

Solution: Every function { 0 } → { 0 } is bijective.

(b) sin : R → R A. Neither B. Just injective C. Just surjective D. Both

Solution: It’s not injective because sin(0) = 0 = sin(π) and it’s not surjec- tive because for all x ∈ R, sin(x) 6 = 2.

(c) sin : [0, π/2] → [0, 1] A. Neither B. Just injective C. Just surjective D. Both

Solution: sin(arcsin(t)) = t for all t ∈ [0, 1], and arcsin(sin(θ)) = θ for all θ ∈ [0, π/2], so this function has an inverse.

(d) ((?)) sin : Q → [− 1 , 1] A. Neither B. Just injective C. Just surjective D. Both

Solution: First we will show this function is not surjective. Suppose sin(x) = 1 for some x ∈ Q. Then x = (2k +1)π for some k ∈ Z. Thus, π = x/(2k +1). This shows that π is rational, but this is not the case. Thus, we cannot have sin(x) = 1 for any x ∈ Q, so the function is not surjective. Now we will show this function is injective. Suppose sin(x) = sin(y) for some x, y ∈ Q. Then 0 = sin(x) − sin(y) = 2 sin((x − y)/2) cos((x + y)/2), so sin((x−y)/2) = 0 or cos((x+y)/2) = 0. Thus, there is some k ∈ Z such that (x − y)/2 = kπ or (x + y)/2 = kπ/2. If k 6 = 0 then π = (x − y)/(2k) ∈ Q or π = (x + y)/k ∈ Q, but π is irrational so this cannot happen. Thus, k = 0, so (x − y)/2 = 0 or (x + y)/2 = 0. This shows that x = y or x = −y. In the latter case, we will have had sin(y) = sin(x) = sin(−y) = − sin(y), so sin(y) = 0. This tells us that y = πfor some ∈ Z, whence = 0 (or else π = y/ would be rational). Thus, in the case where x = −y, we must have y = 0, and thus also x = y.

  1. Let X be a set and let m : X × X → X be a function such that m(m(x, y), z) = m(x, m(y, z)) for all x, y, z ∈ X. Let L = {e ∈ X : ∀x ∈ X(m(e, x) = m(x, e) = x)}. Prove that |L| ≤ 1. Give examples to show that both |L| = 0 and |L| = 1 are possible.

Solution: If e, e′^ ∈ L then m(e, e′) = e and m(e, e′) = e′^ so e = e′. |L| = 0 is seen to be possible by choosing X = Z{ 0 } and defining m(a, b) = a+b. |L| = 1 is seen to be possible by choosing X = Z and defining m(a, b) = a + b (in this case L = { 0 }).

  1. Let f : X → X be a bijection and suppose that f ◦ f = f. Must it be the case that f = idX? A. Yes B. No

Solution:

f = idX ◦f = (f −^1 ◦ f ) ◦ f = f −^1 ◦ (f ◦ f ) = f −^1 ◦ f = idX.

  1. Let f : X → X be a bijection and suppose that f ◦ f = idX. Must it be the case that f = idX? A. Yes B. No

Solution: If X = { 1 , 2 } and f = {(1, 2), (2, 1)} then f : X → X is a bijection and f ◦ f = idX but f 6 = idX.

  1. Let f : R×R → R×R be a function such that f (αx+x′, αy +y′) = αf (x, y)+f (x′, y′) for all x, y, x′, y′, α ∈ R. Let K = {(x, y) ∈ R × R : f (x, y) = (0, 0)}. (a) Prove that (0, 0) ∈ K.

Solution: f (0, 0) = f (0 · 1 , 0 · 1) = 0 · f (1, 1) = (0, 0).

(b) Suppose K = {(0, 0)}. Prove that f is injective.

Solution: Suppose f (x, y) = f (x′, y′) for some x, y, x′, y′^ ∈ R. Then

f ((−1)x + x′, (−1)y + y′) = (−1)f (x, y) + f (x′, y′) = 0

so by assumption ((−1)x + x′, (−1)y + y′) = (0, 0). Thus, x = x′^ and y = y′ so (x, y) = (x′, y′).

(c) ((?)) Suppose f is injective. Must f be surjective? A. Yes B. No

  1. Do there exist bijections between the following sets? If so, define a bijection from one to the other. If not, prove there does not exist a bijection. (a) { 1 ,... , n} and { 1 ,... , n} × { 1 ,... , n}, where n > 1 is a natural number

Solution: These sets have different sizes so there cannot be a bijection between them.

(b) ∅ and P(∅)

Solution: These sets have different sizes so there cannot be a bijection between them.

(c) P(R) and the set of functions from R to { 0 , 1 }

Solution: The function f 7 → {x ∈ R : f (x) = 1} is a bijection from the set of functions R → { 0 , 1 } to P(R).

(d) N and Z

Solution: n 7 →

1 + (−1)n+1(1 + 2n) 4 is a bijection from N → Z (check the first few values of this function to see how it works).

(e) N and N × N

Solution: (a, b) 7 → 2 a(2b + 1) is a bijection from N × N to N.

(f) N and Q

Solution: Let f : N → Z be the bijection described in part (d). Given some n ∈ N, write out its prime factorization pa 11 · · · pa kk where p 1 ,... , pk are distinct primes and a 1 ,... , ak ∈ N. Define a function h+ : N → Q by sending n to p f (a 1 ) 1 · · ·^ p

f (ak ) k. Define^ h^ :^ Z^ →^ Q^ by

h(x) =

−h+(−x) : x < 0 0 : x = 0 h+(x) : x > 0

for x ∈ Z. Then h is a bijection, so h ◦ f : N → Q is a bijection.

(g) ((?)) N and P(N)

Solution: There is no bijection N → P(N). To prove this, suppose for contradiction that f : N → P(N) were such a bijection. Let S = {n ∈ N : n /∈ f (n)}. By surjectivity of f , there is some k ∈ N such that f (k) = S. If k ∈ S then k /∈ f (k) = S would be a contradiction, so we must have k /∈ S. But this means that k ∈ f (k) = S, which is again a contradiction.

(h) ((?)) N and {S ∈ P(N) : S is finite}

Solution: Define a function q : {S ∈ P(N) : S is finite} → N as follows: given a finite set S ⊆ N, let s 1 ,... , sn be the distinct elements of S. Define q(S) =

∑n i=1 2

si (^) (to be clear: if S = ∅ then q(S) = 0). q is a bijection.

(i) ((?)) N and R

Solution: There is no such bijection by a famous proof called Cantor’s Diagonal Argument. I can’t do it justice here but there are many great video and text resources online which you can use to learn about it.

  1. Determine the number of relations on { 1 ,... , n} which are

(a) reflexive and not symmetric.

Solution: The number of reflexive relations is 2n

(^2) −n and the number of relations which are both reflexive and symmetric is 2(

n 2 ). Thus, there 2n^2 −n^ − 2 (

n 2 ) relations which are reflexive but not symmetric.

(b) reflexive and antisymmetric.

Solution: 3 (

n 2 ).

(c) neither symmetric nor antisymmetric.

Solution: By inclusion-exclusion, there are 2n 2 (

n 2 )+2n 3 ( n 2 )− 2 n^ = 2n(2( n 2 )+ 3 (

n 2 )^ − 1) relations which are symmetric or antisymmetric. There are 2n^2 relations in total, so there are 2n

2 − 2 n(2(

n 2 )

  • 3(

n 2 ) − 1) relations which are neither symmetric nor antisymmetric.

(d) reflexive, symmetric, or total. Note: a relation R on a set X is called total if, for all x, y ∈ X, xRy or yRx.

Solution: Since any total relation is reflexive, this is the same asking for the number of relations which are reflexive or symmetric, which by inclusion- exclusion is 2n (^2) −n

  • 2n 2 (

n 2 )^ − 2 ( n 2 ).

  1. How many 5-card poker hands

(a) are flushes? A flush is a poker hand in which all cards have the same suit.

Solution: 4

5

Idea: Choose a suit and then choice which five cards to include from that suit.

(b) have 3 of a kind? A poker hand is said to have 3 of a kind if there are three (or more) cards in the hand which all have the same value.

Solution: 13 · 48 + 52 ·

2

Idea: Split into cases of having 4 of a kind and having 3 of a kind but not 4 of a kind. In the former case, choose which value to include all 4 of, then choose which card from the remaining cards in the deck to put in the hand. In the latter case, choose one card in the deck, set it aside, and put the three other cards with that value in the hand, then pick any two cards from the remaining cards in the deck.

(c) have two pairs? A poker hand is said to have two pairs if there are cards c 1 , c 2 , c 3 , c 4 such that c 1 has the same value as c 2 and c 3 has the same value as c 4.

Solution: 13 · 48 + 52 · 12 ·

2

2

2

2

Idea: Split into cases of having 4 of a kind, having a full house, and having two pairs with different values but not a full house. The first case is the same as in Problem b. For the second case, choose a card from the deck, set it aside, and put the three other cards with that value in the hand, then pick one of the 12 remaining values, and choose 2 suits from which to put the cards of that value into the hand. In the final case, we pick two values to have pairs of, then two suits for each pair to be in, then one of the remaining cards in the deck to complete the hand.

(d) have 3 of a kind or two pairs?

Solution: 59280 + 7176 − (52 · 12 ·

2

Idea: Inclusion-exclusion using Problems b and c. The only time you can have 3 of a kind and two pairs is when you have a full house or four of a kind (notably, it’s impossible to have four of a kind and a full house).

  1. My favorite band, “Half-Nicked”, has 12 members. 6 of them are named Nick and the rest are not named Nick.

(a) How many ways can the band members be lined up so that no two Nicks are next to each other?

Solution: 6! ·

6

Idea: First choose the order in which the non-Nicks should line up. Then choose 6 of the 7 spots adjacent to a non-Nick where the Nicks should go. Then choose an order for the Nicks to go into those spots.

(b) How many ways can the band members be lined up so that no five Nicks appear in a row?

Solution: 12! − 6! · 7! − P (6, 5) · 6! · P (7, 2) = 453600000 Idea: Subtract the number of ways the band members can be lined up so that five Nicks do appear in a row from the total number of ways to line up the band members. Split into cases of six Nicks appearing in a row and five Nicks appearing in a row but not six. In the former case, choose an ordering of the Nicks then treat them as a single entity and order the 7 entities. In the latter case, choose an ordering of 5 Nicks, then choose an ordering of the 6 non-Nicks, then choose where (among the 7 spots between non-Nicks) the lone nick and the group of 5 Nicks should go.

  1. ((?)) Let X ⊆ { 1 ,... , 2 n} for some positive integer n and suppose |X| = n + 1. Show that there exist some a, b ∈ X such that a 6 = b and a divides b.

Solution: We use induction on n.

Base Case When n = 1, |X| = 2 and X ⊆ { 1 , 2 } so X = { 1 , 2 }. Since 1 divides 2, we have the desired result.

Inductive Step Suppose the result holds for some positive integer n, and sup- pose X ⊆ { 1 ,... , 2 n + 2} with |X| = n + 2. Let Y = X \ { 2 n + 1, 2 n + 2}. We see that Y ⊆ { 1 ,... , 2 n}, so if |Y | > n we are done by inductive hy- pothesis. This only fails to happen if { 2 n + 1, 2 n + 2} ⊆ X. So suppose for contradiction that 2n + 1, 2 n + 2 ∈ X and that X contains no pair of distinct elements with one dividing the other. Since 2n + 2 ∈ X, n + 1 ∈/ X, hence n + 1 ∈/ Y. Since Y ∪ {n + 1} ⊆ { 1 ,... , 2 n} and |Y ∪ {n + 1}| = n + 1, we have by inductive hypothesis that there exist y 1 , y 2 ∈ Y ∪ {n + 1} such that y 1 6 = y 2 and y 1 divides y 2. Since X doesn’t have any pair of distinct elements with one dividing the other, we cannot have {y 1 , y 2 } ⊆ X, hence y 1 = n + 1 or y 2 = n + 1. Suppose first that y 1 = n + 1. Since y 1 divides y 2 , y 2 = s(n + 1) for some postive integer s. Since y 1 6 = y 2 , y 2 ∈ Y and s > 1. But then s(n + 1) ≥ 2(n + 1) = 2n + 2 > 2 n, which is impossible since Y ⊆ { 1 ,... , 2 n}. We therefore must have y 2 = n + 1. Then y 1 ∈ Y and y 1 divides n + 1. Thus, y 1 divides 2(n + 1) = 2n + 2, and y 1 , 2 n + 2 ∈ X, contradicting our prior assumption.