# Circle and line diagram tex [closed]

I saw this diagram

I wonder how we type this up in Latex. I have seen that TikZ package produces similar outcome(?)

## closed as too broad by TeXnician, Zarko, Stefan Pinnow, Paul Gaborit, JesseJul 15 '17 at 2:48

Please edit the question to limit it to a specific problem with enough detail to identify an adequate answer. Avoid asking multiple distinct questions at once. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.

• So far I only understood how to draw circle and lines. Could not add labels nor connect them. – CL. Jul 14 '17 at 15:13
• Please add that as code example (MWE). – TeXnician Jul 14 '17 at 15:13
• Your observation is correct! You can draw this as three (growing right), as automaton or as simple image of three circle connected bylines. Maybe for star you look in texample.net. There is a lot of examples of TikZ pictures. – Zarko Jul 14 '17 at 15:13
• I have found this one, as almost the thing I wanted. Now I would like to add circles around text... which I have no idea how. – CL. Jul 14 '17 at 15:21
• Then you should simply post some code... – TeXnician Jul 14 '17 at 15:23

Here is a simple solution with pst-tree (can be compiled with pdflatex , with switch --enable-write18 under MiKTeX,-shell-escape` under TeX Live and MacTeX):

\documentclass[border=3pt]{standalone}
\usepackage[utf8]{inputenc}
\usepackage{pst-tree}
\usepackage{auto-pst-pdf}

\begin{document}

\everypsbox{\scriptstyle}
\psset{shortput=tab, labelsep=0pt}
\MakeShortTnput{\tnput}
$\begin{psmatrix} \pstree[treemode=R, arrows=->, arrowinset=0]{% \Tcircle{\mathsf{S₁}}\tnput[labelsep=24pt]{\mathsf{t = 0}}}% {% \Tcircle{\mathsf{S₃}}^{\mathsf{p}} \Tcircle{\mathsf{S₂}}\tnput[labelsep=5pt, tnpos=b]{\mathsf{t = dt}}_{\mathsf{1-p}}}% \end{psmatrix}$

\end{document}