Download Graph Theory - A site for education and job purpose, just check it

Survey
yes no Was this document useful for you?
   Thank you for your participation!

* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project

Document related concepts

Fundamental theorem of algebra wikipedia , lookup

Dessin d'enfant wikipedia , lookup

Centrality wikipedia , lookup

Dual graph wikipedia , lookup

Signal-flow graph wikipedia , lookup

Transcript
United College of Engineering and Research, Greater Noida
IT- 6th Semester
20011-12
Graph Theory
(ECS-505)
Theory
UCER, Greater Noida
Theory
Ajay Kesharwani, Gr. Noida
United College of Engineering and Research, Greater Noida
Graph Theory
Basic Graph Terminology:

A graph consists of a nonempty set of points or vertices, and a set of edges that link
together the vertices.

A simple real world example of a graph would be your house and the corner store.
Where the house and the store are the vertices and the road between them is the edge
connecting the two vertices.

A graph can take on many forms: directed or undirected. A directed graph is one in
which the direction of any given edge is defined. Conversely, in an undirected graph
you can move in both directions between vertices.

The edges can also be weighted or unweighted. Using the previous example,
weights can be thought of as the number of blocks between your house and the
corner store.
The type of graph largely depends upon the features of its components, namely the attributes of
the vertices and edges. A vertex within a graph may or may not have a label assigned to
it. Similarly, an edge may have a label, weight, and/or direction associated with it. As an example,
a mixed graph is one that contains both directed and undirected edges.
Definition of a Graph:
Theory

A graph G = (V, E) consists of objects V = {v1, v2,……} called vertices, and
another set E = {e1, e2,…….}, whose elements are called edges, such that each edge
ek identifies an unordered pair (vi, vj) of vertices. The vertices vi, vj associated with
edge ek are called the end vertices of ek.

Self-loop: An edge having the same vertex as both its end vertices is called a self –
loop.

Parallel edges: If more than one edge is associated with a given pair of vertices then
such edges are referred as parallel edges.
Ajay Kesharwani, Gr. Noida
United College of Engineering and Research, Greater Noida

A graph that has neither self-loops nor parallel edges is called a simple graph.

Finite and Infinite graphs: A graph with a finite no. of vertices as well as a finite
no. of edges is called a finite graph, otherwise it is an infinite graph.
Incidence and Degree of a Graph:

An edge, ej in a graph that joins two vertices is said to be incident to both vertices.

The degree of a vertex is determined by the number of distinct edges that are
incident to it.

The indegree and outdegree of a vertex represent the number of edges that
terminate in and originate from a vertex, respectively.

Two edges in a graph are termed adjacent if they connect to the same
vertex. Similarly, two vertices are termed adjacent if they are connected by the same
edge.

A loop is an edge that links a vertex to itself.

A simple graph is one that contains no loops or parallel edges, where more than one
edge connects two given vertices.

A multigraph is a graph that contains multiple edges.

Finally, a complete graph is a simple graph in which every pair of vertices is
adjacent.
Isolated Vertex, Pendant Vertex & Null Graph:

A vertex having no incident edge or having zero degree is called an isolated vertex.

A vertex having degree one is called a pendant vertex.

In a graph G = (V, E) if the edge set E is empty then such a graph without any edges is
called a null graph. Every vertex in a null graph is an isolated vertex. e.g. Null graph of
four vertices, is written as N4.
The Null Graph N4
Handshaking Lemma:

Theory
The number of edges incident on a vertex vi, with self loops counted twice, is called
the degree, d(vi) of vertex vi.
Ajay Kesharwani, Gr. Noida
United College of Engineering and Research, Greater Noida

Consider a graph G with e edges and n vertices v1, v2, …vn Since each edge
contributes two degrees, the sum of the degrees of all vertices in G is twice the
number of edges in G.
n
d(vi) = 2e.
(1)
i=1

Theorem: The no. of vertices of odd degree in a graph is always even.
Proof: Left side of equation (1) can be expressed as
n
d(vi) = d(vj) + d(vk).
i=1
even
(2)
odd
Since the left side of the equation is even as from eq. (1) and also the first expression on
right side is even , the second expression must also be even to satisfy the equation.
d(vk) = even
(3)
odd
Hence from above equation each d(vk) is odd, therefore the total no. of terms in the sum
must be even to make the sum an even no.
Hence the theorem.
Isomorphism:

Let G1 and G2 be two graphs and let f be a function from the vertex set of G1 to the vertex
set of G2. Suppose that
i f is one-to-one and onto
ii f(v) is adjacent to f(w) in G2 if and only if v is adjacent to w in G1.
Then we say that the function f is an isomorphism and that the two graphs G1 and G2
are isomorphic.

Theory

Two graphs G1 and G2 are isomorphic if there is a one-to-one correspondence
between vertices of G1 and those of G2 with the property that if two vertices of
G1 are adjacent then so are their images in G2.

If two graphs are isomorphic then as far as we are concerned they are the same
graph though the location of the vertices may be different. To explore
isomorphism consider the two graphs given below.
Two isomorphic graphs must have
1. The same number of vertices.
2. The same number of edges.
3. An equal number of vertices with a given degree.
Ajay Kesharwani, Gr. Noida
United College of Engineering and Research, Greater Noida
However, these conditions are necessary but not sufficient.
Sub-graphs and Operations on Graphs:

A graph g is said to be a sub-graph 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. (g  G)

The following inferences can be drawn:
1. Every graph is its own sub-graph.
2. A sub-graph of a sub-graph of G is a sub-graph of G.
3. A single vertex in a graph G is a sub-graph of G.
4. A single edge in G, together with its end vertices, is also a sub-graph of G.

Edge-Disjoint Sub-graphs: Two (or more) sub-graphs g1 and g2 of a graph G are said to be
edge disjoint if g1 and g2 do not have any edges in common.

Vertex-Disjoint Sub-graphs: Sub-graphs that do not even have vertices in common are said
to be vertex disjoint. (Obviously they are also edge disjoint)

The union of two graphs G1 = (V1, E1) and G2 = (V2, E2) is another graph G3 = G1  G2
whose vertex set V3 = V1  V2 and the edge set E3 = E1  E2

The intersection G1  G2 of graphs G1 and G2 is a graph G4 consisting only of those vertices
and edges that are in both G1 and G2.

The ring sum G1  G2 of two graphs G1 and G2 is a graph consisting of the vertex set V1 
V2 and of edges that are either in G1 or G2, but not in both.

All the three operations mentioned above are commutative.

If G1 and G2 are edge disjoint, then G1  G2 is a null graph, and G1  G2 = G1  G2 . If G1
and G2 are vertex disjoint, then G1  G2 is empty.

For any graph G,

If g is a sub-graph of G, then G  g is that sub-graph of G, which remains after removing all
the edges of g from G. Thus G  g is written as G – g, whenever g  G. Hence G  g = G –
g is called the complement of g in G.

Decomposition: A graph G can be decomposed into two sub-graphs g1 and g2 if
g1  g2 = G and g1  g2 = null graph.

Deletion: Deletion of a vertex implies the deletion of all edges incident on that vertex. If vi
is a vertex in a graph G, the G – vi denotes a sub-graph of G by deleting vi from G.
Theory
G  G = G  G = G,
G  G = null graph.
Ajay Kesharwani, Gr. Noida
United College of Engineering and Research, Greater Noida

Deletion of an edge does not imply deletion of its end vertices. If ej is an edge in G, then G –
ej is a sub-graph of G obtained by deleting ej from G. Thus G – ej = G  ej.

Fusion: A pair of vertices a, b in a graph are said to be fused if the two vertices are replaced
by a single new vertex such that every edge that was incident on either a or b or on both is
incident on the new vertex. The fusion of two vertices reduces the number of vertices by
one; it does not alter the number of edges.
Walks, Trails, Paths and Cycles (Circuits):

A walk is a finite alternating sequence of vertices and edges, beginning and ending with
vertices, with each edge incident to the vertices preceding and following it. No edge appears
more than once in a walk however; a vertex may appear more than once.

If no edges of the walk are repeated then it is called a trail.

If a walk begins and ends at the same vertex then such a walk is called a closed walk.

And if the terminal vertices are distinct then it is an open walk.

An open walk in which no vertex appears once is called a path. A path through a graph is a
traversal of consecutive vertices along a sequence of edges. By this definition, the vertex at
the end of one edge in the sequence must also be the vertex at the beginning of the next edge
in the sequence.

The vertices that begin and end the path are termed the initial vertex and terminal vertex,
respectively. With the exception of these initial and terminal vertices, each vertex within the
path has two neighbouring vertices that must also be adjacent to the vertex.

The length of the path is the number of edges that are traversed along the path.

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 intermediate vertices are
of degree two.

To make this definition more understandable, consider a road map between Saskatoon and
Calgary. All of the towns and cities would be the vertices of a graph, including the starting
city of Saskatoon (initial vertex) and the destination city (terminal vertex), Calgary. The
highway route used to drive from Saskatoon to Calgary would be the path. The length of the
path in this example is 5.
Theory
Ajay Kesharwani, Gr. Noida
United College of Engineering and Research, Greater Noida

Repeated edges or vertices within the path are permissible. When there are no repeated
edges in the path of a directed graph, then the path is called a simple path. On the other
hand, an elementary path in a directed graph is one in which there are no repeated vertices
within the path. The path in our road map example is considered a simple path and also an
elementary path.

A closed walk in which no vertex except the initial and the final vertex appears more than
once is called a circuit or a cycle. A cycle or a circuit is a path in which the initial vertex of
the path is also the terminal vertex of the path.

So by removing all the cycles, the path can be considered an elementary path since there will
no longer be any repeated vertices. This means that if a path exists between any two
vertices, an elementary path must also exist between these two vertices.

When a simple directed graph does not contain any cycles is termed acyclic.

Every vertex in a circuit is of degree two.

An edge in an undirected graph is formed by connecting a pair of vertices but no direction is
stipulated for the edge. Therefore, for a path in an undirected graph, either vertex may be
considered as the initial or terminal vertex of the path and the traversal of the vertices along
the path can occur in either direction.

However, a cycle in a simple undirected graph is slightly different from the definition of a
cycle for a directed graph due to the lack of direction on the edges.

For undirected graphs, the traversal of a set of vertices forward and then backward cannot be
considered a cycle.

Rather, a simple cycle for an undirected graph must contain at least three different edges and
no repeated vertices, with the exception of the initial and terminal vertex.
Theory
Ajay Kesharwani, Gr. Noida
United College of Engineering and Research, Greater Noida

Reachability: If a vertex is reachable from another vertex then a path exists from one
vertex to the other vertex.

It is assumed that every vertex is reachable from itself.

Also, if vertex b is reachable from vertex a and vertex c is reachable from vertex b, then it
follows that vertex c is reachable from vertex a.

The definition of reachability holds true for both directed and undirected graphs.

In the road map example, a driver can reach Kindersley from Saskatoon, and the same
driver can reach Calgary from Kindersley. Therefore, Calgary is considered by the driver to
be reachable from Saskatoon.
Connectedness and Components:

An undirected graph is considered to be connected if a path exists between all pairs of
vertices thus making each of the vertices in a pair reachable from the other.

