Solutions To Homework Set 1

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

Solutions to Homework Set 1

1. Prove that
“not-Q ⇒ not-P ” implies “P ⇒ Q”.
• In class we proved that
“A ⇒ B” implies “not-B ⇒ not-A”
Replacing the statement A by the statement not-Q and the statement B by the statement not-P ,
we have
“not-Q ⇒ not-P ” implies “not-(not-P ) ⇒ not-(not-Q)”.
But
not-(not-P ) = P and not-(not-Q) = Q ,
so
“not-Q ⇒ not-P ” implies “P ⇒ Q”.

2. Prove that if m and n are even integers, then n + m is an even integer.


• If m and n are even integers, then, by definition, there exist integers s and t such that
m = 2s , n = 2t .
But then
m + n = 2s + 2t = 2(s + t) ,
so m + n is divisible by 2 as well. Hence, m + n is even.
3. Prove that if n is an odd integer, then n2 is an odd integer.
• We can assume that n = 2k + 1 for some k ∈ Z. (The actual justication for this assumption must
be postponed until after we discuss the Division Algorithm for Z). But then
 
n2 = (2k + 1)2 = 4k2 + 4k + 1 = 2 2k2 + 2k + 1
has the form of an odd integer - and so must be odd.
4. Prove that if n is an integer and n2 is odd, then n is odd.
• (Proof by Contradiction). Suppose, on the contrary, that n is an integer, n2 is odd, and n is not
odd. Then n is even, so n = 2k and
 
n2 = (2k)2 = 2 2k2
is even, which violates our hypothesis.
5. Prove, by the contrapositive method, that if c is an odd integer then the equation n2 + n − c = 0 has no
integer solution.
• The contrapositive of the proposition is: “If the equation n2 + n − c = 0 has an integer solution then
c is not an odd integer”.
But if n is an integer, then so is n2 + n. Hence c = n2 + n must be an integer. Suppose n is
even, then there exists a k ∈ Z such that n = 2k. Hence
 
c = (2k)2 + 2k = 2 2k2 + k
1
2

is even. Suppose on the other hand, that n is odd. Then there exists a s ∈ Z such that n = 2s + 1.
But then
 
c = (2s + 1)2 + (2s + 1) = 4s2 + 2s + 1 + 2s + 1 = 2 2s2 + 2s + 1
is again even. Hence, whether n is even or odd, c must be even; i.e., c must be not-odd.
6. Prove, by mathematical induction, that if n ≥ 5 then 2n > n2 .
• Clearly,
25 = 32 > 25 = 52 .
We thus only need to show that
“2n > n2 and n ≥ 5” ⇒ 2n+1 > (n + 1)2 .
Assume
2n > n 2 , n≥5 .
Then
2n + 2 n > n2 + n 2
or
(0.1) 2n+1 = 2 (2n ) = (2n + 2n ) > n2 + n2 = 2n2 .
It therefore suffices to check that
(0.2) 2n2 >? (n + 1)2 .
Expanding, the right hand side of (0.1), we get
2n2 >? n2 + 2n + 1
or equivalently
(0.3) n2 >? 2n + 1 .
Statement (eq-0.6.3) is certainly true for n = 5, since 25 > 11. But note also that if n2 > 2n + 1,
then adding 2n + 1 to both sides yields
n2 + 2n + 1 > 2n + 1 + 2n + 1
or
(n + 1)2 > 2n + 2(n + 1) > 2(n + 1) + 1 ifn > 1 .
Hence statement (0.3) is thus proved by mathematical induction.
This then implies the validity of (0.2). Combining (0.1) and (0.2) we have
2n+1 > 2n2 > (n + 1)2 ,
hence the original statement is proved via the principal of mathematical induction.
7. Prove by the contrapositive method that if c is an odd integer, there the equation n2 + n + c = 0 has no
integer solution for n.
• The premise of this statement is
c is odd
and the conclusion is
n2 + n + c = 0 has no integer solution
So the contrapositive of this statement would be
n2 + n + c = 0 has an integer solution ⇒ c is not odd
3

The equation n2 + n + c = 0 implies


− −n
c = n2 .
If n is integer, then it is either even or odd. If n is even,
n = 2k
for some k ∈ Z, and so
c = −n2 − n = −4k2 − 2k = 2(−2k2 − k)
is even. If n is odd then
n = 2s + 1
for some s ∈ Z, and so
c = −n2 − n = − 4s2 + 4s + 1 − (2s + 1) = 2 2s2 − 3s − 1
   

