Skip to main content
\(\require{mathrsfs}\newcommand{\abs}[1]{\left| #1 \right|} \renewcommand{\emptyset}{\varnothing} \DeclareMathOperator{\dom}{dom} \DeclareMathOperator{\range}{rng} \DeclareMathOperator{\perm}{perm} \newcommand{\lt}{<} \newcommand{\gt}{>} \newcommand{\amp}{&} \)

Section5.7Exam 1 Review

1

Recall all the definitions we have discussed, both in plain English, and their logical form.

2

Recall all the proof structures we have discussed, and know how to implement them.

3

Suppose that \(a,b\) are nonzero integers. Let \(q,r\) be the quotient and remainder obtained from the Division Algorithm. Prove that \(\gcd(a,b) = \gcd(b,r)\text{.}\)

Solution

Suppose that \(a,b\) are nonzero integers and \(q,r\) are the quotient and remainder from the Division Algorithm, so that \(a = qb+r\text{.}\) We will prove that the common divisors of \(a,b\) are the same as the common divisors of \(b,r\text{,}\) and therefore these pairs have the same gcd.

Suppose that \(c\) is a common divisor of \(a,b\text{,}\) so that \(a = cm\) and \(b = cn\) for some \(m,n \in\mathbb{Z}\text{.}\) Then \(r = a-bq = cm-cnq = c(m-nq)\text{,}\) so \(c\) divides \(r\text{.}\) Since it already divides \(b\text{,}\) this means \(c\) is a common divisor of \(b,r\text{.}\)

The proof that a common divisor of \(b,r\) is also a common divisor of \(a,b\) is almost identical to the previous paragraphy, so we omit it.

4

Prove that if \(m^2\) is odd, then \(m\) is odd. Note: you should be able to provide two different proofs of this result (see the hint for two different ideas).

Hint

You should be able to prove this using parity. You should also be able to provide a different proof using Euclid's lemma.

Solution1

We prove the contrapositive, namely, if \(m\) is not odd, then \(m^2\) is not odd. By parity, this is equivalent to: if \(m\) is even, then \(m^2\) is even.

Suppose that \(m\) is even. Then \(m = 2k\) for some \(k \in \mathbb{Z}\text{.}\) Thus \(m^2 = 4k^2 = 2(2k^2)\text{.}\) Snice \(2k^2\) is an integer, \(m^2\) is even.

Solution2

Suppose that \(m^2\) is odd. Then \(m^2 = 2k+1\) for some integer \(k\text{.}\) Thus \(2k = m^2 -1 = (m-1)(m+1)\text{.}\) Since \(2\) is prime and divides the product \((m-1)(m+1)\text{,}\) by Euclid's Lemma we know that either \(2\) divides \(m-1\) or \(m+1\text{.}\)

Case 1: Suppose \(2\) divides \(m-1\text{.}\) Then \(m-1 = 2j\) for some \(j \in \mathbb{Z}\text{,}\) and so \(m = 2j+1\text{,}\) so \(m\) is odd.

Case 2: Suppose \(2\) divides \(m+1\text{.}\) Then \(m+1 = 2j\) for some \(j \in \mathbb{Z}\text{,}\) and so \(m = 2j-1 = 2(j-1)+1\text{,}\) so \(m\) is odd.

5

Prove that the product of three consecutive integers is divisible by \(3\text{.}\)

Solution

Let \(n,(n+1),(n+2)\) be an arbitrary choice of three consecutive integers. Notice that to prove that \(3\) divides \(n(n+1)(n+2)\) it suffices to prove that \(3\) divides one of the factors in the product. By the Division Algorithm, \(n = 3q+r\) for some integers \(r,q\) with \(r \in \{0,1,2\}\text{.}\)

Case 1: \(r = 0\). Then \(n = 3q\) so \(3\) divides \(n\text{.}\)

Case 2: \(r = 1\). Then \(n+2 = (3q+1)+2 = 3(q+1)\) so \(3\) divides \(n+2\text{.}\)

Case 3: \(r = 2\). Then \(n+1 = (3q+2)+1 = 3(q+1)\) so \(3\) divides \(n+1\text{.}\)

6

Prove that if \(p,q\) are distinct primes (i.e., \(p \not= q\)) and \(p,q\) each divide \(a\text{,}\) then \(pq\) divides \(a\text{.}\)

Solution1

Since \(p,q\) are primes, the only divisors of \(p\) are \(1,p\text{,}\) and the only divisors of \(q\) are \(1,q\text{.}\) Since \(p \not= q\text{,}\) the only commmon divisor is \(1\text{,}\) so \(\gcd(p,q) = 1\text{.}\) By a previous problem, if relatively prime integers each divides an integer \(a\text{,}\) then so does their product. Thus \(pq\) divides \(a\text{.}\)

Solution2

Suppose \(p,q\) each divide \(a\text{.}\) Then \(pm = a = qn\) for some \(m,n \in \mathbb{Z}\text{.}\) Thus \(p\) divides the product \(qn\text{.}\) Since \(p\) is prime, by Euclid's Lemma, either \(p \mid q\) or \(p \mid n\text{.}\) Since \(q\) is prime, it's only divisors are \(1,q\text{,}\) and hence \(p \not\mid q\) since \(p \not= q\text{.}\) Therefore \(p \mid n\text{.}\) Hence \(n = pk\) for some \(k \in \mathbb{Z}\text{.}\) Finally, \(a = qn = q(pk) = (pq)k\text{,}\) so \(pq \mid a\text{.}\)

7

Suppose \(m\) is an odd integer. Prove that \(m^2\) has remainder \(1\) when divided by \(4\text{.}\)

Solution

Assume \(m\) is an odd integer. Then \(m = 2k+1\) for some \(k \in \mathbb{Z}\text{.}\) Thus \(m^2 = 4k^2 + 4k + 1 = 4(k^2 + k) + 1\text{.}\) Therefore \(m^2\) has remainder \(1\) when divided by \(4\) (since we can write it as \(4\) times an integer plus \(1\)).

8

Prove that if \(x \in \mathbb{R}\) and \(x^2 = 2\text{,}\) then \(x\) is irrational.

Hint

Assume \(x\) is rational and express the fraction in lowest terms, i.e., where the numerator and the denominator are relatively prime.

Solution

Assume to the contrary that \(x \in \mathbb{Q}\) and \(x^2 = 2\text{.}\) Then we may write \(x = \frac{a}{b}\) for \(a,b \in \mathbb{Q}\) with \(b \not= 0\text{.}\) Moreover, by <<Unresolved xref, reference "lem-rational-lowest-terms"; check spelling or use "provisional" attribute>>  we may even assume \(\gcd(a,b) = 1\text{.}\) Since \(2 = x^2 = \frac{a^2}{b^2}\) we know \(2b^2 = a^2\text{,}\) which means that \(a^2\) is even since \(b^2\) is an integer. By Proposition 1.4.13 we know that \(a\) must be even as well. Thus \(a = 2k\) for some \(k \in \mathbb{Z}\text{.}\) Therefore, \(2b^2 = a^2 = (2k)^2 = 4k^2\) and so \(b^2 = 2k^2\text{.}\) Thus, \(b^2\) is even since \(k^2 \in \mathbb{Z}\text{.}\) By Proposition 1.4.13 we know that \(b\) must be even as well. Hence, \(a,b\) are both even which means they have a common divisor of \(2\text{,}\) which contradicts the fact that \(\gcd(a,b) = 1\text{.}\) Therefore our assumption was wrong and instead \(x \notin \mathbb{Q}\text{.}\)

9

Prove that for any natural number \(n\text{,}\) we have \(\gcd(n,n+1) = 1\text{.}\)

Solution1

Suppose that \(n \in \mathbb{N}\text{.}\) Then \((-1) \cdot n + 1 \cdot (n+1) = 1\) is a linear combination of \(n\) and \(n+1\text{,}\) and clearly it is the smallest positive linear combination (since any such combination must be an integer). Therefore, by Bezout's Identity, \(1 = \gcd(n,n+1)\text{.}\)

Solution2

Suppose that \(n \in \mathbb{N}\text{.}\) Let \(c\) be any positive common divisor of \(n,n+1\text{.}\) Then \(n = cj\) and \(n + 1 = ck\) for some integers \(j,k\text{.}\) Thus \(1 = (n+1) - n = ck-cj = c(k-j)\text{,}\) and so \(c\) divides \(1\text{.}\) Therefore \(c \le 1\text{.}\) Since \(c\) was an arbitrary positive common divisor, \(\gcd(n,n+1) = 1\text{.}\)

10

Use the previous problem to prove that there are infinitely many prime numbers.

Hint

Use contradiction and let \(n\) be the product of all the prime numbers.

Solution

Suppose to the contrary that there are only finitely many prime numbers, which we will list as \(p_1,p_2,\ldots,p_k\text{.}\) Let \(n = p_1 p_2 \cdots p_k\) be the product of all these primes. Note, all the primes divide \(n\text{.}\) By the previous problem, \(\gcd(n,n+1) = 1\text{.}\) By the fundamental theorem of arithmetic, there is a prime \(q\) dividing \(n+1\) (it is possible \(q = n+1\text{,}\) but that is not necessarily the case). Note that \(q\) must not divide \(n\) (because then it would be a common divisor of \(n,n+1\) greater than \(1\)). Therefore, \(q\) is a prime not equal to any of \(p_1,p_2, \ldots, p_k\text{,}\) contradicting that this is the list of all the primes. Therefore there must be infinitely many prime numbers.

Note, we used the fundamental theorem of arithmetic to say that \(n+1\) had a prime dividing it. This is overkill. All we really need is that any natural number greater than \(1\) has a prime dividing it, which is much easier to prove than the fundamental theorem of arithmetic. We will learn how to prove this simpler fact in a few weeks.

11

Prove that if every even natural number greater than \(2\) is the sum of two primes, then every odd natural number greater than \(5\) is the sum of three primes.

Solution

Suppose that every even natural number greater than \(2\) is the sum of two primes. Now let \(n\) be an odd natural number greater than \(5\text{.}\) Then \(n = 2k+1\) for some \(k \in \mathbb{Z}\text{,}\) and so \(n-3 = 2k+1-3 = 2(k-1)\) is even. Morevoer, \(n-3 \gt 5-3 = 2\) since \(n \gt 5\text{.}\) Therefore, we can write \(n-3 = p + q\) for some primes \(p,q\text{.}\) Finally, \(n = 3+p+q\text{,}\) and since \(3\) is also prime, we have written \(n\) as the sum of three primes.

12

Prove that if \(a\) divides both \(b-1\) and \(c-1\text{,}\) then \(a\) divides \(bc-1\text{.}\)

Solution

Suppose that \(a\) divides both \(b-1\) and \(c-1\text{.}\) Then \(b-1 = am\) and \(c-1 = an\) for some \(m,n \in \mathbb{Z}\text{.}\) Now

\begin{equation*} bc-1 = bc-b+b-1 = b(c-1)+(b-1) ban+am = a(bn+m)\text{.} \end{equation*}

Thus \(a\) divides \(bc-1\text{.}\)

Note, we could have also reasoned like this:

\begin{equation*} bc-1 = bc-c+c-1 = c(b-1)+(c-1) cam+an = a(cm+n)\text{.} \end{equation*}

Using this equation and the one above, we find that \(a(bn+m) = a(cm+n)\text{,}\) and thus \(bn+m = cm+n\) by cancellation. Thus \(b(n-1) = c(m-1)\text{,}\) which is a perhaps unexpected relationship.

13

Prove that if \(x\) is prime, then \(x+7\) is composite.

Solution

Suppose that \(x\) is prime. Then either \(x = 2\) or \(x\) is odd (because if \(x \gt 2\) and \(x\) is even, then \(x\) is divisible by \(2\) and therefore wouldn't be prime).

Case 1: \(x = 2\). Then \(x+7 = 9 = 3 \cdot 3\) is composite.

Case 2: \(x\) is odd. Then \(x = 2k+1\) for some \(k \in \mathbb{Z}\text{.}\) Moreover, \(x+7 = 2k+1+7 = 2(k+4)\text{,}\) so \(x+7\) is divisible by \(2\text{.}\) Also, \(x+7 \gt 2\text{,}\) so \(x+7\) is composite.

14

Prove that for sets \(A,B,C\text{,}\) we have the following two set equalities:

\begin{gather*} A \cap (B \cup C) = (A \cap B) \cup (A \cap C),\\ A \cup (B \cap C) = (A \cup B) \cap (A \cup C). \end{gather*}
Solution

First equality. Let \(x\) be arbitrary. Then

\begin{align*} x \in A \cap (B \cup C) &\iff (x \in A) \wedge (x \in B \cup C)\\ &\iff (x \in A) \wedge (x \in B \vee x \in C)\\ &\iff (x \in A \wedge x \in B) \vee (x \in A \wedge x \in C)\\ &\iff (x \in A \cap B) \vee (x \in A \cap C)\\ &\iff x \in (A \cap B) \cup (A \cap C) \end{align*}

Second equality. Let \(x\) be arbitrary. Then

\begin{align*} x \in A \cup (B \cap C) &\iff (x \in A) \vee (x \in B \cap C)\\ &\iff (x \in A) \vee (x \in B \wedge x \in C)\\ &\iff (x \in A \vee x \in B) \wedge (x \in A \vee x \in C)\\ &\iff (x \in A \cup B) \wedge (x \in A \cup C)\\ &\iff x \in (A \cup B) \cap (A \cup C) \end{align*}
15

Prove that if \(A,B,C\) are sets and \(A \subseteq B\text{,}\) \(B \subseteq C\text{,}\) and \(C \subseteq A\text{,}\) then \(A = B = C\text{.}\)

Solution

Assume \(A \subseteq B\text{,}\) \(B \subseteq C\text{,}\) and \(C \subseteq A\text{.}\)

By a result proven in class, since \(A \subseteq B\) and \(B \subseteq C\text{,}\) we also have \(A \subseteq C\text{.}\) Since \(C \subseteq A\text{,}\) this means \(A = C\text{.}\) Similarly, since \(B \subseteq C\) and \(C \subseteq A\text{,}\) by the same result from class, we know \(B \subseteq A\text{.}\) Since \(A \subseteq B\) this entails \(A = B\text{.}\) Thus \(B = A = C\text{.}\)

16

You should also be able to do problems 8, 9, 10(a), 10(c), 13, 17 from Section 2.3 on pages 96–99.

Solution

#8.

  1. Suppose \(B = \{a,b\}\text{,}\) \(\Delta = \{1,2\}\text{,}\) \(A_1 = \{a\}, A_2 = \{b\}\text{.}\) Then \(B \setminus A_1 = \{b\}\) and \(B \setminus A_2 = \{a\}\text{.}\) Moreover, \(\bigcap_{\alpha \in \Delta} A_{\alpha} = \emptyset\text{.}\) Therefore, \begin{equation*} B \setminus \left( \bigcap_{\alpha \in \Delta} A_{\alpha} \right) = B \setminus \varnothing = \{a,b\} \not= \varnothing = \{a\} \cap \{b\} = \bigcap_{\alpha \in \Delta} (B \setminus A_{\alpha}). \end{equation*}
  2. Suppose \(B = \{a,b\}\text{,}\) \(\Delta = \{1,2\}\text{,}\) \(A_1 = \{a\}, A_2 = \{b\}\text{.}\) Then \(B \setminus A_1 = \{b\}\) and \(B \setminus A_2 = \{a\}\text{.}\) Moreover, \(\bigcup_{\alpha \in \Delta} A_{\alpha} = \{a,b\} = B\text{.}\) Therefore, \begin{equation*} B \setminus \left( \bigcup_{\alpha \in \Delta} A_{\alpha} \right) = B \setminus B = \varnothing \not= \{a\} \cup \{b\} = \bigcup_{\alpha \in \Delta} (B \setminus A_{\alpha}). \end{equation*}
  3. We will prove this with a series of if and only if statements. \begin{align*} x \in \left( \bigcap_{\alpha \in \Delta} A_{\alpha} \right) \setminus B &\iff \left( \left(x \in \bigcap_{\alpha \in \Delta} A_{\alpha} \right) \wedge (x \notin B) \right)\\ &\iff \left( \left( \forall \alpha \in \Delta, x \in A_{\alpha} \right) \wedge (x \notin B) \right)\\ &\iff \left( \forall \alpha \in \Delta, (x \in A_{\alpha}) \wedge (x \notin B) \right)\\ &\iff \left( \forall \alpha \in \Delta, x \in (A_{\alpha} \setminus B) \right)\\ &\iff x \in \left( \bigcap_{\alpha \in \Delta} (A_{\alpha} \setminus B) \right) \end{align*}
  4. We will prove this with a series of if and only if statements. \begin{align*} x \in \left( \bigcup_{\alpha \in \Delta} A_{\alpha} \right) \setminus B &\iff \left( \left(x \in \bigcup_{\alpha \in \Delta} A_{\alpha} \right) \wedge (x \notin B) \right)\\ &\iff \left( \left( \exists \alpha \in \Delta, x \in A_{\alpha} \right) \wedge (x \notin B) \right)\\ &\iff \left( \exists \alpha \in \Delta, (x \in A_{\alpha}) \wedge (x \notin B) \right)\\ &\iff \left( \exists \alpha \in \Delta, x \in (A_{\alpha} \setminus B) \right)\\ &\iff x \in \left( \bigcup_{\alpha \in \Delta} (A_{\alpha} \setminus B) \right) \end{align*}

#9.

  1. Suppose that \(x \in \bigcup_{\alpha \in \Gamma} A_{\alpha}\text{.}\) Then there exists some \(\gamma \in \Gamma\) for which \(x \in A_{\gamma}\text{.}\) Since \(\Gamma \subseteq \Delta\text{,}\) \(\gamma \in \Delta\) as well. Therefore \(x \in \bigcup_{\alpha \in \Delta} A_{\alpha}\text{.}\)
  2. Suppose that \(x \in \bigcup_{\alpha \in \Delta} A_{\alpha}\text{.}\) Take any \(\gamma \in \Gamma\text{.}\) Since \(\Gamma \subseteq \Delta\text{,}\) \(\gamma \in \Delta\text{.}\) Since \(x \in \bigcup_{\alpha \in \Delta} A_{\alpha}\text{,}\) \(x \in A_{\gamma}\text{.}\) Since \(\gamma\) was chosen arbitrarily from \(\Gamma\text{,}\) this proves \(x \in \bigcup_{\alpha \in \Gamma} A_{\alpha}\text{.}\)

#10.

  1. Suppose \(B \subseteq A\) for every \(A \in \mathcal{A}\text{.}\) Then, take any \(x \in B\) and any \(C \in \mathcal{A}\text{.}\) Since \(B \subseteq C\text{,}\) we must have \(x \in C\text{.}\) Since \(C\) was arbitrary in \(\mathcal{A}\text{,}\) this shows that \(x \in \bigcap_{A \in \mathcal{A}} A\text{.}\) Since \(x\) was arbitrary in \(B\text{,}\) this proves the result.
  2. The largest \(X\) such that \(X \subseteq A\) for all \(A \in \mathcal{A}\) is precisely their intersection: \(\bigcap_{A \in \mathcal{A}} A\text{.}\)
  3. Suppose that \(A \subseteq D\) for every \(A \in \mathcal{A}\text{.}\) Take any \(x \in \bigcup_{A \in \mathcal{A}} A\text{.}\) Then there is some \(C \in \mathcal{A}\) for which \(x \in C\text{.}\) But we know \(C \subseteq D\) by hypothesis, and thus \(x \in D\text{.}\) Since \(x\) was arbitrarily chosen from the union, this proves the result.
  4. The smallest set \(Y\) such that \(A \subseteq Y\) for all \(A \in \mathcal{A}\) is precisely their union: \(\bigcup_{A \in \mathcal{A}} A\text{.}\)

#13. Suppose that \(\mathcal{A}\) is a family of pairwise disjoint sets and assume \(\mathcal{B} \subseteq \mathcal{A}\) is another family of sets. Take any \(C,D \in \mathcal{B}\text{.}\) Since \(\mathcal{B} \subseteq \mathcal{A}\text{,}\) we also have \(C,D \in \mathcal{A}\text{.}\) Because \(\mathcal{A}\) is a pairwise disjoint family, either \(C=D\) or \(C \cap D = \varnothing\text{.}\) Since \(C,D\) were arbitrarily chosen from \(\mathcal{B}\text{,}\) we know \(\mathcal{B}\) is a pairwise disjoint family.

#17.

  1. \(A_i := \left[-\frac{1}{i}, 1+\frac{1}{i}\right]\text{.}\)
  2. \(A_i := (0,1)\text{.}\)
  3. \(A_i := \left[ 0,\frac{1}{i}\right) \cup \left( 1-\frac{1}{i}, 0 \right]\text{.}\)
  4. \(A_i := \left(0,\frac{1}{i}\right)\text{.}\)