\documentclass{article}
\usepackage[papersize={85mm, 20mm}, text={75mm, 15mm}]{geometry}
\usepackage{pgf, tikz}
\usetikzlibrary{arrows,automata}
\begin{document}
\begin{figure}[h]
\footnotesize
\centering
\begin{tikzpicture}[
% type of arrow head
>=stealth',
% keep arrow head from touching the surface
shorten >= 1pt,
% automatic node positioning
auto,
%
node distance=1.5cm,
% line thickness
semithick,
% text for the initial state arrow. I left it as blank
initial text=]
\tikzstyle{every state}=[draw=blue!50, thick, fill=blue!20,
minimum size=4mm]
\node[state] (v1) {$v_1$};
\node[state] (v2) [right of=v1] {$v_2$};
\node[state] (v3) [right of=v2] {$v_3$};
\node[state] (v4) [right of=v3] {$v_4$};
\node[state] (v5) [right of=v4] {$v_5$};
\path[->] (v1) edge (v2);
\path[->] (v3) edge (v4);
\path[->] (v4) edge (v5);
\path[->, bend right, bend angle = 5] (v2) edge (v5);
\path[->, bend left, bend angle = 25] (v1) edge (v3);
\end{tikzpicture}
\end{figure}
\end{document}
\documentclass[12pt]{beamer}
% color theme
\usetheme{psu}
\usecolortheme[RGB={0,38,93}]{structure}
% For fancy fonts
\usepackage{fontspec}
\defaultfontfeatures{Scale=MatchLowercase, Mapping=tex-text}
\setmainfont[Ligatures={Common}, Numbers={OldStyle}]{Cambria}
\setsansfont[Scale=0.95]{Candara}
\setromanfont{Cambria}
\setmonofont{Monaco}
\usepackage{tikz}
\usetikzlibrary{arrows,automata}
\begin{document}
\begin{frame}
\frametitle{Deterministic Finite Automaton}
\begin{figure}[h]
\begin{tikzpicture}[
% type of arrow head
>=stealth',
% keep arrow head from touching the surface
shorten >= 1pt,
% automatic node positioning
auto,
%
node distance=2cm,
% line thickness
semithick,
bend angle=15,
% text for the initial state arrow. I left it as blank
initial text=]
\tikzstyle{every state}=[draw=blue!50, thick, fill=blue!20]
\node[state,initial](qe){$q_\epsilon$};
\node[state,accepting](q0)[above right of=qe]{$q_0$};
\node[state](q1)[below right of=qe]{$q_1$};
\node[state](q2)[right of=q0]{$q_2$};
\node[state,accepting](q3)[right of=q1]{$q_3$};
\node[state](q4)[below right of=q2]{$q_4$};
\path[->]
(qe) edge [above left] node {0} (q0)
(qe) edge [below left] node {1} (q1)
(q0) edge [loop above] node {0} ()
(q0) edge [left] node {1} (q1)
(q1) edge [above left] node {0} (q2)
(q1) edge [bend left] node {1} (q3)
(q2) edge [above right] node {0} (q4)
(q2) edge [above] node {1} (q0)
(q3) edge [bend left] node {0} (q1)
(q3) edge [right] node {1} (q2)
(q4) edge [below right] node {0} (q3)
(q4) edge [loop right] node {1} ();
\end{tikzpicture}
\end{figure}
\end{frame}
\end{document}