Back

Solution: 2019 Fall Midterm - 10

Author: Michiel Smid

Question

The function $f : \mathbb{Z}_{\geq 0} \rightarrow \mathbb{R}$ is defined by $$ f(n) = \begin{cases} 7 & \text{if}\ n = 0 \\ \frac{n}{3} \cdot f(n - 1) & \text{if}\ n \geq 1 \end{cases} $$ What is $f(n)$?
(a)
$f(n) = 7 \cdot \frac{(n + 1)!}{3^n}$
(b)
$f(n) = 7^n \cdot \frac{(n + 1)!}{3^n}$
(c)
$f(n) = 7 \cdot \frac{n!}{3^n}$
(d)
$f(n) = 7^n \cdot \frac{n!}{3^n}$

Solution

  1. Let’s calculate $f(1)$

    $f(1) = \frac{1}{3} \cdot f(0) = \frac{1}{3} \cdot 7 = \frac{7}{3}$

    $f(2) = \frac{2}{3} \cdot f(1) = \frac{2}{3} \cdot \frac{7}{3} = \frac{14}{9}$

  2. Let’s test

  • $f(n) = 7 \cdot \frac{n!}{3^n}$
    $f(1) = 7 \cdot \frac{2!}{3^1} = 7 \cdot \frac{1}{3} = \frac{7}{3}$
  • $f(n) = 7^n \cdot \frac{n!}{3^n}$
    $f(1) = 7^1 \cdot \frac{2!}{3^1} = 7 \cdot \frac{2}{3} = \frac{14}{3}$
  • $f(n) = 7 \cdot \frac{(n + 1)!}{3^n}$
    $f(1) = 7 \cdot \frac{3!}{3^1} = 7 \cdot \frac{6}{3} = 14$
  • $f(n) = 7^n \cdot \frac{(n + 1)!}{3^n}$
    $f(1) = 7^1 \cdot \frac{3!}{3^1} = 7 \cdot \frac{6}{3} = 14$
  1. Profit

    As we can see, the first one is correct