Graph Properties / Features

  1. In a directed graph:
    • The in-degree of a vertex in a directed graph, denoted $\text{indeg}(v)$
      $\text{indeg}(v)$
      , is the number of directed edges entering the vertex, and
    • The out-degree of a vertex in a directed graph, denoted $\text{outdeg}(v)$
      $\text{outdeg}(v)$
      , is the number of directed edges leaving the vertex.
    Digraph on 3 vertices, each with its own in and out degrees.

    In this digraph, we have: $\text{indeg}(1) = 2$ and $\text{outdeg}(1) = 0$; $\text{indeg}(2) = 1$ and $\text{outdeg}(2) = 2$; and $\text{indeg}(3) = 0$ and $\text{outdeg}(3) = 1$. Miriam Briskman, CC BY-NC 4.0.

    \documentclass[border=1pt]{standalone}
    \usepackage{tikz}
    \usetikzlibrary{arrows.meta, bending}
    
    \tikzset{
    vertex/.style={draw, circle, very thick, minimum size=1cm},
    edge/.style={very thick, -Triangle}
    }
    
    \begin{document}
    
    \begin{tikzpicture}
    
    \node[vertex] (v1) at (0,0) {$1$};
    \node[vertex] (v2) at (3,1) {$2$};
    \node[vertex] (v3) at (3,-1) {$3$};
    
    \draw[edge] (v2) -- (v1);
    \draw[edge] (v3) -- (v1);
    
    \draw[edge] (v2.63) arc[start angle=-50, end angle=230, radius=3.5mm];
    
    \end{tikzpicture}
    
    \end{document}