Adapted from Linear Algebra Modules Project: Markov Chains

The purpose of this module is to introduce an important class of applications that involve products and powers of matrices. We will return to these applications in later modules where you will be able to use your expanding knowledge of linear algebra to derive even more insights than we can at this early stage.

Problem 1

Suppose we have collected enough data to justify the following assumptions about the population:

(1) Each year 6% of the urban population moves to rural areas and the remaining 94% stay in urban areas.
(2) Each year 9% of the rural population moves to urban areas and the remaining 91% stay in rural areas.

Assume that the state vector at year k is _rtable[137008812] where u[k] is the urban population and r[k] is the rural population.

Part A: Execute with(LinearAlgebra): Then write out the stochastic matrix for the system the represents the change of state vectors from one year to the next. We will enter the matrix N into Maple as fractions (Maple sometimes has problems with decimals).

Part B: What happens to the system in the long term? To see whether it stabilizes so that Nx=x for some x, we will set up and solve the matrix system (I-N)x=0 for x (which is algebraically equivalent to Nx=x). So, subtract N from I, the identity matrix, and augment with a column of 0s. Since we also want the column of the solution to add to 1, we'll add in a row of 1s at the bottom to represent [u[k]+ r[k] = 1].

Part C: What happens to the system in the long-term if the initial population is 45% urban and 55% rural? For example, will all of the population end up in the cities? Will the urban and rural populations eventually settle down, or will they oscillate back and forth endlessly? What happens after 1 year? After 2 years? What about after 50 years? Execute commands like:
evalf((N^50).Matrix([[45],[55]]));

[Maple Metafile]

Part D : What happens to this system in the long-term for other initial populations? Use commands similar to those in Part C, but change the initial populations (be sure they still add to 100%).


Problem 2

How about if the stochastic (Marchov) matrix is W := _rtable[136778856] ?

W := Matrix([[1,1/2,0,0],[0,0,1/2,0],[0,1/2,0,0],[0,0,1/2,1]]);

What happens to the system in the long-term for various initial populations?
For instance, try evalf((W^50).Matrix([[25],[25],[25],[25]]));
and others like evalf((W^50).Matrix([[10],[20],[30],[40]]));
Reduce the Augmented matrix for (I-N)x=0 with 1s added onto the bottom:
Aug := Matrix([[0, -1/2, 0, 0, 0], [0, 1, -1/2, 0, 0], [0, -1/2, 1, 0, 0], [0, 0, -1/2, 0, 0], [1, 1, 1, 1, 1]])