DMS-12 Graphs
DMS-12 Graphs
DMS-12 Graphs
Structures
Lecture 12
Isomorphism of Graphs
• Two graphs are said to be isomorphic if there exists a one-to-one
correspondence between their vertices such that the adjacency
structure is preserved.
• In simpler terms, two graphs are isomorphic if you can match up their
vertices in such a way that the edges between the vertices are the
same in both graphs.
Isomorphism of Graphs
• We often need to know whether it is possible to draw two graphs in
the same way.
• That is, do the graphs have the same structure when we ignore the
identities of their vertices? For instance, in chemistry, graphs are used
to model chemical compounds (in a way we will describe later).
• Different compounds can have the same molecular formula but can
differ in structure.
• Such compounds can be represented by graphs that cannot be drawn
in the same way.
Definition
In other words, when two simple graphs are isomorphic, there is a one-
to-one correspondence between vertices of the two graphs that
preserves the adjacency relationship.
Example
• Show that the graphs G = (V ,E) and H = (W, F),
displayed are isomorphic.
Solution
Example
• Show that the graphs displayed in Figure 9 are not isomorphic.
Example
Solution
• We note that A and R are isomorphic graphs. Also, F and T are
isomorphic graphs, K and X are isomorphic graphs and M, S, V , and Z
are isomorphic graphs.
Applications
• Graph isomorphisms, and functions that are almost graph
isomorphisms, arise in applications of graph theory to chemistry and
to the design of electronic circuits, and other areas including
bioinformatics and computer vision.
Application
• Electronic circuits are modeled using graphs in which vertices represent
components and edges represent connections between them.
• Modern integrated circuits, known as chips, are miniaturized electronic
circuits, often with millions of transistors and connections between them.
Because of the complexity of modern chips, automation tools are used to
design them.
• Graph isomorphism is the basis for the verification that a particular layout of
a circuit produced by an automated tool corresponds to the original
schematic of the design. Graph isomorphism can also be used to determine
whether a chip from one vendor includes intellectual property from a
different vendor. This can be done by looking for large isomorphic subgraphs
in the graphs modeling these chips.
Connectivity
• Many problems can be modeled with paths formed by traveling along
the edges of graphs.
• For instance, the problem of determining whether a message can be
sent between two computers using intermediate links can be studied
with a graph model.
• Problems of efficiently planning routes for mail delivery, garbage
pickup, diagnostics in computer networks, and so on can be solved
using models that involve paths in graphs.
Multigraph
• Graphs that may have multiple edges connecting the same vertices
are called multigraphs.
• When there are m different edges associated to the same unordered
pair of vertices {u, v}, we also say that {u, v} is an edge of multiplicity
m.
• That is, we can think of this set of edges as m different copies of an
edge {u, v}.
Paths
• Informally, a path is a sequence of edges that begins at a vertex of a
graph and travels from vertex to vertex along edges of the graph.
• As the path travels along its edges, it visits the vertices along this
path, that is, the endpoints of these edges.
• Trail is used to denote a walk that has no repeated edge.
• A simple path is a more restrictive concept. It is a path in which no
vertex (and, by extension, no edge) is repeated.
• The path is a circuit if it begins and ends at the same vertex, circuit is
simple if it does not contain the same edge more than once.
Path
Path
• The sequence α is a path from P4 to P6; but it is not a trail since the
edge {P1, P2} is used twice. The sequence β is not a path since there is
no edge {P2, P6}.
• The sequence γ is a trail since no edge is used twice; but it is not a
simple path since the vertex P5 is used twice.
• The sequence δ is a simple path from P4 to P6; but it is not the
shortest path (with respect to length) from P4 to P6. The shortest
path from P4 to P6 is the simple path (P4, P5, P6) which has length 2.
Connectedness in Undirected Graphs
• An undirected graph is called connected if there is a path between
every pair of distinct vertices of the graph. An undirected graph that is
not connected is called disconnected.
• We say that we disconnect a graph when we remove vertices or
edges, or both, to produce a disconnected subgraph.
CONNECTED COMPONENTS
• A connected component of a graph G is a connected subgraph of G
that is not a proper subgraph of another connected subgraph of G.
• A connected component of a graph G is a maximal connected
subgraph of G. A graph G that is not connected has two or more
connected components that are disjoint and have G as their union.
How Connected is a Graph?
• Suppose that a graph represents a computer network. Knowing that
this graph is connected tells us that any two computers on the
network can communicate.
• However, we would also like to understand how reliable this network
is.
• For instance, will it still be possible for all computers to communicate
after a router or a communications link fails?
Distance and Diameter
• Consider a connected graph G. The distance between vertices u and v
in G, written d(u, v), is the length of the shortest path between u and
v.
• The diameter of a graph is a measure of the longest shortest path
between any two vertices in the graph
Cutpoints and Bridges
• Let G be a connected graph.
• A vertex v in G is called a cutpoint if G−v is disconnected.
• Recall that G−v is the graph obtained from G by deleting v and all edges
containing v.)
• An edge e of G is called a bridge if G−e is disconnected.
• Recall that G − e is the graph obtained from G by simply deleting the
edge e).
• In (a), the vertex D is a cutpoint and there are no bridges.
• In (b), the edge = {D,F} is a bridge. (Its endpoints D and F are necessarily
cutpoints.)
Cutpoints and Bridges
Connectedness in Directed Graphs
• A directed graph is strongly connected if there is a path from a to b
and from b to a whenever a and b are vertices in the graph.
BRIDGES OF KÖNIGSBERG
• The eighteenth-century East Prussian town of Königsberg included
two islands and seven bridges as shown in Fig. 8-10(a). Question:
Beginning anywhere and ending anywhere, can a person walk through
town crossing all seven bridges but not crossing any bridge twice?
Euler path