A disconnected graph may be subdivided into what are termed connected sub-graphs or
connected components of the graph.

The connectedness of a simple directed graph becomes more complex because direction
must be considered. For instance, if vertex a is reachable from vertex b, vertex a may not be
reachable from vertex b.

For the road map example when the map is considered to be a directed graph, it can not be
considered a connected graph, because while Calgary is reachable from Saskatoon,
Saskatoon is not reachable from Calgary.

Because of the added complexity, there are three distinct forms of connectedness in simple
directed graphs: weakly connected, unilaterally connected and strongly connected.

A weakly connected graph is where the direction of the graph is ignored and the
connectedness is defined as if the graph was undirected.
Theory
Ajay Kesharwani, Gr. Noida
United College of Engineering and Research, Greater Noida

A unilaterally connected graph is defined as a graph for which at least one vertex of any
pair of vertices is reachable from the other.

A strongly connected graph is one in which for all pairs of vertices, both vertices are
reachable from the other.

disconnected if and only
Theorem: A graph G is
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 end vertex is in subset V1 and the other in subset V2.

Theorem: If a graph (connected or disconnected) has exactly two vertices of odd degree,
there must be a path joining these two vertices.

Theorem: A simple graph with n vertices and k components can have at most (n – k)(n – k
+ 1)/2 edges.
Eulerian graphs:

A closed walk running through every edge of a graph exactly once is called an Euler line.

A trail containing every edge of a graph is called an Eulerian trail.

A circuit containing every edge of a graph is called an Eulerian circuit.

A graph is called semi–Eulerian if it has an Eulerian trail and Eulerian if it has an Eulerian
circuit.

Note:
1. Every Eulerian graph is semi–Eulerian.
2. A semi–Eulerian graph is necessarily connected.

Theorem: A given connected graph G is an Euler graph if and only if all vertices of G are of
even degree.

An open walk that includes all edges of a graph without retracing any edge a unicursal line
or an open Euler line.

A connected graph that has a unicursal line will be called a unicursal graph.

By adding an edge between the initial and final vertices of a unicursal line we get an Euler
line. Thus a connected graph is unicursal if and only if it has exactly two vertices of odd
degree.
Theory
Ajay Kesharwani, Gr. Noida
United College of Engineering and Research, Greater Noida

Theorem: In a connected graph G with exactly 2k odd vertices, there exist k edge-disjoint
sub-graphs such that they together contain all edges of G and that each is a unicursal graph.

Theorem: A connected graph G is an Euler graph if and only if it can be decomposed into
circuits.







Euler's Theorems are examples of existence theorems
existence theorems tell whether or not something exists (e.g. Euler circuit)
but doesn't tell us how to create it!
we want a constructive method for finding Euler paths and circuits
methods (well-defined procedures, recipes) for construction are called algorithms
there is an algorithm for constructing an Euler circuit: Fleury's algorithm
we will illustrate it with the graph:
Fleury's Algorithm:
1. pick any vertex to start
2. from that vertex pick an edge to traverse (see below for
important rule)
3. darken that edge, as a reminder that you can't traverse it again
4. travel that edge, coming to the next vertex
5. repeat 2-4 until all edges have been traversed, and you are back at
the starting vertex
At each stage of the algorithm:



the original graph minus the darkened (already used) edges = reduced graph
important rule: never cross a bridge of the reduced graph unless there is no other choice
why must we observe that rule?
Notes:




the same algorithm works for Euler paths
before starting, use Euler’s theorems to check that the graph has an Euler path and/or circuit
to find
when you do this on paper, you can erase each edge as you traverse it
this will make the reduced graph visible, and its bridges apparent
Example
Steps
Theory
Marked graph
Reduced graph
Ajay Kesharwani, Gr. Noida
United College of Engineering and Research, Greater Noida
Pick any vertex
(e.g. F)
Travel from F to
C
(arbitrary choice)
Travel from C to
D
(arbitrary)
Travel from D to
A
(arbitrary)
Travel from A to
C
(can't go to B: that
edge is a bridge of
the reduced graph,
and there are two
other choices, we
chose one of them)
The rest of the trip is obvious, and the complete Euler circuit is:
(F, C, D, A, C, E, A, B, D, F)

Arbitrary traceable Graphs: In an Euler graph, if starting from any vertex v, an Euler line
is obtained when one follows any walk from vertex v according to a rule that whenever one
arrives at a vertex one shall select any edge which has not been previously traversed, then
such a graph is called an arbitrarily traceable graph from vertex v.
Theory
Ajay Kesharwani, Gr. Noida
United College of Engineering and Research, Greater Noida

Theorem: An Euler graph G is arbitrarily traceable from vertex v in G if and only if every
circuit in G contains v.
Hamiltonian Paths and Circuits:

A Hamiltonian circuit in a connected graph is defined as a closed walk that traverses every
vertex of G exactly once except the starting vertex at which the walk also terminates.

A Hamiltonian circuit in a graph of n vertices consists of exactly n edges.

If we remove any one edge from a Hamiltonian circuit we are left with a path known as
Hamiltonian path. This path in a graph G traverses every vertex of G.

Since a Hamiltonian path is a subgraph of a Hamiltonian circuit, every graph that has a
Hamiltonian circuit also has a Hamiltonian path.

The length of a Hamiltonian path in a connected graph of n vertices is n – 1.

Theorem: In a complete graph of n vertices there are (n – 1)/2 edge-disjoint Hamiltonian
circuits, if n is an odd number  3.

Theorem: A sufficient (but not necessary) condition for a simple graph G to have a
Hamiltonian circuit is that the degree of every vertex in G be at least n/2, where n is the no
of vertices in G.
Traveling Salesman Problem:

The problem states: A salesman is required to visit a no of cities during a trip. Given the
distance between the cities, in what order should he travel so as to visit every city precisely
once and return home, with the minimum mileage traveled.

We represent the cities by vertices and the roads between them by edges. In this graph
formed, with every edge ei there is associated a real number w(ei) called the weight.

Since each of the cities in the graph has a road to every other city, we have to find a
Hamiltonian circuit with minimum weight possible in the complete weighted graph.

The total no of different Hamiltonian circuits in a complete graph of n vertices is (n –1)!/2.

The problem can be solved by enumerating all (n – 1)!/2 Hamiltonian circuits, calculating
the distance traveled in each and picking the shortest one.
Chinese Postman Problem:

Chinese mathematician Guan Meigee [1962] proposed a problem:
Suppose a mail carrier traverse all edges in a road network starting and ending at the same
vertex. If all the edges have been assigned weights representing distance (or time), our aim
is to find a closed walk of minimum total length that uses all the edges. This is called the
Chinese Postman Problem.

If every vertex is even in such a network, the graph will be Eulerian and then summing the
weights of the edges will give the solution to the problem.
Theory
Ajay Kesharwani, Gr. Noida
United College of Engineering and Research, Greater Noida
Trees

A connected graph without any circuits or cycles is called a tree.

A tree is a simple graph having neither a self-loop nor parallel edges.

A tree with only one vertex is called a trivial tree; otherwise it is a non-trivial tree.

A graph G with no cycles is called a forest. The connected components of a forest are trees.

A vertex of degree 1 in a tree is called a leaf or terminal node or pendant vertex and a
vertex of degree more than 1 is called a branch node or an internal node.

Interestingly enough a tree is considered a type of graph. It consists primarily of a root node
connected to zero or more other nodes. The term "tree" is well suited to this type of structure
because in its inverted state, it resembles a real tree with its system of branches. Any given
vertex can be a parent, with another vertex connected below, or a child, which is the vertex
below the parent, or both.
Theory
Ajay Kesharwani, Gr. Noida
United College of Engineering and Research, Greater Noida
Properties of trees:

A simple graph G is a tree iff there is one path between every pair of vertices.

A tree with n vertices has n – 1 edges.

Any connected graph with n vertices and n – 1 edges is a tree.

A graph is a tree if and only if it is minimally connected. A connected graph is said to be
minimally connected if removal of any one edge from it disconnects the graph.

A graph G with n vertices, n – 1 edges, and no circuits is connected.
Hence a graph with n vertices is called a tree if:





G is connected and is circuitless, or
G is connected and has n – 1 edges, or
G is circuitless and has n – 1 edges, or
There is exactly one path between every pair of vertices in G, or
G is a minimally connected graph.
Pendant vertices in a tree:

In a tree of n vertices, there are n – 1 edges and therefore 2(n – 1) degrees are to distributed
among n vertices. Since, no vertex is of degree 0, there must be at least 2 vertices of degree
1 in a tree

In any non-trivial tree (n2), there are at least two pendant vertices.
Distance and Centres in a tree:

In a connected graph G, the distance d(vi, vj) between two of its vertices vi and vj is the
length of the shortest path between them.

Metric: A function that satisfies the following three conditions is called a metric.
1. Nonnegativity: f(x, y)  0, and f(x, y) = 0 if and only if x = y.
2. Symmetry: f(x, y) = f(y, x).
3. Triangle inequality: f(x, y)  f(x, z) + f(z, y) for any z.

The distance between vertices of a connected graph is a metric asd(vi, vj)  0,
d(vi, vj) = d(vj, vi) and
Theory
Ajay Kesharwani, Gr. Noida
United College of Engineering and Research, Greater Noida
d(vi, vj)  d(vi, vk) + d(vk, vj) , for any vertices vi, vj and vk in the graph.

The eccentricity E(v) of a vertex v in a graph G is the distance from v to the vertex farthest
from v in G:
E(v) = max d(v, vi), vi  G.

A vertex with minimum eccentricity in graph G is called a center of G.

If a tree has two vertices with same minimum eccentricity then the tree has two centers and
are called bicenters.

Every tree has either one or two centers.

The eccentricity of a center in a tree is defined as the radius of the tree.

The length of the longest path in a tree is the diameter of the tree.
Rooted and Binary Trees:

A tree in which one vertex (root) is distinguished from all the others is called a rooted tree.

In a binary tree there is exactly one vertex of degree two and the other vertices are of
degree one or three. The vertex with degree two forms the root.

Properties of binary trees:
 The no. of vertices n in a binary tree is always odd.
 If p be the no. of pendant vertices in a binary tree T then
p = (n+1)/2

A non-pendant vertex in a tree is called internal vertex.

In a binary tree a vertex vi is said to be at level li if vi is at a distance of li from the root. The
root is at level 0.

min lmax = log2 (n+1) – 1 , where lmax is the height of the tree.

max lmax = (n-1)/2

The sum of the levels of all pendant vertices is known as the path length of a tree.

If every pendant vertex vi of a binary tree associates with it a positive real number wi then,
wili is the weighted path length of the binary tree, where li is the level of pendant
vertex vi and the sum is taken over all pendant vertices.
Theory
Ajay Kesharwani, Gr. Noida
United College of Engineering and Research, Greater Noida

Labeled graph: A graph in which each vertex is given a unique name or label is called a
labeled graph.

Cayley’s Theorem: The number of labeled trees with n vertices is nn-2 (n  2).
Spanning Trees

A tree T is said to be a spanning tree (skeleton or scaffolding) of a connected graph G if T
is a subgraph of G and T contains all the vertices of G.

