次の関数g(x)の定義に従ってg(4)を再帰的に求めるとき、必要な加算の回数は幾らか。
g(x)={1if x<2g(x−1)+g(x−2)otherwiseg(x) = \begin{cases} 1 & \text{if } x < 2 \\ g(x-1) + g(x-2) & \text{otherwise} \end{cases}g(x)={1g(x−1)+g(x−2)if x<2otherwise
3
4
5
7