Counting the Same Objects in Two Ways
A useful graph proof often begins by choosing a collection of objects that can be counted from two different viewpoints. For degree arguments, the objects are vertex-edge incidences: an incidence is a pair \((v,e)\) in which \(v\) is an endpoint of \(e\). Counting incidences by vertices brings in degrees; counting them by edges brings in the fact that each edge has two endpoints. The resulting identities are simple, but they give exact constraints on how degrees, edges inside a set, and edges crossing its boundary fit together.
Throughout, graphs are finite and simple. Write \(G=(V,E)\), with \(n=|V|\) and \(m=|E|\). The degree \(\deg(v)\) is the number of edges incident with vertex \(v\). For a vertex set \(S\subseteq V\), \(G[S]\) is the induced subgraph on \(S\): it contains precisely the edges of \(G\) whose two endpoints both lie in \(S\). Write \(\partial(S)\) for the set of edges with exactly one endpoint in \(S\). These are the edges crossing between \(S\) and \(V\setminus S\).
Since the graph is simple, each edge has two distinct endpoints. Thus every edge contributes exactly two incidences to \(I(G)\). On the other hand, a vertex \(v\) belongs to exactly \(\deg(v)\) incidences. This is the basic double count: enumerate the same incidence set once by its vertices and once by its edges.
The Degree-Sum Identity
Proof. Consider \(I(G)\). For each vertex \(v\), there are \(\deg(v)\) incidences with first coordinate \(v\), so counting by vertices gives \(|I(G)|=\sum_{v\in V}\deg(v)\). Each edge has exactly two endpoints, so counting by edges gives \(|I(G)|=2|E|\). Equating these two counts proves the identity. If \(V=\varnothing\), then \(E=\varnothing\), both sides are \(0\), and the same identity holds. \(\square\)
This argument establishes the identity from the definitions; it does not assume a named result. It is important that each edge contributes two incidences, while a vertex contributes as many incidences as its degree. In particular, a degree sum counts edges with both endpoints in the set being summed twice, not once.
Worked Example: Checking a Degree Sum
Let \(G\) have vertex set \(V=\{a,b,c,d,e\}\) and edge set \(E=\{ab,ac,bc,cd,de\}\). Compute every degree and verify the identity in two ways.
The edges incident with \(a\) are \(ab,ac\), so \(\deg(a)=2\). Those incident with \(b\) are \(ab,bc\), so \(\deg(b)=2\). Those incident with \(c\) are \(ac,bc,cd\), so \(\deg(c)=3\). The edges at \(d\) are \(cd,de\), so \(\deg(d)=2\), and \(e\) has only \(de\), so \(\deg(e)=1\). Therefore \[ \sum_{v\in V}\deg(v)=2+2+3+2+1=10. \] The edge set has five members, so \(2|E|=2\cdot5=10\).
Check: Enumerating incidences by edges gives two for each of the five edges: \(ab\) contributes \((a,ab),(b,ab)\), and the same endpoint count applies to \(ac,bc,cd,de\). This gives \(5\cdot2=10\) incidences, agreeing with the sum of degrees.
A useful special case follows directly. If every vertex has the same degree \(r\), then the degree sum is \(rn\), because it has \(n\) terms each equal to \(r\). Hence \(rn=2m\). This is an exact constraint on a regular graph: its order, common degree, and size cannot be chosen independently. The argument also includes the graph with no vertices, where both sides are zero.
Counting Incidences at a Vertex Subset
Now count only incidences whose vertex lies in a chosen subset \(S\). The vertex-based count is \(\sum_{v\in S}\deg(v)\). To count by edges, separate edges into three types: those with both endpoints in \(S\), those with exactly one endpoint in \(S\), and those with no endpoint in \(S\). The last type contributes no incidence to \(I(S)\). Each edge of \(G[S]\) contributes two, and each edge of \(\partial(S)\) contributes one.
Proof. Count \(I(S)\) by its vertex coordinate. A vertex \(v\in S\) contributes one incidence for each edge incident with it, giving \(|I(S)|=\sum_{v\in S}\deg(v)\). For the edge-based count, an edge with both endpoints in \(S\) contributes two incidences; these are exactly the edges of \(G[S]\). An edge with exactly one endpoint in \(S\) contributes one; these are exactly the edges of \(\partial(S)\). An edge with no endpoint in \(S\) contributes zero. Therefore \(|I(S)|=2|E(G[S])|+|\partial(S)|\), which proves the identity. If \(S=\varnothing\), all three quantities are zero, so the formula remains valid. \(\square\)
The formula identifies the two different ways a degree sum over \(S\) receives contributions. Edges internal to \(S\) are counted at both their endpoints; edges crossing out of \(S\) are counted only at their endpoint in \(S\). Rearranging gives an exact way to recover the boundary size: \[ |\partial(S)|=\sum_{v\in S}\deg(v)-2|E(G[S])|. \] The right side must therefore be a nonnegative integer. It is not an estimate: once the degrees in \(S\) and its internal edges are known, the number of crossing edges is determined.
Worked Example: Finding the Number of Crossing Edges
Use the graph with \(V=\{a,b,c,d,e\}\) and \(E=\{ab,ac,bc,cd,de\}\). Take \(S=\{a,b,c\}\). Find the number of edges crossing from \(S\) to its complement.
From the degree calculations above, the sum over \(S\) is \[ \sum_{v\in S}\deg(v)=\deg(a)+\deg(b)+\deg(c)=2+2+3=7. \] The edges with both endpoints in \(S\) are \(ab,ac,bc\), so \(|E(G[S])|=3\), and \(2|E(G[S])|=2\cdot3=6\). The subset identity gives \[ |\partial(S)|=7-6=1. \] Indeed, the complement is \(\{d,e\}\), and among the listed edges only \(cd\) has one endpoint in \(S\) and one outside it.
Check: Counting incidences directly at \(a,b,c\), the three internal edges contribute \(2+2+2=6\) incidences, and the crossing edge \(cd\) contributes one incidence, at \(c\). Thus there are \(6+1=7\) incidences at vertices of \(S\), as computed from the degrees.
The same reasoning applies when a set and its complement are considered together. Each crossing edge contributes one incidence on the \(S\) side and one on the \(V\setminus S\) side. Thus the crossing edges appear in both subset degree sums, while an edge internal to either side appears twice in that side's sum and not at all in the other. This lets us check the two sides separately rather than treating the whole graph as an undivided set.
Worked Example: Comparing Both Sides of a Cut
Let \(G\) have vertex set \(V=\{1,2,3,4,5,6\}\) and edge set \(E=\{12,23,14,25,36,34,45\}\). Set \(S=\{1,2,3\}\) and \(T=\{4,5,6\}\), so \(T=V\setminus S\). Compute the degree sums and verify the cut identities on both sides.
The degrees on \(S\) are \(\deg(1)=2\), from \(12,14\); \(\deg(2)=3\), from \(12,23,25\); and \(\deg(3)=3\), from \(23,36,34\). Their sum is \(2+3+3=8\). The internal edges in \(S\) are \(12,23\), giving \(2|E(G[S])|=2\cdot2=4\). The crossing edges are \(14,25,36,34\), so \(|\partial(S)|=4\). The formula gives \(4+4=8\).
On \(T\), the degrees are \(\deg(4)=3\), from \(14,34,45\); \(\deg(5)=2\), from \(25,45\); and \(\deg(6)=1\), from \(36\). Their sum is \(3+2+1=6\). The only internal edge in \(T\) is \(45\), so \(2|E(G[T])|=2\cdot1=2\). The same four edges \(14,25,36,34\) cross the boundary, giving \(2+4=6\).
Check: The full degree sum is \(8+6=14\). The graph has seven listed edges, so counting two endpoints per edge gives \(2\cdot7=14\). The two subset sums also total \(14\), as every vertex belongs to exactly one of \(S,T\).
Using the Identities Carefully
These counts are useful in proofs because they turn local information about degrees into exact information about edges. For example, if the degrees of the vertices in \(S\) and the edges inside \(S\) are specified, then the subset identity fixes the number of edges leaving \(S\). Conversely, if the internal edges and crossing edges are known, the identity fixes the degree sum on \(S\). In a proof, this can expose incompatible requirements: a proposed configuration cannot exist if its stated quantities do not satisfy the equation.
The boundary formula also gives immediate consistency checks. Since \(|\partial(S)|\geq0\), every \(S\subseteq V\) must satisfy \[ \sum_{v\in S}\deg(v)\geq 2|E(G[S])|. \] This inequality is simply the exact identity with the nonnegative boundary term retained. Equality holds precisely when \(\partial(S)=\varnothing\), which means no edge has exactly one endpoint in \(S\). Indeed, the identity says the difference between its two sides is \(|\partial(S)|\), and a set has no crossing edges exactly when that number is zero.
Several limiting cases help check that the formula is being applied with the right edge counts. For \(S=V\), there are no crossing edges, so the subset identity becomes the full degree-sum identity. For a single vertex \(S=\{v\}\) in a simple graph, \(G[S]\) has no edges, and every edge incident with \(v\) crosses the boundary; the formula becomes \(\deg(v)=|\partial(\{v\})|\). For an isolated vertex, both sides of this last equality are zero. For \(S=\varnothing\), there are no vertices, internal edges, or crossing edges.
Common mistake: counting an internal edge only once. In the first graph example, for \(S=\{a,b,c\}\) there are three internal edges and one crossing edge. A wrong calculation would say that the degree sum is \(3+1=4\), counting each internal edge once. But the actual degree sum is \(2+2+3=7\). Each internal edge has two endpoints in \(S\), so it contributes two incidences; the corrected count is \(2\cdot3+1=7\). A related error is to count a crossing edge twice in the sum over \(S\). It has only one endpoint in \(S\), so it contributes one incidence there; its other incidence belongs to the sum over \(V\setminus S\).
Before using double counting in a proof, identify the objects first and specify exactly which of them are being counted. Here the objects are pairs \((v,e)\), not edges alone. Then classify their contributions: for the full graph, every edge contributes two; for a subset, internal edges contribute two, boundary edges one, and edges outside contribute zero. That classification is what makes the equations reliable.
Check Your Understanding
Use incidence counts to justify each answer. State which edges are internal and which cross the chosen boundary.
- A graph has \(7\) edges and degree sum \(14\). Verify the full incidence count. What degree sum would the identity require if the graph instead had \(8\) edges?
- In a graph, \(S\) has degree sum \(11\) and \(4\) internal edges. How many edges cross from \(S\) to its complement?
- Prove directly from incidence counts that for \(S=V\), the subset identity reduces to the full degree-sum identity.
- If \(S\) is a single isolated vertex, evaluate each term in the subset identity.
- Explain why an edge with both endpoints in \(S\) contributes two to \(\sum_{v\in S}\deg(v)\), whereas an edge in \(\partial(S)\) contributes one.