Graph Properties / Features

  1. A cycle is a closed path in which no edge is repeated and no vertex is repeated except the first and last vertex.
    The sequence 1,2,3,1 forms a cycle.

    The sequence $1,2,3,1$ forms a cycle because it starts and ends at the same vertex without repeating other vertices or edges. The sequence $1,2,3,1,2,3,1$ is a closed path but not a cycle. Miriam Briskman, CC BY-NC 4.0.

    \documentclass[border=1pt]{standalone}
    \usepackage{tikz}
    
    \tikzset{
    vertex/.style={draw, circle, very thick, minimum size=1cm},
    edge/.style={very thick}
    }
    
    \begin{document}
    
    \begin{tikzpicture}
    
    \node[vertex] (1) at (0,0) {$1$};
    \node[vertex] (2) at (3,0) {$2$};
    \node[vertex] (3) at (1.5,2) {$3$};
    
    \draw[edge] (1) -- (2);
    \draw[edge] (2) -- (3);
    \draw[edge] (3) -- (1);
    
    \end{tikzpicture}
    
    \end{document}