Since spanning trees are the largest trees of all the trees in G, they are also called maximal
tree subgraph or simply maximal tree of G.

A spanning tree exists only in a connected graph; a disconnected graph with k components
has a spanning forest consisting of k spanning trees.

Theorem: Every connected graph has at least one spanning tree.

An edge in a spanning tree T is called a branch of T.

An edge of G that is not in the spanning tree T is called a chord (tie or link).

An edge, which is a branch of one spanning tree T1, may be a chord with respect to another
spanning tree T2 in a graph G.

For a spanning tree T in a graph G,
T  T = G, where T is the chord set (tie set or cotree) of T

Theorem: A connected graph of n vertices and e edges has n – 1 tree branches and e – n + 1
chords with respect to any of its spanning trees.

In a graph G of n vertices, e edges and k components,
Rank
r = n – k,
Nullity  = e – n + k


The rank of a connected graph is n – 1 and nullity e – n + 1.
Rank of G = number of branches in any spanning tree of G,
Nullity of G = number of chords in G,
Rank + Nullity = number of edges in G.

Theorem: A connected graph G is a tree if and only if adding an edge between any two
vertices in G creates exactly one circuit.
Theory
Ajay Kesharwani, Gr. Noida
United College of Engineering and Research, Greater Noida

Fundamental circuit: Exactly one circuit formed by adding a chord to a spanning tree T in
a connected graph G is called a fundamental circuit.

Number of fundamental circuits in a graph G is equal to the number of chords i.e.  = e – n
+ k in the graph.

A circuit may be fundamental with respect to one spanning tree, but not with respect to a
different spanning tree of the same graph.

Finding all spanning trees of a graph G:
 We start with a given spanning tree T1.
 Add a chord to the tree T1 forming a fundamental circuit.
 Removal of any other branch from the fundamental circuit will result in a new
spanning tree T2.
 Repeat this process of obtaining a different spanning tree each time a branch is
deleted from the fundamental circuit formed.

This generation of one spanning tree from another, by adding a chord and then deleting an
appropriate branch is called a cyclic interchange or elementary tree transformation.

The distance d (Ti, Tj) between two spanning trees Ti and Tj of a graph G is defined as the
number of edges present in one tree but not in the other.

Ti  Tj is the subgraph of G containing all edges of G that are either in Ti or in Tj but not in
both.
d (Ti, Tj) = (1/2) N(Ti  Tj), where N(g) is the no. of edges in graph g

Cut–Sets

In a connected graph G, a cut-set is a set of minimum number of edges whose removal from
G disconnects the graph G.

A proper subset of a cut-set cannot be a cut-set.

The removal of a cut-set reduces the rank of the graph by one.

If the vertices of a connected graph G are partitioned into two mutually exclusive subsets, a
cut-set is a minimal number of edges whose removal from G destroys all paths between
these two sets of vertices.

Every edge of a tree is a cut-set.

Theorem: Every cut-set in a connected graph G must contain at least one branch of every
spanning tree of G.
Proof: If a spanning tree T and a cut-set S in connected graph G will have no edge in
common then on removing the cut-set S from G will not result in a disconnected graph.
Theory
Ajay Kesharwani, Gr. Noida
United College of Engineering and Research, Greater Noida

Theorem: In a connected graph G, any minimal set of edges containing at least one branch
of every spanning tree of G is a cut-set.
Proof: Let Q be a minimal set of edges containing at least one branch of every spanning tree
of G. Since the subgraph G – Q contains no spanning tree of G, G – Q is disconnected. Also,
since Q is a minimal set of edges, any edge e from Q returned to G – Q will create at least
one spanning tree. Thus the subgraph G – Q + e will be a connected graph. Therefore Q is a
minimal set of edges whose removal from G disconnects G, which by definition is a cut-set.

Theorem: Every circuit has an even number of edges in common with any cut-set.

Fundamental Cut-sets: A fundamental cut-set with respect to a spanning tree T in a
connected graph G is a cut-set S that contains exactly one branch of tree T and the rest of the
edges may be chords with respect to T.

Just as a spanning tree is essential for defining a set of fundamental circuits so is a spanning
tree essential for a set of fundamental cut-sets.

Just as every chord of a spanning tree defines a unique fundamental circuit, every branch of
a spanning tree defines a unique fundamental cut-set.

Theorem: With respect to a given spanning tree T, a chord ci that determines a fundamental
circuit  occurs in every fundamental cut-set associated with the branches in  and in no
other.

Theorem: With respect to a given spanning tree T, a branch bi that determines a
fundamental circuit associated with the chords in S, and in no others.
Connectivity and Separability

Edge Connectivity: The number of edges in the smallest cut-set is defined as the edge
connectivity of a connected graph G.

The edge connectivity of a tree is one.

Vertex Connectivity: The minimum number of vertices whose removal from a connected
graph G leaves the remaining graph disconnected is defined as the vertex connectivity of
graph G.

The vertex connectivity of a tree is also one.

Separable Graph: A connected graph G is said to be separable if its vertex connectivity is
one. All other connected graphs are nonseparable.

In a separable graph there exists a subgraph g in G such that g (complement of g in G) and g
have only one vertex in common.

In a separable graph a vertex whose removal disconnects the graph is called a cut-vertex.
Theory
Ajay Kesharwani, Gr. Noida
United College of Engineering and Research, Greater Noida

Theorem: A vertex v in a connected graph G is a cut-vertex if and only if there exist two
vertices x and y in G such that every path between x and y passes through v.

Theorem: The edge connectivity of a graph G cannot exceed the degree of the vertex with
the smallest degree in G.
Proof: Let vi be the vertex with smallest degree in G. Vertex vi can be separated from G by
removing d(vi) edges incident on vi. Hence proved.

Theorem: The vertex connectivity of a graph G cannot exceed the edge connectivity of G.
Proof: Let a denote the edge connectivity of G. There exists a cut-set S in G with a edges.
Let S partition the vertices of G into subsets V1 and V2. By removing at most a vertices from
V1 (or V2) on which the edges in S are incident, we can remove S from G. Hence proved.

Theorem: The maximum vertex connectivity one can achieve with a graph G of n vertices
and e edges (e  n –1) is the integral part of the number 2e/n, i.e. 2e/n

Hence,

A graph G is said to be k-connected if the vertex connectivity of G is k. Thus a separable
graph is 1-connected.
Vertex connectivity  Edge connectivity  2e/n
Maximum vertex connectivity possible = 2e/n
Network Flows

In networks of telephone lines, highways, railroads, pipelines of oil (or gas or water), etc,
the maximum rate of flow from one station to another is an important entity.

Such networks are represented by a weighted connected graph in which the vertices are the
stations and the edges are lines through which the given commodity (oil, gas, water, no of
messages, no of cars, etc.) flows.

The weight (a real positive no) associated with each edge represents the capacity of the line,
i.e. the maximum amount of flow possible per unit time.

Following assumptions are to be made in such networks:
 The total rate of commodity entering is equal to the rate leaving at each intermediate
vertex.
 There is no accumulation or generation of the commodity at any vertex.
 The flow through a vertex is limited only by the capacities of edges incident on it.
 The lines are lossless.
Theory
Ajay Kesharwani, Gr. Noida
United College of Engineering and Research, Greater Noida

A cut-set S with respect to a pair of vertices a and b in a connected graph G puts a and b into
different components.

The capacity of cut-set S in a weighted connected graph G (weight of each edge represents
its flow capacity) is the sum of the weights of all the edges in S.

The maximum flow possible between two vertices a and b in a network is equal to the
minimum of the capacities of all cut-sets with respect to a and b.

Transport network: A simple, connected, weighted, digraph G is called a transport (or
flow) network if the weight associated with every directed edge in G is a nonnegative
number and this number represents the capacity, cij of the edge directed from vertex i to
vertex j.

The capacity cij of an edge is the maximal amount of some commodity (such as water, gas,
electrical energy, number of cars, bits of information, etc.) that can be transported from
station i to j, along the edge (i, j), per unit of time in steady state.

Maximal flow: In a given transport network G, a flow, fij (a nonnegative number) is
assigned to every directed edge (i, j) such that it satisfies the following conditions:
 For every directed edge (i, j) in G
fij  cij ……….(1)
i.e. the flow through any edge does not exceed its capacity.
 There is a specified vertex s in G, called the source, for which
fsi – fis = w……(2) where w is called the value of flow.
i flow out
i
i.e. the net
of the source is w.
 There is another vertex t in G called the sink, for which
fti – fit = – w ………(3)
i flow into
i
i.e. the net
the sink is w.
 The flow is conserved at each intermediate vertex. For each intermediate vertex j,
fji – fij = 0 ………(4)
i
i

If there is no edge from vertex p to q, fpq = 0.

An edge (i, j) for which fij = cij, is said to be saturated.

A set of flows fij’s for all (i, j)’s in G is called a flow pattern. A flow pattern that maximizes
the quantity w is called a maximal flow pattern.

Cut and its Capacity: Ignoring the directions of edges in a transport network, consider a
cut-set with respect to vertices s and t, i.e. a cut set which separates source s from sink t is
Theory
Ajay Kesharwani, Gr. Noida
United College of Engineering and Research, Greater Noida
called a cut and is denoted by (P, P), where P and P are subsets obtained by the partitioning
made by the cut on the set of vertices. P contains s and P contains t.
The capacity of a cut, denoted by c(P, P) is the sum of the capacities of those edges
directed from the vertices in set P to the vertices in P i.e.  cij = c(P, P) ………(5)
jP

Theorem: In a given transport network G, the value of flow w from source s to sink t is less
iP
than or equal to the capacity of any cut separating s from t.
Proof: Let (P, P) is a cut such that source s in vertex set P and sink t
is in vertex set P .
Adding equation (2) and (4) we get,

Max-Flow Min-Cut Theorem:
In a given transport network G, the maximum value of a flow from s to t is equal to the
minimum value of the capacities of all cut sets in G that separate s from t.
Proof: From above theorem, we need only to prove that there exists a flow pattern in G such
that the value of the flow w0 from s to t is equal to c(P0, P0), the capacity of some cut
separating s from t.
 Let, for some flow pattern in G, the maximum possible value of the flow
from s to t be w0.
 Define a vertex set P in G recursively as:
(i) s  P.
(ii) If i  P and either fij < cij or fji > 0 then j  P. Any vertex not in P
belong to P.


Theory
Ajay Kesharwani, Gr. Noida
United College of Engineering and Research, Greater Noida
Planar Graphs:

A graph G is said to be planar if a geometric representation of G exists which can be drawn
on a plane such that no two of its edges intersect.

A graph, which cannot be drawn on a plane without a crossover between its edges, is called
nonplanar.

A drawing of the geometric representation of the graph on any surface such that no edges
intersect is called embedding.

An embedding of a planar graph G on a plane is called a plane representation of G.

Kuratowski’s Graphs: Polish mathematician Kasimir Kuratowski gave two nonplanar
graphs –
1) Complete graph of five vertices, K5.
2) Regular, connected graph with six vertices and nine edges, K3,3.



