0% found this document useful (0 votes)
18 views8 pages

Assignment 3 S

Uploaded by

Maria Ademola
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
18 views8 pages

Assignment 3 S

Uploaded by

Maria Ademola
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 8

SOLUTIONS

Assignment 3 SC/MATH 1019 C (Fall 2024)


Part (a): Pre-reading Due Thursday, October 10, at 10 pm

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.

(a) Write a complete proof that uses the premises:

• 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.

(b) Suppose instead we only have two premises:

• 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).

© 2024 Michael La Croix All Rights Reserved Page 1 of 8


Question A2:
Let P (n) be the proposition “The AM-GM innequality holds for n 3 2 15 14
variables.” Cauchy proved that the following three things are true:
13
• P (2) is true 16

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).

© 2024 Michael La Croix All Rights Reserved Page 2 of 8


Part (b): Practice and Review Due Sunday, October 13, at 10 pm

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.

(b) Show that the function f : A × A → A defined by f (x, y) = x is a surjection.


Suppose that y is an element of A. This means that (y, y) ∈ A × A. Since f ((y, y)) = y, it follows
that y is in the range of f . We have shown that A ⊂ range f , so f is a surjection.

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 .

© 2024 Michael La Croix All Rights Reserved Page 3 of 8


φn
 
1
(iv) Let vn = √ + for n ≥ 0, and compute v0 , v1 , v2 , . . . , v8 .
5 2
ϕ0
vo = ⌊ √5
+ 12 ⌋ = ⌊ √15 + 12 ⌋ = ⌊0.947 . . .⌋ = 0
ϕ 1
v1 = ⌊ √ 5
+ 12 ⌋ = ⌊1 + 1

2 5
⌋ = ⌊1.223 . . .⌋ = 1
ϕ 2
v2 = ⌊ √ 5
+ 12 ⌋ = 3
⌊1 + 2√5 ⌋ = ⌊1.6708 . . .⌋ = 1
ϕ 3
v3 = ⌊ √ 5
+ 12 ⌋ = ⌊ 32 + √25 ⌋ = ⌊2.3944 . . .⌋ = 2
ϕ 4
v4 = ⌊ √ 5
+ 12 ⌋ = ⌊2 + 2√ 7
5
⌋ = ⌊3.56525 . . .⌋ = 3
ϕ 5
v5 = ⌊ √ 5
+ 12 ⌋ = ⌊3 + 211√ ⌋ = ⌊5.45967 . . .⌋ = 5
5
ϕ 6
v6 = ⌊ √ 5
+ 12 ⌋ = ⌊ 92 + √95 ⌋ = ⌊8.52492 . . .⌋ = 8
ϕ 7
v7 = ⌊ √ 5
+ 12 ⌋ = ⌊7 + 229√ ⌋ = ⌊13.4846 . . .⌋ = 13
5
ϕ 8
v8 = ⌊ √ 5
+ 12 ⌋ = 47
⌊11 + 2 5 ⌋ = ⌊21.5095 . . .⌋ = 21

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.

(a) Suppose a = 0, d = 1, and r = 3, derive a formula for ni=1 i3i .


P

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.

© 2024 Michael La Croix All Rights Reserved Page 4 of 8


Question B4:
One of the surprising results about the cardinalities of infinite sets is that it is possible to find a bijection
between N × N and N. Consider the function f : N × N → N defined by f (m, n) = 2m (2n + 1) − 1.


Note that when the domain of a function is a Cartesian


 product, we sometimes leave out a set of parentheses
in function notation, so that f (m, n) and f (m, n) mean the same thing.

(a) Build a table of the values of f (m, n) when 0 ≤ m ≤ 4 and 0 ≤ n ≤ 4.
Table of values of f((m,n))
m
n 0 1 2 3 4
0 0 1 3 7 15

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.

Since g is an injection and a surjection, we conclude it is a bijection.

Assignment 4 revisits these bijections in the setting of induction, and uses them as building blocks to build
bijections between even more complicated sets.

© 2024 Michael La Croix All Rights Reserved Page 5 of 8


Question B5:
1
Consider the function f (x) = with domain R and codomain (0, 1). Show that f is an injection and
1 + ex
show that f is a surjection. Conclude that |R| = |(0, 1)|.
1 1
We first show that f is an injection. Suppose that f (x) = f (y), then 1+ex = 1+ey . If we cross-multiply to
x y x
clear denominators (since 1 + e ̸= 0), we see that 1 + e = 1 + e . Subtracting 1 and taking logarithms
lets us conclude that y = x, and so we further conclude that f is an injections.

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

A more elegant approach to this question builds f as a composition of bijections.

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

© 2024 Michael La Croix All Rights Reserved Page 6 of 8


(d) How could you have predicted the answer in (c) without any computation? Does
this help convince you that your answer is correct or suggest that there might
be an error in your work?
In fact, since cn is a term over the same summands as cn−1 , we could have realized, a priori, that
2
cn − cn−1 = 12 1
n + 2 n, since every term except this one appears twice, with opposite signs. It’s easy
to check that 2 n + 21 n = 12 n(n + 1), so having derived the same answer in two different ways, we
1 2

should now be more confident that both answers are correct.


In the event that your answer to (c) does not agree with 21 n2 + 12 n, you should instead be much less
confident that your work is correct, and start looking for an error, before you submit it.

(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}.

Table of values of g(m,n)


m
n 0 1 2 3 4 5
0 0 2 5 9 14 20

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

(b) Use your table to compute g −1 (17). g −1 (17) = (2, 3)


As a check, we see that g(2, 3) = 21 (2 + 3 + 1)(2 + 3) + 2 = 12 6 · 5 + 2 = 15 + 2 = 17

(c) Imagine walking through all the points in N × N in the order

g −1 (0), g −1 (1), g −1 (2), g −1 (3), g −1 (4), . . . .

© 2024 Michael La Croix All Rights Reserved Page 7 of 8


Describe the path you take through the grid.
The sequence is (0, 0), (0, 1), (1, 0), (0, 2), (1, 1), (2, 0), . . . . It encounters every point of N × N by
visiting each anti-diagonal in order.

(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.

© 2024 Michael La Croix All Rights Reserved Page 8 of 8

You might also like