is even. Thus, in either case, c is not odd. Since the truth of the contrapositive implies the truth of
the original statement, the proposition is proved.
8. Prove by mathematical induction that
n
 n(n + 1)(2n + 1)
i2 = , ∀ n ∈ Z+ .
i=1
6

 i = n(n + 1)(2n + 1)
• Let S (n) be the statement
n
2

i=1
g
We need to show two things. ı(i) The statement S(1) is true. ı(ii) The truth of statement S (n)
implies the truth of statement S (n + 1).
The first is easy.
1 i2 = 1 = 66 = (1)(1 + 61)(2 + 1) .
i=1
As for (??), assume that S (n) is true. Then
i
n+1
2
=
 i + (n + 1)
n
2 2

i=1 i=1

= n(n + 1)(2 6
n + 1) + (n + 1)2

= n ( n + 1)(2 n + 1) + 6(n + 1)2


6
= ( n + 1) ( n (2 n + 1) + 6(n + 1))
6
= ( n + 1)(2 n 2 + 7n + 6)

6
= ( n + 1)( n + 2)(2n + 3)
6
= (n + 1) ((n + 1) +6 1) (2(n + 1) + 1) ,
which is just the statement S (n + 1).
9. Prove the following identities.
(a) B ∩ ( C ∪ D ) = (B ∩ C ) ∪ ( B ∩ D )
4


B ∩ (C ∪ D ) = {z ∈ B andz ∈ C ∪ D}
= {z ∈ B and (z ∈ C orz ∈ D)}
= {(z ∈ B and z ∈ C ) or (z ∈ B and z ∈ D )}
= ( B ∩ C ) ∪ (B ∩ D )

(b) B ∪ ( C ∩ D ) = (B ∪ C ) ∩ ( B ∪ D )