K5
K3,3
Theorem: The complete graph of five vertices, K5 is nonplanar.
Theorem: Kuratowski’s second graph, K3,3 is also nonplanar.
Properties common to both graphs of Kuratowski1) Both are regular.
2) Both are nonplanar.
3) Removal of one edge or a vertex makes the graph planar.
4) Kuratowski’s first graph is nonplanar graph with smallest number of vertices, and
Kuratowski’s second graph is nonplanar with smallest number of edges.
Theorem: Any simple planar graph can be embedded in a plane such that every edge is
drawn as a straight-line segment.
Theory
Ajay Kesharwani, Gr. Noida
United College of Engineering and Research, Greater Noida

Region: A plane representation of a graph divides the plane into regions. A region identifies
the set of edges as its boundary.
The portion of the plane lying outside a graph embedded in a plane,
which is infinite in its extent, is called the infinite (outer, or exterior)
region for that particular plane representation.

Theorem: A graph can be embedded in the surface of a sphere if and only if it can be
embedded in a plane.

Euler’s Formula: A connected planar graph with n vertices and e edges has f regions giving
f = e – n + 2.

In any simple, connected planar graph with f regions, n vertices, and e edges (e>2), the
following inequalities holde  (3/2)f………… (1)
e  3n – 6………… (2)

Inequality (2) is used to find out the nonplanarity of a graph. This inequality does not hold
for K5, hence Kuratowski’s first graph is nonplanar.

Inequality (2) is only a necessary condition for the planarity of a graph, but it is not
sufficient as this condition holds for Kuratowski’s second graph, K3,3, yet the graph is
nonplanar.

To prove the nonplanarity of K3,3, we make use of the fact that no region can be bounded
with fewer than four edges
Hence, 2e  4f
Substituting for f from Euler’s formula we get,
2e  4(e – n + 2)
which results in a contradiction. Hence the graph is nonplanar.

A disconnected graph is planar if and only if each of its components is planar. Similarly, a
separable graph is planar if and only if each of its blocks is planar.
Detection of Planarity:

To detect the planarity or nonplanarity of any arbitrary graph G we follow a method of
elementary reduction:
Step 1: Since a disconnected graph is planar if and only if each of its components is planar,
and a separable graph is planar if and only if each of its blocks is planar.
Hence, we determine the set G = {G1, G2,…..Gk}
where each Gi is a nonseparable block of G. Test each Gi for planarity.
Step 2: Addition or deletion of self-loops does not affect planarity, so remove all self-loops.
Step 3: Parallel edges also do not affect planarity, so eliminate edges in parallel by removing
all but one edge between every pair of vertices.
Step 4: Elimination of a vertex of degree two by merging two edges in series does not affect
planarity, so eliminate all edges in series.
Theory
Ajay Kesharwani, Gr. Noida
United College of Engineering and Research, Greater Noida
Step 5: Repeat steps 3 and 4 until the nonseparable connected graph Gi reduces to a graph Hi
which is
1) A single edge, or
2) A complete graph of four vertices
3) A nonseparable, simple graph with n ≥ 5 and e ≥ 7.

Now, we need only to check simple, connected, nonseparable graphs of at least five vertices
and with every vertex of degree three or more using inequality e ≤ 3n – 6.

If this inequality does not hold, graph Hi is nonplanar, else we need to test the graph further
using Kuratowski’s theorem.

Homeomorphic Graphs: Two graphs are said to be homeomorphic if one graph can be
obtained from the other by the creation of edges in series or by the merger of edges in series.

A graph G is planar if and only if every graph that is homeomorphic to G is planar.

Kuratowski’s Theorem: A necessary and sufficient condition for a graph G to be planar is
that G does not contain either of Kuratowski’s two graphs or any graph homeomorphic to
either of them.

It is not necessary for a nonplanar graph to have either of the Kuratowski graphs as
subgraph. The nonplanar graph may have a subgraph homeomorphic to a Kuratowski graph.
The graph in fig (a) is nonplanar, yet it is not having any of the
Kuratowski’s graph as subgraph. The subgraph in fig (b) is
homeomorphic to the graph in fig (c) which is isomorphic to K3,3
Geometrical Dual:

If f1, f2, f3,…..fk be the regions or faces in a planar graph G, and corresponding to these
regions if we place points p1, p2, p3,…..pk in each of these regions:
Theory
Ajay Kesharwani, Gr. Noida
United College of Engineering and Research, Greater Noida
i.
ii.
iii.
We connect two points pi and pj if faces fi and fj are adjacent to each other such that
the line joining pi and pj intersects the common edge between fi and fj exactly once.
If there is more than one edge common between fi and fj, draw one line between
points pi and pj for each of the common edges.
For an edge e lying entirely in one region, say fk draw a self-loop at point pk
intersecting e exactly once.
Thus we obtain a graph G* consisting of vertices p1, p2, p3,…..pk and of edges joining these
vertices. Such a graph G* is called a geometric dual of G.

There is a one-to-one correspondence between the edges of graph G and its dual G* - one
edge of G* intersects one edge of G.

Some observations about the relation between planar graph G and its dual G* are:
i.
ii.
iii.
iv.
v.
vi.
vii.
viii.
An edge forming a self-loop in G gives a pendant edge in G*.
A pendant edge in G gives a self-loop in G*.
Edges that are in series in G gives parallel edges in G*.
Parallel edges in G gives edges in series in G*.
The no of edges constituting the boundary of a region fi in G is equal to the degree of
the corresponding vertex pi in G* and vice versa.
Graph G* is also embedded in the plane and is therefore planar.
G* is a dual of G and also G is a dual of G*, therefore G and G* are called dual
graphs.
If n, e, f, r and µ denote the no of vertices, edges, regions, rank and nullity of G and
if n*, e*, f*, r* and µ* are the corresponding nos. for dual graph G*, then
n* = f
e* = e
f* = n
and also using above relationships we get
r* = µ
µ* = r
Combinatorial Dual:

Theorem: A graph has a dual if and only if it is planar.

Two planar graphs G and G* are said to be combinatorial duals of each other if there is a
one-to-one correspondence between the edges of G and G* such that if g is any subgraph of
G and h is the corresponding subgraph of G*, then
rank of (G* - h) = rank of G* - nullity of g.


The geometric and combinatorial duals are same and we simply refer to them as dual.
Self-Dual graphs: If a planar graph G is isomorphic to its own dual it is called a self-dual
graph, e.g. K4.
Thickness and Crossings:

The minimum no of planes required for embedding a nonplanar graph G or the least no of
planar subgraphs whose union is the graph G is called thickness of G.
Theory
Ajay Kesharwani, Gr. Noida
United College of Engineering and Research, Greater Noida

The thickness of planar graph is one.

The thickness of each of Kuratowski’s graphs is two.

The minimum no of crossings or intersections necessary to draw a graph G in a plane is the
crossing no of graph G.

The crossing no of planar graph is zero.

The crossing no of each of Kuratowski’s graph is one.
Incidence Matrix:

Let G be a graph with n vertices, e edges and no self-loops, we define an n x e matrix A =
[aij], whose n rows correspond to the n vertices and the e columns correspond to the e edges,
as follows:
The matrix element
aij = 1,
if edge ej is incident on vertex vi, and
aij = 0,
otherwise.
Such a matrix A is called incidence matrix for graph G and is denoted by A(G).

The incidence matrix contains only two elements, 0 and 1. Such a matrix is called a binary
matrix or a (0, 1)-matrix.
V1
e1
e4
V2
e5
e3
e2
e6

V3
e1
e2
e3
e4
e5
e6
v1
1
1
0
1
0
0
v2
1
0
1
0
1
0
v3
0
0
0
0
0
1
v4
0
0
1
1
0
0
v5
0
1
0
0
1
1
V5
V4
The incidence matrix A(G) has the following properties:
a) Each column of A has exactly two 1’s because every edge is incident on exactly two
1’s.
b) The number of 1’s in each row represents the degree of the corresponding vertex.
c) A row with all 0’s represents an isolated vertex and a row with exactly one 1
represents a pendant vertex.
d) Parallel edges in a graph give identical columns in its incidence matrix.
e) For a disconnected graph consisting of two components g1 and g2, the incidence
matrix A(G) of graph G can be written in a block diagram form as
A(g1)
0
A(G) =
0
A(g2)
Theory
Ajay Kesharwani, Gr. Noida
United College of Engineering and Research, Greater Noida
where A(g1) and A(g2) are the incidence matrices of
components g1 and g2.
f) Permutation of any two rows or columns in an incidence matrix corresponds to
relabeling the vertices and edges of the graph.

Theorem: Two graphs G1 and G2 are isomorphic if and only if their incidence matrices
A(G1) and A(G2) differ only by permutations of rows and columns.

Theorem: If A(G) is an incidence matrix of a connected graph G with n vertices, the rank of
A(G) is n – 1.

Rank of A(G) is n – k, if G is a disconnected graph with n vertices and k components.

If we remove any one row from the incidence matrix of a connected graph, the remaining (n
– 1) by e submatrix is of rank n – 1. Such an (n – 1) by e submatrix Af of A is called a
reduced incidence matrix. The vertex corresponding to the deleted row in Af is called the
reference vertex.

Since a tree is a connected graph of n vertices and n – 1 edges, its reduced incidence matrix
is a square matrix of order and rank n – 1.

Corollary: The reduced incidence matrix of a tree is nonsingular.

Submatrices of A(G): A(g) is a submatrix of A(G) if g be a subgraph of a graph G. There is
a one-to-one correspondence between each n by k submatrix of A(G) and a subgraph of G
with k edges (k < e) and n vertices.
Circuit Matrix:


If no of circuits in graph G be q and no of edges in G be e, then a circuit matrix B = [bij] of
G is a q x e, (0,1)-matrix defined as follows:
bij = 1, if ith circuit includes jth edge
= 0, otherwise.
Observations:
1) All zeroes in a column correspond to a noncircuit edge.
2) For a self-loop the corresponding row will have a single 1.
3) Number of 1’s in a row is equal to the number of edges in the corresponding circuit.
4) If a graph G is separable or disconnected and consists of two blocks or components
g1 and g2, the circuit matrix B(G) can be written in block-diagonal form as
B(g1)
0
B(G) =
0
B(g2)
Theory
Ajay Kesharwani, Gr. Noida
United College of Engineering and Research, Greater Noida
5) Permutation of any two rows or columns in a circuit matrix simply corresponds to
relabeling the circuits and edges.

Fundamental circuit matrix: A submatrix of a circuit matrix in which all rows correspond
to a set of fundamental circuits is called fundamental circuit matrix Bf.
 If n is the number of vertices and e the number of edges in a connected graph,
then Bf is an (e – n + 1) x e matrix (each fundamental circuit produced by one
chord).
 Arrange the columns in Bf such that all the e – n + 1 chords correspond to the
first e – n + 1 columns. Also rearrange the rows such that the first row
corresponds to the fundamental circuit made by the chord in the first column, the
second row to the fundamental circuit made by the second, and so on.
 Thus the matrix arranged as above can be written as Bf = [Iμ | Bt], where Iμ is an
