
\documentclass[beamer]{standalone}
\usepackage[all]{xy}
\usepackage{tikz}
\usetikzlibrary{arrows,calc, patterns, positioning, decorations.pathreplacing,decorations.markings,decorations.pathmorphing,backgrounds}
\usetikzlibrary{shapes,snakes}
\usetikzlibrary{external}
\tikzexternalize % activate! 
\begin{document}
%\begin{standaloneframe}

% If overlays do not work, use \only<1-n>{...} where n is the max overlay
% \only<1-1000>{
  \begin{tikzpicture}[scale=1.5,font=\normalsize]
		\tikzset{
		empty node/.style={circle,inner sep=0,fill=none},
		solid node/.style={circle,draw,inner sep=1.5,fill=black},
		hollow node/.style={circle,draw,thick,inner sep=1.5,fill=white}
		}
		\tikzset{snake it/.style={decorate, decoration=snake, line cap=round}}
		\tikzset{gray line/.style={line cap=round,color=gray}}
		\tikzset{thin line/.style={line cap=round}}
		\draw[color=gray,-,thin line] (-1.65,0.5) to (1.65,0.5);
		\draw[color=gray,-,thin line] (-1.65,1.5) to (1.65,1.5);
		\draw[color=gray,-,thin line] (-1.65,2.5) to (1.65,2.5);
		\draw[color=gray,-,thin line,dash pattern={on 3pt off 3pt}] (-1.65,1) to (1.65,1);
		\draw[color=gray,-,thin line,dash pattern={on 3pt off 3pt}] (-1.65,2) to (1.65,2);
		\node(a)[hollow node] at (0,0) {};
		\node(b)[solid node] at (0,0.5) {};
		\node(b0)[hollow node] at (-1,1) {};
		\node(b1)[hollow node] at (0,1) {};
		\node(b2)[hollow node] at (1,1) {};
		\node(b0')[solid node] at (-1,1.5) {};
		\node(b1')[solid node] at (0,1.5) {};
		\node(b2')[solid node] at (1,1.5) {};
		\node(b0'0)[hollow node] at (-1.25,2) {};
		\node(b0'1)[hollow node] at (-1,2) {};
		\node(b0'2)[hollow node] at (-0.75,2) {};
		\node(b1'0)[hollow node] at (-0.25,2) {};
		\node(b1'1)[hollow node] at (-0.08,2) {};
		\node(b1'2)[hollow node] at (0.08,2) {};
		\node(b1'3)[hollow node] at (0.25,2) {};
		\node(b2'0)[hollow node] at (0.75,2) {};
		\node(b2'1)[hollow node] at (1.25,2) {};
		\node(dots)[empty node] at (0,3) {$\vdots$};
		\node[empty node] at (2,0.5) {$f(0)$};
		\node[align=flush left] at (2,1) {~~~~~$f(0)+1$};
		\node[empty node] at (2,1.5) {$f(1)$};
		\node[align=flush left] at (2,2) {~~~~~$f(1)+1$};
		\node[align=flush left] at (2,2.5) {$f(2)$};

		\node(b0'0')[solid node] at (-1.25,2.5) {};
		\node(b0'1')[solid node] at (-1,2.5) {};
		\node(b0'2')[solid node] at (-0.75,2.5) {};
		\node(b1'0')[solid node] at (-0.25,2.5) {};
		\node(b1'1')[solid node] at (-0.08,2.5) {};
		\node(b1'2')[solid node] at (0.08,2.5) {};
		\node(b1'3')[solid node] at (0.25,2.5) {};
		\node(b2'0')[solid node] at (0.75,2.5) {};
		\node(b2'1')[solid node] at (1.25,2.5) {};

		\draw[thick,snake it] (a) to (b);
		\draw[thick,-] (b) to (b0);
		\draw[thick,-] (b) to (b1);
		\draw[thick,-] (b) to (b2);
		\draw[thick,snake it] (b0) to (b0');
		\draw[thick,snake it] (b1) to (b1');
		\draw[thick,snake it] (b2) to (b2');
		\draw[thick,-] (b0') to (b0'0);
		\draw[thick,-] (b0') to (b0'1);
		\draw[thick,-] (b0') to (b0'2);
		\draw[thick,-] (b1') to (b1'0);
		\draw[thick,-] (b1') to (b1'1);
		\draw[thick,-] (b1') to (b1'2);
		\draw[thick,-] (b1') to (b1'3);
		\draw[thick,-] (b2') to (b2'0);
		\draw[thick,-] (b2') to (b2'1);
		\draw[thick,snake it] (b0'0) to (b0'0');
		\draw[thick,snake it] (b0'1) to (b0'1');
		\draw[thick,snake it] (b0'2) to (b0'2');
		\draw[thick,snake it] (b1'0) to (b1'0');
		\draw[thick,snake it] (b1'1) to (b1'1');
		\draw[thick,snake it] (b1'2) to (b1'2');
		\draw[thick,snake it] (b1'3) to (b1'3');
		\draw[thick,snake it] (b2'0) to (b2'0');
		\draw[thick,snake it] (b2'1) to (b2'1');
		%\draw[gray line,out=20,in=-90] (a) to (2,3);
		%\draw[gray line,out=170,in=-90] (a) to (-2,3);	% ...   
  \end{tikzpicture}
% }
%\end{standaloneframe}
\end{document}
