You are on page 1of 26

GRAPH THEORY AND ALGORITHMS

Pratima Panigrahi
Department of Mathematics
Indian Institute of Technology
Kharagpur 721302

p. 1/2
QUESTIONS:

(1) In any group of n persons (n 3), show that there are at


least two with the same number of friends.

(2) Suppose that not long after ABC-Corporation develops and


markets a computer chip, it happens that DEF-Corporation
markets a chip with striking operational similarities. Can
ABC-Corporation claim that DEFs circuitry is merely a
rearrangement of them?

(3) How do you construct a network of n stations connected by


e links in best possible way(in the sense that if some stations
or links are destroyed then the remaining should be able to
communicate) ? p. 2/2
(4) How many layers does a computer chip need for designing a
given circuit so that wires in the same layer do not cross
each other?

(5) In what order a traveling salesman should visit cities to


minimize his travel cost?

(6) There are m jobs and n people, n m, but not all are
qualified for all the jobs. Is it possible to fill up all the jobs
by qualified people?

p. 3/2
(7) Is it possible to color the map of any country using at the
most four colors such that states having common boundaries
do not get the same color ?

(8) Is it possible to make all the streets of a city one-way such


that a person can commute between any two stations?

(9) (Konigsberg seven bridge problem) In the river Pregel of


Konigsberg, there were two islands A and B, and were
connected to each other and to the banks C and D of the
river by seven bridges as in Fig.1. Then the problem is that "
Can you start at any of the land areas, walk through every
bridge exactly once and come back to the land of origin?"
p. 4/2
Konigsberg bridge problem was a long standing unsolved puzzle.
In 1736 mathematician Leonard Euler (1707-1783) settled this
negatively by giving systematic logic using graphs. And then he
became father of graph theory as well as topology.

p. 5/2
After Euler for about 100 years not much developments
were there in graph theory.
In 1847, G. R. Kirchhoff developed the theory of trees to
apply in electrical networks.
About ten years after Kirchhoff, Cayley also developed
theory of trees independently, to count isomers of saturated
hydrocarbons.
After that people like Hamilton, Mobius and others have
done some work.

p. 6/2
The subject has started seriously and systematically only
after 1920.
Within last 4-5 decades the subject has developed a lot.
Now Graph theory is one of the fast growing subjects
because of its applicability in various areas.

p. 7/2
Reference Books:
1. Introduction to graph theory, Douglas B. West.

2. Graph Theory and Its Applications, Jonathan L. Gross and Jay


Yellen.

3. Introduction to graph theory, G. Chartrand and P. Zhang,

p. 8/2
DEFINITION: An undirected graph (or simply a graph) G
is a pair (V, E) such that V is a nonempty set and E is a multi-set
of 1-subsets or 2-subsets of V .

p. 9/2
Elements of V are called vertices of G. Sometime vertex set
of G is denoted by V (G).
Elements of E are called edges of G. Sometime edge set of
G is denoted by E(G).
If l = {x, y} is an edge then x and y are called adjacent ,
otherwise non-adjacent .
If l = {x, y} is an edge then x and y are also called
neighbor of each other, otherwise non-neighbor .
Edge l = {x, y} is called incident on vertices x and y. And
x and y are called end on vertices of l.

p. 10/2
An edge of the form {x, x} = {x} is called a self loop or
simply a loop.
If an edge appears more than once then it is called a parallel
edge or a multiple edge.

p. 11/2
DEFINITION: An undirected graph free from self loops and
having no multiple edges is called a simple graph.

DEFINITION: A complete graph G is a simple graph in


which E(G) is consists of all possible 2-subsets of V (G). A com-
plete graph on n vertices is denoted by Kn .

DEFINITION: The complement of a simple graph G, de-


noted by Gc or G, is a graph with vertex set same as G, i.e. V (G),
and two vertices are adjacent in Gc if and only if they are not
adjacent in G.

p. 12/2
DEFINITION: Degree of a vertex x, denoted by deg(x) or
degx or d(x), is the number of edges incident on x where loops
are counted twice.

First Theorem of Graph Theory

In every graph G
X
degx = 2e
xV (G)

where e is the total number of edges in G.

Corollary: In every graph, the total number of vertices of odd


degree is even.
p. 13/2
DEFINITION: Vertices of degree zero are called isolated
vertices.

DEFINITION: Vertices of degree one are called pendant


vertices. An edge l is called a pendant edge if exactly one of
its end vertices is a pendant vertex.

DEFINITION: A graph G is called regular if degree of every


vertex is the same. Moreover, if degree of every vertex is d then
the graph is called d-regular. Kn is example of an (n1)-regular
graph.

p. 14/2
DEFINITION: A graph H is called a subgraph of graph G
if V (H) V (G) and E(H) E(G).

DEFINITION: A subgraph H of graph G is called an