identity matrix of order μ = e – n + 1, and Bt is the remaining μ x (n – 1)
submatrix, corresponding to the branches of spanning tree.
 Rank of Bf = μ = e – n + 1
Since Bf is a submatrix of circuit matrix B, rank of B  μ
 Theorem: If B is a circuit matrix of a connected graph G with e edges and n
vertices, rank of B = e – n + 1.
Cut- Set Matrix:




In a cut-set matrix C = [cij], the rows correspond to the cut-sets and the columns to the edges
of the graph, as given below
cij = 1, if ith cut-set contains jth edge, and
= 0, otherwise
Observations:
1) A self loop is represented by a column having all 0’s.
2) Parallel edges produce identical columns in the cut-set matrix
3) Permutation of any two rows or columns in a cut-set matrix simply corresponds to
relabeling the cut-sets and edges.
Theorem: The rank of cut-set matrix C(G) is equal to the rank of the incidence matrix A(G),
which equals the rank of graph G.
Fundamental Cut-Set Matrix: Cf of a connected graph G with e edges and n vertices is an
(n – 1) x e submatrix of C such that the rows correspond to the set of fundamental cut-sets
with respect to some spanning tree.
 Like fundamental circuit matrix, a fundamental cut-set matrix Cf can also be
partitioned into two Submatrices, one of which is an identity matrix In-1 of order
n-1, i.e.
Cf = [Cc | In-1], where the first e-n+1 columns forming Cc
correspond to chords and the last n-1 columns forming the identity matrix
correspond to the branches of spanning tree.
Path Matrix:

Path matrix is defined for a specific pair of vertices in a graph, say (x,y) and written as
P(x,y). Rows in P(x,y) correspond to different paths between vertices x and y, and the
columns correspond to the edges in G.
P(x,y) = [pij], where
Theory
Ajay Kesharwani, Gr. Noida
United College of Engineering and Research, Greater Noida
pij = 1, if jth edge lies in ith path, and
= 0, otherwise.

Observations:
1) All 0’s in a column corresponds to an edge that does not lie in any path between x
and y.
2) A column of all 1’s corresponds to an edge that lies in every path between x and y.
3) There is no row with all 0’s.
Adjacency Matrix:

The adjacency matrix of a graph G denoted by X(G) with n vertices and no parallel edges is
an n x n symmetric binary matrix X = [xij] defined as
xij = 1, if there is an edge between ith and jth vertices, and
xij = 0, if there is no edge between them.
V1
V3
V5
v1
v2
v3
v4
v5
v1
0
1
0
1
1
v2
1
0
0
1
1
v3
0
0
0
0
1
v4
1
1
0
0
0
v5
1
1
1
0
0
V2
V4

The adjacency matrix X(G) has the following properties:
a) The entries along the principal diagonal of X are all 0’s if and only if the graph has
no self-loops. A self loop at the ith vertex corresponds to xii = 1.
b) The definition of adjacency matrix makes no provision for parallel edges.
c) If the graph has no self-loops, the no of 1’s in a row or column of X gives the degree
of the corresponding vertex.
d) Permutations of rows and of the corresponding columns imply reordering the
vertices.
e) For a disconnected graph G with two components g1 and g2, the adjacency matrix
X(G) will be written as
X(g1)
0
X(G) =
0
X(g2)
where X(g1) and X(g2) are the adjacency matrices of
components g1 and g2.
f) From any square, symmetric, binary matrix Q of order n, a graph G of n vertices can
be constructed such that Q is the adjacency matrix of G.

Powers of Adjacency Matrix X(G): We obtain X2 by multiplying the n x n adjacency
matrix by itself which is another n x n symmetric matrix.
Theory
Ajay Kesharwani, Gr. Noida
United College of Engineering and Research, Greater Noida
The value of an off-diagonal entry in X2, i.e. ijth entry (ij) in X2
= number of 1’s in the dot product of ith row and jth column (or jth
row) of X.
= number of positions in which both ith and jth rows of X have 1’s.
= number of vertices that are adjacent to both ith and jth vertices.
= number of different paths of length two between ith and jth
vertices.
The ith diagonal entry in X2 is the number of 1’s in the ith row (or column) of matrix X, i.e.
the degree of the corresponding vertex, if the graph has no self-loops.
Similarly, X3 is also a square symmetric matrix obtained by
X.X2 = X2.X = X3
The ijth entry of X3
= dot product of ith row of X2 and jth column (or row) of X.
= ikth entry of X2.kjth entry of X for k=1 to n.
=  number of all different edge sequences of three edges from ith to
jth vertex via kth vertex, for k=1 to n.
= number of different edge sequences of three edges between ith and
jth vertices.
The iith entry in X3 equals twice the number of different circuits of length three (i.e.
triangles) in the graph passing through the corresponding vertex vi.

Theorem: Let X be the adjacency matrix of a simple graph. Then the ijth entry in Xr is the
number of different edge sequences of r edges between vertices vi and vj.

In a connected graph, the distance between two vertices vi and vj (ij) is k, if and only if k is
the smallest integer for which the i,jth entry in Xk is nonzero.

If X is the adjacency matrix of graph G with n vertices, and
Y = X + X2 +X3 + … + Xn-1, then G is disconnected if and only if
there exists at least one entry in matrix Y that is zero.
Theory
Ajay Kesharwani, Gr. Noida
United College of Engineering and Research, Greater Noida
Colorings
Chromatic Number:

Painting all the vertices of a graph with colors such that no two adjacent vertices have the
same color is called the proper coloring or simply coloring of a graph.

A graph in which every vertex has been assigned a color according to a proper coloring is
called a properly colored graph.

A graph G that requires k different colors for its proper coloring, and no less, is called a kchromatic graph, and k is called the chromatic number of G.

For coloring problems we need to consider only simple, connected graphs.

Some observations derived from the above definitions
 A null graph is 1-chromatic.
 A graph with one or more edges is at least 2-chromatic (bichromatic).
 A complete graph of n vertices is n-chromatic, as all its vertices are adjacent. A
graph containing a complete graph of r vertices is at least r-chromatic.
 A graph consisting of simply one circuit with n  3 vertices is 2-chromatic if n is
even and 3-chromatic if n is odd.
Theory
Ajay Kesharwani, Gr. Noida
United College of Engineering and Research, Greater Noida

Theorem: Every tree with two or more vertices is 2-chromatic.

Every 2-chromatic graph is not necessarily a tree.

Theorem: A graph with at least one edge is 2-chromatic if and only if it has no circuits of
odd length.

Theorem: If dmax is the maximum degree of the vertices in graph G, chromatic number of G
 1 + dmax.

If G has no complete graph of dmax + 1 vertices, then
chromatic number of G  dmax.

Every 2-chromatic graph is bipartite, because the coloring partitions the vertex set into two
subsets V1 and V2 such that no two vertices in V1 (or V2) are adjacent.

Every bipartite graph is 2-chromatic, with one trivial exception – a graph of two or more
isolated vertices and with no edges is bipartite but is 1-chromatic.

In general, a graph G is called p-partite if its vertex set can be decomposed into p disjoint
subsets V1, V2, … , Vp such that no edge in G joins the vertices in the same subset.

A k-chromatic graph is p-partite if and only if k  p
Chromatic Polynomial:

A graph G can be properly colored in many different ways using a large number of colors;
this property of graph is expressed by a chromatic polynomial of G.

The value of the chromatic polynomial Pn() of a graph with n vertices gives the number of
ways of properly coloring the graph using  or fewer colors.

Let ci be the different ways of properly coloring G using exactly i different colors. Since i
colors can be chosen out of  colors in Ci different ways, there are ciCi different ways of
properly coloring G using exactly i colors out of  colors.

Since i can be any positive integer from 1 to n, the chromatic polynomial is a sum of these
terms; i.e.
Pn() = i=1 nciCi
= c1[/1!] + c2[(-1)/2!] +c3[(-1)(-2)/3!] +….
+ cn[(-1)(-2)…(-n+1)/n!]
For a graph with at least one edge requires at least two colors for proper coloring, so
c1 = 0


A graph with n vertices and using n different colors can be properly colored in n! ways, i.e.
cn = n!
Theory
Ajay Kesharwani, Gr. Noida
United College of Engineering and Research, Greater Noida

Theorem: A graph of n vertices is a complete graph if and only if its chromatic polynomial
is
Pn() = ( - 1)( - 2)…( - n +1)

Theorem: An n-vertex graph is a tree if and only if its chromatic polynomial
Pn() = ( - 1)n-1

Theorem: Let a and b be two nonadjacent vertices in a graph G. Let G′ be a graph obtained
by adding an edge between a and b. Let G′′ be a simple graph obtained from G by fusing the
vertices a and b together and replacing sets of parallel edges with single edges. Then
Pn() of G = Pn() of G′ + Pn-1() of G′′
Proof: The number of ways of properly coloring G can be broken into two cases
 Vertices a and b are of same color
 Vertices a and b are of different colors
Since, no of ways of properly coloring G such that a and b have different colors = no of
ways of properly coloring G′
No of ways of properly coloring G such that a and b have the same color = no of ways of
properly coloring G′′,
Hence,
Pn() of G = Pn() of G′ + Pn-1() of G′′.
Proved.
Chromatic Partitioning:

A graph G can be properly colored to introduce a vertex partitioning such that no two
vertices in a partition are adjacent to each other.

A set of vertices in a graph is said to be independent set of vertices (or internally stable
set) if no two vertices in the set are adjacent to each other.
 A single vertex in any graph will form an independent set.
 A maximal independent set (or maximally internally stable set) is an independent
set to which no other vertex can be added without destroying its independence
property.
 A graph, in general has many maximal independent sets, of different sizes.
 The maximal independent set with largest number of vertices is of concern, and the
number of vertices in the largest independent set of a graph G is called the
independence number (or coefficient of internal stability), β(G).
 Since, the largest no of vertices in G with the same color cannot exceed the
independence number β(G), if n and k be the no of vertices and chromatic no of
graph Gβ(G)  n/k

To find independence and chromatic no of a graph G:
 Obtain all maximal independent sets of G
Theory
Ajay Kesharwani, Gr. Noida
United College of Engineering and Research, Greater Noida
 Find the size of the one with largest no of vertices to get the independence no β(G) of
graph G.
 Find the minimum no of maximal independent sets, which collectively include all the
vertices of G; this gives the chromatic no, k of G.

For a simple, connected graph G, partitioning all the vertices in G to get the smallest
possible number of disjoint, independent sets is known as chromatic partitioning. (By
enumerating all maximal independent sets and finding the smallest no of sets to include all
the vertices, we get the chromatic partitions)

A graph that has only one chromatic partition is called uniquely colorable graph.

A dominating set (or externally stable set) in a graph G, is a set of vertices that dominates
every vertex v in G such that, either v is included in the dominating set or is adjacent to one
or more vertices included in the dominating set.
 A dominating set need not be independent
 A minimal dominating set is a dominating set from which no vertex can be
removed without destroying its dominance property.

Following observations can be made from the above definitions:
 Any single vertex in a complete graph forms a dominating set.
 Every dominating set contains at least one minimal dominating set.
 A graph may have many minimal dominating sets, and of different sizes.
 The number of vertices in the smallest minimal dominating set of a graph G is called
