Assignment 3 S
Assignment 3 S
Question A1:
One of the most surprising aspects of mathematical induction is that in many cases it doesn’t actually
provide any new results. It only simplifies the derivation of results we already had a recipe for proving.
• P (1)
• P (1) → P (2)
• P (2) → P (3)
• P (3) → P (4)
to prove that P (4) is true. You will need a combination of modus ponens and hypothetical syllogism.
Since P (1) is true and P (1) → P (2), we conclude by modus ponens that P (2) is true.
Since P (2) is true and P (2) → P (3), we conclude by modus ponens that P (3) is true.
Since P (3) is true and P (3) → P (4), we conclude by modus ponens that P (4) is true.
Alternatively,
Since P (1) → P (2) and P (2) → P (3), we conclude by hypothetical syllogism that P (1) → P (3).
Since P (1) → P (3) and P (3) → P (4), we conclude by hypothetical syllogism that P (1) → P (4).
Since P (1) is true and P (1) → P (4), we conclude by modus ponens that P (4) is true.
• P (1)
• ∀n ≥ 1 P (n) → P (n + 1) .
Apply Universal Instantiation 3 times to obtain the premises from part (a).
We can apply Universal Instantiation to the second premise with n = 1 to obtain P (1) → P (2).
We can apply Universal Instantiation to the second premise with n = 2 to obtain P (2) → P (3).
We can apply Universal Instantiation to the second premise with n = 3 to obtain P (3) → P (4).
Note that after doing this, we could proceed to prove P (4) using either approach from (a).
(c) How much would you need to modify your proof to prove P (10)?
We can’t prove P (10) from the premises in part (a), but with the premises in part (b) we could use
Universal Instantion for n = 4, n = 5, n = 6, n = 7, n = 8, n = 9, and n = 10, and then string
together the premises in the manner of part (a). The proof would not be any more complicated, but
it would be a lot longer.
If fact, it would be relatively easy to write a computer program that uses the two premises in (b)
and prints out a proof of P (10, or P (5000), but we wouldn’t really gain any new intuition from this
computer generated proof.
Induction works because if we had enough patience we could apply Universal Instantiation, Modus Po-
nens, and Hypothetical Syllogism as many times as necessary to conclude P (10), P (5000), or even
P (632 325 234 453).
4 12
• For k > 2, if P (k) is true, then P (k − 1) is true. 5 8
• For k ≥ 1, if P (2k ) is true, then P (2k+1 ) is also true. 11
9
There is an arrow from m to n if Cauchy showed that P (m) → P (n). 6 7 10
Using Cauchy’s facts, modus ponens, and hypothetical syllogism, prove that P (14) is true.
Since P (2) is true, and P (2) → P (4), we conclude P (4) by modus ponens.
Since P (4) is true, and P (4) → P (8), we conclude P (8) by modus ponens.
Since P (8) is true, and P (8) → P (16), we conclude P (16) by modus ponens.
Since P (16) is true, and P (16) → P (15), we conclude P (15) by modus ponens.
Since P (15) is true, and P (15) → P (14), we conclude P (14) by modus ponens.
Alternatively
Since P (2) → P (4) and P (4) → P (8), we conclude P (2) → P (8) by hypothetical syllogism.
Since P (2) → P (8) and P (8) → P (16), we conclude P (2) → P (16) by hypothetical syllogism.
Since P (2) → P (16) and P (16) → P (15), we conclude P (2) → P (15) by hypothetical syllogism.
Since P (2) → P (15) and P (15) → P (14), we conclude P (2) → P (14) by hypothetical syllogism.
Then since P (2) is true, and P (2) → P (14), we conclude P (14) by modus ponens.
Question A3:
After many years of research, an investigator has learned several facts about a predicate Q(n).
• Q(4) is false,
• Q(6) is true,
• Q(11) is true, and
• For every k ≥ 8, if Q(k) is true, then Q(k + 1) is also true.
You can analyze this predicate using a diagram like in question A1. You will need one vertex (dot) for
every element of the universe {1, 2, 3, 4, 5, . . . , 15}. Draw an arrow from i to j if Q(i) → Q(j). Draw a
circle around the dot labelled i if the researcher concluded Q(i) is true. Draw a box around the dot labelled
i if the researcher concluded Q(j) is false. Do not submit your graph, but use it to answer the following
questions:
(a) Is Q(5) true? There is not enough information to conclude whether Q(5) is true or false.
(b) Is Q(9) true? There is not enough information to conclude whether Q(9) is true or false.
(c) Is Q(14) true? Yes, Q(14) is true. As are Q(12) and Q(13).
Question B1:
Suppose that A is a set.
(a) Show that the function f : A → P(A) defined by f (x) = {x} is an injection.
If f (x) = f (y), then {x} = {y}. Two sets are equal iff they contain the same elements, so {x} = {y}
implies x = y. Since f (x) = f (y) implies x = y, it follows that f is an injection.
Question B2:
1
Consider a sequence {ai } defined recursively by a0 = 1 and an = 1 + an−1 when n ≥ 1.
(a) Compute a0 , a1 , a2 , . . . , a10 as fractions in least terms. Do you notice anything about the numerators
and denominators?
a0 = 1 = 11 , a4 = 1 + a13 = 1 + 15 = 58 , a8 = 1 + a17 = 1 + 34
1
= 55
34 ,
3 21
1 1
a1 = 1 + a0 =1+ 1 = 21 , a5 = 1 + 1
a4 =1+ 1
8
13
=
8 , a9 = 1 + 1 1 89
a8 = 1 + 55 = 55 ,
1 5 34
1 1
a2 = 1 + a1 =1+ 2 = 32 , a6 = 1 + 1
a5 =1+ 1 21
13 = 13 , a10 = 1 + a19 = 1 + 89
1
= 144
89 ,
1 8 55
1 1
a3 = 1 + a2 =1+ 3 = 53 , a7 = 1 + 1
a6 =1+ 1 34
21 = 21 ,
2 13
The numerators and denominators both seem to be following the Fibonnaci sequence.
(b) List the decimal expansion of a0 , a1 , a2 , . . . , a10 . Do you notice any patterns here?
a0 = 1, a1 = 2, a2 = 1.5, a3 = 1.666 . . . , a4 = 1.6, a5 = 1.625, a6 = 1.6153846 . . . , a7 = 1.6190476 . . . ,
a8 = 1.617647 . . . , a9 = 1.6181818 . . . , a10 = 1.16179777528 . . . .
The terms alternate between increasing
√ and decreasing, and appear to get closer and closer together.
1+ 5
In fact they converge to φ = 2 = 1.61803398 . . .
(c) We could (but won’t) use calculus to show that the sequence ai converges to√a limit. This limit is
one of the solutions to the equation x = 1 + x1 . The positive solution is φ = 1+2 5 , and is often called
√
1− 5
the golden ratio. The negative solution is ψ = 2 .
(i) Write out the decimal expansions of the first 8 terms of the sequence un = φn .
u0 = 1, u1 = φ = 1.61803398 . . . , u2 = φ2 = 2.61803398 . . . , u3 = 4.236067977 . . . ,
u4 = 6.854101966 . . . , u5 = 11.09016994 . . . , u6 = 17.94427191 . . . , u7 = 29.03444185 . . . ,
u8 = 46.97871376 . . .
It’s ambiguous whether 8 terms should run from index 0 to index 7, or from index 1 to index
8, so there are actually 9 terms included here. We need both u0 and u8 in (iv) anyway.
(ii) Compare u5 to u4 + u3 .
u4 + u3 = 11.0901699 . . . which appears to be equal to u5 .
1
(iii) Use the fact that φ = 1 + φ to show that ∀n ∈ Z+ (un+1 = un + un−1 ).
Since φ = 1 + φ1 , we can multiply both sides of the equality by φn to see that φn+1 = φn + φn−1 .
But φj = uj for every j, so un+1 = un + un−1 .
We would have exactly the same recurrence satisfied by tn = ψ n .
Once again, we seem to have encountered the Fibonacci sequence. We’ll have to wait until
Chapter 8 to see a full explanation of this phenomenon.
Note: We will use the ideas set up by this question as the basis for solving linear recurrence equations when
we get to Chapter 8.
Question B3:
An arithmetico-geometric sequence is a generalization of both an arithmetic sequence and a geometric
sequence. If {tn } is such a sequence, then tn = (a + nd)rn for some values of a, d, and r. Notice that if
r = 1, then this is just an arithmetic sequence, and if d = 0, then it is a geometric sequence.
Hint: Let S = ni=1 i3i , and begin by showing that 3S − S is almost a sum we can recognize from
P
section 2.4.
If we let S = ni=1 i3i , then 3S = ni=1 i3i+1 = n+1 i
P P P
i=2 (i − 1)3 . It follows that
n+1 n
! !
X X Alternatively, without summation notation,
3S − S = (i − 1)3i − i3i
i=2 i=1 S = 1 · 31 + 2 · 32 + 3 · 33 + · · · + n · 3n
n n
! !
3S = 1 · 32 + 2 · 33 + · · · + (n − 1)3n + n3n+1
X X
= n3n+1 + (i − 1)3i − i3i
i=1 i=1 3S − S = −1 · 3 − 1 · 32 − 1 · 33 − · · · − 1 · 3n + n3n+1
n
X 3n − 1
= n3n+1 − i
3 = −3 + n3n+1
i=1
3−1
−1 3n
= n3n+1 − 3
3−1
Since 3S − S = 2S, we see that S = n2 3n+1 − 14 3n+1 + 34
Note: These terms can be collected in many different algebraically equivalent ways, so it is also true,
for instance, that S = 6n−3 n 3
4 3 + 4 . Other expressions are possible. This is one of the reasons that
we test our expression in the next part. If there’s been a minor algebraic error, then it will show up
when the formula doesn’t agree with direct computation.
(b) Test that your formula agrees with a direct evaluation of 3 + 2 · 9 + 3 · 27 + 4 · 81.
By direct computation, 3 + 2 · 9 + 3 · 27 + 4 · 81 = 3 + 18 + 81 + 324 = 426.
This is the sum from (a) when n = 4, and our formula predicts 42 35 − 41 35 + 34 = 74 ·243+ 43 = 1704
4 = 426.
1 2 5 11 23 47
2 4 9 19 39 79
3 6 13 27 55 111
4 8 17 35 71 143
(b) Write the binary expansions (base-2) of the numbers in your tables, and look for a pattern. Compute
f −1 (37) (either using your pattern or otherwise).
We see that m determines the
Table of values of f((m,n)) in base-2 number of 1s after the final
m
n 0 1 2 3 4 0 in the binary expansion of
0 (0)2 (01)2 (011)2 (0111)2 (01111)2 f (m, n), while n is the expan-
1
sion to the left of that 0. Since
(10)2 (101)2 (1011)2 (10111)2 (101111)2
37 = (100101)2 we see that
2 (100)2 (1001)2 (10011)2 (100111)2 (1001111)2 f −1 (37) = (1, 9).
3 (110)2 (1101)2 (11011)2 (110111)2 (1101111)2
We would have needed five
4 (1000)2 (10001)2 (100011)2 (1000111)2 (10001111)2
more rows to actually find this
number in our table.
Without spotting the pattern, it would also be relatively easy to write a small computer program in
your favourite language to search through small inputs and attempt to find the output 37.
We could (but won’t for now) use the fact that we know how to compute f −1 to prove f is a bijection.
(c) Show that if f is a bijection, then g : N × N × N → N defined by g(x, y, z) = f f (x, y), z is too.
We first show that if f is a bijection then g is an injection. So suppose that g(x, y, z) = g(a, b, c).
From the definition of f , this means f (f (x, y), z) = f (f (a, b), c). Since f is an injection, we conclude
(f (x, y), z) = (f (a, b), c), so f (x, y) = f (a, b) and z = c. Again applying the fact that f is an
injection, we conclude (x, y) = (a, b), and hence x = a and y = b. Thus if g(x, y, z) = g(a, b, c), we
can conclude (x, y, z) = (a, b, c) and thus g is an injections.
We now show that g is a surjection. Suppose n ∈ N. Since f is a surjection, there exist u, z ∈ N such
that f (u, z) = n. Again applying the fact that f is a surjection, there must also exist x, y ∈ N such
that f (x, y) = u. Combining these facts, we see that g(x, y, z) = f (f (x, y), z) = f (u, z) = n, and so
n is in the range of g. Since n was selected arbitrarily from n, we conclude that every element of N
is in the range of g, and thus g is a surjection.
Assignment 4 revisits these bijections in the setting of induction, and uses them as building blocks to build
bijections between even more complicated sets.
We also show that f is a surjection. Given y ∈ (0, 1), we can choose x = ln( y1 − 1) (this is just the result
1 1
of rough work working one step at a time to solve 1+e x = y) and find that f (y) = ln( 1 −1)
= 1+ 11 −1 = y.
1+e y y
Let g : R → R+ be given by g(x) = ex . Then g must be a bijection because it has compositional inverse
g (−1) (y) = ln y. Similarly h : R+ → (1, ∞) given by h(x) = 1 + x is a bijection since it has compositional
inverse h(−1) (y) = y − 1, and k : (1, ∞) → (0, 1) given by k(x) = x1 is a bijection since it has compositional
inverse k (−1) (y) = y1 .
But then f = k ◦ h ◦ g is a composition of bijections, and must also be a bijection. This line of reasoning
tells us, for free that |R| = |R+ | = |(1, ∞)| = |(0, 1)|.
Question B6: n
X 1 2 1
Consider the sequence {cn } defined by cn = k + k .
2 2
k=1
(a) Compute c0 , c1 , c2 , and c3 .
c0 = 0 since the sum is empty
c1 = ( 12 12 + 1
2 1)=1
c2 = ( 21 12 + 1
2 1)+ ( 12 22 + 21 2) = 1 + 3 = 4
c3 = ( 21 12 + 1
2 1)+ ( 12 22 + 21 2) + ( 12 32 + 12 3) = 1 + 3 + 6 = 10
(b) You may recall, either from class or from a table in the textbook that
n n
X n(n + 1) X (2n + 1)(n + 1)(n)
k= and k2 = .
2 6
k=1 k=1
Use these facts to find a formula for cn . You should simplify your formula as much as possible.
n n n
! !
X 1 12 1 X
2 1 X
cn = k + k = k + k
2 2 2 2
k=1 k=1 k=1
1 (2n + 1)(n + 1)(n) 1 n(n + 1) 1 1
= + = n(n + 1)(n + 2)= n(n2 + 3n + 2)
2 6 2 2 6 6
(c) Use your formula from (b) to compute cn − cn−1 . (Your formula will involve the variable n).
You should make sure your formula agrees with your values from (a).
Using our result from (b), we see
1 1 1 1
cn − cn−1 = n(n + 1)(n + 2) − (n − 1)(n)(n + 1) = n(n + 1)[(n + 2) − (n − 1)] = n(n + 1)
6 6 6 2
(e) In fact, cn is the number of blocks in an n-layer pyramid, where the k-th layer
from the top consists of 1 + 2 + · · · + k blocks. Use your formula to compute
c6 and check that this is a reasonable answer for the number of blocks in the
picture to the right.
Using our formula from (b), we expect c6 = 16 6 · 7 · 8 = 56. My sense of numbers
might not be great, but the pyramid certainly looks like it has somewhere between
20 and 80 cubes in it, so this seems reasonable.
It would not be reasonable, if your formula produces a negative number, or a
fractional number, or a single digit number, or a number in the thousands. In
fact, the exact answer (counting by layers) is 1 + 3 + 6 + 10 + 15 + 21 = 56, as
we expected.
Question B7:
Consider the function g : N × N → N given by g(m, n) = 12 (m + n + 1)(m + n)+ m. It is not obvious, but
this function is a bijection. Note: We should probably actually write g (m, n) , but when the domain is a
cartesian product we often leave out a set of parentheses.
(a) Build a table of values of g(m, n) when m ∈ {0, 1, 2, 3, 4, 5} and n ∈ {0, 1, 2, 3, 4}.
1 1 4 8 13 19 26
2 3 7 12 18 25 33
3 6 11 17 24 32 41
4 10 16 23 31 40 50
(d) In fact, you could use the pattern of g −1 to guess a formula for g −1 (r). By recognizing that the
entries g(0, n) are all triangle numbers, you could realize that to find which anti-diagonal contains
r, you should first find the largest triangle number less than or equal to r, and then subtract this
triangle number from r to find how far along the anti-diagonal the entry is.
j bit√(!) ofk algebra, this leads to the following description. Given r ∈ N, define s: N → N
With a little
by s(r) = −1+ 2 1+8r . We can compute g −1 (r) = r − 21 s(r)2 − 12 s(r), 32 s(r) + 12 s(r)2 − r . Check
that this formula is reasonable by using it to compute g −1 (24) and also by finding 24 in your table.
j √ k j √ k
Since s(24) = −1+ 21+8·24 = −1+2 193 = 6, so g −1 (24) = (24 − 21 36 − 12 6, 32 6 + 12 36 − 24) = (3, 3).
If we want to understand what s(r) is computing, note that there are 1 + 2 + 3 + 4 + 5 + 6 = 21 boxes
on the first 6 anti-diagonals. Since 21 < 24, we won’t get to g −1 (24), but 1 + 2 + 3 + 4 + 5 + 6 + 7 > 24,
so we will get to g −1 (24) before we finish visiting the 7th anti-diagonal (where m + n = 6). How did
x2 +x
we come up with this number? Well 1 + 2 + 3 + · · · + s = s(s+1) 2 . If we solve 2 = r, using the
√
−1± 1+8r
quadratic formula, we find that x = 2 . The floor function finds the largest integer that is at
most this number.