Last time | Next time |
Generally, the worst problem is writing $P(k)=$.
$P(k)$ is an assersion. It has a truth value, but not a numeric value. So we don't let it equal anything (except another assertion). Use a colon: $P(k):$.
Write, for example, \[ P(k): 1\cdot 1! + 2\cdot 2! + \ldots + k\cdot k! = (k+1)! - 1 \]
$P(k)$ is the assertion that the sum on the left is equal to the difference on the right. It is not a number. It is not a quantity. It is predicate wff, which may or may not be true.
But I fear that I'm shouting into the wind here. Those who want to please the grader (and avoid saying nonsense) -- let them hear.
It also may be wise for some of you to state $P(k+1)$. That's your target, using the first principle: show that $P(k) \rightarrow P(k+1)$.
Note that we don't spend time on closed form solutions of second-order recurrence with constant coefficients (like Fibonaccis). But it is possible (the method described in the text seems pretty ad hoc, however -- not enlightening).
\[ Fib(n) = \frac{1}{\sqrt{5}} \left( \left(\frac{1+\sqrt{5}}{2}\right)^n - \left(\frac{1-\sqrt{5}}{2}\right)^n \right) \]
\[ \gamma = \frac{1+\sqrt{5}}{2} \approx 1.618 \] is called the "golden ratio", while \[ \frac{1-\sqrt{5}}{2} = 1-\gamma = \frac{-1}{\gamma} \approx -0.618 \] As I show in some lisp code below, \[ Fib(n) \approx \frac{1}{\sqrt{5}}\gamma^n \] So well, that by simply rounding this quantity you get all the right values! This shows that the Fibonacci numbers grow exponentially fast, with base $\gamma$.
(coded up following our author's algorithm, in section 3.3, p. 214, as closely as possible).