B ∪ (C ∩ D) = {z ∈ B z ∈ C ∩ D}
or
= {z ∈ B z ∈ C andz ∈ D)}
or (
= {(z ∈ B or z ∈ C ) and (z ∈ B orz ∈ D)}
= ( B ∪ C ) ∩ (B ∪ D )

(c) C = (C − A) ∪ (C ∩ A)

( C − A) ∪ (C ∩ A) = {z ∈ C z ∈/ A} ∪ {z ∈ C andz ∈ A}
and
= {(z ∈ C andz ∈/ A) or (z ∈ C andz ∈ A)}
= {z ∈ C }
= C

10. Describe each set in set-builder notation:

(a) All positive real numbers.


{x | x ∈ R , x > 0}

(b) All negative irrational numbers.


{x | x ∈ R , x < 0 , x ∈/ Q}

(c) All points in the coordinate plane with rational first coordinate.


{(x,y) | x ∈ Q , y ∈ R}

(d) All negative even integers greater than −50.


5

{2k | k ∈ Z , −25 < k < 0}

11. Which of the following sets are nonempty?


 
(a) r ∈ Q | r2 = 2
• This set is empty because neither of the roots of r 2 = 2 is rational

 
(b) r ∈ R | r2 + 5r − 7 = 0

√ √3
• The quadratic formula gives us the roots of r 2 + 5r − 7 = 0. They are r ± = −5± 225−28 = − 52 ± 2
and they are both real numbers. Therefore this set is non-empty.

 
(c) t ∈ Z | 6t2 − t − 1 = 0

• We have 6 2t − t − 1 = (3t + 1) (2t − 1) and so the roots of 6 2 t −t−1 = 0 are t = − 13 , 12 ; neither of


which is an integer. Therefore this set is empty.

12. IsB is a subset of C when


(a) B = Z and C = Q?

• Yes, every integer is also a rational number.

(b) B = all solutions of x2 + 2x − 5 = 0 and C = Z?


√ √24 √
• The solutions of x2 + 2x − 5 = 0 are x± = −2± 2 4+20 = −1 ± 2 = −1 ± 6; neither of which is an
integer. and so B is not a subset of C .

(c) B = {a, b, 7, 9, 11, −6} and C = Q?


• The lettersa and b are not rational numbers. Hence there are two elements of B that do not lie in
C . Hence B is not a subset of C .
13. In each part find B − C , B ∩ C , and B ∪ C .
(a) B = Z and C = Q.
• Since every element of Z is an element of Q we have
B−C = {}
B∩C = B =Z
B∪C = C =Q

(b) B = R and C = Q.
6

• In this case, every element of C = Q is an element of B = R


B−C = {x | x ∈ R , x ∈/ Q}
B∩C = C=Q
B∪C = B=R

(c) B = {a, b, c, 1, 2, 3, 4, 5, 6} and C = {a, c, e, 2, 4, 6, 8}.



B − C = {b, 1, 3, 5}
B ∩ C = {a, c, 2, 4, 6}
B ∪ C = {a, b, c,e, 1, 2, 3, 4, 5, 6, 8}

14. Let A,B be subsets of U . Prove De Morgan’s laws:


(a) U − (A ∩ B) = (U − A) ∪ (U − B)
• We need to show that U − (A ∩ B) is a subset of (U − A) ∪ (U − B) and that (U − A) ∪ (U − B) is
a subset of U − (A ∩ B )
— U − (A ∩ B ) ⊂ (U − A) ∪ (U − B )

x ∈ U − (A ∩ B )
⇒ x ∈ U and x ∈/ A ∩ B
⇒ x ∈ U and (x ∈/ A or x ∈/ B)
⇒ (x ∈ U and x ∈/ A) or (x ∈ U and x ∈/ B)
⇒ (x ∈ U − A) or (x ∈ U − B)
⇒ x ∈ (U − A) ∪ (U − B)
The key step here was in passing from the third line to the fourth, where we employed the
“distributive law of logic”:
A and (B or C ) ⇔ (A and B) or (A and C )
— (U − A) ∪ (U − B ) ⊂ U − (A ∩ B )
The argument we use here is just the reverse of the sequence of arguments we used above:
x∈ x ∈ (U − A) ∪ (U − B)
⇒ (x ∈ U − A) or (x ∈ U − B)
⇒ (x ∈ U and x ∈/ A) or (x ∈ U and x ∈/ B )
⇒ x ∈ U and (x ∈/ A or x ∈/ B)
⇒ x ∈ U and x ∈/ A ∩ B
⇒ x ∈ U − (A ∩ B )
(b) U − (A ∪ B ) = (U − A) ∩ (U − B )
7

• We need to show that U − (A ∪ B) is a subset of (U − A) ∩ (U − B) and (U − A) ∩ (U − B) is a


subset of U − (A ∪ B ). This time we’ll argue a bit more efficiently using biconditional statements.
x ∈ U − (A ∪ B )
⇔ x ∈ U and x ∈/ (A ∪ B)
⇔ x ∈ U and (x ∈/ A and x ∈/ B)
⇔ (x ∈ U and x ∈/ A) and (x ∈ U and x ∈/ B)
⇔ (x ∈ U − A) and (x ∈ U − B)
⇔ x ∈ (U − A ) ∩ (U − B )
15.
(a) Give an example of a function that is injective but not surjective.
• The natural inclusion map i : Z → R is injective but not surjective.
(b) Give and example of a function that is surjective but not injective.
• Let A denote the set of nonzero real numbers, and let B denote the set of positive real numbers.
Then
f : A → B ; x → x2
is surjective, but not injective (f (−x) = f (x), but x = −x).
16. Prove that f : R → R : f (x) = x3 is injective.
• According to Descartes’ Sign Rule, the number of real roots of a polynomial equation is less than or
equal to the number of sign changes in the coefficients. So, the number of real solutions of x3 = C
is less than or equal to 1. If (x1 )3 = (x2 )3 then x1 = x2 . Hence, f is injective.
17. Prove that f : R → R : f (x) = −3x + 5 is surjective.
• Let y be an arbitray element of the range of f . We need to show that there is an x ∈ R such that
y = f (x). We’ll do this constructively by solving the equation y = −3x + 5 for y. One has
y = −3x + 5 ⇔ − 13 (y − 5) = x
and so for any y ∈ R
 1 
y = f − 3 (y − 5) ∈ Im (f )

18.
Let B and C be nonempty sets. Prove that the function
f : B ×C → C ×B
given by f (x,y) = (y, x) is a bijection.
• (i) f is a injection.
Suppose f (x1 , y1 ) = f (x2 , y2 ). Then (y1 ,x1 ) = (y2 , x2 ), so y1 = y2 and x1 = x2 , hence
(x1 , y1 ) = (x2 ,y2 ).
8

• (ii) f is a surjection.
Consider an arbitrary element (y, x) ∈ C × B. Evidently, (y,x) = f (x,y), so (y,x) ∈ Image(f ).
Hence, f is surjective.

You might also like