Special Graphs

  1. A tree is a connected graph that contains no cycles.

    Equivalently, a tree is a connected acyclic graph.
    This graph is a tree because it is connected and contains no cycles.

    This graph is a tree because it is connected and contains no cycles. 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 (-2,-2) {$2$};
    \node[vertex] (3) at (2,-2) {$3$};
    \node[vertex] (4) at (-3,-4) {$4$};
    \node[vertex] (5) at (-1,-4) {$5$};
    
    \draw[edge] (1) -- (2);
    \draw[edge] (1) -- (3);
    \draw[edge] (2) -- (4);
    \draw[edge] (2) -- (5);
    
    \end{tikzpicture}
    
    \end{document}