100% satisfaction guarantee Immediately available after payment Both online and in PDF No strings attached 4.2 TrustPilot
logo-home
Class notes

CPSC 121 Assignment 4 Solutions 2021

Rating
-
Sold
-
Pages
5
Uploaded on
09-02-2022
Written in
2021/2022

CPSC 121 Assignment 4 Solutions










Whoops! We can’t load your doc right now. Try again or contact support.

Document information

Uploaded on
February 9, 2022
Number of pages
5
Written in
2021/2022
Type
Class notes
Professor(s)
Jordon johnson
Contains
All classes

Content preview

CPSC 121


[8 marks] Prove that for every three non-zero integers a, b and c, at least one of the
three products ab, ac, bc is positive. Hint: use a proof by contradiction.
Proof (by contradiction):
Consider unspecified non-zero integers a, b, c. For the purpose of contradiction, assume
that none of the three products ab, ac, bc are positive. In other words, assume that all
three products are negative.
Consider the product ab. Since ab is negative, assume WLOG that a is positive and b is
negative. Since a is positive and ac is negative, then c is negative.
Since bc is negative, then exactly one of b or c must be negative. This contradicts with
our observation that both b and c must be negative. Therefore, our original assumption
is false, and for every three non-zero integers a, b and c, at least one of the three products
ab, ac, and bc is positive.

, CPSC 121


[8 marks] The Fibonacci numbers are defined as follows: F0 = F1 = 1 and for every
i ≥ 2, Fi = Fi−1 + Fi−2 . We thus get the sequence

1, 1, 2, 3, 5, 8, 13, 21, 34, 55, . . .

Prove by induction that
n
X
Fi = Fn+2 − 1
i=0

Proof by weak induction on n:



Base case: for n = 0
X0
F (i) = F (0) = 1
i=0
0
X
F (i) = F (0 + 2) − 1 = F (2) − 1 = 2 − 1 = 1
i=0
The theorem holds for n = 0.



Inductive hypothesis:
n−1
X
Fi = Fn−1+2 − 1 = Fn+1 − 1
i=0




Inductive step:
Consider an unspecified natural number n. Assume n ≥ 1.
n
X n−1
X
Fi = Fi + Fn by definition of the sum
i=0 i=0
= Fn+1 − 1 + Fn by IH
= Fn+2 − 1 by the Fibonacci definition Fn+2 = Fn + Fn+1
X n
Therefore, by the principle of mathematical induction, Fi = Fn+2 − 1.
i=0

Get to know the seller

Seller avatar
Reputation scores are based on the amount of documents a seller has sold for a fee and the reviews they have received for those documents. There are three levels: Bronze, Silver and Gold. The better the reputation, the more your can rely on the quality of the sellers work.
travissmith1 UBC
View profile
Follow You need to be logged in order to follow users or courses
Sold
97
Member since
4 year
Number of followers
61
Documents
36
Last sold
1 month ago

3.6

16 reviews

5
6
4
6
3
0
2
0
1
4

Recently viewed by you

Why students choose Stuvia

Created by fellow students, verified by reviews

Quality you can trust: written by students who passed their tests and reviewed by others who've used these notes.

Didn't get what you expected? Choose another document

No worries! You can instantly pick a different document that better fits what you're looking for.

Pay as you like, start learning right away

No subscription, no commitments. Pay the way you're used to via credit card and download your PDF document instantly.

Student with book image

“Bought, downloaded, and aced it. It really can be that simple.”

Alisha Student

Frequently asked questions