GTM1 Notes
GTM1 Notes
Module-1
Introduction to Graphs: Introduction- Basic definition – Application of graphs – finite, infinite
and bipartite graphs – Incidence and Degree – Isolated vertex, pendant vertex and Null graph.
Paths and circuits – Isomorphism, sub-graphs, walks, paths and circuits, connected graphs,
disconnected graphs and components. (8 hours)
A graph G=( V , E ) consists of a set of objects V ={v 1 , v 2 , .. .. . .. ..} called vertices and another
e k is identified
set E={e1 , e 2 , .. .. . .. ..} whose elements are called edges, such that each edge
(v , v ) (v , v ) e
with an unordered pair i j of vertices. The vertices i j associated with edge k are
e
called the end vertices of k . The most common representation of a graph is by means of a
diagram, in which the vertices are represented as points and each edge as a line segment
joining its end vertices. Often this diagram itself is referred to as the graph.
Fig. 1-1
An edge having the same vertex as both its end vertices is called a self-loop (or simply a
loop). Edge e1 in Fig. 1-1 is a self-loop. Also note that the definition allows more than one
edge associated with a given pair of vertices, for example, edges e4 and e5 in Fig. 1-1. Such
edges are referred to as parallel edges.
A graph that has neither self-loops nor parallel edges is called a simple graph.
In drawing a graph, it is immaterial whether the lines are drawn straight or curved, long or
short: what is important is the incidence between the edges and vertices. For example, the
two graphs drawn in Figs. 1-2(a) and (b) are the same, because incidence between edges and
vertices is the same in both cases.
Fig.1-2
APPLICATIONS OF GRAPHS
Because of its inherent simplicity, graph theory has a very wide range of applications in
engineering, in physical, social, and biological sciences, in linguistics, and in numerous other
areas. A graph can be used to represent almost any physical situation involving discrete
objects and a relationship among them.
The following are four examples from among hundreds of such applications
Konigsberg Bridge Problem:
The Konigsberg bridge problem is perhaps the best-known example in graph theory. It was a
long-standing problem until solved by Leonhard Euler (1707-1783) in 1736, by means of a
graph. Euler wrote the first paper ever in graph theory and thus became the originator of the
theory of graphs as well as of the rest of topology. The problem is depicted in Fig. 1-3.
Two islands, C and D, formed by the Pregel River in Königsberg (then the capital of East
Prussia but now renamed Kaliningrad and in West Soviet Russia) were connected to each
other and to the banks A and B with seven bridges, as shown in Fig. 1-3. The problem was to
start at any of the four land areas of the city, A, B, C, or D, walk over each of the seven
bridges exactly once, and return to the starting point (without swimming across the river, of
course).
Euler represented this situation by means of a graph, as shown in Fig. 1-4. The vertices
represent the land areas and the edges represent the bridges. Euler proved that a solution for
this problem does not exist.
Fig.1-3
Fig.1-4
The Königsberg bridge problem is the same as the problem of drawing figures without lifting
the pen from the paper and without retracing a line.
Utilities Problem:
There are three houses (Fig. 1-5) H1, H2, and H3, each to be connected to each of the three
utilities—water (W), gas (G), and electricity (E)—by means of conduits. Is it possible to
make such connections without any crossovers of the conduits?
Fig.1-5
Fig. 1-6
Fig.1-6 shows how this problem can be represented by a graph—the conduits are shown as
edges while the houses and utility supply centers are vertices. The graph in Fig. 1-6 cannot be
drawn in the plane without edges crossing over. Thus the answer to the problem is no.
1. The nature and value of the elements forming the network, such as resistors, inductors,
transistors, and so forth.
2. The way these elements are connected together, that is, the topology of the network.
Since there are only a few different types of electrical elements, the variations in networks are
chiefly due to the variations in topology. Thus electrical network analysis and synthesis are
mainly the study of network topology. In the topological study of electrical networks, factor 2
is separated from 1 and is studied independently.
The topology of a network is studied by means of its graph. In drawing a graph of an
electrical network the junctions are represented by vertices, and branches (which consist of
electrical elements) are represented by edges, regardless of the nature and size of the
electrical elements. An electrical network and its graph are shown in Fig. 1-7
.
Fig.1-7
Seating Problem:
Nine members of a new club meet each day for lunch at a round table. They decide to sit such
that every member has different neighbours at each lunch. How many days can this
arrangement last?
This situation can be represented by a graph with nine vertices such that each vertex
represents a member, and an edge joining two vertices represents the relationship of sitting
next to each other. Figure 1-8 shows two possible seating arrangements—these are 1 2 3 4 5 6
7 8 91 (solid lines), and 1 3 5 2 7 4 9 6 8 1 (dashed lines). It can be shown by graph-theoretic
considerations that there are only two more arrangements possible. They are 1573928461 and
17958362
4 1. In general it can be shown that for n people the number of such possible arrangements is
and
Fig.1-8
A graph with a finite number of vertices as well as a finite number of edges is called a finite
graph; otherwise, it is an infinite graph.
When a vertex vi is an end vertex of some edge ej, vi and ej are said to be incident with (on or
to) each other. In Fig. 1-9, for example, edges e2, e6, and e7 are incident with vertex v4. Two
nonparallel edges are said to be adjacent if they are incident on a common vertex. For
example, e2 and e7 in Fig. 1-9 are adjacent.
Similarly, two vertices are said to be adjacent if they are the end vertices of the same edge. In
Fig. 1-9, v4 and v5 are adjacent, but v1 and v4 are not. The number of edges incident on a
vertex vi, with self-loops counted twice, is called the degree, d (vi) of vertex vi. In Fig. 1-9,
for example,d(v1) = d(v3) = d(v4) = 3, d(v2) = 4, and d(v5) = 1. The degree of a vertex is
sometimes also referred to as its valency.
Property: The sum of the degrees of all the vertices in a graph is equal to twice the number of
edges in the graph.(Handshaking property)
∑ d ( v )=2|E|
For a graph G = (V,E) v ∈V
THEOREM 1
n k n
∑ d (v i )= ∑ d (v i )+ ∑ d ( vi)
i=1 i=1 i=k +1 (1)
Since the left-hand side in Eq. (1) is even, and the second expression on the
right-hand side is even (being a sum of even numbers), the first expression
must also be even
that is
d( v )+d(v )+d(v )+........+d( v )=even
1 2 3 k
But each d(vk) is odd, the total number of terms in the sum must be even to make the sum an
even number. Hence the theorem.
A graph in which all vertices are of equal degree is called a regular graph.
A vertex having no incident edge is called an isolated vertex. In other words, isolated vertices
are vertices with zero degree. Vertices v4 and v7 in Fig. 1-10, for example, are isolated
vertices. A vertex of degree one is called a pendant vertex or an end vertex. Vertex v3 in Fig.
1-10 is a pendant vertex. Two adjacent edges are said to be in series if their common vertex is
of degree two. In Fig. 1-10, the two edges incident on v1 are in series.
Fig. 1-10 Graph containing isolated vertices, series edges, and a pendant vertex.
In the definition of a graph G = (V, E), it is possible for the edge set E to be empty. Such a
graph, without any edges, is called a null graph. In other words, every vertex in a null graph
is an isolated vertex. A null graph of six vertices is shown in Fig. 1-11. Although the edge set
E may be empty, the vertex set V must not be empty; otherwise, there is no graph. In other
words, by definition, a graph must have at least one vertex.
Problems:
1. Determine the order |V| of the graph G = (V,E) in the following cases:
a) G is a cubic graph with 9 edges.
b) G is regular with 15 edges.
c) G has 10 edges with 2 vertices of degree 4 and all other vertices of degree 3.
2. Show that there is no graph with 28 edges and 12 vertices in the following cases:
a) The degree of a vertex is either 3 or 4.
b) The degree of a vertex is either 3 or 6.
3. a) If a graph with n vertices and m edges is k-regular, show thatm=kn/ 2 .
b) Does there exist a cubic graph with 11 vertices?
c) Does there exist a 4-regular graph with (i) 15 edges? (ii) 10 edges?
4. For a graph with n vertices and m edges, if δ is the minimum and Δ is the
2m
δ≤ <Δ
maximum of the degrees of vertices, show that n .
2
5. If G = (V, E) is a simple graph, prove that2|E|≤|V| −|V|.
Bipartite Graph:
Suppose a simple graph G is such that its vertex set is the union of two of its mutually
disjoint non empty subsets V1 and V2 which are such that each edge in G joins a vertex in V1
and a vertex in V2.Then G is called a bipartite graph.
A bipartite graph G = (V1, V2; E) is called a complete bipartite graph if there is an edge
between every vertex in V1 and every vertex in V2.
ISOMORPHISM
Two graphs G and G′ are said to be isomorphic (to each other) if there is a one-to-one
correspondence between their vertices and between their edges such that the incidence
relationship is preserved. In other words, suppose that edge e is incident on vertices v1 and v2
in G; then the corresponding edge e′ in G′ must be incident on the vertices v′1 and v′2 that
correspond to v1 and v2, respectively.
For example, one can verify that the two graphs in Fig. are isomorphic. The correspondence
between the two graphs is as follows: The vertices a, b, c, d, and e correspond to v1, v2, v3, v4,
and v5, respectively. The edges 1, 2, 3, 4, 5, and 6 correspond to e1, e2, e3, e4, e5, and e6,
respectively.
Isomorphic graphs
Problems:
2.
3.
SUBGRAPHS
A graph g is said to be a subgraph of a graph G if all the vertices and all the edges of g are in
G, and each edge of g has the same end vertices in g as in G.
For instance, the graph in Fig (b) is a subgraph of the one in Fig. (a).
The following observations can be made immediately:
1. Every graph is its own subgraph.
2. A subgraph of a subgraph of G is a subgraph of G.
3. A single vertex in a graph G is a subgraph of G.
4. A single edge in G, together with its end vertices, is also a subgraph.
Edge-Disjoint Subgraphs: Two (or more) subgraphs g1 and g2 of a graph G are said to be
edge disjoint if g1 and g2 do not have any edges in common. For example, the two graphs in
Figs. (a) and (b) are edge-disjoint subgraphs of the graph in Fig. *. Note that although edge-
disjoint graphs do not have any edge in common, they may have vertices in common.
Subgraphs that do not even have vertices in common are said to be vertex disjoint.
Fig. *
(a) (b)
A walk is defined as a finite alternating sequence of vertices and edges, beginning and ending
with vertices, such that each edge is incident with the vertices preceding and following it. No
edge appears (is covered or traversed) more than once in a walk. A vertex, however, may
appear more than once. In Fig. (a), for instance, v1 a v2 b v3 c v3 d v4 e v2 f v5 is a walk shown
with heavy lines. A walk is also referred to as an edge train or a chain. The set of vertices and
edges constituting a given walk in a graph G is clearly a subgraph of G.
An open walk in which no vertex appears more than once is called a path (or a simple path or
an elementary path). In Fig., vl a v2 b v3 d v4 is a path, whereas v1 a v2 b v3 c v3 d v4 e v2 f v5 is
not a path. In other words, a path does not intersect itself. The number of edges in a path is
called the length of a path.
It immediately follows, then, that an edge which is not a self-loop is a path of length one. It
should also be noted that a self-loop can be included in a walk but not in a path.
The terminal vertices of a path are of degree one, and the rest of the vertices (called
intermediate vertices) are of degree two. This degree, of course, is counted only with respect
to the edges included in the path and not the entire graph in which the path may be contained.
A closed walk in which no vertex (except the initial and the final vertex) appears more than
once is called a circuit. That is, a circuit is a closed, nonintersecting walk. In Fig. (a), v2 b v3
d v4 e v2 is, for example, a circuit.
Three different circuits are shown in Fig. below. Clearly, every vertex in a circuit is of degree
two; again, if the circuit is a subgraph of another graph, one must count degrees contributed
by the edges in the circuit only.
A circuit is also called a cycle, elementary cycle, circular path, and polygon.
In electrical engineering a circuit is sometimes referred to as a loop—not to be confused with
self-loop. (Every self-loop is a circuit, but not every circuit is a self-loop.)
.
A graph is connected if we can reach any vertex from any other vertex by traveling along the
edges.
More formally:
A graph G is said to be connected if there is at least one path between every pair of vertices in
G. Otherwise, G is disconnected. A null graph of more than one vertex is disconnected
It is easy to see that a disconnected graph consists of two or more connected graphs. Each of
these connected subgraphs is called a component.
THEOREM 2
A graph G is disconnected if and only if its vertex set V can be partitioned into two
nonempty, disjoint subsets V1 and V2 such that there exists no edge in G whose one end vertex
is in subset V1 and the other in subset V2.
Proof: Suppose that such a partitioning exists. Consider two arbitrary vertices a and b of G,
such that a ∈ V1 and b ∈ V2. No path can exist between vertices a and b; otherwise, there
would be at least one edge whose one end vertex would be in V1 and the other in V2. Hence, if
a partition exists, G is not connected.
Conversely, let G be a disconnected graph. Consider a vertex a in G. Let V1 be the set of all
vertices that are joined by paths to a. Since G is disconnected, V1 does not include all vertices
of G. The remaining vertices will form a (nonempty) set V2. No vertex in V1 is joined to any
in V2 by an edge. Hence the partition.
THEOREM 3
If a graph (connected or disconnected) has exactly two vertices of odd degree, there must be a
path joining these two vertices.
Proof: Let G be a graph with all even vertices† except vertices v1 and v2, which are odd. From
Theorem 1, which holds for every graph and therefore for every component of a disconnected
graph, no graph can have an odd number of odd vertices. Therefore, in graph G, v1 and v2
must belong to the same component, and hence must have a path between them.
THEOREM 4
A simple graph (i.e., a graph without parallel edges or self-loops) with n vertices and k
components can have at most (n − k)(n − k + l)/2 edges.