You are on page 1of 2

Dynamics and Dynamic optimization

Week 1-5: Homework

Introduction
Your attempts at the solution of the problems below will be marked as follows
◼ Every non-empty submission is awarded 4 marks.
◼ The word-counts are recommended and answers longer than the word-count to neither get
penalties nor extra marks for the material contained int he extra words.
◼ There are 8 sub-questions in total, across which the remaining 96 marks are distributed.
◼ 12 marks per sub-question, distributed as follows:
◼ Basic correctness: 0-3
◼ Solution fully addresses the question asked: 0-3
◼ Quality of Comments: 0-3
◼ Advanced Originality: 0-3

Exam
A] Random matrices and their Eigenvalues
This problem concerns the eigenvalues of a specific set of random 50 ⨯ 50 matrices.

a: Write one cell of commands that execute the following calculations:


◼ Sets the values N = 100 and p = 0.1.
◼ Generate a sample of N, 50 ⨯ 50, whose matrix-elements are 0 with probability 1 - p, and with
probability p are randomly drawn real numbers between 1 and -1, with a uniform probability
density, and of which all diagonal elements are 0.
◼ Numerically calculates a flattened list of all the eigenvalues of all matrices in the sample.
◼ Plots all these eigenvalues in the complex plane.
Execute the command and comment on the results of your calculation in 250 words or less (use
WordCount[...]).
b: Explore how the complex-plane plot changes when p takes different values between 0.1 and 0.75,
calculate a few representative plots and comment on the results of your calculations in 500 words
or less (use WordCount[...]).

B] Gradient-learning amongst agents


Consider a set of agents j = 1, , ..., N who each make a choice at each time-period t specified by
their choice variable xj [t] and who each have the following utility they extract from that choice in a
given time-period t

1
uj 
x [t] = ηj xj [t] - 200
xj [t]2 + ∑Nk=1 Bjk xj [t] xk [t] ,
2 Dynamics and Dynamic optimization homework.nb

Consider a set of agents j = 1, , ..., N who each make a choice at each time-period t specified by
their choice variable xj [t] and who each have the following utility they extract from that choice in a
given time-period t

1
uj 
x [t] = ηj xj [t] - 200
xj [t]2 + ∑Nk=1 Bjk xj [t] xk [t] ,

where B is an N ⨯ N matrix of which all diagonal elements are 0, and the off-diagonal elements have
a probability of 0.5 to take a random value, uniformly distributed, between 0 and 0.01.

a: If we assume that agent j is gradient-learning the optimal choice for their xj [t]. Give the gradient-
learning equation for j and explain the meaning of the various terms of the equation in 250 words or
less (use WordCount[...]).
b: Consider the case where N = 10 and where ηj = 1 and xj [0] = 0.1 for all agents. Calculate a sample
of 100 matrices B and determine in how many cases there is a stationary state solution. Comment
on your results using one relevant graph and 250 words or less (use WordCount[...]).
c: Using the sample from b: calculate in how many cases there are systems where agents may
display periodic behaviour, for perhaps just a short period of time, and for one system of your
choice from the sample graph a few representative choice-paths of the agents in the model. Com-
ment on your results using one or two relevant graphs and 500 words or less (use WordCount[...]).

C] Consensus formation amongst a community of agents


Consider a set of agents j = 1, , ..., N who each make a choice at each time-period t specified by
their choice variable xj [t] and who have the following community utility they extract from that
choice in a given time-period t

1 1 2
u
x [t] = 
η. 
x [t] - 20

x [t]2 + 
x [t] . B . 
x [t] - b
∂t 
x [t] ,

where B is an N ⨯ N matrix of which all diagonal elements are 0, and the off-diagonal elements have
a probability of 0.5 to take a random value, uniformly distributed, between 0 and 0.01.

a: For N = 4 and one randomly generated matrix B, find the Euler equations for the dynamical
optimization problem faced by these agents. Assume there is no future-discounting and that  η is a
vector of ones. Comment on the equations you find in no more than 250 words (use WordCount[...]).
b: If you assume that all agents start at xj [0] and want to reach the optimal utility state xj* time
T → ∞. Find the solutions 
x [t] and plot them in a representative plot for an appropriate and illustra-
tive choice of T. Comment on the solutions you find in no more than 250 words (use WordCount[...]).
c: Explore how future-discounting affects the behaviour of the solutions to the dynamic optimiza-
tion problem. Comment on the results you find in no more than 500 words (use WordCount[...]).

You might also like