# How to draw the following diagram using tikz?

I am trying to draw the following cyclic birth and death chain using tikz:

The key elements I require are:

1. Labels inside the circles
2. Arrowheads in middle of arrows
3. Ellipses at bottom of diagram
4. Arrows going in both directions at each node.

I found a very similar one over here: Drawing cyclic quiver , but it lacked arrows going both directions and labels within nodes.

I have drawn this related diagram already:

Any help would be greatly appreciated (and explanation of code would also be really helpful!)

Thanks!! :)

• Welcome to TeX.SX! If you know that you want to do it with TikZ then you should definitely read an introduction to coding with it, because labels inside circular nodes (\node[circle, draw]) are among the basic knowledge you will need. Please help us help you by giving it a try and then posting a minimal code example with which you do need help with. Jun 29, 2018 at 7:10
• Judging by what you have done, you seem to know how to place text in circles, and that the biggest thing missing is to place the nodes in a circular pattern, rather than in a horizontal line. TikZ has the option of using polar coordinates, (<angle>:<radius>), so for example \node [circle,draw] (m1) at (30:2cm) {$[1]_{m}$}; to place a node at the angle 30 degrees, 2cm from the origin. Jun 29, 2018 at 19:11

This is how I would do it, but since you gave no MWE (not even of the diagram you already made) I don't know if it is of use to you.

\documentclass[tikz]{standalone}

\usetikzlibrary{decorations.markings}

\tikzset{state/.style={draw,circle,minimum size=1.75cm}}

\begin{document}
\begin{tikzpicture}
\node[state] (0)   at ( 90:4) {$$[0]_m$$};
\node[state] (1)   at ( 45:4) {$$[1]_m$$};
\node[state] (2)   at (  0:4) {$$[2]_m$$};
\node[state] (i)   at (270:4) {$$[i]_m$$};
\node[state] (m-2) at (180:4) {$$[m-2]_m$$};
\node[state] (m-1) at (135:4) {$$[m-1]_m$$};

\node[state,draw=none,rotate=315+90] (i-1) at (315:4) {$$\cdots$$};
\node[state,draw=none,rotate=225+90] (i+1) at (225:4) {$$\cdots$$};

\begin{scope}[decoration={markings,mark=at position 0.6 with {\arrow{latex}}},every node/.style={auto,font=\small}]
\foreach \startnode/\endnode in {0/1,1/2,2/i-1,i-1/i,i/i+1,i+1/m-2,m-2/m-1,m-1/0}{
\draw[postaction={decorate}] (\startnode) to[bend left=25] node[auto] {$$P_{\startnode}$$} (\endnode);
\draw[postaction={decorate}] (\endnode)   to[bend left=25] node[auto] {$$1-P_{\endnode}$$} (\startnode);
}
\end{scope}
\end{tikzpicture}
\end{document}


The result looks like this:

Note that Tikz also has the automata library which may be better suited for this type of diagrams. See page 513 of the PGF manual (v3.0.1a).