Dear localghost,
Thank you very much for the reply.
Your solution works indeed!
However, I came across yet another problem.
The solution does not work for self-loops.
Do you have any idea?
I have attached the code below.
You can un-comment the hard coded values in order to see what result is expected.
Code: Select all
\begin{tikzpicture}[%
->,
>=stealth',
shorten >=1pt,
node distance=2cm,
thick,
every state/.style={%
fill=white,
draw=black,
text=black
}
]
\node[state] (A) {$A$};
\node[state] (B) [right of=A] {$B$};
\node[state] (C) [right of=B] {$C$};
\path (A) edge [loop above] node[midway] {\tikz\fill circle (3pt);} (A)
(A) edge node [above, very near start] {$2$} node [above,very near end] {$3$} (B)
(B) edge [loop above] node[midway] {\tikz\fill circle (3pt);} (B)
(B) edge node [above, very near start] {$1$} node [above, very near end] {$2$} (C)
(C) edge [loop above] node[midway] {\tikz\fill circle (3pt);} (C)
(C) edge [bend left=45] node [xshift=2mm,yshift=1mm,below,very near start] {$2$} node [xshift=-2mm,yshift=1mm,below,very near end] {$1$}
node[midway,below,yshift=-1mm] {2} node[midway] {\tikz\fill circle (3pt);} (B)
(B) edge [bend left=45] node [xshift=2mm,yshift=1mm,below,very near start] {$3$} node [xshift=-2mm,yshift=1mm,below,very near end] {$2$}
node[midway,below,yshift=-1mm] {4} node[midway] {\tikz\fill circle (3pt);} (A);
% Hard-coded the token location since i don't know about it.
%\fill[black] (0.00,1.00) circle (2pt);
%\fill[black] (2.00,1.00) circle (2pt);
%\fill[black] (4.00,1.00) circle (2pt);
\end{tikzpicture}
Thank You for reply !
Raj