Download as pptx, pdf, or txt
Download as pptx, pdf, or txt
You are on page 1of 45

Discrete Mathematical

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

• An Euler circuit in a graph G is a simple circuit containing every edge


of G. An Euler path in G is a simple path containing every edge of G.
• Eulerian circuit traverses every edge exactly once, but may repeat
vertices.
Example
• Which of the undirected graphs in Figure 3 have an Euler circuit? Of
those that do not, which have an Euler path?
Solution
Example
Solution
Example
Eulerian Circuit Eulerian Path

Every vertex has an even degree


Undirected Every vertex has an even degree Or exactly two vertices has odd degree

At most one vertex has


Indegree – Outdegree = 1 and
Every vertex has equal Indegree and
Directed outdegree
At most one vertex has
Outdegree – Indegree = 1 and All other
vertices have equal in and out degree
Practice Questions
Practice Questions
Hamilton Paths and Circuits
• We have developed necessary and sufficient conditions for the
existence of paths and circuits that contain every edge of a multigraph
exactly once. Can we do the same for simple paths and circuits that
contain every vertex of the graph exactly once?
• A simple path in a graph G that passes through every vertex exactly
once is called a Hamilton path, and a simple circuit in a graph G that
passes through every vertex exactly once is called a Hamilton circuit.
Examples
• Which of the simple graphs in Figure 10 have a Hamilton circuit or, if
not, a Hamilton path?
Solution
CONDITIONS FOR THE EXISTENCE OF HAMILTON
CIRCUITS
• It might seem that there should be an easy way to determine this,
because there is a simple way to answer the similar question of
whether a graph has an Euler circuit.
• Surprisingly, there are no known simple necessary and sufficient
criteria for the existence of Hamilton circuits.
• Many theorems are known that give sufficient conditions for the
existence of Hamilton circuits. Also, certain properties can be used to
show that a graph has no Hamilton circuit.
CONDITIONS FOR THE EXISTENCE OF HAMILTON
CIRCUITS
• A graph with a vertex of degree one cannot have a Hamilton circuit,
because in a Hamilton circuit, each vertex is incident with two edges
in the circuit.
• Moreover, if a vertex in the graph has degree two, then both edges
that are incident with this vertex must be part of any Hamilton circuit.
• When a Hamilton circuit is being constructed and this circuit has
passed through a vertex, then all remaining edges incident with this
vertex, other than the two used in the circuit, can be removed from
consideration
Example
Solution
Hamilton Paths and Circuits
Applications of Hamilton Circuits
• Hamilton paths and circuits can be used to solve practical problems.
• For example, many applications ask for a path or circuit that visits
each road intersection in a city, each place pipelines intersect in a
utility grid, or each node in a communications network exactly once.
• Finding a Hamilton path or circuit in the appropriate graph model can
solve such problems.
• The famous traveling salesperson problem or TSP (also known as the
traveling salesman problem) asks for the shortest route a traveling
salesperson should take to visit a set of cities.
Practice Questions
Planar Graphs
• A graph or multigraph which can be drawn in the plane so that its
edges do not cross is said to be planar.
• Although the complete graph with four vertices K4 is usually pictured
with crossing edges.
• A graph may be planar even if it is usually drawn with crossings,
because it may be possible to draw it in a different way without
crossings.
Example
Examples

You might also like