MIT6 042JS15 cp2 Solutions

Download as pdf or txt
Download as pdf or txt
You are on page 1of 6

Math for CS 2015/2019 solutions to “In-Class

Problems Week 1, Fri. (Session 2)”

https://github.com/spamegg1

November 27, 2022

Contents
1 Problem 1 1

2 Problem 2 1
2.1 Generalizing even further . . . . . . . . . . . . . . . . . . . . . . . . . . 3

3 Problem 3 5

4 Problem 4 5

1 Problem 1
Prove that if a·b = n, then either a or b must be ≤ n, where a, b, and n are nonnegative
real numbers. Hint: by contradiction, Section 1.8 in the course textbook.

Proof. 1. Assume a, b, n are nonnegative real numbers, and a · b = n.


√ √
2. Argue by contradiction. Assume a > n and b > n.

3. Since all the numbers involved√a, b, √
n, n are nonnegative, we can multiply the two
inequalities in (2) to get: a · b > n · n.
4. Using (1) we can replace a · b with n, so (3) gives us: n > n, a contradiction.
√ √
5. Our assumption in (2) must be false, therefore either a ≤ n or b ≤ n.

2 Problem 2

Generalize the proof of Theorem 1.8.1 repeated
√ below that 2 is irrational in the
course textbook. For example, how about 3?
We want to prove:

1

Theorem 1. 3 is an irrational number.
First we will need another result:
Lemma 1. Assume n is a positive integer. If 3 divides n2 , then 3 divides n.
This is actually Problem 1.10
√ part (b) in the textbook! Prof. Meyer tells
us to do it in the proof of 2 is irrational.

Proof. 1. Assume n is a positive integer and 3 divides n2 .


2. By definition of divisibility there exists an integer k such that 3k = n2 (we will
need this later below).
3. Argue by contradiction and assume that 3 does not divide n.
4. By the Quotient-Remainder Theorem there exist integers q, r such that n = 3q + r
where 0 ≤ r < 3.
5. Since 3 does not divide n, r cannot be 0. So r must be 1 or 2.
6. Case 1. r = 1.
6.1. Then n = 3q + 1. So n2 = (3q + 1)2 = 9q 2 + 6q + 1.
6.2. So 3k = 9q 2 + 6q + 1, dividing by 3 we get k = 3q 2 + 2q + 31 .
6.3. Moving terms, we get k − 3q 2 − 2q = 31 . This is a contradiction! Because the
left-hand side k − 3q 2 − 2q is an integer, but the right-hand side 13 is not an integer.
7. Case 2. r = 2.
7.1. Then n = 3q + 2. So n2 = (3q + 2)2 = 9q 2 + 12q + 4.
7.2. So 3k = 9q 2 + 12q + 4, dividing by 3 we get k = 3q 2 + 4q + 34 .
7.3. Moving terms, we get k − 3q 2 − 4q = 43 . This is a contradiction! Because the
left-hand side k − 3q 2 − 4q is an integer, but the right-hand side 43 is not an integer.
8. The two cases in (6) and (7) are exhaustive of all possibilities, and in all cases we
had a contradiction.
9. Therefore our assumption must have been false, so 3 divides n.

Now we can begin the proof of the Theorem.



Proof. 1. Argue by contradiction and assume 3 is rational.
2.
√ Byn the definition of a rational number, there exist integers n and d such that
3 = d where d ̸= 0 and n and d have no common divisors greater than 1.
Without
√ loss of generality, we may assume that both n and d are both positive, since
3 is positive.
n2
3. Squaring both sides we get 3 = d2 .

2
4. Multiplying both sides by d2 we get 3d2 = n2 .
5. From this equation we notice that 3 divides n2 . (Because there exists an integer
k = d2 such that n2 = 3k, which is the definition of divisibility).
6. By (5) and the Lemma, 3 divides n.
7. By (6) and the definition of divisibility, there exists an integer m such that 3m = n.
8. Substituting (7) into (4) we get 3d2 = (3m)2 = 9m2 .
9. Dividing by 3, we get d2 = 3m2 . This means d is divisible by 3, which is a
contradiction to the fact that n and d have no common divisors greater than 1.

10. Therefore our initial assumption was false, hence 3 is irrational.

2.1 Generalizing even further


This subsection is fairly hard and is optional.

How far can this Theorem be generalized? Is 4 √ irrational too? No, it’s equal to 2.
Where would the proof go wrong if we tried it on 4?

Let m vary over the positive integers, and consider the general statement: “ m is
irrational.” Intuitively, it seems like this should be true as long as m itself is not a
perfect square. If we go through the proof, we end up with a step where md2 = n2 ,
and we notice m divides n2 . Then we would have to prove the Lemma, that is, if m
divides n2 then m divides n, and derive the contradiction similarly.
So, is it true that if m and n are positive integers, m is not a perfect square, and
m divides n2 , then m divides n? Not quite. We can let n = pq where p and q are two
primes that are different from each other, and let m = p2 q. Then m divides n2 = p2 q 2
but not n = pq. So we cannot use the same argument, with the same Lemma, to prove
the Theorem for all m that are not perfect squares.
However, the Claim that if m divides n2 then m divides n should hold true for all
prime m. When m = 3 we had to consider two cases: where the remainder of
dividing n by m was 1 or 2. In general there will be m − 1 cases! We cannot go
through them one by one (we don’t know how many there are, since we don’t know
the value of m), so we will have to “parametrize” all the cases and handle them in a
generic way.
Lemma 2. Assume m and n are positive integers and m is prime. If m divides n2
then m divides n.

