% pollard.tex
%
% Visualization of the pseudo-random sequence used in Pollard's rho algorithm 
%
% Author: Peter Schwabe
% Public Domain


\begin{pspicture}(-4,-3)(3,3)
\rput(-3,-3){\rnode{X0}{$\bullet$}}
\rput(-2.5,-2){\rnode{X1}{$\bullet$}}
\rput(-2,-1){\rnode{X2}{$\bullet$}}
\rput(-1.5,0){\rnode{X3}{$\bullet$}}
\rput(-0.5607,1.0607){\rnode{Xt}{$\bullet$}}
\rput(0.5,1.5){\rnode{Xt1}{$\bullet$}}
\rput(2,0){\rnode{Xt2}{$\bullet$}}
\rput(0.5,-1.5){\rnode{Xts2}{$\bullet$}}
\rput(-1,0){\rnode{Xts1}{$\bullet$}}
\ncline[linestyle=solid]{X0}{X1}
\ncline[linestyle=solid]{X1}{X2}
\ncline[linestyle=dashed,dash=2pt 2pt]{X2}{X3}
\ncarc[linestyle=solid]{X3}{Xt}
\ncarc[linestyle=solid,arcangle=22.5]{Xt}{Xt1}
\ncarc[linestyle=solid,arcangle=45]{Xt1}{Xt2}
\ncarc[linestyle=dashed,dash=2pt 2pt,arcangle=45]{Xt2}{Xts2}
\ncarc[linestyle=solid,arcangle=45]{Xts2}{Xts1}
\ncarc[linestyle=solid,arcangle=22.5]{Xts1}{Xt}
\rput(-3.4,-3){$X_0$}
\rput(-2.9,-2){$X_1$}
\rput(-2.4,-1){$X_2$}
\rput(-2,0){$X_{t-1}$}
\rput(-0.8607,1.1607){$X_t$}
\rput(0.5,1.8){$X_{t+1}$}
\rput(2.4,0){$X_{t+2}$}
\rput(0.5,-1.8){$X_{t+s-2}$}
\rput(-0.3,0){$X_{t+s-1}$}
\rput(-0.0607,0.9607){$X_{t+s}$}
\end{pspicture}


