Skip to content
Free public beta until December 4, 2026: every course is open, no card needed. After that, the first chapter of each course stays free and full access is a one-time $39 ($19 for up to 100 founding members chosen for helpful feedback). Your progress is kept. How the beta works

Recipe

Compute a degree sequence from an edge list

Use when: you're given a graph's edge list, possibly with a self-loop, and asked for the degree of some or all of its vertices

Goal: the degree of every vertex asked about, plus which of them are isolated or pendant

Taught in Degree, isolated, and pendant vertices, revisited

  1. 1

    Write out the full edge list, and tally directly from it rather than redrawing the graph.

    Example

    G has vertices \{A,B,C,D,E\} and edges \{A,B\}, \{A,C\}, \{B,C\}, \{A,D\}.

    Why: degree is a count of edge-touches, so the edge list is the only data that count actually depends on.

  2. 2

    For every vertex, count how many times it appears among the listed edges. A self-loop adds 2 to that one vertex's tally by itself, not 1.

    Example

    A appears in 3 edges (AB, AC, AD), B in 2 (AB, BC), C in 2 (AC, BC), D in 1 (AD), E in 0. Separately, a pseudograph vertex v with a single self-loop and nothing else gets \deg(v) = 2, since both ends of that one loop attach to v.

    • the edge is an ordinary edge between two distinct vertices — add 1 to each of the two endpoints
    • the edge is a self-loop at one vertex — add 2 to that vertex alone

    Why: both ends of a loop attach to the same vertex, so a loop contributes twice to that one vertex's degree even though only one vertex is involved.

  3. 3

    Compare each tally to the two named extremes: a tally of 0 makes that vertex isolated, and a tally of 1 makes it pendant.

    Example

    \deg(D) = 1 makes D pendant; \deg(E) = 0 makes E isolated. A, B, and C sit strictly between the two extremes and get neither name.

    Why: isolated and pendant are just names for the two extreme degree values, not a separate count to compute.

Common mistakes

  • Counting a self-loop once instead of twice.
  • Forgetting that a self-loop still counts as an edge touching its vertex, so that vertex is not isolated.
  • Mislabeling a degree-2 vertex as pendant by miscounting one of its edges.
  • Confusing "isolated" (no edges at all) with "disconnected from the rest of the graph" while still having a self-loop or other edge.