Math 2513, Spring 2013 Solutions to Sample Problems

Math 2513, Spring 2013
Solutions to Sample Problems
1. Write down the contrapositive and converse of each of the the following implications.
a. If a triangle with sides a, b, c (with c largest) is right-angled then a2 + b2 = c2 .
b. If 2n − 1 is prime then n is prime.
c. If the wind is from the south then the humidity is low.
The contrapositive of p → q is ¬q → ¬p and the converse is q → p.
a. contrapositive. If the sides a, b, c of a triangle satisfy a2 + b2 6= c2 then the
triangle is not right-angled.
converse. If the sides a, b, c of a triangle satisfy a2 + b2 = c2 then the triangle
is right-angled.
b. contrapositive. If n is not prime then 2n − 1 is not prime.
converse. If 2n − 1 is prime then n is prime.
c. contrapositive. If the humidity is not low then the wind is not from the south.
converse. If the humidity is low then the wind is from the south.
2. Let b and c be odd integers. Show that the equation x2 + bx + c = 0 has no integer
solutions.
Suppose an integer n satisfies n2 + bn + c = 0, or equivalently n2 = −bn − c. We’ll
show that this is impossible by showing that n cannot be even or odd. If n is even
then n2 is even and −bn − c is odd (since −bn is even and −c is odd and even +
odd = odd). Thus for n even we cannot have n2 = −nb − c. On the other hand, if
n is odd then n2 is odd. Further, n odd implies −bn − c is even. Indeed, if n is odd
then −bn is odd (odd × odd = odd) and so −bn − c is even (odd + odd = even).
Thus for n odd we also cannot have n2 = −nb − c.
3. Prove that for any real numbers x and y if x + y ≥ 2 then x ≥ 1 or y ≥ 1.
We’ll prove the contrapositive. Thus suppose it is not the case that x ≥ 1 or y ≥ 1.
This means x < 1 and y < 1. Hence x + y < 1 + 1 = 2, as required.
4. For any set S, recall that P(S) denotes the set of all subsets of S.
a. List the elements of P(P({∅})).
b. How many elements does P(P(P({∅}))) have?
c. List the elements of P(P(P({∅}))).
From class, if a set S has n elements then P(S) has 2n elements.
2
a. Note P({∅}) = {∅, {∅}}. Thus P(P({∅})) has four elements:
∅, {∅}, {{∅}}, {∅, {∅}}.
b. P(P(P({∅}))) has 24 = 16 elements.
c. The elements of P(P(P({∅}))) are the various subsets of P(P({∅})). We list
these subsets in order of increasing
size. There is one subset with no elements—
4
the empty set ∅. There are
= 4 subsets with a single element:
1
{∅}, {{∅}}, {{{∅}}}, {{∅, {∅}}}.
4
There are
= 6 subsets with two elements:
2
{∅, {∅}}, {∅, {{∅}}}, {∅, {∅, {∅}}}, {{∅}, {{∅}}},
{{∅}, {∅, {∅}}}, {{{∅}}, {∅, {∅}}}.
4
There are
= 4 subsets with three elements:
3
{∅, {∅}, {{∅}}},
{∅, {∅}, {∅, {∅}}},
{∅, {{∅}}, {∅, {∅}}},
{{∅}, {{∅}}, {∅, {∅}}}.
Finally, there is one subset with four elements:
{∅, {∅}, {{∅}}, {∅, {∅}}.
5. Let S and T be sets.
a. Show that (S \ T ) ∪ (T \ S) = (S ∪ T ) \ (S ∩ T ).
b. Show that (S \ T ) ∩ (T \ S) = ∅.
c. Show that S ∪ T = S ∩ T if and only if S = T .
a. To prove equality, we’ll show that each side is a subset of the other.
(S \ T ) ∪ (T \ S) ⊂ (S ∪ T ) \ (S ∩ T ): Let s ∈ S \ T . Then s ∈ S, so certainly
s ∈ S ∪ T . Further, since s ∈
/ T , we have s ∈
/ S ∩ T . Thus s ∈ (S ∪ T ) \ (S ∩ T ).
Similarly, if t ∈ T \ S then t ∈ (S ∪ T ) \ (S ∩ T ). Hence
(S \ T ) ∪ (T \ S) ⊂ (S ∪ T ) \ (S ∩ T ).
(S ∪ T ) \ (S ∩ T ) ⊂ (S \ T ) ∪ (T \ S): Now let x ∈ (S ∪ T ) \ (S ∩ T ). If x ∈ S
then x ∈
/ S ∩ T , so x ∈ S \ T . Similarly, if x ∈ T then we must have x ∈ T \ S.
This proves that
(S ∪ T ) \ (S ∩ T ) ⊂ (S \ T ) ∪ (T \ S).
3
b. Let s ∈ S \ T . Since s ∈
/ T , certainly s ∈
/ T \ S. That is, no element of S \ T
can also belong to T \ S. Thus (S \ T ) ∩ (T \ S) = ∅.
c. Clearly S = T implies S ∪ T = S ∩ T . Now suppose S ∩ T = S ∩ T . If s ∈ S
then s ∈ S ∪ T . From S ∩ T = S ∩ T , it follows that s ∈ S ∩ T , so s ∈ T . This
proves that S ⊂ T . In the same way, T ⊂ S. Hence S = T .
6. Consider f : R → R where f (x) = 2x − 3. Determine all functions g : R → R of
the form g(x) = αx + β such that f ◦ g = g ◦ f .
We have
f ◦ g(x) = f (g(x)) = 2g(x) − 3
= 2(αx + β) − 3
= 2αx + 2β − 3
and
g ◦ f (x) = g(f (x)) = αf (x) + β
= α(2x − 3) + β
= 2αx + β − 3α.
Clearly 2β − 3 = β − 3α implies f ◦ g(x) = g ◦ f (x), for all x ∈ R, i.e., f ◦ g = g ◦ f .
Conversely, f ◦ g = g ◦ f implies f ◦ g(0) = g ◦ f (0), i.e., 2β − 3 = β − 3α. Thus
f ◦ g = g ◦ f if and only if 2β − 3 = β − 3α or equivalently 3α + β = 3.
7. Consider the function f : R → R given by
(
x,
if x ∈ Q,
f (x) =
x + 1, if x ∈
/ Q.
Show that f is a bijection and find f −1 .
To check surjectivity, let x ∈ R. If x ∈ Q then f (x) = x. If x ∈
/ Q then f (x−1) = x.
In either case, x is in the range of f , so f is surjective.
To check injectivity, suppose f (x) = f (y) for real numbers x and y. If x and y are
both rational then x = y. If they are both irrational then x + 1 = y + 1 and again
x = y. Suppose now that one of the numbers is rational and the other is irrational.
Without loss of generality, we may assume x is rational and y is irrational. Then
x = y + 1 and so y = x − 1 must also be rational—a contradiction. So the numbers
are either both rational or both irrational. Thus f (x) = f (y) implies x = y, i.e.,
f is injective.
We have
f
−1
(
x,
if x ∈ Q,
(x) =
x − 1, if x ∈
/ Q.
4
8. Consider the function g : R → R given by
(
x2 ,
if x ∈ Q,
f (x) =
x + 1, if x ∈
/ Q.
a. Is f injective?
b. Is f surjective?
a. No. We have f (1) = 1 = f (−1) but 1 6= −1.
b. No. For instance, there is no x ∈ R with f (x) = −1. Indeed, for x ∈ Q we have
f (x) = x2 ≥ 0, so f (x) 6= −1. On the other hand, f (x) = −1 for x ∈
/ Q would
mean x + 1 = −1, or equivalently x = −2, which is impossible given x ∈
/ Q.
9. a. Prove that the set of all polynomials with integer coefficients is countable.
b. Show that the set of all irrational real numbers is uncountable.
a. Let P (x) = a0 + a1 x + a2 x2 + · · · + an xn be a non-zero polynomial with integer
coefficents (so that a0 , a1 , . . . , an ∈ Z). Define the height h(P ) of P by
h(P ) = |a0 | + a1 | + · · · + |an | + n.
For N > 0, note that h(P ) ≤ N implies n ≤ N and |ai | ≤ N (for i = 0, 1, . . . n)
It follows that there are only finitely many polynomials P with h(P ) ≤ N (for
any positive integer N ). Thus we can exhaustively list all polynomials with
integer coefficients by starting with the zero polynomial, then listing those of
height one, followed by those of height two, then height three, and so on.
b. We proved in class the fundamental result that R is uncountable. We also
showed that Q is countable and that a union of two countable sets is countable
(more generally, a countable union of countable sets is countable). Now
R = (R \ Q) ∪ Q.
It follows that R \ Q must be uncountable as otherwise R would be a union of
two countable sets and so would be countable.
10. Let a and b be any real numbers with a < b. Show that there is a bijection from
the interval (0, 1) to the interval (a, b).
f (x) = (b − a)x + a gives a bijection from (0, 1) to (a, b).
11. Show that S = {(x, y) ∈ R2 : x2 + y 2 = 1} (the unit circle) is uncountable.
The map θ 7→ (cos θ, sin θ) : [0, 2π) → S is a bijection. Thus S is uncountable if
and only if [0, 2π) is uncountable. Now any infinite interval in R is uncountable
(why?) and thus S is uncountable.
12. a. Prove that 2n + 1 ≤ 2n for all integers n ≥ 3.
b. Prove that nn+1 > (n + 1)n for all integers n ≥ 3.
5
c. Prove that
Pn
k=1
k k! = (n + 1)! − 1 for all integers n ≥ 1.
a. Write P (n) for the statement 2n + 1 ≤ 2n . We use induction to show that P (n)
holds for all integers n ≥ 3. The base case 2 × 3 + 1 ≤ 23 is true. Assuming the
statement holds for an integer m ≥ 3, we’ll show it also holds for m + 1 (the
inductive step). Thus suppose 2m + 1 ≤ 2m , for m ≥ 3. Then
2(m + 1) + 1 = 2m + 1 + 2
≤ 2m + 2
≤ 2m + 2 m
= 22
(since 2 ≤ 2m )
m
= 2m+1 .
This establishes the inductive step. By induction, the statement holds for all
integers n ≥ 3.
b. I don’t see a way to give a direct proof by induction. If I’m missing something,
please let me know. Here’s an alternative approach. For any positive integer n,
1 n
(n + 1)n
= 1+
.
nn+1 > (n + 1)n ⇐⇒ n >
nn
n
It suffices therefore to show that
1 n
1+
< n, for n ≥ 3. (4)
n
Now
n 1 n X n
1
1+
=
n
k nn−k
=
=
<
k=0
n
X
k=0
n
X
k=0
n
X
k=0
n(n − 1)(n − 2) · · · (n − k + 1) 1
k!
nn−k
n(n − 1)(n − 2) · · · (n − k + 1) 1
n · n · n···n
k!
1
.
k!
To prove (4), we could note that
n
∞
X
X
1
1
<
k!
k!
k=0
k=0
and that the infinite series has sum e which is < 3. (If you’re unfamiliar with
this infinite series, it’s covered in Calc. III.) Instead, we’ll take another route
that relies only on the formula for the sum of a geometric series which we
discussed in class:
∞
X
a
ak =
, for |a| < 1.
1−a
k=1
6
Note k! ≥ 2k−1 for k ≥ 2 (check this using induction or a direct argument), or
1
1
equivalently
≤ k−1 (k ≥ 2). Hence, for n ≥ 3,
k!
2
n
n
n
X
X
X
1
1
1
=2+
≤2+
k!
k!
2k−1
k=0
k=2
<2+
k=2
∞
X
k=1
1
2k
= 2 + 1,
where the last line follows from the formula for the sum of a geometric series.
Hence
1 n
1+
< 3 ≤ n, for n ≥ 3.
n
This proves (4) and hence the original inequality.
Pn
c. Consider the statement k=1 k k! = (n + 1)! − 1 for a positive integer n. We
use ordinary induction to show that this holds for all positive integers. The
base case 1 1! = 2! − 1 is clearly true. For the inductive step, we assume
m
X
k k! = (m + 1)! − 1,
k=1
for m ≥ 1. We then have
m+1
X
k k! =
k=1
m
X
k k! + (m + 1) (m + 1)!
k=1
= (m + 1)! − 1 + (m + 1) (m + 1)!
= (m + 2) (m + 1)! − 1
= (m + 2)! − 1,
and so the statement also holds for m + 1. Hence, by induction, the statement
holds for all positive integers.
13. Find the greatest common divisor d of 552 and 713 and find integers x and y such
that d = 552x + 713y.
We use Euclid’s algorithm.
713 = 1 × 552 + 161
552 = 3 × 161 + 69
161 = 2 × 69 + 23
69 = 3 × 23 + 0.
7
Thus (552, 713) = 23. Working backwards,
23 = 161 − 2 × 69
= 161 − 2(552 − 3 × 161)
= 7 × 161 − 2 × 552
= 7 × (713 − 552) − 2 × 552
= 7 × 713 − 9 × 552.
14. Determine 3301 (mod 11) and 5110 (mod 13).
By Fermat’s little theorem, 310 ≡ 1 (mod 11) and hence
3301 ≡ (310 )30 3
(mod 11)
≡ 130 3
(mod 11)
≡3
(mod 11).
Similarly, 512 ≡ 1 (mod 13). Using 110 = 12 × 9 + 2, we see that
5110 ≡ (512 )9 52
(mod 13)
≡ 25
(mod 13)
≡ 12
(mod 13).
15. Let p be a prime number.
a. Show that if x2 ≡ x (mod p) then x ≡ 0 (mod p) or x ≡ 1 (mod p).
b. Suppose an integer a is not divisible by p. Show that ax ≡ 1 (mod p) has a
solution x in Z.
a. Recall from class that if p | ab (for integers a and b) then p | a or p | b. We
have p | x2 − x = x(x − 1) and thus p | x or p | x − 1. That is, x ≡ 0 (mod p)
or x ≡ 1 (mod p).
b. As p - a, we have (a, p) = 1. Hence there exist integers x and y such that
ax + py = 1. Thus p | ax − 1, that is, ax ≡ 1 (mod p).
16. Let a, b, c be positive integers such that a | c and b | c.
a. Show that if (a, b) = 1 then ab | c.
b. Given an example to that ab need not divide c if a and b are not relatively prime.
a. By hypothesis, there are integers e and f such that c = ae and c = bf . Further,
there are integers x and y such that ax + by = 1. Hence
c = c(ax + by) = cax + cby
= bf ax + aeby
= ab(f x + ey),
8
and so ab | c.
b. 4 | 12 and 6 | 12 but 4 × 6 = 24 - 12.
17. Show that n7 ≡ n (mod 21) for any integer n. [Hint: use Fermat’s little theorem
and part a of the preceding problem.]
Let n be an integer. By Fermat’s little theorem, n7 ≡ n (mod 7). Similarly,
n3 ≡ n (mod 3) and hence
n7 ≡ (n3 )2 n
(mod 3)
3
(mod 3)
≡n n
≡n
≡n
(mod 3)
2
(mod 3).
Thus 7 | n7 − n and 3 | n7 − n. Since 3 and 7 are relatively prime, it follows that
3 × 7 = 21 | n7 − n, that is, n7 ≡ n (mod 21).
18. Let p and q be distinct primes. Show that pq−1 + q p−1 ≡ 1 (mod pq).
We need to show that pq | pq−1 + q p−1 − 1. Since (p, q) = 1, it suffices by
problem 16 a to show that (i) p | pq−1 + q p−1 − 1 and (ii) q | pq−1 + q p−1 − 1. In
fact, we only need to prove (i) as (ii) is obtained simply by interchanging the roles
of p and q. By Fermat’s little theorem, q p−1 ≡ 1 (mod p). That is, p | q p−1 − 1
and hence also p | pq−1 + q p−1 − 1.
19. a. Prove that
√
p is irrational for any prime number p.
b. Prove that log2 3 is irrational.
√
a. Suppose p = n/m for positive integers n and m. Then pn2 = m2 . It follows
that the power of p in the prime factorization of pn2 must be odd while the
power of p in the prime factorization of m2 must be even. [Write e (resp. f ) for
the power of p in the prime factorization of n (resp. m). Then the power of p in
the prime factorization of pn2 (resp. m2 ) is 1 + 2e (resp. 2f ).] This contradicts
√
uniqueness of prime factorizations. Thus p must be irrational.
b. Suppose log2 3 = n/m, for positive integers n and m. Then 2n/m = 3, or
equivalently 2n = 3m . This is impossible (for example, the left side is even and
the right side is odd). Thus log2 3 is irrational.
20. Show that
Note
(n + m)!
is an integer for any non-negative integers n and m.
n! m!
(n + m)!
n+m
=
n! m!
n
counts the number of subsets with n elements of a set with n + m elements, and
so is certainly an integer.
9
21. a. How many injective functions are there from {1, 2, 3} to {1, 2, 3, 4}?
b. How many surjective functions are there from {1, 2, 3, 4} to {1, 2}?
c. How many surjective functions are there from {1, 2, 3, 4} to {1, 2, 3}?
I’ll just write down the answer as we worked through this in detail in class.
a. 4 × 3 × 2 = 24.
b. 24 − 2 = 14.
3
3
4
c. 3 −
× 14 −
× 3 = 30.
2
1
22. The digits 1, 2, 3, 4, 5, 6 are written down in some order to form a six-digit number.
a. How many such numbers are there in all?
b. How many such numbers are even?
c. How many such numbers are divisible by 5?
d. How many such numbers are divisible by 4?
a. Writing down such a number, say abcdef , is a six-step process. First we write
down a, then b, and so on. There are 6 choices for a, then 5 for b (having chosen
a) etc. Thus there are 6! = 6 × 5 × 4 × 3 × 2 × 1 = 720 numbers in all.
b. The even numbers in part a are exactly those where the units digit is 2, 4 or
6. Once more we can think of writing down the even numbers as a six-step
process. Write the number as f edcba. We first choose the units digit a, so
there are 3 possibilities, then the tens digit b, and so on. Having chosen a,
there are 5 possibilities for b (it can be anything except our choice for a), then
4 for c etc. In all, there are 3 × 5! = 360 even numbers.
c. To be divisible by 5 there must be a 5 in the units place. The remaining places
can be assigned arbitrarily. So 5! = 120 of the numbers are divisible by 5.
d. Note abcdef = abcd × 100 + ef . Since 4 | 100, it follows that 4 | abcdef if
and only if 4 | ef . Thus there are 6 possibilities for the last two digits of the
number, namely 12, 16, 24, 32, 36 or 56. Having chosen the last two digits, the
remaining digits can be selected arbitrarily. Thus 6 × 4! = 144 of the numbers
are divisible by 4.
23. a. Find the coefficient of x15 in (1 + x)18 .
1
b. Find the coefficient of x3 in (x2 − ) 7 .
x
18
18
18 × 17 × 16
a.
=
=
= 816.
15
3
3×2×1
10
b. We have
(x2 −
7 1 7 X 7
1
) =
x2k (− )7−k
x
x
k
k=0
7 X
7
=
(−1)7−k x3k−7 .
k
k=0
The equation 3k −7 = 3 has no integer solutions, so certainly there is no integer
in the given range such that 3k − 7 = 3. Hence the coefficient of x3 is 0.
24. a. Explain why
n
n
=
(for any nonnegative integers n and k with k ≤
k
n−k
n).
b. By comparing coefficents of xn in (1+x)n (1+x)n = (1+x)2n , prove the identity
n 2
X
n
2n
=
.
k
n
k=0
c. Give a direct combinatorial proof of the identity in part b. [Hint: split a pile
of 2n objects into two piles of equal size and note that to choose n objects from
the piles, you must choose k objects from one and n − k from the other.]
a. See Rosen 411-412 (Corollary 2).
n
b. The coefficient of x in (1 + x)
2n
is
!
2n
. On the other hand,
n
(1 + x)2n = (1 + x)n (1 + x)n
n n X
n i X n j =
x
x
i
j
i=0
j=0
n X
n X
n n i+j
=
x .
i
j
i=0 j=0
Collecting terms we see that the coefficient of xn is given by
X
n n 2
X
n
n
n
=
k
n−k
k
k=0
and thus
k=0
X
n 2
2n
n
=
,
n
k
k=0
as required.
c. See Rosen 420 (Corollary 4).