%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\clearpage
\pagestyle{fancy}
% Uncomment the next line to generate a Table of Contents
%\tableofcontents
\newpage
\setcounter{page}{1}
\rhead{Page \thepage\ }%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Begin your paper here
進行以下修改:
\begin{document}\setcounter{page}{1} %將這一行代碼放在\begin{document}的最前面
\clearpage
\pagestyle{fancy}
% Uncomment the next line to generate a Table of Contents
\rhead{Page \thepage\ of 20}%將這一行放在\tableofcontents 前面,這樣做從目錄頁就有頁眉顯示
\tableofcontents %目錄
\newpage
\subsection{Model Settings}
The transition process is a discrete-time stochastic process.The occurence of immigrants satisfies Markov conditions.Regard to the condition probability $P(N_{n+1}=j|F_n)$,it satisfies the following expression.
\begin{equation}
P(N_{n+1}=j|N_0=i_0,N_1=i_1,\cdots,N_{n-1}=i_{n-1})=P(N_{n+1}=j|N_n=i_n)
\end{equation}
This means that when the status of the immigrations process at time $n$ is known,the status of immigration process after time $n$ has nothing to do with the status before $n$,that is ,no post-validity.We define $p_{i,j}=P(N_{n=1}=j|N_n=i_n)$,then the entire migration of process ${N_n}$ is determined by the $p_{i,j}$and the initial distribution of $N_0$.As we know from assumption,$p_{i,j}$ is only related to country $i,j$,but has nothing to do with $n$,then Markov chain is time-aligned Markov chain.Then write the $p_{i,j}$in matrix from:
\begin{equation}
P=(p_{i,j})
\begin{pmatrix}
p_{1,1}&p_{1,2}& \cdots &p_{1,226} \\
p_{2,1}& p_{2,2}&\cdots & p_{2,226}\\
\vdots &\vdots & \ddots & \vdots\\
p_{226,1}& p_{226,2}& \cdots & p_{226,226}
\end{pmatrix}
\end{equation}
Because the transition probability is positive,and residents will certainly either stay in their own country or move to other countries in the next period, thus,tha matrix has the following properities.(1)$\underset{226}{p_{i,j}}>0,\quad i,j=1,2,\cdots,226$(2)$\sum p_{i,j}=1,\quad \forall i=1,2,\cdots,226$