Download MATH10040: Numbers and Functions Homework 5: Solutions

Survey
yes no Was this document useful for you?
   Thank you for your participation!

* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project

Document related concepts

Location arithmetic wikipedia , lookup

Non-standard calculus wikipedia , lookup

Laws of Form wikipedia , lookup

Addition wikipedia , lookup

Fermat's Last Theorem wikipedia , lookup

Fundamental theorem of algebra wikipedia , lookup

Elementary mathematics wikipedia , lookup

Proofs of Fermat's little theorem wikipedia , lookup

Transcript
MATH10040: Numbers and Functions
Homework 5: Solutions
1. How many positive integers less than 10, 000 are not divisible by 4, 5
or 6?
Solution: Note that a number is divisible by 4 and 5 if and only if it
is divisible by 20 (since (4, 5) = 1). A number is divisible by 4 and 6
if and only if it is divisible by 12 (since the l.c.m of 4 and 6 is 12 - see
Homework, Problem 8), and a number is divisible by 5 and 6 if and
only if it is divisible by 30. A number is divisible by 4, 5 and 6 if and
only it is divisible by 60.
Let Ak be the set of numbers less than 10, 000 ( i.e. less than or equal
to 9999 ) which are divisible by k. Then |Ak | = b9999/kc (since if
b9999/kc = m then mk ≤ 9999 < (m + 1)k.
By the principle of inclusion-exclusion and the preceding observations, the number of positive integers less than 10000 which are divisible by 4, 5 or 6 is
|A4 ∪ A5 ∪ A6 | = |A4 | + |A5 | + |A6 | − |A20 | − |A12 | − |A30 | + |A60 |
9999
9999
9999
9999
9999
9999
9999
c+b
c+b
c−b
c−b
c−b
c+b
c
= b
4
5
6
20
12
30
60
= 2499 + 1999 + 1666 − 499 − 833 − 333 + 166
= 4665.
The answer is therefore 10000 − 4666 = 5335.
2. How many positive integers less than 1, 000, 000 are neither perfect
squares nor perfect cubes? (A perfect k-th power is an integer of the
form nk for some integer n.)
Solution: Let S be the set of squares less than or equal to 106 , and
let C the set of cubes less than or equal to 106 . Note that S ∩ C is
then the set of 6-th powers.1
Since 106 = 10002 , |S| = 1000. Similarly, |C| = 100 and |S ∩ C| = 10.
Thus
|S ∪ C| = 1000 + 100 − 10 = 1090
and thus the answer to our question is 106 − 1090 = 998, 910.
Use the following fact: If n ∈ Z has prime factorization n = pa1 1 · · · pat t then n is a
dth power if and only if d|ai for i = 1, . . . , t. Proof: Use the fundamental theorem of
arithmetic.
1
3. Let f : R → Z be the ceiling function. So for any x ∈ R, we have
f (x) = dxe := the smallest integer which is greater than or equal to
x. (Thus d2.3e = 3, d−2.3e = −2, dπe = 4, d57e = 57 etc. )
Prove that f has infinitely many different right inverses g : Z → R.
Solution: For each a ∈ R satisfying 0 ≤ a < 1 let ga : Z → R be the
map n 7→ n − a. For any integer n, we have f (ga (n)) = dn − ae = n
(since a < 1). Thus each of the infinitely many functions ga is a right
inverse of f .
4. Evaluate
10
7
and
14
.
7
Solution:
10
10
10 · 9 · 8
= 10 · 3 · 4 = 120.
=
=
1·2·3
7
3
14
14 · 13 · 12 · 11 · 10 · 9 · 8
= 13 · 11 · 2 · 3 · 4 = 3432.
=
7
1·2·3·4·5·6·7
5. (a) Let m and n be integers with 1 ≤ m ≤ n. Prove that
n
n−1
m
=n
.
m
m−1
(b) Let p be a prime number. Use part (a) to show that p|
ever 1 ≤ m ≤ p − 1.
p
m
when-
Solution:
(a)
n
m · n!
m
=
m
m!(n − m)!
n · (n − 1)!
=
(m − 1)!(n − m)!
n−1
= n
.
m−1
(since (n − 1) − (m − 1) = n − m).
(b) By part (a), we have
p
p−1
m
=p
.
m
n−1
p−1
Thus p|m mp (since n−1
∈ Z). But (p, m) = 1 since p is prime
p
and m < p. Thus p| m as required.
6. Prove that
Deduce that
2n
2n − 1
=2
.
n
n
2n
n
is always even.
Solution:
2n
(2n)!
=
n
n!n!
2 · (2n − 1)!
2n − 1
2 · n · (2n − 1)!
=
=2·
.
=
n!n · (n − 1)!
n!(n − 1)!
n
2n
Since 2n−1
is
an
integer,
it
follows
at
once
that
is always even.
n
n
7. Find the coefficient of x11 in the expansion of
10
3
2
x −
.
x
Solution: By the binomial theorem again
10
n
10 X
3
10
3
2
2 10−n
x −
=
(x )
−
x
n
x
n=0
10 10
X
X
10 20−2n
n n
n 10
=
x
(−3) x =
(−3)
x20−3n .
n
n
n=0
n=0
So the term x11 occurs when 20 − 3n = 11; i.e when n = 3. So the
coefficient of x11 is
3 10
(−3)
= −27 · 120 = −3240.
3
8. Let S be a set of cardinality n ≥ 1 and let m ≤ n. Describe an explicit
bijective map from Pm (S) to Pn−m (S). Prove this map is a bijection
by constructing a 2-sided inverse map.
Solution: Recall that Pk (S) denotes the set of k-element subsets of
S. Now if X ⊂ S has cardinality k, Then S \ X has cardinality n − k.
Thus we define maps
f : Pm (S) → Pn−m (S),
f (X) = S \ X
g : Pn−m (S) → Pm (S),
g(Y ) = S \ Y
and
For all X ∈ Pm (S), we have g(f (X)) = g(S \ X) = S \ (S \ X) = X.
Similarly, for all Y ∈ Pn−m (S) we have f (g(Y )) = Y . So g is a 2-sided
inverse of f and hence these maps are bijections.
9.
∗
(a) Let Z≥0 denote the set of nonnegative integers an let
Sn,m = {(a1 , . . . , an ) ∈ Zn≥0 | a1 + · · · + an = m}.
(For example, S3,2 = {(0, 0, 2), (0, 1, 1), (0, 2, 0), (1, 0, 1), (1, 1, 0), (2, 0, 0)}.)
Recall that B`,s is the set of binary strings of length ` containing
exactly s 1s.
Describe a bijection from Sn,m to Bn+m−1,n−1 .
(b) How many nonnegative integer solutions are there to the equation
x1 + · · · + x5 = 10?
(c) In how many ways can 10 sugar lumps be distributed in 5 cups?
Solution:
(a) Let f : Sn,m → Bn+m−1,n−1 be the map
(a1 , . . . , an ) 7→ (0, . . . , 0, 1, 0, . . . , 0, 1, . . . , 1, 0, . . . , 0).
| {z } | {z }
| {z }
a1
a2
an
Then f is both injective and surjective (every binary string of
length n + m − 1 with n − 1 1s must look like the right-hand-side
for some values of a1 , . . . , an ).
(For example, (3, 1, 0, 4) ∈ S4,8 maps to (0, 0, 0, 1, 0, 1, 1, 0, 0, 0, 0) ∈
B11,3 .)
It follows that
n+m−1
|Sn,m | = |Bn+m−1,n−1 | =
.
n−1
(b) A solution has the form x1 = a1 , . . . , x5 = a5 where ai ≥ 0 and
a1 + · · · + a5 = 10. Thus the set
of solutions is precisely the set
14
S5,10 . By part (a), |S5,10 | = 4 = 13 · 11 · 7 = 1001.
(c) This is the same question again: Let a1 = number of lumps in
cup 1, a2 = number of lumps in cup 2, . . ., a5 = number of lumps
in cup 5. Then ai ≥ 0 and a1 + · · · + a5 = 10. So the answer is
again 1001.