In
graph theory
In mathematics and computer science, graph theory is the study of ''graph (discrete mathematics), graphs'', which are mathematical structures used to model pairwise relations between objects. A graph in this context is made up of ''Vertex (graph ...
, an edge contraction is an
operation that removes an edge from a
graph
Graph may refer to:
Mathematics
*Graph (discrete mathematics), a structure made of vertices and edges
**Graph theory, the study of such graphs and their properties
*Graph (topology), a topological space resembling a graph in the sense of discret ...
while simultaneously merging the two
vertices that it previously joined. Edge contraction is a fundamental operation in the theory of
graph minor
In graph theory, an undirected graph is called a minor of the graph if can be formed from by deleting edges, vertices and by contracting edges.
The theory of graph minors began with Wagner's theorem that a graph is planar if and only if ...
s. Vertex identification is a less restrictive form of this operation.
Definition
The edge contraction operation occurs relative to a particular edge,
. The edge
is removed and its two incident vertices,
and
, are merged into a new vertex
, where the edges incident to
each correspond to an edge incident to either
or
. More generally, the operation may be performed on a set of edges by contracting each edge (in any order).
The resulting graph is sometimes written as
. (Contrast this with
, which means simply removing the edge
without merging its incident vertices.)
As defined below, an edge contraction operation may result in a graph with
multiple edges even if the original graph was a
simple graph
In discrete mathematics, particularly in graph theory, a graph is a structure consisting of a Set (mathematics), set of objects where some pairs of the objects are in some sense "related". The objects are represented by abstractions called ''Ver ...
. However, some authors disallow the creation of multiple edges, so that edge contractions performed on simple graphs always produce simple graphs.
Formal definition
Let
be a graph (''or
directed graph'') containing an edge
with
. Let
be a function that maps every vertex in
to itself, and otherwise, maps it to a new vertex
. The contraction of
results in a new graph
, where
,
, and for every
,
is incident to an edge
if and only if, the corresponding edge,
is incident to
in
.
Vertex identification
Vertex identification (sometimes called vertex contraction) removes the restriction that the ''contraction'' must occur over vertices sharing an incident edge. (Thus, edge contraction is a special case of vertex identification.) The operation may occur on any pair (or subset) of vertices in the graph. Edges between two ''contracting'' vertices are sometimes removed. If
and
are vertices of distinct components of
, then we can create a new graph
by identifying
and
in
as a new vertex
in
. More generally, given a
partition of the vertex set, one can identify vertices in the partition; the resulting graph is known as a
quotient graph.
Vertex cleaving
Vertex cleaving, which is the same as vertex splitting, means one vertex is being split into two, where these two new vertices are adjacent to the vertices that the original vertex was adjacent to. This is a reverse operation of vertex identification, although in general for vertex identification, adjacent vertices of the two identified vertices are not the same set.
Path contraction
Path contraction occurs upon the set of edges in a
path
A path is a route for physical travel – see Trail.
Path or PATH may also refer to:
Physical paths of different types
* Bicycle path
* Bridle path, used by people on horseback
* Course (navigation), the intended path of a vehicle
* Desir ...
that ''contract'' to form a single edge between the endpoints of the path. Edges incident to vertices along the path are either eliminated, or arbitrarily (or systematically) connected to one of the endpoints.
Twisting
Consider two disjoint graphs
and
, where
contains vertices
and
and
contains vertices
and
. Suppose we can obtain the graph
by identifying the vertices
of
and
of
as the vertex
of
and identifying the vertices
of
and
of
as the vertex
of
. In a ''twisting''
of
with respect to the vertex set
, we identify, instead,
with
and
with
.
Repeated contractions
Given a finite set of edges, the order in which contractions are performed on a graph does not change the result (up to isomorphism). The result reduces to showing that
is isomorphic to
for two edges
of
.
Applications
Both edge and vertex contraction techniques are valuable in
proof by induction on the number of vertices or edges in a graph, where it can be assumed that a property holds for all smaller graphs and this can be used to prove the property for the larger graph.
Edge contraction is used in the recursive formula for the number of
spanning tree
In the mathematical field of graph theory, a spanning tree ''T'' of an undirected graph ''G'' is a subgraph that is a tree which includes all of the vertices of ''G''. In general, a graph may have several spanning trees, but a graph that is no ...
s of an arbitrary
connected graph, and in the recurrence formula for the
chromatic polynomial of a simple graph.
Contractions are also useful in structures where we wish to simplify a graph by identifying vertices that represent essentially equivalent entities. One of the most common examples is the reduction of a general
directed graph to an
acyclic directed graph by contracting all of the vertices in each
strongly connected component
In the mathematics, mathematical theory of directed graphs, a graph is said to be strongly connected if every vertex is reachability, reachable from every other vertex. The strongly connected components of a directed graph form a partition of a s ...
. If the relation described by the graph is
transitive, no information is lost as long as we label each vertex with the set of labels of the vertices that were contracted to form it.
Another example is the coalescing performed in
global graph coloring register allocation, where vertices are contracted (where it is safe) in order to eliminate move operations between distinct variables.
Edge contraction is used in 3D modelling packages (either manually, or through some feature of the modelling software) to consistently reduce vertex count, aiding in the creation of low-polygon models.
See also
*
Subdivision (graph theory)
In graph theory, two graphs G and G' are homeomorphic if there is a graph isomorphism from some subdivision of G to some subdivision of G'. If the edges of a graph are thought of as lines drawn from one vertex to another (as they are usually ...
Notes
References
*
*
*
*
External links
*{{MathWorld, id=EdgeContraction, title=Edge Contraction
Graph operations