Section5.10Comprehensive Final Exam Review
1
Show that the statements \((P \wedge Q) \implies R\) and \((P \wedge \neg R) \implies \neg Q\) are equivalent by whatever means you prefer.
SolutionEach of the following statements are equivalent.
\begin{align*}
(P \wedge Q) \implies R &\ \\\\
\neg(P \wedge Q) \vee R &\ \text{definition of}\ \implies \\\\
(\neg P \vee \neg Q) \vee R &\ \text{DeMorgan's Laws} \\\\
(\neg P \vee (\neg \neg R)) \vee \neg Q &\ \text{double negation and associativity/commutativity of disjunction} \\\\
\neg(P \wedge \neg R) \vee \neg Q &\ \text{DeMorgan's Laws} \\\\
(P \wedge \neg R) \implies \neg Q &\
\end{align*}
2
Prove that if \(a,b \in \mathbb{Z}\) are relatively prime and for some \(c \in \mathbb{Z}\text{,}\) we have \(a \mid c\) and \(b \mid c\text{,}\) then \(ab \mid c\text{.}\)
SolutionSince \(a,b\) are relatively prime, we have \(\gcd(a,b) = 1\text{,}\) and by a theorem from class there are integers \(x,y\) for which \(ax+by = 1\text{.}\) Multiplying by \(c\) we find \(acx+bcy = c\text{.}\) Now since \(a,b\) both divide \(c\text{,}\) there exist integers \(j,k\) so that \(c = aj\) and \(c = bk\text{.}\) Applying these to the above equation yields
\begin{equation*}
c = acx + bcy = abkx + abjy = ab(kx+jy).
\end{equation*}
Thus \(ab\) divides \(c\) since \(kx+jy\) is a integer.
3
Translate the following sentence into a mathematical formula: “Not every real number is the square of a real number.”
Solution\(\neg (\forall x \in \mathbb{R}, \exists y \in \mathbb{R}, y^2 = x) \text{.}\)
4
Prove that for positive integers \(a,b,c \in \mathbb{N}\text{,}\) if \(a \mid b\) and \(b \mid c\text{,}\) then \(a \mid c\text{.}\) What does this mean about the divides relation on the positive integers?
SolutionSince \(a \mid b\) and \(b \mid c\) there are integers \(m,n\) so that \(b = ma\) and \(c = nb\text{.}\) Therefore \(c = nb = n(ma) = (nm)a\text{.}\) Since \(nm\) is an integer, \(a \mid c\text{.}\)
This shows that the divides relation on \(\mathbb{N}\) is transitive.
5
Describe the minimal elements of the divides relation on \(N = \mathbb{N} \setminus \{1\}\text{.}\) You should also prove these elements are minimal and that the elements you propose are the only minimal elements.
SolutionThe minimal elements of the divides relation on \(N\) are precisely the prime numbers. Indeed, suppose \(p \in \mathbb{N}\) is prime. Then its only divisors are \(1,p\text{,}\) but \(1 \notin N\text{.}\) Therefore, for \(a \in N\text{,}\) \(a \mid p\) if and only if \(a = p\text{,}\) hence \(p\) is minimal.
Similarly, if \(b \in N\) is not prime, then there is some divisor \(a\) with \(1 \lt a \lt b\text{,}\) so \(a \in N\) and \(a \mid b\text{.}\) Therefore, \(b\) is not minimal.
6
Prove that for any odd positive integer \(n\text{,}\) the quantity \(n^2 + 4n + 3\) is divisible by \(8\text{.}\)
Solution1Suppose \(n\) is odd so that there is an integer \(m\) satisfying \(n = 2m+1\text{.}\) Then
\begin{equation*}
n^2 + 4n + 3 = (n+1)(n+3) = (2m+1+1)(2m+1+3) = 2(m+1)2(m+2) = 4(m+1)(m+2).
\end{equation*}
Since \((m+1)(m+2)\) is the product of two consecutive integers, it must be even (we proved this elsewhere), and hence there is some integer \(k\) so that \((m+1)(m+2) = 2k\text{.}\) Hence \(n^2+4n+3 = 8k\text{.}\)
Solution2Given an odd positive integer \(n\text{,}\) we can write it as \(2m+1\) for some nonnegative integer \(m\text{.}\) Our proof will proceed by induction on \(m\text{.}\)
Base case: \(m=0\). Notice that when \(m=0\text{,}\) then \(n=1\text{,}\) and \(n^2+4n+3 = 1+4+3 = 8\) which is obviously divisible by \(8\text{.}\)
Inductive step. Suppose that \(m\) is a nonnegative integer and for \(n = 2m+1\text{,}\) the quantity \(n^2+4n+3\) is divisible by \(8\) so that there is some integer \(k\) for which \(n^2+4n+3 = 8k\text{.}\) Then consider \(r = 2(m+1)+1 = 2m+3 = n+2\text{.}\) Then
\begin{equation*}
r^2 + 4r + 3 = (n+2)^2 + 4(n+2) + 3 = (n^2 + 4n + 3) + 4n+4+8 = 8k + 4(2m+1)+4+8 = 8k+8m*16 = 8(k+m+2),
\end{equation*}
which is divisible by \(8\text{.}\)
By induction, we have proven the desired result.
7
Prove that \(\sqrt{p}\) is irrational for any prime \(p\text{.}\)
SolutionSupose \(\sqrt{p}\) were rational, so that \(\sqrt{p} = \frac{a}{b}\) for some integers \(a,b\text{.}\) We may assume that the fraction is in lowest terms, i.e., \(\gcd(a,b) = 1\text{.}\) Then squaring our equation and multiplying both sides by \(b^2\text{,}\) we find \(b^2 p = a^2\text{.}\) In particular, this means \(p\) divides \(a^2\text{.}\) Since \(p\) is prime, by Euclid's lemma we know \(p\) divides \(a\text{.}\) Thus \(a = pk\) for some integer \(k\text{.}\) Hence \(b^2 p = a^2 = (pk)^2 = p^2 k^2\text{.}\) Cancelling one of the factors of \(p\text{,}\) we obtain \(b^2 = p k^2\text{,}\) and hence \(p\) divides \(b\text{.}\) This implies \(\gcd(a,b) \ge p \gt 1\text{,}\) contradicting the fact that \(\frac{a}{b}\) is in lowest terms. Therefore \(\sqrt{p}\) is irrational.
8
Fix nonzero integers \(a,b\text{.}\) Consider the function \(f : \mathbb{Z}^2 \to \mathbb{Z}\) given by \(f(x,y) = ax+by\text{.}\) Prove that \(f\) is surjective if and only if \(\gcd(a,b)=1\text{.}\)
SolutionNotice that \(\gcd(a,b)\) divides \(f(x,y) = ax+by\) for any \(x,y\) since it divides each of \(a,b\text{.}\) Therefore, if \(\gcd(a,b) \gt 1\text{,}\) then \(f(x,y) \not= 1\) for any \(x,y \in \mathbb{Z}\text{,}\) hence \(f\) is not surjective.
Now suppose \(\gcd(a,b) = 1\text{.}\) Then by a theorem from class, there exist some integers \(r,s \in \mathbb{Z}\) so that \(ar+bs = 1\text{.}\) Now let \(c \in \mathbb{Z}\) be arbitrary. Notice that \(arc + bsc = (ar+bs)c = c\text{,}\) and so letting \(x = rc \in \mathbb{Z}\text{,}\) \(y = sc \mathbb{Z}\text{,}\) we have \(f(x,y) = c\text{.}\) Since \(c \in \mathbb{Z}\) was arbitrary, \(f\) is surjective.
9
Prove that a relation \(R\) on \(A\) is antisymmetric if and only if for every \(x,y \in A\text{,}\) if \(x\,R\,y\) and \(x\not=y\text{,}\) then \(y\,\not R\,x\text{.}\)
SolutionApply the equivalence from the first question in this review.
10
Consider \(f : \mathbb{R} \to \mathbb{Q}\) given by the formula
\begin{equation*}
f(x) =
\begin{cases}
\frac{1}{q} & \text{if}\ x = \frac{p}{q} \in \mathbb{Q}, \\
0 & \text{if}\ x \notin \mathbb{Q}. \\
\end{cases}
\end{equation*}
Is \(f\) well-defined? If so, prove it. If not, explain why and give a counterexample.
SolutionNo, \(f\) is not well-defined because \(f(\frac{1}{2}) = \frac{1}{2}\text{,}\) and \(f(\frac{2}{4}) = \frac{1}{4}\text{,}\) but \(\frac{1}{2} \not= \frac{1}{4}\)
11
Find a bijection between the integers \(\mathbb{Z}\) and the set \(A\) of integers with remainder \(2\) when divided by \(5\text{.}\)
SolutionLet \(f : A \to \mathbb{Z}\) be defined as follows: for \(n \in A\text{,}\) let \(f(n)\) be the quotient (from the Division Algorithm) of \(n\) divided by \(5\text{.}\) This function is well-defined because the quotient from the Division Algorithm always exists, and is a unique integer.
Now consider the function \(g : \mathbb{Z} \to A\) defined by \(g(k) = 5k+2\text{.}\) Clearly, \(g(k) \in A\) since it has remainder \(2\) when divided by \(5\text{,}\) and so \(A\) is a valid codomain.
Now consider \(g \circ f\text{.}\) Let \(n \in A\text{.}\) By the Division Algorithm, there exist unique integers \(q,r\) with \(0 \le r \lt 5\) so that \(n = 5q + r\text{.}\) Since \(n \in A\text{,}\) \(r = 2\text{.}\) Moreover, by definition \(f(n) = q\text{.}\) Therefore \((g \circ f)(n) = g(f(n)) = g(q) = 5q+2 = n\text{.}\) Hence \(g \circ f = Id_A\text{.}\)
Now consider \(f \circ g\text{.}\) Let \(n \in \mathbb{Z}\text{.}\) Notice that \(g(n) = 5n+2\text{.}\) Since the quotient from the division algorithm is unique, it is clear that \((f \circ g)(n) = f(5n+2) = n\) so that \(f \circ g = Id_{\mathbb{Z}}\text{.}\)
By a result proven previously, since \(f \circ g\) and \(g \circ f\) are the identity on their respective domains, we know that \(f,g\) are bijective and in fact \(f^{-1} = g\text{,}\) thereby proving the result.
12
Use the Cantor--Schröder--Bernstein theorem to prove that \(\mathbb{R}\) and \([0,\infty)\) have the same cardinality.
SolutionNotice that the inclusion map \(f : [0,\infty) \to \mathbb{R}\) givne by \(f(x) = x\) is obviously injective. Moreover, consider the function \(g : \mathbb{R} \to [0,\infty)\) given by \(g(x) = 2^x\text{.}\) The codomain \([0,\infty)\) is valid since \(2^x \gt 0\) for all \(x \in \mathbb{R}\text{.}\) Moreover, \(g\) is strictly increasing (using, say, the first derivative test from calculus), and therefore injective. Indeed, if \(x \not= y\text{,}\) then \(x \lt y\) (or \(y \lt x\)). Thus, \(g(x) \lt g(y)\) (or \(g(y) \lt g(x)\)), and hence \(g(x) \not= g(y)\text{.}\) Since we have injective functions in both directions, by the Cantor--Schröder--Bernstein theorem, these sets have the same cardinality.
13
Give an example of a partition of \(\mathbb{Z}\) into two sets. If it has a simple expression, determine the equivalence relation which generates this partition.
SolutionLet \(2\mathbb{Z}\) be the even integers and \(2\mathbb{Z}+1\) be the odd integers. Clearly these sets are disjoint since no integer is both even and odd. Moreover, any integer is either even or odd, so the union of these two sets is all of \(\mathbb{Z}\text{.}\) Therefore this set is a partition.
The equivalence relation which generates this partition is congurence moduluo \(2\text{.}\)
14
Give an example of a partition of \(\mathbb{Z}\) into infinitely many sets.
SolutionConsider the family of singletons (i.e., sets with only one element) \(\mathcal{A} := \{ \{x\} \mid x \in \mathbb{Z} \}\text{.}\) Clearly, any two sets from this family are either the same or disjoint since they each only contain a single element. Moreover, the union is all of \(\mathbb{Z}\) since for any \(x \in \mathbb{Z}\text{,}\) \(x \in \{x\} \subset \bigcup_{A \in \mathcal{A}} A\text{.}\)
The equivalence relation which generates this partition is equality.
15
Consider the following equivalence relation on \(\mathbb{N}^2\text{:}\) \((x,y) \sim (a,b)\) if and only if \(x-y = a-b\text{.}\) Prove that \(\sim\) is an equivalence relation and find the number of elements in each of the equivalence classes \([(1,1)]\) and \([(3,1)]\text{.}\)
SolutionThis appeared on a previous review sheet.
16
For an integer \(m \in \mathbb{N}\) let \(m\mathbb{N}\) denote all the positive multiples of \(m\text{,}\) i.e., \(m\mathbb{N} = \{ mk \mid k \in \mathbb{N} \}\text{.}\) Prove that
\begin{equation*}
\bigcup_{p\ \text{prime}} p\mathbb{N} = \mathbb{N} \setminus \{1\}.
\end{equation*}
SolutionFor any prime \(p\text{,}\) we know that \(p \gt 2\) and therefore \(p \mathbb{N} \subseteq \mathbb{N} \setminus \{1\}\text{.}\) Taking the union over all \(p\) prime, we find
\begin{equation*}
\bigcup_{p\ \text{prime}} p\mathbb{N} \subseteq \mathbb{N} \setminus \{1\}.
\end{equation*}
We now prove the other inclusion by using the well-ordering principle. Suppose the difference \(D := (\mathbb{N} \setminus \{1\}) \setminus \Big( \bigcup_{p\ \text{prime}} p\mathbb{N} \Big)\) is nonempty. Then since \(\mathbb{N}\) is well-ordered, \(D\) has a minimum element which we will call \(n\text{.}\)
Since \(n \gt 1\text{,}\) are two possibilities, either \(n\) is prime, in which case \(n \in n\mathbb{N}\) contradicting the fact that \(n \in D\text{;}\) or \(n\) is composite. In this case, \(n = ab\) for some \(1 \lt a,b \lt n\text{.}\) Since \(1 \lt a \lt n\text{,}\) \(a \notin D\text{,}\) and therefore \(a \in p\mathbb{N}\) for some prime \(p\text{.}\) Hence, \(a = pk\) for some \(k \in \mathbb{N}\text{.}\) Finally, \(n = ab = p(kb) \in p\mathbb{N}\text{,}\) contradicting the fact that \(n \in D\text{.}\) Therefore our assumption that \(D\) is nonempty is false. This proves the other inclusion.
17
Given sets \(A,B\) prove that \(A=B\) if and only if \(A \setminus B = \emptyset = B \setminus A\text{.}\)
SolutionIt is clear that if \(A=B\) then \(A \setminus B = B \setminus A = A \setminus A = \emptyset\text{.}\)
For the other direction, suppose that \(A \setminus B = \emptyset = B \setminus A\text{.}\) Let \(x \in A\text{.}\) Then since \(A \setminus B = \emptyset\text{,}\) we know that \(x \in B\) (for otherwise \(x \in A \setminus B\)). Therefore \(A \subseteq B\text{.}\) A symmetric argument proves \(B \subseteq A\text{.}\)
18
Give an example of a tautology. Give an example of a contradiction.
Solution\(P \vee \neg P\text{.}\)\(P \wedge \neg P\text{.}\)
19
There is a result which says that if \(a,b \in \mathbb{N}\) and \(a\) divides \(b\) and \(b\) divides \(a\text{,}\) then \(a = b\text{.}\) What does this tell you about the divides relation on \(\mathbb{N}\text{?}\) Does the same result hold for the divides relation on \(\mathbb{Z}\text{?}\)
SolutionThis result says precisely that the divides relation is antisymmetric on \(\mathbb{N}\text{.}\) No, it does not hold on \(\mathbb{Z}\text{.}\) Indeed, if \(m \in \mathbb{Z}\) and \(m \not= 0\text{,}\) then \(m = (-1)(-m)\text{,}\) and therefore \(m \mid -m\text{.}\) Similarly \(-m = (-1)m\) so \(-m \mid m\text{.}\) But \(m \not= -m\) since \(m \not= 0\text{.}\)
20
Prove by (strong) induction on \(n\) that
\begin{equation*}
\sum_{k=1}^n (-1)^{n-1} (n-1) =
\begin{cases}
\frac{n}{2} & n\ \text{even}; \\
\frac{-n+1}{2} & n\ \text{odd}. \\
\end{cases}
\end{equation*}
SolutionBase case. For \(n = 1\text{,}\) the quantity on the left is \(\sum_{k=1}^1 (-1)^{1-1} (1-1) = 0 = \frac{-1+1}{2}\text{.}\)
Inductive step. Now suppose \(n \in \mathbb{N}\) and the formula holds for \(n\text{.}\)
Case 1: \(n\) even. In this case, \((-1)^{n+1} = -1\) since \(n+1\) is odd. By the inductive hypothesis, we have
\begin{equation*}
\sum_{k=1}^{n+1} (-1)^n (n-1) = \sum_{k=1}^n (-1)^n (n-1) + (-1)^{n+1} n = \frac{n}{2} - n = -\frac{n}{2} = \frac{-(n+1)+1}{2},
\end{equation*}
as desired.
Case 1: \(n\) odd. In this case, \((-1)^{n+1} = 1\) since \(n+1\) is even. By the inductive hypothesis, we have
\begin{equation*}
\sum_{k=1}^{n+1} (-1)^n (n-1) = \sum_{k=1}^n (-1)^n (n-1) + (-1)^{n+1} n = \frac{-n+1}{2} + n = \frac{n+1}{2},
\end{equation*}
as desired.
Don't look now, but if we use this formula to define a function \(f : \mathbb{N} \to \mathbb{Z}\text{,}\) by \(f(n) = \sum_{k=1}^n (-1)^n (n-1)\text{,}\) then \(f\) is just our usual bijection between \(\mathbb{N}\) and \(\mathbb{Z}\text{.}\)
21
Consider \(\mathbb{N}^2\) equipped with the equivalence relation \((x,y) \sim (a,b)\) if and only if \(x-y = a-b\text{.}\) Define an addition on the collection of equivalence classes \(\mathbb{N}^2 / \sim\) defined by \(+ : \big(\mathbb{N}^2 / \sim\big)^2 \to \mathbb{N}^2 / \sim\) with the formula
\begin{equation*}
[(x,y)] + [(a,b)] = [(x+a,y+b)].
\end{equation*}
Show that \(+\) is well-defined.
SolutionWe need to show that the resulting equivalence class under addition is independent of the choice of representatives from the original equivalence classes. So, suppose \((x',y') \in [(x,y)]\) and \((a',b') \in [(a,b)]\text{.}\) Then \(x - y = x' - y'\) and \(a - b = a' - b'\text{.}\) Therefore,
\begin{equation*}
(x+a) - (y+b) = (x-y) + (a-b) = (x' - y') + (a' - b') = (x' + a') - (y' + b'),
\end{equation*}
and hence \([(x+a,y+b)] = [(x'+a',y'+b')]\text{.}\) Thus \(+\) is well-defined.
22
Consider the relation on \(\mathbb{R}\) given by \(x \sim y\) if and only if \(x-y \in \mathbb{Q}\text{.}\) Prove that \(\sim\) is an equivalence relation.
SolutionClearly \(\sim\) is reflexive since for any \(x \in \mathbb{R}\text{,}\) \(x-x=0 \in \mathbb{Q}\) and so \(x \sim x\text{.}\)
Now suppose \(x,y \in \mathbb{R}\) and \(x \sim y\text{.}\) Then \(x-y \in \mathbb{Q}\) and hence \(y-x = -(x-y) \in \mathbb{Q}\text{.}\) Therefore \(\sim\) is symmetric.
For transitivity it will be helpful to remember that \(\mathbb{Q}\) is closed under addition since \(\frac{p}{q} + \frac{a}{b} = \frac{pb+aq}{qb}\text{.}\) Suppose that \(x \sim y\) and \(\sim z\text{.}\) Then \(x-y \in \mathbb{Q}\) and \(y-z \in \mathbb{Q}\text{.}\) Therefore \(x-z = (x-y)+(y-z) \in \mathbb{Q}\) and hence \(x \sim z\text{.}\) Thus \(\sim\) is transitive.
Since \(\sim\) is reflexive, symmetric and transitive, it is an equivalence relation.
23
Prove that if \(n^2\) is even if and only if \(n\) is even.
SolutionSuppose \(n\) is even. Then \(n = 2k\) for some integer \(k\text{.}\) Thus \(n^2 = (2k)^2 = 4k^2 = 2(2k^2)\) which is even since \(2k^2 \in \mathbb{Z}\text{.}\)
For the other direction we use contraposition. Suppose \(n\) is not even. Then by parity \(n\) is odd and hence \(n = 2k+1\) for some integer \(k\text{.}\) Thus
\begin{equation*}
n^2 = (2k+1)^2 = 4k^2 + 4k + 1 = 2(2k^2+2k) +1
\end{equation*}
which is odd since \(2k^2 +2k \in \mathbb{Z}\text{.}\) Thus \(n^2\) is not even. By contraposition, if \(n^2\) is even then \(n\) is even.
24
Generalize the previous exercise to arbitrary primes \(p\) in the following manner: Prove that \(n^2\) is a multiple of \(p\) if and only if \(n\) is a multiple of \(p\text{.}\)
HintEuclid's lemma.
SolutionIf \(n\) is a multiple of \(p\text{,}\) then \(n = pk\) for some integer \(k\text{.}\) Thus \(n^2 = (pk)^2 = p(pk^2)\) is a multiple of \(p\) as well.
For the oher direction, if \(n^2\) is a multiple of \(p\) then \(n^2 = pk\) for some integer \(p\text{.}\) This means that \(p\) divides \(n^2\text{.}\) By Euclid's lemma \(p\) divides \(n\text{.}\)
25
Give an example to show that the result from the previous exercise doesn't necessarily hold if \(p\) is not prime.
SolutionConsider \(p=4\) and \(n=2\text{.}\) Then \(n^2 = 4 = p\) is a multiple of \(p\text{,}\) but \(n\) is not a multiple of \(p\) since it is less than \(p\text{.}\)