the domination number, α(G).
 A minimal dominating set may or may not be independent.
 Every maximal independent set is a dominating set.
 An independent set has the dominance property only if it is a maximal independent
set, i.e. an independent dominating set is same as maximal independent set.
 For any graph G,
α(G) ≤ β(G).
Matchings:

The problem of matching deals with the assignment of one set of vertices into another,
where the two sets of vertices form the partitions of a bipartite graph.

A matching in a graph is a subset of edges in which no two edges are adjacent.
 A single edge always forms a matching in any graph.
Theory
Ajay Kesharwani, Gr. Noida
United College of Engineering and Research, Greater Noida

A maximal matching is a matching to which no edge in the graph can be added. (In K3, any
single edge is a maximal matching)
 A graph may have many different maximal matchings, and of different sizes.
 The maximal matchings with the largest number of edges are called largest
maximal matchings.
 The number of edges in a largest maximal matching is called the matching number
of the graph.

In a bipartite graph having a vertex partition V1 and V2, a complete matching of vertices in
set V1 into vertices in V2 is a matching in which there is one edge incident with every vertex
in V1.
 A complete matching is always a largest maximal matching, whereas the converse is
not necessarily true.
 For complete matching to exist, there should be at least as many vertices in V2 as
there are in V1.(but this is not sufficient)
 There is another necessary condition – Every subset of r vertices in V1 must
collectively be adjacent to at least r vertices in V2, for all r = 1, 2, 3, ……, |V1|. (This
condition is also sufficient for the existence of a complete matching)

Theorem 1: A complete matching of V1 into V2 in a bipartite graph exists if and only if
every subset of r vertices in V1 is collectively adjacent to r or more vertices in V2 for all
values of r.
 If there are m vertices in V1, form 2m – 1 nonempty subsets of V1 and find the
number of vertices of V2 adjacent collectively to each of these.

Theorem 2: In a bipartite graph a complete matching of V1 into V2 exists if there is a
positive integer m for which the following condition is satisfied:
degree of every vertex in V1  m  degree of every vertex in V2
 The above condition is sufficient but not necessary for the existence of a complete
matching.
 The matching problem or the problem of distinct representatives is also called the
marriage problem.

If no complete matching can be found, then a maximal matching can only be found and a
new term is defined called the deficiency, δ(G) of a bipartite graph – If a set of r vertices in
V1 is collectively incident on q vertices of V2, then the maximum value of the number r – q
taken over all values of r = 1, 2, ….. and all subsets of V1 is called the deficiency δ(G) of
the bipartite graph.

Theorem 1 when expressed in terms of deficiency, states that a complete matching in a
bipartite graph G exists if and only if
δ(G) ≤ 0

Theorem 3: The maximal number of vertices in set V1 that can be matched into V2 is equal
to
number of vertices in V1 – δ(G), where δ(G) > 0
Theory
Ajay Kesharwani, Gr. Noida
United College of Engineering and Research, Greater Noida

Matching and Adjacency Matrix: For a bipartite graph G with non-adjacent sets of
vertices V1 and V2, having number of vertices n1 and n2 respectively and let n1  n2, n1+n2 =
n, number of vertices in G; the adjacency matrix X (G) can be written in the form
0
X12
X (G) =
,
X12T
0
where the sub-matrix X12 is n1 x n2, (0,1)-matrix containing the information as to which of
the n1 vertices of V1 are connected to which of the n2 vertices of V2. Matrix X12T is the
transpose of X12.
 A matching V1 into V2 corresponds to a selection of 1’s in the matrix X12, such that
no line (row or column) has more than one 1.
 Matching is complete if n1 x n2 matrix made of selected 1’s has exactly one 1 in
every row.
 A maximal matching corresponds to the selection of a largest possible number of 1’s
from X12 such that no row in it has more than one 1
 Thus from Theorem 3; in matrix X12 the largest number of 1’s, no two of which are
in one row, is equal to
number of vertices in V1 – δ(G).
Coverings:

In a graph G, a set g of edges is said to cover G if every vertex in G is incident on at least
one edge in g; and the set g which covers the graph g is said to be an edge covering, a
covering subgraph, or simply a covering of G.
 A spanning tree in a connected graph or a spanning forest in a disconnected graph is
a covering.
 A Hamiltonian circuit in a graph is also a covering.

A minimal covering is a covering from which no edge can be removed without destroying
its property of covering.

Following observations can be made:
 A covering exists if and only if the graph has no isolated vertex.
 A covering of an n-vertex graph will have at least n/2 edges.
 Every pendant edge in a graph is included in every covering of the graph.
 Every covering contains a minimal covering.
 The set of edges g is a covering iff, for every vertex v, the degree of vertex in (G – g)
≤ (degree of vertex v in G) – 1.
 No minimal covering contains a circuit, thus a minimal covering of an n-vertex
graph contains no more than n–1 edges.
 A graph has many minimal coverings and they may be of different sizes. The number
of edges in a smallest minimal covering is called the covering number of the
graph.

Theorem: A covering g of a graph is minimal if and only if g contains no paths of length
three or more.
Theory
Ajay Kesharwani, Gr. Noida
United College of Engineering and Research, Greater Noida
Proof: Suppose that g contains a path of length three, i.e v1e1v2e2v3e3v4. Edge e2 can be
removed without having its end vertices v2 and v3 uncovered; thus g is not a minimal
covering.
Conversely, if covering g contains no path of length three or more, all its
components will be star graphs; and from a star graph no edge can be removed without
leaving a vertex uncovered. Hence, g must be a minimal covering.

A covering in which every vertex is of degree one is called a dimer covering or 1-factor
and such a covering is also a maximal matching often referred to as perfect matching.
 A graph must have an even number of vertices to have a dimmer covering. (not
sufficient)
Four Color Problem:

Here, we consider the proper coloring of regions in a planar graph.

The regions of a planar graph are said to be properly colored if no two adjacent regions have
the same color.

The proper coloring of regions is called map coloring (like an atlas is colored).

For minimum no of colors required for proper coloring of a map there is a four-color
conjecture proposed by De Morgan, which states that Four colors are sufficient for coloring any atlas (or a map on a plane) such that the
countries with common boundaries have different colors.

Many famous mathematicians have been working on this conjecture for the past 100 years,
but no one has been able to prove the theorem.

It has been proved that, all maps containing less than 40 regions can be properly colored
with four colors.

If the Four-color conjecture is false, then the counterexample has to be a very complicated
and large one.

Coloring the regions of a planar graph G is equivalent to coloring the vertices of its dual G*,
and vice versa.
Theory
Ajay Kesharwani, Gr. Noida
United College of Engineering and Research, Greater Noida

Thus, Four color conjecture can be restated as: Every planar graph has a chromatic number
of four or less.
Five – Color Theorem:

Statement: The vertices of every planar graph can be properly colored with five colors.

Proof:
 The theorem will be proved by induction.
 The vertices of all graphs with 1, 2, 3, 4, or 5 vertices can be properly colored with
five colors.
 Let us assume that vertices of every planar graph with n – 1 vertices can be properly
colored with five colors.
 We require proving, that any planar graph G with n vertices will need no more than
five colors for proper coloring.
 A planar graph G with n vertices must be having at least one vertex with degree 5 or
less. Let this vertex be v.
 Let G be a graph of n – 1 vertices obtained from G by deleting vertex v.
 Graph G requires no more than five colors, according to induction hypothesis.
 Suppose that vertices in G are properly colored and we add v to it and all the edges
incident on v.
 If degree of v is 1, 2, 3, or 4, there is no difficulty in assigning a proper color to v.
 Thus the case in which degree of v is 5 is left, and all the five colors have been used
in coloring the vertices adjacent to v.
 Suppose that there is a path in G between vertices a and c colored alternately with
colors 1 and 3.
 Then a similar path between b and d colored alternately with colors 2 and 4 cannot
exist (because there will be an intersection of the two paths and G will become
nonplanar).
 Since there is no path between b and d colored alternately with colors 2 and 4,
starting from vertex b we can interchange colors 2 and 4 of all vertices connected to
b through vertices of alternating colors 2 and 4, still keeping G properly colored.
 Since vertex d is still with color 4, we paint the vertex v with color 2, which was left.
 Thus, properly coloring the graph. Hence the theorem.
Theory
Ajay Kesharwani, Gr. Noida
United College of Engineering and Research, Greater Noida
Six – Color Theorem:

Statement: Every simple planar graph is 6-colorable

Proof:
 This theorem can also be proved by induction.
 A simple planar graph G contains a vertex v of degree at most 5.
 If we delete v and its incident edges, then the remaining graph with n–1 vertices
is 6-colorable (induction hypothesis).
 A 6-coloring of G is obtained by coloring v with a color different from the
vertices adjacent to v.
Directed Graphs
Terminology:

A directed graph (or digraph) G consists of a set of vertices
V = {v1, v2, v3, …}, a set of edges E = {e1, e2, e3, …}, and a
mapping Ψ that maps every edge onto some ordered pair of
vertices (vi, vj).

A digraph is also referred as oriented graph.

The vertex vi, which edge ek is incident out of, is called the initial vertex of ek. The vertex vj,
which edge ek is incident into is called the terminal vertex of ek.

An edge for which the initial and terminal vertices are the same forms a self-loop.

The number of edges incident out of a vertex vi is called the out-degree (or out-valence) of
vi and is written d+(vi). The number of edges incident into vi is called the in-degree (or invalence) of vi and is written as d–(vi)
In any digraph G the sum of all in-degrees is equal to the sum of all out-degrees, each sum
being equal to the number of edges in G; i.e.

n
Theory
n
Ajay Kesharwani, Gr. Noida
United College of Engineering and Research, Greater Noida
∑ d+(vi) = ∑ d–(vi)
i=1
i=1

The in-degree and out-degree of an isolated vertex are both equal to zero.

A vertex v in a digraph is called pendant if it is of degree one; i.e. if
d+(v) + d–(v) = 1

Two directed edges are said to be parallel if they are mapped onto the same ordered pair of
vertices.

An undirected graph obtained from a directed graph G will be called the undirected graph
corresponding to G.
To an undirected graph H, we can assign each edge of H some arbitrary direction. The
resulting digraph, designated by H is called an orientation of H (or a digraph associated
with H).


A given digraph has a unique undirected graph corresponding to it, a given undirected graph
may have different orientations possible.

For two digraphs to be isomorphic not only must their corresponding undirected graphs be
isomorphic, but the directions of the corresponding edges must also agree.
Types of Digraphs:

A digraph that has no self-loop or parallel edges is called a simple digraph.

Digraphs that have at most one directed edge between a pair of vertices, but can have selfloops are called asymmetric or antisymmetric digraphs.

Digraphs in which for every edge (a, b), there is also an edge (b, a) are called symmetric
digraphs.

A digraph that is both simple and symmetric is called a simple symmetric digraph.
Similarly, a digraph that is both simple and asymmetric is simple asymmetric digraph.

A complete symmetric digraph is a simple digraph in which there is exactly one edge
directed from every vertex to every other vertex. This digraph of n vertices contains n(n –
1)/2 edges.

