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

8 Colored Solutions

The document contains a series of mathematical problems and solutions related to strong induction proofs for various functions defined on natural numbers. Each problem presents a function, its recursive definition, and a structured proof demonstrating the validity of a specific formula for the function using induction. The problems cover topics such as sequences, Zellig graphs, and trigonometric identities.

Uploaded by

liuyuhuiiiiiii
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)
15 views8 pages

8 Colored Solutions

The document contains a series of mathematical problems and solutions related to strong induction proofs for various functions defined on natural numbers. Each problem presents a function, its recursive definition, and a structured proof demonstrating the validity of a specific formula for the function using induction. The problems cover topics such as sequences, Zellig graphs, and trigonometric identities.

Uploaded by

liuyuhuiiiiiii
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

CS 173, Spring 19 Examlet 8, colored 1

Name:
NetID: Lecture: A B
Discussion: Thursday Friday 9 10 11 12 1 2 3 4 5 6

(20 points) Suppose that g : N → R is defined by


4
g(0) = 0 g(1) = 3

g(n) = 34 g(n − 1) − 13 g(n − 2), for n ≥ 2

2
Use (strong) induction to prove that g(n) = 2 −
3n
Solution: Proof by induction on n.

2 2
Base case(s): n = 0: 2 − 3n
=2− 1
= 0 = g(0) So the claim holds.
2 2 4
n = 1: 2 − 3n
=2− 3
= 3
= g(1) So the claim holds.

Inductive Hypothesis [Be specific, don’t just refer to “the claim”]:


2
Suppose that g(n) = 2 − 3n
, for n = 0, 1, · · · , k − 1 for some integer k ≥ 2.

Inductive Step:
2
We need to show that g(k) = 2 −
3k
4 1
g(k) = g(k − 1) − g(k − 2) [by the def, k ≥ 2]
3 3
  
4 2 1 2
= 2 − k−1 − 2 − k−2 [Inductive Hypothesis]
3 3 3 3
8 8 2 2
= − k − + k−1
3 3 3 3
6 8 6
= − k+ k
3 3 3
2
= 2 − k.
3
CS 173, Spring 19 Examlet 8, colored 2

Name:
NetID: Lecture: A B
Discussion: Thursday Friday 9 10 11 12 1 2 3 4 5 6

(20 points) Let function f : N → Z be defined by

f (0) = 2

f (1) = 7

f (n) = f (n − 1) + 2f (n − 2), for n ≥ 2

Use (strong) induction to prove that f (n) = 3 · 2n + (−1)n+1 for any natural number n.
Solution: Proof by induction on n.

Base case(s): For n = 0, we have 3 · 20 + (−1)1 = 3 − 1 = 2 which is equal to f (0). So the claim
holds.
For n = 1, we have 3 · 21 + (−1)2 = 6 + 1 = 7 which is equal to f (1). So the claim holds.

Inductive hypothesis [Be specific, don’t just refer to “the claim”]: Suppose that f (n) = 3 · 2n +
(−1)n+1 , for n = 0, 1, . . . , k − 1 where k ≥ 2.

Rest of the inductive step:

f (k) = f (k − 1) + 2f (k − 2) by definition of f
= (3 · 2k−1 + (−1)k ) + 2(3 · 2k−2 + (−1)k−1 ) by inductive hypothesis
= (3 · 2k−1 + (−1)k ) + 3 · 2k−1 + 2(−1)k−1
= 6 · 2k−1 + (−1)k − 2(−1)k
= 3 · 2k − (−1)k
= 3 · 2k (−1)k+1

So f (k) = 3 · 2k (−1)k+1 , which is what we needed to show.


CS 173, Spring 19 Examlet 8, colored 3

Name:
NetID: Lecture: A B
Discussion: Thursday Friday 9 10 11 12 1 2 3 4 5 6

(20 points) Use (strong) induction to prove that the following claim holds:

Claim : For any integer n ≥ 2, if p1 , . . . , pn is a sequence of integers and p1 < pn , then there
is an index j (1 ≤ j < n) such that pj < pj+1 .

Solution:

Base case(s): Proof by induction on n. At n = 2: It’s given that p1 < pn . But pn = p2 . So p1 < p2
and so j = 1 is the required index.

Inductive Hypothesis [Be specific, don’t just refer to “the claim”]: Suppose that any sequence of
integers p1 , . . . , pn with p1 < pn has an index j (1 ≤ j < n) such that pj < pj+1, for n = 2, . . . , k.

