Simultaneous embedding is a technique in
graph drawing and
information visualization
Data and information visualization (data viz/vis or info viz/vis) is the practice of designing and creating Graphics, graphic or visual Representation (arts), representations of a large amount of complex quantitative and qualitative data and i ...
for visualizing two or more different
graphs on the same or overlapping sets of labeled
vertices, while avoiding
crossings within both graphs. Crossings between an
edge of one graph and an edge of the other graph are allowed.
If edges are allowed to be drawn as
polyline
In geometry, a polygonal chain is a connected series of line segments. More formally, a polygonal chain is a curve specified by a sequence of points (A_1, A_2, \dots, A_n) called its vertices. The curve itself consists of the line segments co ...
s or
curve
In mathematics, a curve (also called a curved line in older texts) is an object similar to a line, but that does not have to be straight.
Intuitively, a curve may be thought of as the trace left by a moving point. This is the definition that ...
s, then any
planar graph
In graph theory, a planar graph is a graph (discrete mathematics), graph that can be graph embedding, embedded in the plane (geometry), plane, i.e., it can be drawn on the plane in such a way that its edges intersect only at their endpoints. ...
may be drawn without crossing with its vertices in arbitrary positions in the plane, where the same vertex placement provides a simultaneous embedding.
There are two restricted models: simultaneous geometric embedding, where each graph must be drawn planarly with line segments representing its edges rather than more complex curves, restricting the two given graphs to subclasses of the planar graphs, and simultaneous embedding with fixed edges, where curves or bends are allowed in the edges, but any edge in both graphs must be represented by the same curve in both drawings.
In the unrestricted model, any two planar graphs can have a simultaneous embedding.
Definition
Simultaneous
embedding
In mathematics, an embedding (or imbedding) is one instance of some mathematical structure contained within another instance, such as a group (mathematics), group that is a subgroup.
When some object X is said to be embedded in another object Y ...
is a technique in
graph drawing and
information visualization
Data and information visualization (data viz/vis or info viz/vis) is the practice of designing and creating Graphics, graphic or visual Representation (arts), representations of a large amount of complex quantitative and qualitative data and i ...
for visualizing two or more different
graphs on the same or overlapping sets of labeled
vertices, while avoiding
crossings within both graphs. Crossings between an
edge of one graph and an edge of the other graph are allowed; it is only crossings between two edges of the same graph that are disallowed.
If edges are allowed to be drawn as
polyline
In geometry, a polygonal chain is a connected series of line segments. More formally, a polygonal chain is a curve specified by a sequence of points (A_1, A_2, \dots, A_n) called its vertices. The curve itself consists of the line segments co ...
s or
curve
In mathematics, a curve (also called a curved line in older texts) is an object similar to a line, but that does not have to be straight.
Intuitively, a curve may be thought of as the trace left by a moving point. This is the definition that ...
s, then any
planar graph
In graph theory, a planar graph is a graph (discrete mathematics), graph that can be graph embedding, embedded in the plane (geometry), plane, i.e., it can be drawn on the plane in such a way that its edges intersect only at their endpoints. ...
may be drawn without crossings with its vertices in arbitrary positions in the plane. Using the same vertex placement for two graphs provides a simultaneous embedding of the two graphs. Research has concentrated on finding drawings with few bends, or with few crossings between edges from the two graphs.
There are two restricted models: simultaneous geometric embedding and simultaneous embedding with fixed edges, where curves or bends are allowed in the edges, but any edge present in both graphs must be represented by the same curve in both drawings. When a simultaneous geometric embedding exists, it automatically is also a simultaneous embedding with fixed edges.
For simultaneous embedding problems on more than two graphs, it is standard to assume that all pairs of input graphs have the same intersection as each other; that is, the edge and vertex sets of the graphs form a
sunflower
The common sunflower (''Helianthus annuus'') is a species of large annual forb of the daisy family Asteraceae. The common sunflower is harvested for its edible oily seeds, which are often eaten as a snack food. They are also used in the pr ...
. This constraint is known as ''sunflower intersection''.
Simultaneous embedding is closely related to
thickness, the minimum number of planar subgraphs that can cover all of the edges of a given graph, and geometric thickness, the minimum number of edge colors needed in a straight-line drawing of a given graph with no crossing between same-colored edges. In particular, the thickness of a given graph is two, if the graph's edges can be partitioned into two subgraphs that have a simultaneous embedding, and the geometric thickness is two, if the edges can be partitioned into two subgraphs with simultaneous geometric embedding.
[
]
Geometric
In simultaneous geometric embedding each graph must be drawn as a planar graph
In graph theory, a planar graph is a graph (discrete mathematics), graph that can be graph embedding, embedded in the plane (geometry), plane, i.e., it can be drawn on the plane in such a way that its edges intersect only at their endpoints. ...
with line segments representing its edges rather than more complex curves, restricting the two given graphs to subclasses of the planar graphs.
Many results on simultaneous geometric embedding are based on the idea that the Cartesian coordinates
In geometry, a Cartesian coordinate system (, ) in a plane is a coordinate system that specifies each point uniquely by a pair of real numbers called ''coordinates'', which are the signed distances to the point from two fixed perpendicular o ...
of the two given graphs' vertices can be derived from properties of the two graphs. One of the most basic results of this type is the fact that any two path graphs on the same vertex set always have a simultaneous embedding. To find such an embedding, one can use the position of a vertex in the first path as its ''x''-coordinate, and the position of the same vertex in the second path as its ''y''-coordinate. In this way, the first path will be drawn as an ''x''-monotone polyline
In geometry, a polygonal chain is a connected series of line segments. More formally, a polygonal chain is a curve specified by a sequence of points (A_1, A_2, \dots, A_n) called its vertices. The curve itself consists of the line segments co ...
, a type of curve that is automatically non-self-crossing, and the second path will similarly be drawn as a ''y''-monotone polyline.
This type of drawing places the vertices in an integer lattice
In mathematics, the -dimensional integer lattice (or cubic lattice), denoted , is the lattice (group), lattice in the Euclidean space whose lattice points are tuple, -tuples of integers. The two-dimensional integer lattice is also called the s ...
of dimensions linear in the graph sizes. Similarly defined layouts also work, with larger but still linear grid sizes, when both graphs are caterpillars or when both are cycle graphs. A simultaneous embedding in a grid of linear dimensions is also possible for any number of graphs that are all stars
A star is a luminous spheroid of plasma held together by self-gravity. The nearest star to Earth is the Sun. Many other stars are visible to the naked eye at night; their immense distances from Earth make them appear as fixed points of ...
. Other pairs of graph types that always admit a simultaneous embedding, but that might need larger grid sizes, include a wheel graph and a cycle graph, a tree and a matching, or a pair of graphs both of which have maximum degree two. However, pairs of planar graphs and a matching, or of a Angelini, Geyer, Neuwirth and Kaufmann showed that a tree and a path exist, that have no simultaneous geometric embedding.
Testing whether two graphs admit a simultaneous geometric embedding is NP-hard
In computational complexity theory, a computational problem ''H'' is called NP-hard if, for every problem ''L'' which can be solved in non-deterministic polynomial-time, there is a polynomial-time reduction from ''L'' to ''H''. That is, assumi ...
.[.] More precisely, it is complete for the existential theory of the reals. The proof of this result also implies that for some pairs of graphs that have simultaneous geometric embeddings, the smallest grid on which they can be drawn has doubly exponential size.
[.]
When a simultaneous geometric embedding exists, it automatically is also a simultaneous embedding with fixed edges.
Fixed edges
In simultaneous embedding with fixed edges, curves or bends are allowed in the edges, but any edge present in both graphs must be represented by the same curve in both drawings. The classification of different types of input as always having an embedding or as sometimes not being possible depends not only on the two types of graphs to be drawn, but also on the structure of their intersection. For instance, it is always possible to find such an embedding when both of the two given graphs are outerplanar graphs and their intersection is a linear forest, with at most one bend per edge and with vertex coordinates and bend points all belonging to a grid of polynomial area. However, there exist other pairs of outerplanar graphs with more complex intersections that have no such embedding. It is also possible to find a simultaneous embedding with fixed edges for any pair of a planar graph and a tree.[.]
It is an open question whether the existence of a simultaneous embedding with fixed edges for two given graphs can be tested in polynomial time. However, for three or more graphs, the problem is NP-complete
In computational complexity theory, NP-complete problems are the hardest of the problems to which ''solutions'' can be verified ''quickly''.
Somewhat more precisely, a problem is NP-complete when:
# It is a decision problem, meaning that for any ...
. When simultaneous embeddings with fixed edges do exist, they can be found in polynomial time for pairs of outerplanar graphs, and for Biconnected graphs, i.e. pairs of graphs whose intersection is biconnected.
Unrestricted
Any two planar graphs can have a simultaneous embedding. This may be done in a grid of polynomial area, with at most two bends per edge. Any two subhamiltonian graphs have a simultaneous embedding with at most one bend per edge.[.]
References
{{reflist, 30em
Graph drawing