# Creating a graph for a markov chain

I have the following problem. I want to create the following graph So far I know how to create a graph with latex. But I don't know how to insert the series points. Here is my solution. It looks similar to the above graph but without the points. Hope someone can help me

\documentclass{book}
\usepackage{amsmath, amssymb, amsthm, dsfont, bbm}
\usepackage{pgf}
\usepackage{tikz}
\usetikzlibrary{arrows,automata}
\begin{document}
$\begin{tikzpicture}[->,>=stealth',shorten >=1pt,auto,node distance=4cm, semithick] \tikzstyle{every state}=[fill=red,draw=none,text=white] \node[state] (A) {\{\omega\}}; \node[state] (B) [below of=A] {A_{2}(1)}; \node[state] (C) [below of=B] {A_{1}(1)}; \node[state] (D) [below of=C] {\{\omega\}}; \node[state] (E) [right of=A] {\{\omega\}}; \node[state] (F) [right of=B] {A_{2}(2)}; \node[state] (G) [right of=C] {A_{1}(2)}; \node[state] (H) [right of=D] {\{\omega\}}; \node[state] (I) [right of=E] {\{\omega\}}; \node[state] (J) [right of=F] {A_{2}(m)}; \node[state] (K) [right of=G] {A_{1}(m)}; \node[state] (L) [right of=H] {\{\omega\}}; \node[state] (M) [right of=J] {A_{2}(m+1)}; \path (B) edge node {\mathbf{Q}_{A_{2}\{\omega\}}} (A) edge [loop left] node {\QAt} (B) edge node {\QAto} (C) (C) edge [loop left] node {\QAo} (C) edge node {\mathbf{Q}_{A_{1}\{\omega\}}} (D) edge [right] node {\QAot} (F) (F) edge node {\mathbf{Q}_{A_{2}\{\omega\}}} (E) edge [loop left] node {\QAt} (F) edge node {\QAto} (G) (G) edge [loop left] node {\QAo} (G) edge node {\mathbf{Q}_{A_{1}\{\omega\}}} (H) (J) edge node {\mathbf{Q}_{A_{2}\{\omega\}}} (I) edge [loop left] node {\QAt} (J) edge node {\QAto} (K) (K) edge [loop left] node {\QAo} (K) edge node {\mathbf{Q}_{A_{1}\{\omega\}}} (L) edge [right] node {\QAot} (M) (M) edge [loop left] node {\I} (M); \end{tikzpicture}$
\end{document}


So that my graph looks as follows I have defined the following commands:

\newcommand{\QAt}{\mathbf{Q}_{A_{2}A_{2}}}
\newcommand{\QAo}{\mathbf{Q}_{A_{1}A_{1}}}
\newcommand{\QAot}{\mathbf{Q}_{A_{1}A_{2}}}
\newcommand{\QAto}{\mathbf{Q}_{A_{2}A_{1}}}
\newcommand{\QAtC}{\mathbf{Q}_{A_{2}C}}
\newcommand{\I}{\mathbf{I}}


How can I create the three points in the graph?

• Is your problem solved? If yes, then please accept the provided answer. – Dr. Manuel Kuehner Dec 30 '18 at 8:15

Welcome to TeX.SE! This is very easy. This answer, however, is to tell you that your way of relative positioning is somewhat deprecated, it is better to employ the positioning library for that, and the task becomes even simpler. Likewise, arrows is superseded by arrows.meta.

\documentclass{book}
\usepackage{amsmath, amssymb, amsthm, dsfont, bbm}
\usepackage{tikz}
\usetikzlibrary{arrows.meta,automata,positioning}
\newcommand{\QAt}{\mathbf{Q}_{A_{2}A_{2}}}
\newcommand{\QAo}{\mathbf{Q}_{A_{1}A_{1}}}
\newcommand{\QAot}{\mathbf{Q}_{A_{1}A_{2}}}
\newcommand{\QAto}{\mathbf{Q}_{A_{2}A_{1}}}
\newcommand{\QAtC}{\mathbf{Q}_{A_{2}C}}
\newcommand{\I}{\mathbf{I}}
\begin{document}
$\begin{tikzpicture}[->,>=Stealth,shorten >=1pt,auto,node distance=2cm, semithick] \tikzset{every state/.append style={fill=red,draw=none,text=white}} \node[state] (A) {\{\omega\}}; \node[state] (B) [below=of A] {A_{2}(1)}; \node[state] (C) [below=of B] {A_{1}(1)}; \node[state] (D) [below=of C] {\{\omega\}}; \node[state] (F) [right=of B] {A_{2}(2)}; \node[state] (E) [above=of F] {\{\omega\}}; \node[state] (G) [below=of F] {A_{1}(2)}; \node[state] (H) [below=of G] {\{\omega\}}; \node[state] (J) [right=of F] {A_{2}(m)}; \node[state] (I) [above=of J] {\{\omega\}}; \node[state] (K) [below=of J] {A_{1}(m)}; \node[state] (L) [below=of K] {\{\omega\}}; \node[state] (M) [right=of J] {A_{2}(m+1)}; \path (B) edge node {\mathbf{Q}_{A_{2}\{\omega\}}} (A) edge [loop left] node {\QAt} (B) edge node {\QAto} (C) (C) edge [loop left] node {\QAo} (C) edge node {\mathbf{Q}_{A_{1}\{\omega\}}} (D) edge [right] node {\QAot} (F) (F) edge node {\mathbf{Q}_{A_{2}\{\omega\}}} (E) edge [loop left] node {\QAt} (F) edge node(aux) {\QAto} (G) (G) edge [loop left] node {\QAo} (G) edge node {\mathbf{Q}_{A_{1}\{\omega\}}} (H) (J) edge node {\mathbf{Q}_{A_{2}\{\omega\}}} (I) edge [loop left] node {\QAt} (J) edge node {\QAto} (K) (K) edge [loop left] node {\QAo} (K) edge node {\mathbf{Q}_{A_{1}\{\omega\}}} (L) edge [right] node {\QAot} (M) (M) edge [loop left] node {\I} (M); \node[right=2mm of aux,font=\bfseries\Huge]{\dots}; \end{tikzpicture}$
\end{document} 