Skip to content

Chapter 12. Graph Operations

Graph operations build new graphs from old graphs. Some operations remove vertices or edges. Some combine two graphs. Some transform the incidence structure while preserving part of the original graph.

These operations are useful for two reasons. First, they give concise ways to construct examples. Second, they support proofs by reduction: one studies how a property changes when a graph is modified.

Common graph operations include union, intersection, complement, deletion, contraction, subdivision, join, and graph products. Standard references distinguish unary operations, which act on one graph, from binary operations, which combine two graphs.

12.1 Unary and Binary Operations

A unary graph operation takes one graph as input and produces one graph as output.

Examples include:

OperationInputOutput
Vertex deletionGG and a vertex vvGvG-v
Edge deletionGG and an edge eeGeG-e
Edge contractionGG and an edge eeG/eG/e
ComplementGGG\overline{G}
SubdivisionGG and an edge eeA graph with ee replaced by a path

A binary graph operation takes two graphs and produces one graph.

Examples include:

OperationInputsOutput
UnionG,HG,HGHG \cup H
IntersectionG,HG,HGHG \cap H
JoinG,HG,HG+HG+H
Cartesian productG,HG,HGHG \square H
Disjoint unionG,HG,HG˙HG \dot{\cup} H

Unary operations modify one graph. Binary operations combine two graphs.

12.2 Union of Graphs

Let

G=(VG,EG) G=(V_G,E_G)

and

H=(VH,EH) H=(V_H,E_H)

be graphs. Their union is the graph

GH G \cup H

with vertex set

V(GH)=VGVH V(G \cup H)=V_G \cup V_H

and edge set

E(GH)=EGEH. E(G \cup H)=E_G \cup E_H.

The union contains all vertices and all edges appearing in either graph. If a vertex or edge appears in both graphs, it appears only once in the union.

For example, if

EG={{a,b},{b,c}} E_G=\{\{a,b\},\{b,c\}\}

and

EH={{c,d},{a,b}}, E_H=\{\{c,d\},\{a,b\}\},

then

E(GH)={{a,b},{b,c},{c,d}}. E(G\cup H)=\{\{a,b\},\{b,c\},\{c,d\}\}.

The shared edge {a,b}\{a,b\} is not duplicated. This set-theoretic definition of graph union is the usual one.

12.3 Intersection of Graphs

The intersection of two graphs GG and HH is the graph

GH G \cap H

with vertex set

V(GH)=VGVH V(G \cap H)=V_G \cap V_H

and edge set

E(GH)=EGEH. E(G \cap H)=E_G \cap E_H.

The intersection keeps only the vertices and edges common to both graphs.

For example, if

EG={{a,b},{b,c},{c,d}} E_G=\{\{a,b\},\{b,c\},\{c,d\}\}

and

EH={{a,b},{c,d},{d,e}}, E_H=\{\{a,b\},\{c,d\},\{d,e\}\},

then

E(GH)={{a,b},{c,d}}. E(G\cap H)=\{\{a,b\},\{c,d\}\}.

Graph intersection is useful when two graphs describe different relations on overlapping objects, and one wants the part common to both.

12.4 Disjoint Union

The disjoint union of graphs combines them without identifying vertices.

Even if GG and HH use the same vertex labels, the disjoint union treats the two copies as separate unless they have first been explicitly identified.

It is often written as

G˙H. G \dot{\cup} H.

Formally, one may replace the vertices of GG by pairs

(v,1) (v,1)

and the vertices of HH by pairs

(w,2). (w,2).

Then the vertex sets are disjoint by construction.

The disjoint union has no edges between the copy of GG and the copy of HH. Therefore, if both graphs are nonempty, the disjoint union is disconnected.

Disjoint union is useful for building graphs component by component.

12.5 Ring Sum and Symmetric Difference

The ring sum of two graphs is formed by taking the symmetric difference of their edge sets.

It is often written as

GH. G \oplus H.

The edge set is

E(GH)=EGEH, E(G\oplus H)=E_G \triangle E_H,

where

EGEH=(EGEH)(EHEG). E_G \triangle E_H = (E_G\setminus E_H)\cup(E_H\setminus E_G).

Thus an edge appears in GHG\oplus H exactly when it appears in one graph but not both.

Depending on convention, the vertex set may be taken as

VGVH V_G \cup V_H

or restricted to vertices incident with edges of the symmetric difference. The convention should be stated before use.

For example, if

EG={{a,b},{b,c}} E_G=\{\{a,b\},\{b,c\}\}

and

EH={{b,c},{c,d}}, E_H=\{\{b,c\},\{c,d\}\},

then

