Recursively Defined Sequence/Examples/Minimum over k of Maximum of 1 plus Function of k and 2 plus Function of n-k

From ProofWiki
Jump to navigation Jump to search

Theorem

Consider the integer sequence $\sequence {\map f n}$ defined recusrively as:

$\map f n = \begin{cases} 0 & : n = 1 \\

\ds \min_{0 \mathop < k \mathop < n} \map \max {1 + \map f k, 2 + \map f {n - k} } & : n > 1 \end{cases}$


$\map f n$ has a closed-form expression:

$\map f n = m$ for $F_m < n \le F_{m + 1}$

where $F_m$ denotes the $m$th Fibonacci number.


Proof

The proof proceeds by induction.

For all $n \in \Z_{\ge 1}$, let $\map P n$ be the proposition:

$\map f n = m$ for $F_m < n \le F_{m + 1}$


Basis for the Induction

$\map P 1$ is the case:

\(\ds 0\) \(=\) \(\ds \)
\(\ds F_0\) \(<\) \(\, \ds 1 \, \) \(\, \ds \le \, \) \(\ds F_{0 + 1}\)
\(\ds \) \(=\) \(\ds 1\) Definition of Fibonacci Number: $F_1 = 1$
\(\ds \leadsto \ \ \) \(\ds m\) \(=\) \(\ds 0\)

Thus $\map P 1$ is seen to hold.


This is the basis for the induction.


Induction Hypothesis

Now it needs to be shown that, if $\map P r$ is true, where $r \ge 1$, then it logically follows that $\map P {r + 1}$ is true.


So this is the induction hypothesis:

$\map f r = m$ for $F_m < r \le F_{m + 1}$


from which it is to be shown that:

$\map f {r + 1} = m$ for $F_m < {r + 1} \le F_{m + 1}$


Induction Step

This is the induction step:



\(\ds \) \(=\) \(\ds \)
\(\ds \leadsto \ \ \) \(\ds \) \(=\) \(\ds \)

So $\map P r \implies \map P {r + 1}$ and the result follows by the Principle of Mathematical Induction.


Therefore:

$\forall n \in \Z_{\ge 1}: \map f n = m$ for $F_m < n \le F_{m + 1}$

$\blacksquare$


Sources