A complete asymmetric digraph is an asymmetric digraph in which there is exactly one
edge between every pair of vertices. This digraph of n vertices contains n(n – 1) edges.
(Also known as a tournament)

A digraph is said to be balanced if for every vertex vi the in-degree equals the out-degree;
i.e. d+(vi) = d–(vi). Also referred as pseudosymmetric digraph, or an isograph.

A balanced digraph is said to be regular if every vertex has the same in-degree and outdegree as every other vertex.
Theory
Ajay Kesharwani, Gr. Noida
United College of Engineering and Research, Greater Noida
Digraphs and Binary Relations:

In a set of objects, X where
X = {x1, x2, x3, …},
a binary relation R between pairs (xi, xj) exists such that xiRxj which
means that xi has relation R to xj.

Each of these relations is defined only on pairs of numbers of the set, thus the name binary
relation.

A digraph is a natural way of representing a binary relation on a set X. Each xi  X is
represented by a vertex xi. If xi has a relation R to xj, a directed edge is drawn from vertex xi
to xj for every pair (xi, xj).

Every binary relation on a finite set can be represented by a digraph without parallel edges
and vice versa.

Reflexive Relation: A relation R on X that satisfies xiRxi for every xi  X is called a
reflexive relation.
The digraph of a reflexive relation will have a self-loop at every vertex. Such a digraph
representing a reflexive binary relation on its vertex set is called a reflexive digraph.
A digraph in which no vertex has a self-loop is called an irreflexive digraph.

Symmetric Relation: For a relation R on X such that for every xi, xj  X, if xiRxj holds, then
xjRxi also holds is called a symmetric relation.
The directed graph of a symmetric relation is a symmetric digraph because for every
directed edge from vertex xi to xj there is a directed edge from xj to xi.

Every undirected graph is a representation of some symmetric binary relation on the set of
its vertices.
Every undirected graph with e edges can be thought of as a symmetric digraph with 2e
directed edges.


Transitive Relation: For a relation R on X such that for every xi, xj, xk  X, if xiRxj and xjRxk
holds then xiRxk also holds is called a transitive relation.
A digraph representing a transitive relation on its vertex set is called a transitive directed
graph.

Equivalence Relation: A binary relation is called an equivalence relation if it is reflexive,
symmetric and transitive.
The graph representing an equivalence relation may be called an equivalence graph.

An equivalence relation on a set partitions the elements of the set into classes called
equivalence classes such that two elements are in the same class if and only if they are
related.
Theory
Ajay Kesharwani, Gr. Noida
United College of Engineering and Research, Greater Noida

Relation Matrices: A binary relation R on a set can also be represented by a matrix, called a
relation matrix. It is a (0, 1), n by n matrix, where n is the number of elements in the set.
The i, jth entry in the matrix is 1 if xiRxj is true, and is 0 otherwise.
Directed Paths and Connectedness:

A directed walk from a vertex vi to vj is an alternating sequence of vertices and edges,
beginning with vi and ending with vj, such that each edge is oriented from the vertex
preceding it to the vertex following it. No edge in a directed walk appears more than once,
but a vertex may appear more than once.

A semiwalk in a directed graph is a walk in the corresponding undirected graph, but is not a
directed walk.

A walk in a digraph means either a directed walk or a semiwalk.


A directed walk in which no vertex appears more than once is called a directed path.
A semipath in a directed graph is a path in the corresponding undirected graph, but is not a
directed path.

A path in a digraph means either a directed path or a semipath.

The beginning vertex vi is known as the initial vertex and the ending vertex vj is known as
the terminal vertex of the directed walk/path.

A directed path having the initial and terminal vertex same i.e. a closed path is called a
directed circuit in a digraph.

A semicircuit in a directed graph is a circuit in the corresponding undirected graph, but is
not a directed circuit.

A circuit in a digraph means either a directed circuit or a semicircuit.

Connected Digraphs: A digraph may be strongly connected, unilaterally connected or
weakly connected.

A digraph is connected means that its corresponding undirected graph is connected, i.e. the
digraph may be strongly, unilaterally or weakly connected.
Each maximal connected (weakly, unilaterally, or strongly) subgraph of a digraph G is a
component of G.


Within each component of G, the maximal strongly connected subgraphs are called
fragments (or strongly connected fragments of G).

Condensation: The condensation Gc of a digraph G is a digraph in which, each strongly
connected fragment is replaced by a vertex, and all directed edges from one strongly
connected fragment to another are replaced by a single directed edge.
Theory
Ajay Kesharwani, Gr. Noida
United College of Engineering and Research, Greater Noida

Observations –
 The condensation of a strongly connected digraph is simply a vertex.
 The condensation of a digraph has no directed circuit.

Accessibility: In a digraph G, a vertex b is said to be accessible (or reachable) from vertex a
if there is a directed path from a to b.
A digraph G is strongly connected if and only if every vertex in G is accessible from every
other vertex.
Trees with directed edges:

A tree is a connected digraph having no circuit (neither a directed circuit nor a semi-circuit).
A tree with n vertices contains n – 1 directed edges.

Arborescence: A digraph G is said to be an arborescence if
 G contains no circuit (neither directed circuit nor semicircuit).
 There is exactly one vertex v with in-degree zero. This vertex v is called the root of
the arborescence.

Theorem: An arborescence is a tree in which every vertex other than the root has an indegree of exactly one.

An arborescence is a tree directed out of the root, so it is also referred as an out-tree.

If the direction of every edge in an arborescence is reversed an in-tree will be produced.

Theorem: In an arborescence there is a directed path from the root R to every other vertex.
Conversely, a circuitless digraph G is an arborescence if there is a vertex v in G such that
every other vertex is accessible from v, and v is not accessible from any other vertex.

Polish notation: To determine the sequence of operations in any arithmetic expression, a
machine need to scan the expression back and forth. To avoid this scanning, a computer
converts the expression into a Polish notation (invented by Polish logician Lukasiewicz).
Polish notation is also known as parenthesis-free notation or pre-order notation.
In Polish notation, a binary operator appears just to the left of the two operands
rather in between the two operands. x+y is written as +xy.

This Polish notation is obtained by representing the given expression by means of an
arborescence.
 A pendant vertex represents each variable or constant appearing in the
expression.
 Each internal vertex represents a binary operator having the two
subarborescences as its operands.
 To obtain the Polish notation for the expression, the arborescence formed is
traversed in pre-order.

Ordered Trees: In an expression arborescence the relative positions of the vertices in the
plane of the paper are important and must be preserved.
Theory
Ajay Kesharwani, Gr. Noida
United College of Engineering and Research, Greater Noida
A tree in which the relative order of subtrees meeting at each vertex must be preserved is
called an ordered tree or a planar tree.

A spanning arborescence in a connected digraph is a spanning tree that is an arborescence.
A spanning tree in an n-vertex connected digraph consists of n – 1 directed edges.
Enumeration of Graphs
Counting Simple Graphs:

For simple graphs with n distinguishable vertices and e edges (labeled graphs), the number
of ways of selecting e edges to form the graph is n(n-1)/2Ce, as there are n(n-1)/2 unordered
pairs of vertices.

Some of these graphs may be isomorphic (if labels are not considered). Hence the number of
simple unlabeled graphs of n vertices and e edges is much smaller than the number of simple
labeled graphs.

Among a collection of graphs, isomorphism is an equivalence relation. The number of
different unlabeled graphs equals the number of equivalence classes, under isomorphism of
the labeled graphs.

Theorem: The number of simple, labeled graphs of n vertices is
2n(n-1)/2
Counting Labeled Trees:

Cayley’s Theorem: There are nn-2 labeled trees with n vertices (n≥2)
Proof: Let the n vertices of tree T be labeled 1, 2, 3, …, n.
 Remove the pendant vertex having the smallest label, say a1.
 The vertex that was adjacent to a1 becomes b1.
 Among remaining n-1 vertices let a2 be the pendant vertex with smallest label and b2
be the vertex adjacent to a2.
Theory
Ajay Kesharwani, Gr. Noida
United College of Engineering and Research, Greater Noida
 Remove edge (a2, b2).
 Repeat the above operations for remaining n-2 vertices, and then for n-3 vertices, and
so on.
 The process terminates after n-2 steps, when only two vertices are left.
 The tree T is defined by the sequence (b1, b2, …, bn-2) ……(1) uniquely.
 Conversely, given a sequence of n-2 labels, an n-vertex tree can be constructed
uniquely.
 Determine the first number in the sequence (1, 2, 3, …, n) …(2) that does not appear
in sequence (1). (which is a1)
 Edge (a1, b1) is defined, and b1 is removed from sequence (1) and a1 from (2).
 In the remaining sequence of (2), find the first number that does not appear in the
remaining sequence of (1). (will be a2)
 Edge (a2, b2) is defined and a2, b2 are removed from the corresponding sequences as
above.
 Construction is continued till the sequence (1) has no element left.
 Finally the last two vertices left in sequence (2) are joined to get the desired tree.
 For each of the n-2 elements in sequence (1) we can choose any one of n numbers,
forming nn-2
(n-2)-tuples, each defining a distinct labeled tree of n vertices.
 Since each tree defines one of these sequences uniquely, hence the theorem.

Theorem: The number of different rooted, labeled trees with n vertices is nn-1.
Proof: For each of the nn-2 labeled trees we have n rooted labeled trees, since any of the n
vertices can be made a root.
Polya’s Counting Theorem:
Theory
Ajay Kesharwani, Gr. Noida
United College of Engineering and Research, Greater Noida

To understand Polya’s theorem, we need to define some additional concepts in
combinatorial theory.

Permutation: A permutation π is a one-one mapping from an object set A onto itself.
e.g. for A={a, b, c, d}
A permutation, π 1 = a b c d
bdca
π1(a) = b, π 1(b) = d, π 1(c) = c, π 1(d) = a
 The no of elements in the set on which a permutation is defined is called the degree
of the permutation.
 A digraph is also used to represent a permutation, in which each vertex represents an
element of the object set and the directed edges represent the mapping.
 The in-degree and the out-degree of every vertex in the digraph of a permutation is
one.
 Such digraphs can be decomposed into one or more vertex-disjoint directed circuits –
another permutation.
 Such directed circuits form cycles of the permutation, so π1 can be written as (a b
d)(c) – cyclic representation. The no of edges in a permutation cycle is called the
length of the cycle in the permutation.
 A permutation π of degree k is said to be of type (1, 2, …, k) if π has i cycles of
length i for i = 1, 2, …, k, e.g. permutation (a b d)(c) is of type (1, 0, 1, 0).
So, 11 + 22 + 33 + … + kk = k ……………. (1)
 Type of permutation can also be represented by a cycle structure of π, given by y11
y22 … ykk …………… (2) where y1, y2, …, yk are dummy variables, e.g. cycle
structure of eight-degree permutation (a b f)(c)(d e h)(g) is
y12 y20 y32 y40 y50 y60 y70 y80 = y12 y32
The subscript of yi indicates the length of the cycle and the
exponent indicates the number of cycles.
 On a set A with k objects there are a total of k! possible permutations including the