E(GH)={{a,b},{c,d}}. E(G\oplus H)=\{\{a,b\},\{c,d\}\}.

The common edge {b,c}\{b,c\} disappears.

12.6 Complement

Let GG be a simple graph with vertex set VV. The complement of GG, written

G, \overline{G},

is the simple graph with the same vertex set, where two distinct vertices are adjacent in G\overline{G} exactly when they are not adjacent in GG.

Thus

V(G)=V(G). V(\overline{G})=V(G).

For distinct vertices u,vu,v,

{u,v}E(G) \{u,v\}\in E(\overline{G})

if and only if

{u,v}E(G). \{u,v\}\notin E(G).

If GG has nn vertices and mm edges, then

G \overline{G}

has

(n2)m \binom{n}{2}-m

edges.

The complement turns non-adjacency into adjacency. It is useful in coloring, clique theory, independent sets, and extremal graph theory.

12.7 Vertex Deletion

Let GG be a graph and let vV(G)v\in V(G). The graph

Gv G-v

is obtained by deleting vv and all edges incident with vv.

Thus

V(Gv)=V(G){v}. V(G-v)=V(G)\setminus\{v\}.

The edge set consists of all edges of GG whose endpoints are not vv.

More generally, if SV(G)S\subseteq V(G), then

GS G-S

is obtained by deleting every vertex in SS and all incident edges.

Vertex deletion is used in cut vertices, induced subgraphs, graph minors, recursive algorithms, and deletion proofs.

12.8 Edge Deletion

Let eE(G)e\in E(G). The graph

Ge G-e

is obtained by deleting the edge ee while keeping all vertices.

Thus

V(Ge)=V(G) V(G-e)=V(G)

and

E(Ge)=E(G){e}. E(G-e)=E(G)\setminus\{e\}.

More generally, if FE(G)F\subseteq E(G), then

GF G-F

deletes all edges in FF.

Edge deletion produces a spanning subgraph. It is used in forests, spanning trees, bridges, cuts, and deletion-contraction recurrences. Lecture notes commonly define GeG-e as the edge-deleted subgraph of GG.

12.9 Edge Addition

If uu and vv are distinct nonadjacent vertices of a simple graph GG, then

G+{u,v} G+\{u,v\}

is the graph obtained by adding the edge {u,v}\{u,v\}.

The vertex set remains unchanged:

V(G+{u,v})=V(G). V(G+\{u,v\})=V(G).

The edge set becomes

E(G+{u,v})=E(G){{u,v}}. E(G+\{u,v\})=E(G)\cup\{\{u,v\}\}.

Adding an edge can reduce the number of connected components by at most one. If uu and vv are already in the same component, the number of components does not change. If they are in different components, those two components merge.

In a tree, adding any new edge creates exactly one cycle.

12.10 Edge Contraction

Let

e={u,v} e=\{u,v\}

be an edge of an undirected graph GG. The contraction of ee, written

G/e, G/e,

is obtained by identifying uu and vv into a single new vertex and keeping the remaining adjacencies.

Intuitively, the edge ee is shrunk to a point.

If uu and vv are merged into a new vertex xx, then every edge incident with uu or vv becomes incident with xx. The edge ee itself disappears.

Contraction may create loops or multiple edges. In simple graph theory, loops are usually deleted and parallel edges may be merged after contraction.

Edge contraction is fundamental in graph minors, planar graph theory, spanning tree recurrences, and network simplification.

12.11 Subdivision

A subdivision replaces an edge by a path.

If

e={u,v} e=\{u,v\}

is an edge of GG, subdividing ee means deleting ee, adding a new vertex xx, and adding two edges

{u,x} \{u,x\}

and

{x,v}. \{x,v\}.

Thus the edge

uv u-v

is replaced by

uxv. u-x-v.

Subdivision preserves many topological features of a graph while changing degrees and path lengths. It is important in planar graph theory, homeomorphism of graphs, graph drawing, and topological minors.

Repeated subdivision replaces an edge by a longer path.

12.12 Join of Graphs

Let GG and HH be vertex-disjoint graphs. The join of GG and HH, written

G+H G+H

or sometimes

GH, G \vee H,

is obtained from their disjoint union by adding every possible edge between a vertex of GG and a vertex of HH.

Thus

V(G+H)=V(G)V(H) V(G+H)=V(G)\cup V(H)

and

E(G+H)=E(G)E(H){{u,v}:uV(G), vV(H)}. E(G+H) = E(G)\cup E(H) \cup \{\{u,v\}:u\in V(G),\ v\in V(H)\}.

The join makes every vertex of GG adjacent to every vertex of HH. This is the standard construction used in graph operations.

For example,

