Code: Select all
\documentclass[landscape]{article}
\pagestyle{empty}
\usepackage[rgb]{xcolor}
\usepackage{pgf}
\usepackage{tikz}
\begin{document}
\begin{tikzpicture}[->,shorten >=1pt,node distance=5cm,auto,thick,bend angle=45, minimum size=5mm, >=stealth]
\usetikzlibrary{automata}
\node[state,accepting] (q_0)[]{$q_0$};
\node[state] (q_1) [right of=q_0] {$q_1$};
\node[state] (q_2) [below right of=q_1] {$q_2$};
\node[state] (q_3) [above right of=q_2] {$q_3$};
\node[state] (q_4) [above of=q_3] {$q_4$};
\node[state] (q_5) [above of=q_2] {$q_5$};
\node[state] (q_8) [left of=q_2,fill=orange,text=blue] {$q_8$};
\node[state] (q_6) [below left of=q_2,fill=cyan,text=blue] {$q_6$};
\node[state] (q_7) [right of=q_6,fill=red,text=blue] {$q_7$};
\node[state] (q_9) [above right of=q_0,fill=magenta,text=blue] {$q_9$};
\path [every node/.style={font=}, line width=2pt]
(q_0) edge [loop left] (q_0)
edge [bend right=10] (q_9)
edge [bend left=10] (q_1)
edge [bend right=30] (q_6)
edge [bend right=25] (q_8)
(q_1) edge [loop above] (q_1)
edge [bend left=10] (q_0)
edge [bend left=10] (q_2)
edge [bend left=25, color=blue] (q_6)
edge [bend right=10, color=blue] (q_8)
(q_2) edge [bend right=0] (q_0)
edge [bend left=10] (q_1)
edge [bend left=10] (q_5)
edge [bend right=10] (q_3)
edge [bend right=10, color=green] (q_6)
edge [bend left=10, color=green] (q_8)
(q_3) edge [bend right=10] (q_4)
(q_4) edge [bend right=60] (q_0)
(q_5) edge [bend right=20] (q_0)
edge [bend right=10] (q_1)
edge [bend left=10] (q_2)
(q_6) edge [loop below, color=gray] (q_6)
edge [bend left=10, color=cyan] (q_1)
edge [bend left=10, color=cyan] (q_7)
edge [bend left=15, color=cyan] (q_8)
edge [bend left=20, color=cyan] (q_0)
(q_7) edge [bend left=90, color=red] (q_0)
edge [bend right=45, color=red] (q_1)
edge [bend right=10, color=red] (q_2)
edge [bend left=10, color=red] (q_6)
edge [bend right=10, color=red] (q_8)
(q_8) edge [loop left, color=orange] (q_8)
edge [bend right=10, color=orange] (q_0)
edge [bend left=7, color=orange] (q_6)
edge [bend right=10, color=orange] (q_7)
(q_9) edge [bend right=10, color=magenta] (q_0)
edge [loop right, color=magenta] (q_9);
\end{tikzpicture}
\end{document}