identity permutation, e.g. on a set of three elements {a, b, c}, following are the six
permutations
(a)(b)(c),
(a b)(c),
(a c)(b),
(a)(b c),
(a b c), (a c b)
Their cycle structures respectively are,
y13,
y1y2, y1y2, y1y2, y3, y3 …………………. (3)

Composition of Permutations:
Consider two permutations π1 = 1 2 3 4 5
and
π2 = 1 2 3 4 5
21453
34125
A composition of these two permutations π2 π1 is another permutation obtained by first
applying π1 and then applying π2 on the resultant, i.e.
π2 π1 (1) = π2 (2) = 4
π2 π1 (2) = π2 (1) = 3
π2 π1 (3) = π2 (4) = 2
π2 π1 (4) = π2 (5) = 5
π2 π1 (5) = π2 (3) = 1
Theory
Ajay Kesharwani, Gr. Noida
United College of Engineering and Research, Greater Noida
Hence, π2 π1 = 1 2 3 4 5
43251
Thus composition is a binary operation.

Permutation Group:
 A collection of m permutations P = { π1, π2, …, πm} on a set
A = {a1, a2, …, ak} forms a group under composition (closure,
associativity, identity and inverse). Such a group is called a
permutation group.
 The number of permutations m in a permutation group is called its order and the
number of elements in the object set on which the permutations are defined is called
the degree of permutation group.
 The set of all k! permutations on a set A of k elements forms a permutation group.
Such a group is of order k! and degree k and is called a full symmetric group, Sk.

Cycle Index of a Permutation Group: For a permutation group P, of order m, if we add the
cycle structures of all m permutations in P and divide the sum by m, we get an expression
called the cycle index Z(P) of P, e.g. cycle index of S3, the full symmetric group of degree
three, according to (3) is
Z (S3) = (y13 + 3y1y2 + 2y3)/3! ………………… (4)
The different types of permutations possible in S4, the full symmetric
group of degree four is given below:
Permutation Type
(4, 0, 0, 0)
(2, 1, 0, 0)
(1, 0, 1, 0)
(0, 2, 0, 0)
(0, 0, 0, 1)
Number of such
Permutations
Cycle Structures
y14
y12y2
y1y3
y22
y4
1
6
8
3
6
The cycle index of S4,
Z (S4) = (y14 +6y12y2 + 8y1y3 + 3y22 + 6y4)/4! ………………(5)
To display the variables involved, the cycle index of a permutation
group P is written as, Z (P) = Z (P; y1, y2, …, yk)

Equivalence Classes of Functions:
 Consider two sets D and R, and let f be a mapping which maps each element d from
domain D to a unique image f(d) in range R.
 Since each of the |D| elements can be mapped into any of the |R| elements, the number of
different functions from D to R is |R||D|.
 Let there is a permutation group P on the elements of set D. We define two mappings f1
and f2 as P-equivalent if there is some permutation π in P such that for every d in D we
have,
Theory
Ajay Kesharwani, Gr. Noida
United College of Engineering and Research, Greater Noida
f1(d) = f2[π(d)] ………………… (6)
 The above relationship is an equivalence relation1. Since P is a permutation group, it contains the identity
permutation, and thus reflexive.
2. If P contains permutation π, it also contains the inverse
permutation π-1, and thus symmetric.
3. If P contains permutations π1 and π2, it must also contain
π1π2, and thus transitive.
 All mappings from D to R are divided into equivalence classes by a permutation group P
defined on set D.

Polya’s Counting Theorem:
 Consider two finite sets, domain D and range R, with a permutation group P on D.
 To every pR, we assign a quantity w[p] called the content (or weight) of element p.
 A mapping f from D to R can be described by a sequence of |D| elements of set R such
that the ith element in the sequence is the image of the ith element of set D under f.
 Therefore, content W(f) of a mapping f is defined as the product of the contents of all its
images.
W(f) = ∏ w[f(d)] ………………. (7)
dD
 All functions belonging to the same equivalence class defined by (6) have identical
weights. Therefore, the weight of an entire equivalence class of functions from D to R is
the common weight of the functions in this class.
 So, our concern is to count the number of classes with various weights, given D, R,
permutation group P on D, and weights w[p] for each pR.
 In Polya’s terminology, elements p of set R are called figures and functions f from D to
R are called configurations.
 The weights of the elements of R can be expressed as powers of some common quantity
x. Now, the weight assignment to the elements of R can be described by a counting
series A(x)
A(x) = Σ∞ aqxq,
q=0
where aq is the number of elements in set R with weight xq.
 The number of configurations can be expressed in terms of another series called
configuration counting series B(x),
B(x) = Σ∞ bmxm,
m=0
where bm is the number of configurations having weight xm.
 Statement: The configuration-counting series B(x) is obtained by substituting the figurecounting series A(xi) for each yi in the cycle index Z (P; y1, y2, …, yk) of the permutation
group, i.e.
B(x) = Z(P; Σ aqxq, Σ aqx2q, Σ aqx3q, …, Σ aqxkq)
 Cycle Index of Pair Group: With respect to the permutation of n vertices of a graph G,
n(n-1)/2 unordered pair of vertices also get permuted.
If V = {a,b,c,d} be the set of vertices of a graph. A permutation
β= ab
cd
dbac
Theory
Ajay Kesharwani, Gr. Noida
United College of Engineering and Research, Greater Noida
on the vertices induces a permutation on six unordered vertex
β' = ab ac ad bc bd cd
db da dc ba bc ac
pairs:
Similarly, each of n! possible permutations on n vertices of a
graph results in
some permutation of the n(n-1)/2 unordered vertex pairs.
If set of permutations on set of vertices form a group, the induced
set
of
permutations on the pair of vertices also forms a
group.
Thus a full symmetric group Sn on n vertices of a graph induces
a group Rn of n!
permutations on the pairs of vertices. Such an
induced group is called the pair group
Rn, e.g. R4 induced by S4
Term in Z (S4) Induced Term in Z(R4)
y14
y12y2
y1y3
y22
y4
No of Permutations
y16
y12y22
y32
y1y22
y2y4
1
6
8
3
6
 So, cycle index of pair group R4 is
Z (R4) = (y16 + 9y12y22 +8y32 + 6y2y4)/24.
Graph Enumeration with Polya’s Theorem:

Enumeration of Simple Graphs: For a simple, unlabeled graph G of n vertices , a mapping
(configuration) from set D of all n(n-1)/2 unordered pair of vertices to a range R consisting
of two elements s (presence of an edge) and t (absence of edge) , with contents x1 and x0
respectively gives the figure counting series A(x) = Σ aqxq = 1 + x
The configuration-counting series is obtained by substituting 1+x for
y1, 1+x2 for y2,
3
1+x for y3 and so on in Z (Rn), Rn is the group of
permutations on the pairs of vertices
induced by Sn.
For example,
(1) For n =3,
Z (R3) = (y13 + 3y1y2 + 2y3)/6
The configuration-counting series,
B(x) = [(1+x)3 + 3(1+x)(1+x2) + 2(1+x3)]/6
= 1 + x + x2 + x3.
The coefficient of xi in B(x) gives the no of configurations with
content xi. The content
gives the number of edges in the corresponding graph.
Hence, the no of nonisomorphic simple graphs of three vertices with
0, 1, 2 and 3
edges is each one.
(2) For n = 4, substituting 1+xi for yi in,
Theory
Ajay Kesharwani, Gr. Noida
United College of Engineering and Research, Greater Noida
Z (R4) = (y16 + 9y12y22 +8y32 + 6y2y4)/24
we get,
B(x) = [(1+x)6 + 9(1+x)2(1+x2)2 + 8(1+x3)2 + 6(1+x2)(1+x4)]/24
= 1+ x + 2x2 + 3x3 + 2x4 + x5 + x6
The coefficient of xr gives the number of simple graphs with four vertices and r edges.
(3) For n = 5, substituting 1+xi for yi in,
Z (R5) = (y110 + 10y14y23 + 20y1y33 + 15y12y24 + 30y2y42
+ 20y1y3y6 + 24y52)/5!
we get,
B(x) =[(1+x)10 + 10(1+x)4(1+x2)3 + 20(1+x)(1+x3)3 + 5(1+x)2(1+x2)4
30(1+x2)(1+x4)2 + 20(1+x)(1+x3)(1+x6) + 24(1+x5)2]/120
= 1+ x + 2x2 + 4x3 + 6x4 + 6x5 + 6x6 + 4x7 + 2x8 + x9 + x10.
+
The coefficient of xr gives the no of simple graphs of five vertices and r edges.

Enumeration of Multigraphs: For Multigraphs of n vertices, in which at most two edges are
allowed between a pair of vertices, the domain and the permutation group remains the same
but the range is different- a pair of vertices may be joined by (1) no edge, (2) one edge, (3)
two edges, so range R contains three elements; s, t, u with contents x0, x1, x2 respectively and
xi indicates the presence of i edges between a vertex pair for i = 0, 1, 2. Thus, figurecounting series is
1 + x +x2
Substituting 1 + x + x2r for yr in Z (Rn) will give the configuration- counting series.
For n = 4,
Z (R4) = (y16 + 9y12y22 +8y32 + 6y2y4)/24.
B(x) = [(1+x+x2)10 + 9(1+x+x2)2(1+x2+x4)2 + 8(1+x3+x6)2 +
6(1+x +x4)(1+x4+x8)]/24
= 1+ x + 3x2 + 5x3 + 8x4 + 9x5 + 12x6 + 9x7 + 8x8 + 5x9 +
10
11
12
3x + x + x .
2
The coefficient of xi gives the no of distinct, unlabeled multigraphs of
i edges, with at most two parallel edges between
any vertex pair.
four vertices and
If we allow any no of parallel edges between a pair of vertices, the figure-counting
will be an infinite series
A(x) = 1 + x + x2 + x3 + … = 1/(1 – x)

series
Enumeration of Digraphs: For digraphs we consider n(n-1) ordered pairs of vertices
forming the domain. The permutation group will consist of permutations induced on all
ordered pairs of vertices by Sn. Hence, the cycle index of permutation group, Mn can be
obtained.
For n =4, the terms in Z (Mn) induced by each term in Z (Sn) are as
follows:
Theory
Ajay Kesharwani, Gr. Noida
United College of Engineering and Research, Greater Noida
Term in Z (S4)
y14
y12y2
y1y3
y22
y4
Induced Term in Z (M4)
y112
y12y25
y34
y26
y43
Z (M4) = (y112 + 6y12y25 + 8y34 + 3y26 + 6y43)/24
For simple digraphs, the figure-counting series is A(x) = 1 + x, as a
given
pair of vertices exists or does not exist. By substituting 1+xi for every yi, we
configuration-counting series for four- vertex, simple digraphs
B(x) = [(1+x)12 + 6(1+x)2(1+x2)5 + 8(1+x3)4 + 3(1+x2)6 + 6(1+x4)3]/24
= 1+ x + 5x2 + 13x3 + 27x4 + 38x5 + 48x6 + 38x7 + 27x8 + 13x9 +
5x10 + x11 + x12.
The coefficient of xj gives the number of simple digraphs with four
edges.
Theory
vertices
ordered
get the
and
Ajay Kesharwani, Gr. Noida
j