Proof. 1. Assume m and n are positive integers, m is prime, and m divides n2 .


2. By definition of divisibility, there exists an integer k such that mk = n2 . (We notice
that k must be positive.)
3. By the Quotient-Remainder theorem there exist integers q, r such that n = qm + r
where 0 ≤ r < m.

3
4. If r = 0 then n = qm so m divides n, and we are done. So now consider the case
r > 0.
5. Then n2 = (qm + r)2 = q 2 m2 + 2qmr + r2 .
6. By (2) and (4) we have q 2 m2 + 2qmr + r2 = mk.
r2
7. Dividing by m we get q 2 m + 2qr + m = k.
2
8. Moving terms, we get q 2 m + 2qr − k = − rm .
9. Since m is prime and 0 < r < m, r2 is not divisible by m. (We need to prove
this!)
10. So the LHS of (8) is an integer, while the RHS of (8) is not an integer (because
r ̸= 0), a contradiction.
11. Our initial assumption must have been false, therefore m divides n.

Let’s prove step (9). We have to use the Fundamental Theorem of Arithmetic and
properties of prime numbers.
Claim 1. Assume m is prime and 0 < r < m is an integer. Then m does not divide
r2.

Proof. 1. Assume m is prime and 0 < r < m is an integer.


2. By the Fundamental Theorem of Arithmetic, there exist primes p1 , . . . , pn and
positive integers a1 , . . . , an such that

r = pa11 · pa22 · . . . · pann

3. By (2), we have pi ≤ r for all i = 1, . . . , n.


4. Since 0 < r < m, by (3) we have pi < m for all i = 1, . . . , n.
5. Since m is prime, by (4) we have m ∤ pi for all i = 1, . . . , n.
6. Since m is prime, by (5) m does not divide any product of the primes p1 , . . . , pn
either.
7. By (2) we have
r2 = p2a 2a2 2an
1 · p2 · . . . · pn
1

so r2 is a product of the primes p1 , . . . , pn .


8. By (7) and (6) m does not divide r2 .

With Lemma 2, we are able √ to generalize the Theorem to square roots of any primes
(just repeat the proof for 3 where m replaces 3, and use Lemma 2 in the place of
Lemma 1):

Theorem 2. Assume m is prime. Then m is irrational.

4
Earlier we said that the theorem should hold not just for prime m, but any m that is
not a perfect square itself. However proving this greater generalization would require
more work.

3 Problem 3
If we raise an irrational number to √an irrational power, can the result be rational?
√ 2
Show that it can, by considering 2 and arguing by cases.

√ 2
Proof. 1. Case 1. 2 is rational.

1.1. We know that 2 is irrational (earlier Theorem from the lecture).

1.2. So in this case, an irrational, namely √2, raised to an irrational power, namely
√ √ 2
2, gives us a rational number, namely 2 . Therefore we proved the claim in this
case.
√ √2
2. Case 2. 2 is irrational.
2.1. By the law of exponents (ab )c = abc we have:
√  √2 √ √
√ √ √

2 2· 2 2
2 = 2 = 2 =2


√ 2
2.2. So, in this case, once√again we have an irrational, namely 2 , raised to an
irrational power, namely 2, that results in a rational number, namely 2. So we
proved the claim in this case too.

4 Problem 4
The fact that that there are irrational numbers a, b such that ab is rational was proved
earlier by cases. Unfortunately, that proof was nonconstructive: it didn’t reveal √ a
specific pair, a, b with this property. But in fact, it’s easy to do this: let a ::= 2 and
b ::= 2 log2 (3). We know a is irrational, and ab = 3 by definition. Finish the proof
that these values for a, b work by showing that 2 log2 (3) is irrational.

Proof. 1. Argue by contradiction and assume 2 log2 (3) is rational.


2. By the definition of a rational number, there exist integers n and d such that
2 log2 (3) = nd , where n and d have no common divisors greater than 1.
Without loss of generality we may assume d > 0.
n
3. Dividing both sides by 2, we get log2 (3) = .
2d
4. Using exponentiation with base 2 for both sides, we get 2log2 (3) = 2n/2d .

5
5. By the definition of log2 , we get 3 = 2n/2d .
6. Raising both sides to the power 2d we get 32d = 2n .
7. Dividing, we get
32d
=1
2n
8. Since 2 and 3 are different primes, 2n cannot divide 32d , unless n = 0. So by (7) we
have n = 0.
9. By (8) and (2) we have 2 log2 (3) = d0 = 0 which is a contradiction. (Because for
the log2 function, the only root is x = 1. So log2 (3) ̸= 0.)
10. Therefore 2 log2 (3) is irrational.

You might also like