Rest of the inductive step: Let p1 , . . . , pk+1 be a sequence of k + 1 integers, with p1 < pk+1 .
Consider pk and pk+1 . There are two cases:
Case (1): pk < pk+1 . Then the index j = k works.
Case (2): pk ≥ pk+1 . Then we have p1 < pk+1 and pk+1 ≤ pk . So p1 < pk . So we can apply the
inductive hypothesis to the shorter subsequence p1 , . . . , pk . That is, by the inductive hypothesis, there is
an index j into the subsequence (i.e. 1 ≤ j < k) such that pj < pj+1. This (obviously) also works as an
index into the longer sequence of k + 1 integers.
In both cases, we have found an index j such that pj < pj+1, which is what we needed to find.
[Notes: it also works to remove the first element p1 from the sequence, with small changes to the
inductive step. Your inductive step doesn’t need to be quite this detailed.]
CS 173, Spring 19 Examlet 8, colored 4

Name:
NetID: Lecture: A B
Discussion: Thursday Friday 9 10 11 12 1 2 3 4 5 6

(20 points) Suppose that f : Z+ → Z is defined by is defined by

f (1) = 5 f (2) = −5

f (n) = 4f (n − 2) − 3f (n − 1), for all n ≥ 3

Use (strong) induction to prove that f (n) = 2 · (−4)n−1 + 3

Solution: Proof by induction on n.

Base case(s): For n = 1, 2 · (−4)n−1 + 3 = 2 · (−4)0 + 3 = 2 · 1 + 3 = 5, which is equal to f (1).


For n = 2, 2 · (−4)n−1 + 3 = 2 · (−4)1 + 3 = 2 · (−4) + 3 = −5, which is equal to f (2).
So the claim holds.

Inductive hypothesis [Be specific, don’t just refer to “the claim”]:


Suppose that f (n) = 2 · (−4)n−1 + 3, for n = 1, 2, . . . , k − 1, for some integer k ≥ 3

Rest of the inductive step:


Using the definition of f and the inductive hypothesis, we get
f (k) = 4f (k − 2) − 3f (k − 1) = 4(2 · (−4)k−3 + 3) − 3(2 · (−4)k−2 + 3)
Simplifying the algebra,

4(2 · (−4)k−3 + 3) − 3(2 · (−4)k−2 + 3) = 8 · (−4)k−3 + 12 − 6 · (−4)k−2 − 9


= −2 · (−4)k−2 − 6 · (−4)k−2 + 3
= −8 · (−4)k−2 + 3 = 2 · (−4)k−1 + 3

So f (k) = 2 · (−4)k−1 + 3, which is what we needed to prove.


CS 173, Spring 19 Examlet 8, colored 5

Name:
NetID: Lecture: A B
Discussion: Thursday Friday 9 10 11 12 1 2 3 4 5 6

(20 points) Suppose that θ is a constant (but unknown) real number. For any real number p, the
angle addition formulas imply the following two equations (which you can assume without proof):

cos(θ) cos(pθ) = cos((p + 1)θ) + sin(θ) sin(pθ) (1)


cos(θ) cos(pθ) = cos((p − 1)θ) − sin(θ) sin(pθ) (2)

Suppose that f : Z+ → Z is defined by

f (0) = 1 f (1) = cos(θ)

f (n + 1) = 2 cos(θ)f (n) − f (n − 1), for all n ≥ 2.

Use (strong) induction to prove that f (n) = cos(nθ) for any natural number n.

Solution: Proof by induction on n.

Base case(s): At n = 0, f (n) = f (0) = 1 = cos(0) = cos(0θ) = cos(nθ).


At n = 1, f (n) = f (1) = cos θ = cos(1θ) = cos(nθ).

Inductive Hypothesis [Be specific, don’t just refer to “the claim”]:


f (n) = cos(nθ) for n = 0, . . . , k.

Rest of the inductive step: In particular, by the inductive hypothesis, f (k) = cos(kθ) and
f (k − 1) = cos((k − 1)θ).
If we set p = k in equations (1) and (2), and then add them together, we get

2 cos(θ) cos(kθ) = cos((k + 1)θ) + cos((k − 1)θ)

So then we can compute

f (k + 1) = 2 cos(θ)f (k) − f (k − 1)
= 2 cos(θ) cos(kθ) − cos((k − 1)θ) (by the IH)
= cos((k + 1)θ) + cos((k − 1)θ) + cos((k − 1)θ)
= cos((k + 1)θ)

So f (k + 1) = cos((k + 1)θ), which is what we needed to show.


CS 173, Spring 19 Examlet 8, colored 6

Name:
NetID: Lecture: A B
Discussion: Thursday Friday 9 10 11 12 1 2 3 4 5 6

