Last time, we introduced Markov matrix as an extension of adjacency matrix. Let's assume \(M\) has the following form.
\begin{eqnarray}
M &=&
\left[
\begin{array}{cc}
0.8 & 0.3 \\
0.2 & 0.7 \\
\end{array}
\right]
\label{eq:berlin_potsdam_mat}
\end{eqnarray}
The meaning of each element of this specific example is:
\begin{eqnarray*}
M &=&
\left[
\begin{array}{cc}
\mbox{Stay Berlin} & \mbox{P $\rightarrow$ B} \\
\mbox{B $\rightarrow$ P} & \mbox{Stay Potsdam} \\
\end{array}
\right]
\end{eqnarray*}
Where \(\mbox{B $\rightarrow$ P}\) is a ratio of moving people from Berlin to Potsdam and \(\mbox{P $\rightarrow$ B}\) is a ratio of from Potsdam to Berlin. The ratio is against to the current inhabitant. In Equation of \(M\), 80% of inhabitants Berlin will stay in Berlin after one year. 20% people will move from Berlin to Potsdam. As you see, the total sum of column is 1 (0.8 + 0.2 = 1.0) since we consider all the inhabitants. This is same to inhabitants of Potsdam. 70% of inhabitants of Potsdam will stay Potsdam and 30% will move to Berlin after one year. The total sum of this column is also 1 (0.7 + 0.3 = 1).
Since the elements of matrix represent ``Ratio of stay/move'', the elements are always more than or equal to 0, and less than or equal to 1. There is no minus number of people movement. Also, there is no more than 100% inhabitants, therefore the element of matrix never more than 1. This matrix completely determines the next year's state from the last year's state. This kind of matrix is called Markov matrix.
Assume Berlin has 900 inhabitants and Potsdam has 100 inhabitants. Then, total 1000 people in these cities. What is the next year's inhabitants distribution? We can compute this using octave.
octave:29> M = [0.8 0.3; 0.2 0.7];
octave:30> p = [900 100]';
octave:31> M * p
750
250
Two yeas later will be:
octave:32> M^2 * p
675
325
I have several quiz to understand this matrix more. Let's think about the number of inhabitants many years later.
By the way, some of the readers might have a question: Why you want to know the many years later. Because I am interested in what happens many years later. But this actually didn't answer the question. ``What happens after many years?'' is the same question to ``What happens in the future?''
Many sciences gather knowledge. The purpose of gathering knowledge is to know the future. Mathematics is essential since it helps to know the future in some extent. I believe that many people are interested in the future since knowing about the future helps to survive. If the society didn't care the future, there is no future of such society. For example, the people who don't care the food in winter, they consume the food before the winter, then disappeared. The people who don't care the children's education, their society has less chance to develop. We are the result of long survival, since we predict the future, like we need some food in the winter, and prepare the winter. If we didn't learn that, we don't exist. As the result, I think many people are interested in the future.
Next time, let's predict the future based on our hypotheses.
No comments:
Post a Comment