induced subgraph if H contains all the edges of G whose both
the end vertices are in H.

p. 15/2
DEFINITION: A clique in a graph is a set of pairwise ad-
jacent vertices. In other words an induced subgraph which is a
complete graph is a clique in the graph.

DEFINITION:An independent set in a graph is a set of pair-


wise non-adjacent vertices. In other words an induced subgraph
which is complement of a complete graph is independent set or a
co-clique in the graph.

p. 16/2
DEFINITION: For vertices u and v (not necessarily dis-
tinct) in graph G, a u-v walk W in G is an alternating sequence
W : u = v0 e1 v1 e2 v2 . . . ek vk = v of vertices and edges,
starting at u and ending at v such that every edge is incident on
vertices preceding and following it, ei = {vi1 , vi }, 1 i k. If
u = v then the walk is called a closed walk, otherwise an open
walk.The number k is called the length of the walk. In other
words length of a walk is the number edges (with counting multi-
plicity) appear in the walk.

p. 17/2
DEFINITION: A trail is a walk where no edge repeats, that
is, all the edges are distinct (vertices may repeat).

DEFINITION: A path is an open walk where all the vertices


are distinct. A path on n vertices is denoted by Pn .

DEFINITION: A cycle is a closed walk where all the ver-


tices are distinct except the end vertices. A cycle on n vertices is
denoted by Cn .

p. 18/2
PROPOSITION: Every u v open walk in a graph contains
a u v path.

DEFINITION: A graph G is said to be connected if for every


pair of vertices u and v in G there is a u v path in G.

p. 19/2
DEFINITION: Maximal connected subgraphs of G are called
components of G. (Here maximal means not contained in any
other connected subgraph)

DEFINITION: A vertex v (respectively an edge l) of a graph


G is called a cut-vertex ( respectively cut-edge) if removal of v
(respectively removal of l) increases the number of components
of G.

p. 20/2
DEFINITION: Let G be a loop less graph on n vertices. The
adjacency matrix of G, denoted by A(G), is an n n matrix
whose rows and columns are indexed by vertices of G, and (i, j)th
entry is equal to the number of edges between the ith and j th ver-
tices.

REMARK: 1. The sum of all entries in vth row or vth column


of A(G) is equal to degree of v.

2. If G is a simple graph then all the entries of A(G) are either 0


or 1.

p. 21/2
DEFINITION: Let G be a graph on n vertices and e edges.
The incidence matrix of G, denoted by I(G), is an n e matrix
whose rows are indexed by the vertices and columns are indexed
by the edges of G, and (i, j)th entry is equal to 1 if the ith vertex
is an end vertex of the j th edge, zero otherwise.

THEOREM: Let G be a loop less graph having V (G) =


{v1 , v2 , . . . , vn }, and A be the adjacency matrix of G. For any
integer k 1, the (i, j)th entry of Ak is equal to the total number
of vi vj walk of length k.

p. 22/2
GRAPH ISOMORPHISM

DEFINITION: Graphs G and H are said to be isomorphic


if there exists a bijection f : V (G) V (H) such that {x, y}
E(G) if and only if {f (x), f (y)} E(H). This mapping f is
called an isomorphism from G to H.

Degree Sequence: It is the sequence of degrees of vertices


arranged in non-increasing order.

p. 23/2
PROBLEMS
(1) Let M = (aij ) be an n m matrix. Consider a graph G
whose vertices are the entries of M and two vertices are
adjacent if they lie in the same row or same column. Then
(a) Find the total number of vertices of G?
(b) Is G a regular graph? If yes, then find the degree of
regularity.
(c) Find the total number of edges of G.

(2) In any group of n persons (n 3), show that there are at


least two with the same number of friends.

(3) Prove that if a graph has exactly two vertices of odd degree
then there must be a path in the graph joining them. p. 24/2
(4) Prove or disprove: If every vertex of a simple graph G has
degree 2 then G is a cycle.

(5) If G is a simple graph with n vertices and the minimum


degree (G) n1 2
then prove that G is connected.

(6) Show by means of an example that the condition


(G) n2
2
for a simple graph G, need not imply that G is
connected.

p. 25/2
(7) Let G be a graph in which there is no pair of adjacent edges. What
can you say about the degrees of the vertices in G.

(8) Let G be a graph with n vertices and e edges. Let m be the


smallest positive integer such that m 2e
n . Prove that G has a
vertex of degree at least m.

(9) Let G be a graph with n vertices and exactly n 1 edges. Prove


that G has either a pendant vertex or an isolated vertex.

(10) Prove that in a group of six people, there must be three people who
are mutually acquainted or three people who are mutually
non-acquainted.

(11) A simple graph with n vertices and k components can have at most
(nk)(nk+1)
2 edges.
p. 26/2

You might also like