Problem 407795 · medium · Economics · Level 04 Strategy and Growth

Two Valleys, One Destination

Solow model · convergence · steady state · while loop · growth rate

Two valleys, Ash and Brenn, share the same climate, laws and habits: the same productivity A, capital exponent alpha, saving rate s, depreciation rate delta and workforce growth n. They differ only in how much capital per worker k_0 they start with. Both follow the Solow model: output per worker is y_t = A\,k_t^{\alpha} (0 < \alpha < 1), and

k_{t+1} = k_t + s\,y_t - (\delta + n)\,k_t

with all rates as fractions (5 % is 0.05). Both head to the same steady state

k^* = \left(\frac{s A}{\delta + n}\right)^{1/(1-\alpha)}

Write converge(A, alpha, s, delta, n, k0, frac) that returns a tuple (years, growth):

  • years is the first year t \ge 0 in which k_t is within the fraction frac of the steady state: |k_t - k^*| \le \text{frac} \cdot k^*. If k_0 is already within, years is 0.
  • growth is the growth rate of output per worker in the first year, y_1 / y_0 - 1 (a fraction, negative if output falls).

Try both valleys and press Run with plot on their output paths: the poorer one grows faster at first, yet both arrive at the same place.

Examples

Input:  A = 1, alpha = 0.5, s = 0.2, delta = 0.05, n = 0.05, k0 = 1, frac = 0.1
Output: (45, 0.04880885)
Explanation: k* = 4. Capital per worker first reaches 3.6 or more in year 45.
In year 1, k = 1.1, so output grows from 1 to sqrt(1.1): 4.88 %.

Input:  A = 1, alpha = 0.5, s = 0.2, delta = 0.05, n = 0.05, k0 = 0.25, frac = 0.1
Output: (53, 0.14017543)
Explanation: the poorer valley grows 14 % in its first year, but has further to go.

Input:  A = 1, alpha = 0.5, s = 0.2, delta = 0.05, n = 0.05, k0 = 9, frac = 0.1
Output: (46, -0.01680792)
Explanation: starting above k*, capital and output per worker shrink towards it.

Constraints

  • answers are compared with a tolerance of 1e-6; do not round

Goals

  • Count the years until a simulated path is within a relative tolerance of its steady state
  • Compute the growth rate of output per worker in the first year
  • See that, with the same parameters, a poorer start grows faster
Starting Python…