(20 points) A Zellig graph consists of 2n (n ≥ 1) nodes connected so as to form a circle. Half of the
nodes have label 1 and the other half have label -1. As you move clockwise around the circle, you keep
a running total of node labels. E.g. if you start at a 1 node and then pass through two -1 nodes, your
running total is -1. Use (strong) induction to prove that there is a choice of starting node for which the
running total stays ≥ 0.
Hint: remove an adjacent pair of nodes.

Solution: Proof by induction on n.

Base case(s): At n = 1, there are only two nodes. If you start at the node with label 1, the running
total stays ≥ 0.

Inductive Hypothesis [Be specific, don’t just refer to “the claim”]: Suppose that there is a choice of
starting node for which the running total stays ≥ 0, for Zellig graphs with 2n nodes, where n = 1, . . . , k−1.

Rest of the inductive step: Let G be a Zellig graph with 2k nodes. Find a 1 node that immediately
precedes a -1 (going clockewise). Remove those two nodes m and s from G to create a smaller graph H.
By the inductive hypothesis, we can find a starting node p on H such that the running total stays
≥ 0. I claim that p also works as a starting node for G. Between p and m, we see the same sequence of
nodes as in H, so the total stays ≥ 0. The total increases by 1 at m and the immediately decreases by 1
at s. So it can’t dip below zero in that section of the circle. Between s and returning to p, we have the
same running totals as in H.
So G has a starting point for which all the running totals stay ≥ 0, which is what we needed to prove.
CS 173, Spring 19 Examlet 8, colored 7

Name:
NetID: Lecture: A B
Discussion: Thursday Friday 9 10 11 12 1 2 3 4 5 6

(20 points) (20 points) Suppose that f : N → Z is defined by

f (0) = 2 f (1) = 5 f (2) = 15

f (n) = 6f (n − 1) − 11f (n − 2) + 6f (n − 3), for all n ≥ 3

Use (strong) induction to prove that f (n) = 1 − 2n + 2 · 3n

Solution: Proof by induction on n.

Base case(s): At n = 0, f (0) = 2 and 1 − 2n + 2 · 3n = 1 − 1 + 2 = 2


At n = 1, f (1) = 5 and 1 − 2n + 2 · 3n = 1 − 2 + 6 = 5
At n = 2, f (2) = 15 and 1 − 2n + 2 · 3n = 1 − 4 + 18 = 15
So the claim holds at all three values.

Inductive hypothesis [Be specific, don’t just refer to “the claim”]:


Suppose that f (n) = 1 − 2n + 2 · 3n for n = 0, 1, . . . , k − 1.

Rest of the inductive step: By the definition of f and the inductive hypothesis, we get

f (k) = 6f (k − 1) − 11f (k − 2) + 6f (k − 3)
= 6(1 − 2k−1 + 2 · 3k−1) − 11(1 − 2k−2 + 2 · 3k−2 ) + 6(1 − 2k−3 + 2 · 3k−3 )
= (6 − 11 + 6) − (6 · 2k−1 − 11 · 2k−2 + 6 · 2k−3) + 2(6 · 3k−1 − 11 · 3k−2 + 6 · 3k−3 )
= 1 − (12 · 2k−2 − 11 · 2k−2 + 3 · 2k−2 ) + 2(18 · 3k−2 − 11 · 3k−2 + 2 · 3k−2)
= 1 − 4 · 2k−2 + 2 · 9 · 3k−2 = 1 − 2k + 2 · 2k

So f (k) = 1 − 2k + 2 · 2k , which is what we needed to show.


CS 173, Spring 19 Examlet 8, colored 8

Name:
NetID: Lecture: A B
Discussion: Thursday Friday 9 10 11 12 1 2 3 4 5 6

(20 points) Use (strong) induction to prove that, for any integer n ≥ 8, there are non-negative integers
p and q such that n = 3p + 5q.

Solution: Proof by induction on n.

Base case(s): At n = 8, we can chose p = 1 and q = 1. At n = 9, we can chose p = 3 and q = 0. At


n = 10, we can chose p = 0 and q = 2. In all three cases, n = 3p + 5q.

Inductive Hypothesis [Be specific, don’t just refer to “the claim”]: Suppose that there are non-
negative integers p and q such that n = 3p + 5q, for n = 8, 9, . . . , k − 1, where k ≥ 11.

Rest of the inductive step: Consider n = k.


Notice that k ≥ 11, so 8 ≤ k − 3 ≤ k − 1. So k − 3 is covered by the inductive hypothesiss. Therefore,
there are non-negative integers r and q such that k − 3 = 3r + 5q.
Now, set p = r + 1. Then k = (k − 3) + 3 = (3r + 5q) + 3 = 3(r + 1) + 5q = 3p + 5q. p is non-negative
since r is.
So there are non-negative integers p and q such that k = 3p + 5q, which is what we needed to prove.

You might also like