Km+Kn=Km+n. K_m + K_n = K_{m+n}.

Joining two complete graphs gives a larger complete graph.

12.13 Cartesian Product

The Cartesian product of graphs GG and HH is written

GH. G \square H.

Its vertex set is

V(GH)=V(G)×V(H). V(G \square H)=V(G)\times V(H).

Two vertices

(g,h) (g,h)

and

(g,h) (g',h')

are adjacent if either:

g=g g=g'

and

{h,h}E(H), \{h,h'\}\in E(H),

or

h=h h=h'

and

{g,g}E(G). \{g,g'\}\in E(G).

Thus movement in the product changes one coordinate at a time. This is the standard definition of the Cartesian product of graphs.

For example, the grid graph can be written as

PmPn. P_m \square P_n.

It has mnm n vertices arranged like an mm-by-nn rectangular grid.

12.14 Other Graph Products

Several other graph products are used in graph theory.

The tensor product, also called the direct product, has vertex set

V(G)×V(H), V(G)\times V(H),

where two vertices are adjacent when both coordinates move along edges.

The strong product combines the Cartesian and tensor product rules. Two product vertices are adjacent if one coordinate moves, the other coordinate moves, or both move simultaneously. The strong product of path graphs models king moves on a grid.

The lexicographic product replaces each vertex of one graph by a copy of another graph.

Graph products are used in algebraic graph theory, network construction, coding theory, distributed computing, and metric graph theory.

12.15 Line Graph

The line graph of a graph GG, written

L(G), L(G),

is the graph whose vertices are the edges of GG.

Two vertices of L(G)L(G) are adjacent when the corresponding edges of GG share an endpoint.

For example, if GG is the path

abc, a-b-c,

then GG has two edges:

{a,b} \{a,b\}

and

{b,c}. \{b,c\}.

These two edges share the endpoint bb, so L(G)L(G) is a graph with two adjacent vertices.

Line graphs convert edge questions into vertex questions. Matchings in GG, for example, correspond to independent sets in L(G)L(G).

12.16 Graph Powers

The kk-th power of a graph GG, written

Gk, G^k,

has the same vertex set as GG. Two distinct vertices are adjacent in GkG^k when their distance in GG is at most kk.

Thus

{u,v}E(Gk) \{u,v\}\in E(G^k)

if and only if

1dG(u,v)k. 1\leq d_G(u,v)\leq k.

The first power is the graph itself:

G1=G. G^1=G.

The square G2G^2 adds edges between vertices at distance 22. Graph powers are useful in network reachability, coloring, bandwidth problems, and distance-based graph theory.

12.17 Operation Effects

Graph operations change graph parameters in predictable ways.

OperationVerticesEdgesTypical effect
Vertex deletionDecreasesDecreasesMay disconnect graph
Edge deletionSameDecreasesMay create more components
Edge additionSameIncreasesMay create cycles or merge components
ContractionDecreasesUsually decreasesShortens paths, may create parallel edges
ComplementSameReplaces edges by non-edgesExchanges cliques and independent sets
JoinAdds verticesAdds all cross edgesStrongly increases connectivity
Cartesian productMultiplies vertex countsCombines coordinate movesBuilds grid-like graphs

These effects help in proofs. For example, deleting edges can produce a spanning tree. Adding edges to a tree creates cycles. Taking complements converts clique questions into independent set questions.

12.18 Example

Let

G G

have vertex set

{a,b,c} \{a,b,c\}

and edge set

{{a,b},{b,c}}. \{\{a,b\},\{b,c\}\}.

Thus G=P3G=P_3.

The complement G\overline{G} has the same vertex set and edge set

{{a,c}}. \{\{a,c\}\}.

Deleting the edge {a,b}\{a,b\} gives

G{a,b}, G-\{a,b\},

with edge set

{{b,c}}. \{\{b,c\}\}.

Contracting the edge {a,b}\{a,b\} merges aa and bb. The resulting graph has two vertices and one edge between the merged vertex and cc.

Subdividing the edge {b,c}\{b,c\} adds a new vertex xx and replaces

bc b-c

by

bxc. b-x-c.

These operations all begin with the same graph but produce different structural changes.

12.19 Summary

Graph operations construct new graphs from existing graphs. Unary operations modify one graph through deletion, addition, contraction, subdivision, complementation, line graph construction, or graph powers. Binary operations combine graphs through union, intersection, disjoint union, join, and graph products.

These operations are not merely notation. They are tools for building examples, proving theorems, designing algorithms, and comparing graph structures. Many later topics, including trees, minors, planar graphs, colorings, products, and spectral graph theory, depend on understanding how graph operations change vertices, edges, paths, cycles, and connectivity.