\begin{figure}[!t]
\centering
\scalebox{0.9}{
\begin{tikzpicture}
    \node[draw, rectangle, fill=gray!50] (DEAD) at (0,0) {T$$};
    \node[draw, rectangle, fill=gray!50] (DEAD2) at (9,0) {T$$};
    \node[draw, circle] (A) at (1.5,0) {A};
    \node[draw, circle] (B) at (3,0) {B};
    \node[draw, circle] (C) at (4.5,0) {C};
    \node[draw, circle] (D) at (6,0) {D};
    \node[draw, circle] (E) at (7.5,0) {E};

    \draw[->] (DEAD.south) to [bend right=30] node {0.5} (C.south);
    \draw[->] (A) -- node {0.5}  (DEAD);
    \draw[->] (A) to [bend left=30] node {0.5} (B);
    \draw[->] (B) to [bend left=30] node {0.5} (A);
    \draw[->] (B) to [bend left=30] node {0.5} (C);
    \draw[->] (C) to [bend left=30] node {0.5} (B);
    \draw[->] (C) to [bend left=30] node {0.5} (D);
    \draw[->] (D) to [bend left=30] node {0.5} (C);
    \draw[->] (D) to [bend left=30] node {0.5} (E);
    \draw[->] (E) to [bend left=30] node {0.5} (D);
    \draw[->] (E) -- node {0.5}  (DEAD2);
    \draw[->] (DEAD2.south) to [bend left=30] node {0.5} (C.south);

    \draw[->] ([yshift=4ex]C.north) -- ([yshift=4.5ex]C.south);
\end{tikzpicture}
}
\caption{Random walk with restarts.}
\label{randomwalkRestart}
\end{figure}


