In: Computer Science
Draw a directed graph consisting of five nodes, each of which is path connected to every other node in the graph. Be sure to label the vertices.
I need LaTeX codes on this problem.
\documentclass{article}
\usepackage{tikz}
\begin{document}
\begin{tikzpicture}
[scale=.9,auto=center,every node/.style={circle,fill=blue!20}]
\node (a1) at (1,1) {1};
\node (a2) at (5,1) {2};
\node (a3) at (2,2) {3};
\node (a4) at (4,2) {4};
\node (a5) at (3,3) {5};
\draw[edge] (a1) to (a2);
\draw[edge] (a1) to (a3);
\draw[edge] (a1) to (a4);
\draw[edge] (a1) to (a5);
\draw[edge] (a2) to (a1);
\draw[edge] (a2) to (a3);
\draw[edge] (a2) to (a4);
\draw[edge] (a2) to (a5);
\draw[edge] (a3) to (a1);
\draw[edge] (a3) to (a2);
\draw[edge] (a3) to (a4);
\draw[edge] (a3) to (a5);
\draw[edge] (a4) to (a1);
\draw[edge] (a4) to (a2);
\draw[edge] (a4) to (a3);
\draw[edge] (a4) to (a5);
\draw[edge] (a5) to (a1);
\draw[edge] (a5) to (a2);
\draw[edge] (a5) to (a3);
\draw[edge] (a5) to (a4);
\end{tikzpicture}
\end{document}