Sei sulla pagina 1di 123

Visit & Downloaded from : www.LearnEngineering.

in

ENGINEERING COLLEGES
2016 – 17 Odd Semester

IMPORTANT QUESTIONS & ANSWERS

Department of CSE
SUBJECT CODE: CS6702

SUBJECT NAME: GRAPH THEORY AND APPLICATIONS

Regulation: 2013

Year and Semester: IV Year/ 07 Semester

Copyright © SCAD

Visit & Downloaded from : www.LearnEngineering.in


Visit & Downloaded from : www.LearnEngineering.in

SYLLABUS

CS6702 GRAPH THEORY AND APPLICATIONS LTPC


3003

OBJECTIVES:

The student should be made to:

 Be familiar with the most fundamental Graph Theory topics and results.
 Be exposed to the techniques of proofs and analysis.

UNIT I INTRODUCTION 9

Graphs – Introduction – Isomorphism – Sub graphs – Walks, Paths, Circuits –


Connectedness –Components – Euler graphs – Hamiltonian paths and circuits – Trees
– Properties of trees – Distance and centers in tree – Rooted and binary trees.

UNIT II TREES, CONNECTIVITY & PLANARITY 9

Spanning trees – Fundamental circuits – Spanning trees in a weighted graph – cut sets
– Properties of cut set – All cut sets – Fundamental circuits and cut sets –
Connectivity and separability – Network flows – 1-Isomorphism – 2-Isomorphism –
Combinational and geometric graphs – Planer graphs –Different representation of a
planer graph.

UNIT III MATRICES, COLOURING AND DIRECTED GRAPH 8

Chromatic number – Chromatic partitioning – Chromatic polynomial – Matching –


Covering – Four color problem – Directed graphs – Types of directed graphs –
Digraphs and binary relations – Directed paths and connectedness – Euler graphs.

UNIT IV PERMUTATIONS & COMBINATIONS 9

Fundamental principles of counting - Permutations and combinations - Binomial


theorem -combinations with repetition - Combinatorial numbers - Principle of
inclusion and exclusion -Derangements - Arrangements with forbidden positions.

UNIT V GENERATING FUNCTIONS 10

Generating functions - Partitions of integers - Exponential generating function –


Summation operator - Recurrence relations - First order and second order – Non-
homogeneous recurrence relations -Method of generating functions.

TOTAL: 45 PERIODS

Visit & Downloaded from : www.LearnEngineering.in


Visit & Downloaded from : www.LearnEngineering.in

OUTCOMES:

 Upon Completion of the course, the students should be able to:


 Write precise and accurate mathematical definitions of objects in graph theory.
 Use mathematical definitions to identify and construct examples and to
distinguish examples from non-examples.
 Validate and critically assess a mathematical proof.
 Use a combination of theoretical knowledge and independent mathematical
thinking in creative investigation of questions in graph theory.
 Reason from definitions to construct mathematical proofs.

TEXT BOOKS:

1. Narsingh Deo, ―Graph Theory: With Application to Engineering and Computer


Science‖,Prentice Hall of India, 2003.

2. Grimaldi R.P. ―Discrete and Combinatorial Mathematics: An Applied


Introduction‖, Addison Wesley, 1994.

REFERENCES:

1. Clark J. and Holton D.A, ―A First Look at Graph Theory‖, Allied Publishers, 1995.

2. Mott J.L., Kandel A. and Baker T.P. ―Discrete Mathematics for Computer
Scientists and Mathematicians‖, Prentice Hall of India, 1996.

3. Liu C.L., ―Elements of Discrete Mathematics‖, Mc Graw Hill, 1985.

4. Rosen K.H., ―Discrete Mathematics and Its Applications‖, Mc Graw Hill, 2007.

Visit & Downloaded from : www.LearnEngineering.in


Visit & Downloaded from : www.LearnEngineering.in

TABLE OF CONTENTS

PAGE
S.NO CONTENTS
NO
1 Aim and objective 1
2 Detailed Lesson plan 2
Unit I – Introduction
3 PART A 5
4 PART B 11
5 GRAPH 11
6 THEOREMS IN GRAPHS 13
7 WALK,PATH AND CIRCUIT 14
8 GRAPH OPERATIONS 15
9 THEOREMS IN EULER GRAPHS 17
10 THEOREMS IN TREES 18
Unit II - Trees, connectivity & planarity
11 PART A 22
12 PART B 30
13 SPANNING TREES 30
14 CUT-SET 32
15 PLANAR GRAPHS 35
16 MINIMAL SPANNING TREES 40
17 NETWORK FLOWS 42
EDGE CONNECTIVITY AND VERTEX
18 45
CONNECTIVITY
19 FUNDAMENTAL CIRCUITS 48
Unit III - Matrices, colouring and directed graph
20 PART A 50

Visit & Downloaded from : www.LearnEngineering.in


Visit & Downloaded from : www.LearnEngineering.in

PAGE
S.NO CONTENTS
NO
21 PART B 57
22 CHROMATIC PARTITIONING 57
23 CHROMATIC POLYNOMIAL 60
24 MATCHING 65
25 FOUR COLOR PROBLEM 67
26 DIRECTED GRAPH 69
DIRECTED PATHS AND
27 73
CONNECTEDNESS
Unit IV Permutations & Combinations
28 PART A 75
29 PART B 80
30 ARRANGEMENTS 80
31 BINOMIAL THEOREM 81
32 COMBINATIONS 82
33 PERMUTATIONS 83
34 DERANGEMENTS 85
35 INCLUSION AND EXCLUSION 87

Unit V - Generating Functions


35 Part A 89
36 Part B 94
Industrial/Practical Connectivity of the
37 104
subject
NOV /DEC - 2016 & APR /MAY -2017 Question
38 106
papers

ADDITIONAL QUESTIONS WITH ANSWERS


39 113
(Part-A and Part-B)

Visit & Downloaded from : www.LearnEngineering.in


Visit & Downloaded from : www.LearnEngineering.in

AIM AND OBJECTIVE OF THE SUBJECT

The student should be made to:

 Be familiar with the most fundamental Graph Theory topics and results.
 Be exposed to the techniques of proofs and analysis.

Need and Importance for Study of the Subject:

 Graph Theory and Applications teaches how to write precise and accurate
mathematical definitions of objects in graph theory.
 It uses mathematical definitions to identify and construct examples and to
distinguish examples from non-examples.
 It holds importance in such a way to validate and critically assess a
mathematical proof.
 This subject uses a combination of theoretical knowledge and independent
mathematical thinking in creative investigation of questions in graph theory.

Visit & Downloaded from : www.LearnEngineering.in


DETAILED
Visit & Downloaded LESSON
from PLAN
: www.LearnEngineering.in
Text Book:
1. Narsingh Deo, ―Graph Theory: With Application to Engineering and Computer
Science‖,Prentice Hall of India, 2003. (Available in the library)
2. Grimaldi R.P. ―Discrete and Combinatorial Mathematics: An Applied
Introduction‖, Addison Wesley, 1994. (Available in the library)

References:
1. Clark J. and Holton D.A, ―A First Look at Graph Theory‖, Allied Publishers,
1995.
2. Mott J.L., Kandel A. and Baker T.P. ―Discrete Mathematics for Computer
Scientists and Mathematicians‖ , Prentice Hall of India, 1996.
3. Liu C.L., ―Elements of Discrete Mathematics‖, Mc Graw Hill, 1985.
4. Rosen K.H., ―Discrete Mathematics and Its Applications‖, Mc Graw Hill, 2007.

S. Unit Hrs Cumulative Books


Topic/Portions to be covered
No No Req Hrs Referred
UNIT I INTRODUCTION
1 I Graphs – Introduction 1 1 T1

2 I Isomorphism 1 2 T1
Sub graphs –
3 I 1 3 T1
Walks, Paths, Circuits
4 I Connectedness –Components 1 4 T1

5 I Euler graphs 1 5 T1

6 I Hamiltonian paths and circuits 1 6 T1

7 I Trees – Properties of trees 1 7 T1

8 I Distance and centers in tree 1 8 T1

9 I Rooted and binary trees 1 9 T1

UNIT II TREES, CONNECTIVITY & PLANARITY


Spanning trees – Fundamental
10 II 1 10 T1
circuits
11 II Spanning trees in a weighted graph 1 11 T1

12 II Cut sets – Properties of cut set 1 12 T1

Visit & Downloaded from : www.LearnEngineering.in


7
S. Unit Hrs Cumulative
Visit & Downloaded from : www.LearnEngineering.in Books
Topic/Portions to be covered
No No Req Hrs Referred
All cut sets – Fundamental circuits
13 II 1 13 T1
and cut sets
14 II Connectivity and separability 1 14 T1

15 II Network flows 1 15 T1

16 II 1-Isomorphism – 2-Isomorphism 1 16 T1
Combinational and geometric
17 II 1 17 T1
graphs

Planar graphs –Different


18 II 1 18 T1
representation of a planar Graph

UNIT III MATRICES, COLOURING AND DIRECTED GRAPH


Chromatic number – Chromatic
19 III 1 19 T1
partitioning
20 III Chromatic polynomial – Matching 1 20 T1

21 III Covering 1 21 T1

22 III Four color problem 1 22 T1

23 III Directed graphs 1 23 T1

24 III Types of directed graphs 1 24 T1

25 III Digraphs and binary relations 1 25 T1

26 III Directed paths and connectedness 1 26 T1

27 III Euler graphs 1 27 T1

UNIT IV PERMUTATIONS & COMBINATIONS


Fundamental principles of
28 IV 1 28 T2
counting
29 IV Permutations and combinations 1 29 T2

30 IV Binomial theorem 1 30 T2

31 IV Combinations with repetition 2 32 T2

32 IV Combinatorial numbers 2 34 T2

Visit & Downloaded from : www.LearnEngineering.in


8
S. Unit Hrs Cumulative
Visit & Downloaded from : www.LearnEngineering.in Books
Topic/Portions to be covered
No No Req Hrs Referred
Principle of inclusion and T2
33 IV 1 35
exclusion
34 IV Derangements 1 36 T2

Arrangements with forbidden T2


35 IV 1 37
positions
UNIT V GENERATING FUNCTIONS

37 V Generating functions 1 38 T2

38 V Partitions of integers 1 39 T2

39 V Exponential generating function 2 41 T2

40 V Summation operator 1 42 T2

41 V Recurrence relations 2 44 T2

42 V First order and second order 1 45 T2

Non-homogeneous recurrence T2
43 V 2 47
relations
44 V Method of generating functions 2 49 T2

Visit & Downloaded from : www.LearnEngineering.in


9
UNIT
Visit & Downloaded from I
: www.LearnEngineering.in
INTRODUCTION

Graphs – Introduction – Isomorphism – Sub graphs – Walks, Paths, Circuits –


Connectedness –Components – Euler graphs – Hamiltonian paths and circuits –
Trees – Properties of trees – Distance and centers in tree – Rooted and binary trees.

PART A

1. Define the degree of a vertex in a graph.

The number of edges incident on a vertex vi, with self-loops counted twice, is
called the degree d(vi) of vertex vi. Its also known as its valency.
e.g.

Here d(v1)= d(v3)= d(v4)=3, d(v2)=4, d(v5)=1.

2. Define isomorphism in graphs.

Two graphs G and G‘ are said to be isomorphic if there is a one-to-one


correspondence between their vertices and between their edges such that the
incidence relationship is preserved. Suppose the edge e is incident on vertices v1, v2
in G, then the corresponding edge e‘ in G‘ must be incident on the vertices v1‘, v2‘ that
correspond to v1, v2 respectively.
e.g

The vertices a, b, c, d, e corresponds to v1, v2, v3, v4, v5. The edges 1, 2, 3, 4, 5, 6
correspond to e1, e2, e3, e4, e5, e6.

Two isomorphic graphs must have

Visit & Downloaded from : www.LearnEngineering.in


10
 The same number of vertices from : www.LearnEngineering.in
Visit & Downloaded
 The same number of edges
 An equal number of vertices with a given degree

3. Define subgraph.

A graph g is said to be a subgraph of a graph G, if all the vertices and all the
edges of g are in G, and each edge of g has the same end vertices in g as in G.

First is a subgraph of second figure.

4. Define multi graph?

A graph which contains multiple edges (parallel edges) but no loops is called
multi graph.
e.g.
v1

v3
v2

5. Define connected and disconnected graph.

Graph G is said to be connected if there is at least one path between every


pair of vertices in G. We can reach any vertex from any other vertex by travelling
along the edges. Otherwise it is disconnected. A null graph of more than one vertex
is disconnected.
e.g A connected graph

Visit & Downloaded from : www.LearnEngineering.in


11
e.g Disconnected
Visit & Downloaded graph
from : www.LearnEngineering.in

6. Define component.

A disconnected graph consists of two or more connected graphs. Each of


these connected subgraphs is called a component. Consider a vertex vi, in a
disconnected graph G. By definition not all vertices of G are joined by paths to v i.
Vertex vi and all the vertices of G that have paths to vi, together with all the edges
incident on them form a component. A component itself is a graph.
e.g. Disconnected graph with two components

7. Define pendant vertex.

A vertex of degree one is called pendant vertex or an end vertex.

Here v3 is an end vertex.

8. What is Euler graph?


Give an example of an Euler graph which is arbitrarily traceable.

Euler graph:

Visit & Downloaded from : www.LearnEngineering.in


12
If some closed walk
Visit & in a graph
Downloaded contains
from all the edges of the graph then the
: www.LearnEngineering.in
walk is called an Euler line and the graph an Euler graph. An Euler graph is always
connected.
e.g.

An example of an Euler graph which is arbitrarily traceable.

The above figure is an Euler graph which is arbitrarily traceable from the vertex c.

9. What is a Hamiltonian circuit?

A Hamiltonian circuit in a connected graph is defined as a closed walk that


traverses every vertex of G exactly once except of course the starting vertex, at
which the walk also terminates.
e.g.

A circuit in a connected graph G is said to be Hamiltonian if it includes every


vertex of G. Hence a Hamiltonian circuit in a graph of n vertices consists of exactly n
edges.

Visit & Downloaded from : www.LearnEngineering.in


13
Visit & Downloaded from : www.LearnEngineering.in

Graph without Hamiltonian circuit.

10. What is a complete graph?

A simple graph in which there exists an edge between every pair of vertices is
called a complete graph. It is also referred to as a universal graph. In a complete
graph every pair of vertices are adjacent. A complete graph with n ≥ 2 vertices in
denoted by Kn.

Since every vertex is joined with every other vertex through one edge, the
degree of every vertex is n-1 in a complete graph G of n vertices. The total number
of edges in G is n (n-1)/2.
e.g.

11. What is a tree?

A tree is a connected graph without any circuits. As a graph must have at least
one vertex, a tree also must have at least one vertex.
e.g.

Visit & Downloaded from : www.LearnEngineering.in


14
Visit & Downloaded from : www.LearnEngineering.in

12. Define eccentricity of a 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. That is

13. Define center of a graph.

A vertex with minimum eccentricity in a graph G is called a center of G.

The eccentricities of four vertices are E(a)=2, E(b)=1, E(c)=2 and E(d)=2.
Hence vertex b is the center of the tree. In a graph that consists of just a circuit,
every vertex is a center.

14. What is a binary tree?

A binary tree is defined as a tree in which there is exactly one vertex of degree
2, and each of the remaining vertices is of degree one or three. Since the vertex of
degree 2 is distinct from all other vertices this vertex serves as a root. Thus every
binary tree is a rooted tree.
Two properties of binary trees are
 The number of vertices n in a binary tree is always odd.
 Let p be the number of pendent vertices in a binary tree T.
p = (n + 1) / 2

15. Define labelled graph.

A graph in which each vertex is assigned a unique name or label is called a


labelled graph.
e.g.

Visit & Downloaded from : www.LearnEngineering.in


15
Visit & Downloaded from : www.LearnEngineering.in

PART B

1. GRAPH

 Define with an example : (i) Graph (ii) Directed Graph (iii) Finite and
Infinite Graphs

(i) Graph
A Graph G= (V, E) consists of a set of objects V= {v1, v2, ……..} called
vertices, and another set E= {e1,e2,…….}, whose elements called edges, such that
each edge ek is identified with an unordered pair (vi, vj) of vertices. The vertices vi, vj
associated with the edge ek are called end vertices of ek. The most common
representation of a graph is by means of a diagram, in which the vertices are
represented as points and each edge as a line segment joining its end vertices.
e.g. A Graph with five vertices and seven edges.

V={v1,v2,v3,v4,v5} E={e1,e2,e3,e4,e5, e6,e7}

(ii) Directed Graph


A directed Graph G consists of a set of series V= {v1, v2, ……..}, a set of
edges E= {e1,e2,…….}, and a mapping ѱ that maps every edge onto some ordered
pair of vertices (vi, vj).

Visit & Downloaded from : www.LearnEngineering.in


16
Visit & Downloaded from : www.LearnEngineering.in

Directed graph with 5vertices and 10 edges

(iii) Finite and Graphs Infinite


A graph with a finite set of vertices as well as with a finite set of edges is
called a finite graph. otherwise it is an infinite graph.
e.g. Finite graph

Here V={ v1,v2,v3,v4,v5} and E= E={e1,e2,e3,e4,e5, e6,e7}

Infinite graph

Are portions of two infinite groups.

2. THEOREMS IN GRAPHS

 Prove that

Visit & Downloaded from : www.LearnEngineering.in


17
(a) If a graph
Visithas exactly twofrom
& Downloaded vertices of odd degree, there must be a path
: www.LearnEngineering.in
joining these two vertices.
(b) The number of vertices of odd degree in a graph is always even.

Proof:

(a) If a graph has exactly two vertices of odd degree, there must be a path
joining these two vertices.

Let G be a graph with all even vertices except vertices v1 and v2 which are
odd. By the theorem the number of vertices of odd degree in a graph is always even,
for every component of a disconnected graph, no graph can have an odd number of
odd vertices. Therefore in a graph G, v1, v2 must belong to the same component, and
hence must have a path between them.

(b) The number of vertices of odd degree in a graph is always even.

If we consider the vertices with odd and even degrees separately, the quantity

in the left side of can be expressed as the sum of two sums, each
taken over vertices of even and odd degrees, respectively as follows

Since the LHS is even and the first expression of the RHS is even, the second
expression of the RHS must also be even.

= an even number. Because each d(vk) is odd, the total number of terms in
the sum must also be even. Hence proved.

3. WALK, PATH, CIRCUIT

 Define the term Walk, Path, Circuit with an example.

Walk:
A walk is defined as a finite alternating sequence of vertices and edges,
beginning and ending with vertices, such that each edge is incident with the vertices
preceding and following it. No edge appears more than once in a walk. A vertex may
appear more than once. A walk is also referred to as an edge train or a chain.

Visit & Downloaded from : www.LearnEngineering.in


18
Visit & Downloaded from : www.LearnEngineering.in

Here v1 a v2 b v3 c v3 d v4 e v2 f v5 is a walk.
The set of vertices and edges constituting a given walk in a graph G is a subgraph of
G. Vertices with which a walk begins and ends are called terminal vertices. v1 and v5
are the terminal vertices.

Closed walk:
A walk which begins and ends at the same vertex is a closed walk.

Open walk :
A walk that is not closed is called as a open walk.

Path:
An open walk in which no vertex appears more than once is called a path. A path
does not intersect itself.
Here v1 a v2 b v3 d v4 is a path. But v1 a v2 b v3 c v3 d v4 e v2 f v5 is not a path.

Circuit:
A closed walk in which no vertex appears more than once is called a circuit. A circuit
is a closed, non intersecting walk.
e.g. v2 b v3 d v4 e v2 is a circuit.
4. GRAPH OPERATIONS

 Define the following operations on the graphs with example :


(i) Union
(ii) Intersection
(iii) Ring sum
(iv) Deletion
(v) Complement

(i) Union
The union of two graphs G1=(V1, E1) and G2=(V2, E2) is another graph G3 whose
vertex set V3= V1 U V2 and the edge set E3 = E1 U E2.

(ii) Intersection

Visit & Downloaded from : www.LearnEngineering.in


19
1 ∩ &
The intersection GVisit G2Downloaded
of graphs Gfrom
1 and: www.LearnEngineering.in
G2 is a graph G4 consisting only of those
vertices and edges that are in both G1 and G2.
(iii) Ring sum

The ring sum of two graphs G1 and G2 is a graph consisting of the


vertex set V1 U V2 and of edges that are either in G1 or G2, but not in both.
e.g.

Union, intersection and ring sum of two graphs


(iv) Deletion

If vi is a vertex in a graph G, then G – vi denotes a subgraph of G obtained by


deleting vi from G. Deletion of a vertex always implies the deletion of all edges
incident on that vertex vi. .This subgraph G - vi, is referred to as vertex deleted
subgraph of G.

If ej is an edge in a graph G, then G – ej denotes a subgraph of G obtained by


deleting ej from G. Deletion of an edge does not imply deletion of its end vertices.
This subgraph, G – ej, is referred to as edge – deleted subgraph of G.

Visit & Downloaded from : www.LearnEngineering.in


20
Visit & Downloaded from : www.LearnEngineering.in

Vertex deletion and edge deletion


(iv) Complement

If g is a subgraph of G, then is by definition that subgraph of G which


remains after all the edges in g have been removed from G. Therefore is
written as G – g whenever So is called the complement of
g in G.
e.g.

Is a complete graph with 4 vertices. Simple graph G is

Is complement of G.
5. THEOREMS IN EULER GRAPHS

 Prove the following.

(a) A connected graph is an Euler graph if and only if every vertex has even
degree.
(b) A connected graph is an Euler graph if and only if it can be decomposed into
circuits.

Visit & Downloaded from : www.LearnEngineering.in


21
(a) A connected Visit
graph is an Eulerfrom
& Downloaded graph if and only if every vertex has even
: www.LearnEngineering.in
degree.

Suppose that G is an Euler graph. It therefore contains an Euler line which is a


closed walk. In tracing this walk we observe that every time the walk meets a vertex
v it goes through two new edges incident on v with one we entered v and with the
other exited. This is true not only of all intermediate vertices of the walk but also of
the terminal vertex, because we exited and entered the same vertex at the beginning
and end of the walk, respectively. Thus if G is an Euler graph the degree of every
vertex is even.

To prove the sufficiency of the condition, assume that all vertices of G are of
even degree. Now we construct a walk starting at an arbitrary vertex v and going
through the edges of G such that no edge is traced more than once. We continue
tracing as for as possible. Since every vertex is of even degree, we can exit from
every vertex we enter; the tracing cannot stop at any vertex but v. And since v is also
of even degree, we shall eventually reach v when the tracing comes to an end. If this
closed walk h we just traced includes all the edges of G, G is an Euler graph. If not,
we remove from G all the edges in h and obtain a subgraph h‘ of G formed by the
remaining edges. Since both G and h have all their vertices of even degree, the
degrees of the vertices of h‘ are also even. Moreover, h‘ must touch h at least at one
vertex a, because G is connected. Starting from a, we can again construct a new walk
in graph h‘. Since all the vertices of h‘ are of even degree, this walk in h‘ must
terminate at a vertex a; but this walk in h‘ can be combined with h to form a new
walk which starts and ends at vertex v and has more edges than h. This process can
be repeated until we obtain a closed walk that traverses all the edges of G. Thus G is
an Euler graph.

(b) A connected graph is an Euler graph if and only if it can be decomposed into
circuits.

Proof:
Suppose graph G can be decomposed into circuits; that is, G is a union of
edge disjoint circuits. Since the degree of every vertex in a circuit is two, the degree
of every vertex in G is even. Hence G is an Euler graph.

Conversely, let G be an Euler graph. Consider a vertex v1. There are at least
two edge incident at v1. Let one of these edges be between v1 and v2. Since vertex v2
is also of even degree, it must have at least another edge, say between v2 and v3.
Proceeding in this fashion, we eventually arrive at a vertex that has previously been
traversed, thus forming a circuit Г. Let us remove Г from G. All vertices in the

Visit & Downloaded from : www.LearnEngineering.in


22
remaining graph Visit
must&also be of even
Downloaded fromdegree. From the remaining graph remove
: www.LearnEngineering.in
another circuit in exactly the same way as we removed Г from G. Continue this
process until no edges are left. Hence the theorem.

6. THEOREMS IN TREES

 Prove the following.


(a) Every tree has either one or two centers.
(b) A graph is a tree if and only if it is minimally connected.
(c) Number of vertices in a binary tree is always odd.
(d) Number of pendent vertices in a binary tree is (n + l ) / 2 .
(e) If in a Graph G, there is one and only one path between every pair of
vertices, G is tree.
(f) A tree with n vertices has n-1 edges.

(a) Every tree has either one or two centers.

Proof:
The maximum distance, max d(v, vi), from a given vertex v to any other
vertex vi occurs only when vi is a pendant vertex. With this observation, let us start
with a tree T having more than two vertices. Tree T must have two or more pendant
vertices. Delete all the pendant vertices from T. The resulting graph T‘ is still a tree.
The removal of all pendant vertices from T uniformly reduced the eccentricities of
the remaining vertices by one. Therefore all vertices that T had as centers will remain
centers in T‘. From T‘ we can again remove all pendant vertices and get another tree
T‘‘. We continue this process until there is left either a vertex which is the center of T
or an edge whose end vertices are the two centers of T. Thus the theorem.

Visit & Downloaded from : www.LearnEngineering.in


23
Visit & Downloaded from : www.LearnEngineering.in

(b) A graph is a tree if and only if it is minimally connected.

Proof:
To interconnect n distinct points, the minimum number of line segments needed is n
– 1. The resulting structure is a tree.

(c) Number of vertices in a binary tree is always odd.

Proof:
This is because there is exactly one vertex of even degree, and the remaining n – 1
vertices are of odd degrees. Since the number of vertices of odd degrees is even, n –
1 is even. Hence n is odd.

(d) Number of pendent vertices in a binary tree is (n + l ) / 2 .

Proof:
Let p be the number of pendent vertices in a binary tree T. Then n – p – 1 is the
number of vertices of degree three. Therefore the number of edges in equals

Hence

Visit & Downloaded from : www.LearnEngineering.in


24
Visit & Downloaded from : www.LearnEngineering.in

(e) If in a Graph G, there is one and only one path between every pair of
vertices, G is tree.
Proof:

Existence of a path between every pair of vertices assures that G is connected.


A circuit in a graph implies that there is at least one pair of vertices a, b such that
there are two distinct paths between a and b. Since G has one and only one path
between every pair of vertices, G can have no circuit. Therefore, G is a tree.

(f) A tree with n vertices has n-1 edges.

Proof:
The theorem will be proved by induction on the number of vertices. It is true
for n=1,2, and 3.

Tree T with n vertices

Assume that the theorem holds for all trees with fewer than n vertices.
Consider a tree with n vertices. In T let ek be an edge with end vertices vi and vj.
Since there is one and only one path between every pair of vertices in a tree, there is
no other path between vi and vj except ek. Therefore deletion of ek from T will
disconnect the graph. Also T - ek consists of exactly two components, and since there
were no circuits in T to begin with, each of these components is tree. Both these trees
t1 and t2 have fewer than vertices each, and therefore by the induction hypothesis,
each contains one less edge than the number of vertices in it. Thus T – ek consists of
n – 2 edges. Hence T has exactly n – 1 edges.

Visit & Downloaded from : www.LearnEngineering.in


25
Visit & Downloaded from : www.LearnEngineering.in

UNIT II

TREES, CONNECTIVITY & PLANARITY

Spanning trees – Fundamental circuits – Spanning trees in a weighted graph – cut


sets – Properties of cut set – All cut sets – Fundamental circuits and cut sets –
Connectivity and separability – Network flows – 1-Isomorphism – 2-Isomorphism–
Combinatorial and geometric graphs – Planer graphs – Different representation of a
planer graph.

PART-A

1.What is a Spanning tree?

A tree T is said to be a spanning tree of a connected graph G if T is a subgraph


of G and T contains all vertices of G.

Visit & Downloaded from : www.LearnEngineering.in


26
e.g. the subgraph in heavy
Visit lines is a spanning
& Downloaded tree of the graph.
from : www.LearnEngineering.in

2. What is fundamental circuit?

A circuit formed by adding a chord to a spanning tree is called a fundamental


circuit. That is, Consider a spanning tree T of a connected graph G. Let ci be a chord
with respect to T and let the fundamental circuit made by ci be called Г, consisting of
k branches b1, b2, ….., bk in addition to the chord ci; that is Г = {ci, b1, b2, ….., bk} is
a fundamental circuit with respect to T.

3. Define the cut set of a graph.

A cut-set can be defined as a minimal set of edges in a connected graph whose


removal reduces the rank of the graph by one.
Or If we partition all the vertices of a connected graph G 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.

e.g. cut-set {a, c, d, f} connects vertex set {v1,v2, v6} with {v3, v4, v5}

4. Write about fundamental cut-set.

A cut-set S containing exactly one branch of the tree T is called a fundamental


cut-set with respect to T. Consider a spanning tree T of a connected graph G. b be a
branch in T. Every branch of a spanning tree has a fundamental cut-set associated

Visit & Downloaded from : www.LearnEngineering.in


27
with it. Let S1 be Visit
a fundamental cut-set
& Downloaded fromassociated with b1, consisting of q chords in
: www.LearnEngineering.in
addition to the branch b1; that is

S1={b1, c1, c2, c3, ….., cq} is a fundamental cut-set with respect to T.
e.g.

In this figure a spanning tree is shown in heavy lines. All the five fundamental
cut-set with respect to T are shown in dotted lines.

5. Define bridge.

A bridge is an edge whose removal disconnects the graph. Also known as a


cut-edge is an edge of a graph whose deletion increases its number of connected
components.

6. Write about separable graph.

A connected graph G is said to be separable if its vertex connectivity is one.


All other connected graphs are non separable. A connected graph G is said to be
separable if there exists a subgraph g in G such that the complement of g, and g have
only one vertex in common.
e.g.

Visit & Downloaded from : www.LearnEngineering.in


28
Visit & Downloaded from : www.LearnEngineering.in

7. Define articulation point.

In a separable graph a vertex whose removal disconnects the graph is called a


cut-vertex, a cut-node or an articulation point.
e.g

Here v4 is the cut-vertex.

Here v is the cut-vertex.

8. Define k-connected graph and Weighted connected graph.

k-connected graph:
A graph G is said to be k-connected if the vertex connectivity of G is k.
Weighted connected graph
A connected graph in which a real positive number is associated with every edge is
known as a Weighted connected graph.

Visit & Downloaded from : www.LearnEngineering.in


29
9.Write about 1-isomorphism and 2-isomorphism.
Visit & Downloaded from : www.LearnEngineering.in

1-isomorphism
Two graphs G1 and G2 are said to be 1-isomorphic if they become isomorphic
to each other under repeated application of the following operation.
Operation 1: split a cut-vertex into two vertices to produce two disjoint subgraphs.
Two nonseparable graphs are 1-isomorphic if and only if they are isomorphic.

Disconnected graph 1- isomorphic to the above graph.

2-isomorphism
In a 2-connected graph G let vertices x and y be a pair of vertices whose
removal from G will leave the remaining graph disconnected. G consists of a
subgraph g1 and its complement such that g1 and its complement has exactly two
vertices x and y common. Suppose we perform the following operation 2 on G.
Operation 2: Split the vertex x into x1 and x2 and the vertex y into y1 and y2 such that
G is split into g1 and g1‾. Let vertices x1 and y1 go with g1 and x2 and y2 with g1‾.
Now rejoin the graphs g1 and g1‾ by merging x1 and y2 and x2 and y1.

Two graphs are said to be 2-isomorphic if they become isomorphic after undergoing
operation 1 or operation 2 or both operations any number of times.

Visit & Downloaded from : www.LearnEngineering.in


30
Visit & Downloaded from : www.LearnEngineering.in

2-isomorphic graphs (a) and (d)

10. What is circuit correspondence?

Two graphs G1 and G2 are said to have a circuit correspondence if there is a


one-to-one correspondence between the edges of G1 and G2 and a one-to-one
correspondence between the circuits of G1 and G2, such that a circuit in G1 formed by
certain edges of G1 has a corresponding circuit in G2 formed by the corresponding
edges of G2 and vice versa. isomorphic graphs have circuit correspondence.

11. Define a Planar Graph with an example.

A graph G is said to be planar if there exists some geometric representation of


G which can be drawn on a plane such that no two of its edges intersect.
e.g. planar graphs

12. Define dual of a planar graph.

Let G be a planar graph. The dual of G is defined to be the graph G *


constructed as follows. To each region f of G there is a corresponding vertex p of G *
and to each edge e of G there is a corresponding edge e* in G* such that if the edge e
occurs on the boundary of the two regions fi and fj, and the edge e* joins the

Visit & Downloaded from : www.LearnEngineering.in


31
*
corresponding vertices and fj* in Gfrom
Visit &fi Downloaded
*
. If: the edge e is a bridge i.e. the edge e lies
www.LearnEngineering.in
entirely in one region f , then the corresponding edge e* is a loop incident with the
vertex f* in G*.
e.g. Construction of a dual graph.

13. State Kuratowski’s two graphs and some properties of them.

Kuratowski’s first graph

Visit & Downloaded from : www.LearnEngineering.in


32
A complete graph with
Visit 5 vertices is
& Downloaded the: www.LearnEngineering.in
from first of the two graphs of Kuratowski.
Usually it is denoted by K5.

The second graph of Kuratowski is a regular connected graph with six vertices
and nine edges shown in its two common geometric representations. Usually it is
denoted by K3, 3.

Some common properties of the two graphs of Kuratowski.


 Both are regular graphs
 Both are nonplanar
 Removal of one edge or a vertex makes each a planar graph.

14. What is a region?

A plane representation of a graph divides the plane into regions. A region is


characterized by the set of edges (or the set of vertices) forming its boundary.

Visit & Downloaded from : www.LearnEngineering.in


33
Visit & Downloaded from : www.LearnEngineering.in

Plane representation of a graph where the number stands for regions.

15. State Eulers formula

A connected planar graph with n vertices and e edges has e – n + 2 regions.


i.e. f = e – n + 2 where f is the number of regions.

PART B

1. SPANNING TREES

 Explain in detail about spanning trees.

A tree is said to be a spanning tree of a connected graph G if T is a subgraph


of G and T contains all vertices of G

e.g: A spanning Tree

The vertices of G are hanging together in a spanning tree like a


skeleton of the original graph G. Therefore spanning tree is otherwise called
as skeleton or scaffolding of G.

The spanning trees are the largest trees among all trees in G. So spanning trees
are called as maximal tree subgraph or maximal tree of G.

Visit & Downloaded from : www.LearnEngineering.in


34
Procedure to find
Visit & aDownloaded
spanning tree:
from : www.LearnEngineering.in

o If G has no circuit, it is the spanning tree


o If G has a circuit, delete an edge from the circuit.
o If there are more circuits repeat the operation till an edge from
the last circuit is deleted leaving a connected, circuit free graph
that contains all vertices of G.

Theorem 1: Every connected graph has atleast one spanning tree

o An edge in a spanning tree T is called a branch of T.


o An edge of G that is not in a given spanning tree T is called a
Chord.
o In the example, edges b1,b2,b3,b4,b5 and b6 are the branches in
the spanning tee and the edges c1,c2,c3,c4,c5,c6,c7 and c8 are
chords.
o An edge that is a branch of one spanning tree T1 may be a chord
with respect to another spanning tree T2
o A connected graph G is a union of two subgraphs, T and = G,
where T is a spanning tree and is the complement of T in G
o Since the subgraph is the collection of chords, it is called as
chord set.

Theorem 2: With respect to any of its spanning trees, a connected graph


of n vertices and e edges had n-1 tree branches and e-n+1 chords

o In the example, n=7 and e=14, so e-n+1=8 chords.


o Rank and Nullity:
o In a Graph G, n is the number of vertices and e is the number of
edges and k is the number of components.
o If k=1, then G is connected
o Every component of a graph must have atleast one vertex. So
n>=k
o Number of edges in a component cannot be lesser than the
number of vertices in that component minus one. So, e>=n-k
o There are two constraints: n-k>=0 and e-n+k>=0
o From these n, e and k rank and nullity are defined
 Rank r=n-k
 Nullity µ=e-n+k
o The rank of a connected graph is n-1 and the nullity of a
connected graph is
e-n+1. Nullity of a graph is otherwise called as cyclomatic
number or first Betti number

Visit & Downloaded from : www.LearnEngineering.in


35
Visit &Downloaded
Rank of G= number
from of branches in any spanning tree of
: www.LearnEngineering.in
G
 Nullity of G= number of chords in G
 Rank + Nullity = number of edges in G

2. CUT-SET
 Show that

(i) Every circuit has an even number of edges in common with any cut-set.
Proof:

Consider a cut-set S in graph G. Let the removal of S partition the vertices of


G into two subsets V1 and V2. Consider a circuit Г in G. If all the vertices in Г are
entirely within vertex set V1 (or V2), the number of edges common to S and Г is zero;
i.e. N(S ∩ Г) = 0, an even number.

If on the other hand, some vertices in Г are in V1 and some in V2 we traverse


back and forth between the sets V1 and V2 as we traverse the circuit. Because of the
closed nature of a circuit, the number of edges we traverse between V1 and V2 must
be even. And since every edge in S has one end in V1 and the other inV2, and no
other edge in G has this property, the number of edges common to S and Г is even.

Circuit and a cut-set in G

(ii) The ring sum of any two cut-sets in a graph is either a third cut-set or an
edge-disjoint union of cut-sets.

Proof:
Let S1 and S2 be two cut-sets in a given connected graph G. Let V1 and V2 be
the partitioning of the vertex set V of G corresponding to S1. Let V3 and V4 be the
partitioning of the vertex set V of G corresponding to S2.

Visit & Downloaded from : www.LearnEngineering.in


36
Visit & Downloaded from : www.LearnEngineering.in

Now let the subset (V1 ∩ V4) U (V2 ∩ V3) be called V5, and this by definition is the
same as the ring sum Similarly let the sub set (V1 ∩ V3) U (V2 ∩ V4) be
called V6, which is the same as

The ring sum of two cut sets can be seen to consist only of edges
that join vertices in V5 to those in V6. Also, there are no edges outside that
join vertices in V5 to those in V6.

Thus the set of edges produces a partitioning of V into V5 and V6


such that

Visit & Downloaded from : www.LearnEngineering.in


37
Visit & Downloaded from : www.LearnEngineering.in
Hence is a cut-set if the
subgraphs containing V5 and V6 each remain connected after is removed
from G. otherwise is an edge-disjoint union of cut-sets.
e.g.

In this figure consider the ring sums of the following three pairs of cut-sets.

(iii) Write Max-flow min-cut theorem.

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.

Proof:

Consider any cut-set S with respect to vertices a and b in G. In the subgraph G –


S there is no path between a and b. Therefore every path in G between a and b must
contain at least one edge of S. Thus every flow from a to b must pass through one or
more edges of S. Hence the total flow rate between these two vertices cannot exceed
the capacity of S. Since this holds for all cut-sets with respect to a and b, the flow
rate cannot exceed the minimum of their capacities.

3. PLANAR GRAPHS

Visit & Downloaded from : www.LearnEngineering.in


38
 (i) Write about
Visit &planar graphsfrom
Downloaded and: different ways of representing it.
www.LearnEngineering.in

(ii) Explain the steps involved in testing for planarity of graphs.

(i) Planar Graphs:

A Graph G is said to be planar if there exists some geometric representation of


G which can be drawn on a plane such that no two of its edges intersect. A Graph
that cannot be drawn on a plane without a cross over between its edges is called
nonplanar. A drawing of a geometric representation of a graph on any surface such
that no edges intersect is called embedding. Thus to prove that a graph G is
nonplanar, we have to prove that all possible geometric representation of G none
can be embedded in a plane. A embedding of a planar graph G on a plane is called a
plane representation of G.

Example:

A planar Graph

Visit & Downloaded from : www.LearnEngineering.in


39
Visit & Downloaded from : www.LearnEngineering.in

Fig: A Non-Planar Graph

Different representations of a Planar Graph:

Theorem:

Any simple planar graph can be embedded in a plane such that every edge is drawn
as a straight line segment.

Proof:

In this theorem, it is necessary for the graph to be simple because a self-loop or one
of two parallel edges cannot be drawn by a straight line segment.

Infinite Region:

The portion of the plane lying outside the graph embedded in a plane is infinite in its
extent. Such a region is called the infinite region.

Embedding on a sphere:

To eliminate the distinction between finite and infinite regions, a planar graph
is embedded in the surface of a sphere. It is accomplished by the stereographic
projection of the sphere in the plane.

Theorem 1:

A Graph can be embedded in the surface of a sphere if and only if it can be


embedded in a plane.

A planar graph embedded in the surface of a sphere divides the surface into
different regions. Each region on the sphere is finite, the infinite region on the plane
having been mapped onto the region containing the point NP.

Visit & Downloaded from : www.LearnEngineering.in


40
Theorem 2: Visit & Downloaded from : www.LearnEngineering.in

A planar graph may be embedded in a plane such that any specified region can
be made the infinite region.

Theorem 3:

A connected planar graph with n vertices and e edges has e-n+2 regions.

Proof:
o Any simple planar graph can have a plane representation such that each
edge is a straight line , any planar graph can be drawn such that each
region is a polygon
o The polygon net representing the given graph consisting of f regions
and let kp be the number of p-sided regions.

Where kr is the number of polygons with maximum edges

o The sum of all angles subtended at each vertex in the polygon net is

Theorem 4:

The spherical embedding of every planar 3-connected graph is unique

Example:

Two distinct plane representations of the same graph

(ii) Elementary Reduction

Step 1: Since a disconnected graph is planar if and only if each of its components is
planar, we need consider only one component at a time. Also, a separable graph is

Visit & Downloaded from : www.LearnEngineering.in


41
planar if and onlyVisit
if each of its blocks
& Downloaded fromis: planar. Therefore, for the given arbitrary
www.LearnEngineering.in
graph G, determine the set G={G1, G2, G3,………, Gk}, where each Gi is a
nonseparable block of G. then we have to test each Gi for planarity.

Step 2: Since addition or removal of self-loops does not affect planarity, remove all
self-loops.

Step 3: Since parallel edges also do not affect planarity, 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. Therefore, eliminate all edges in series.

Repeated application of steps 3 and 4 will usually reduce a graph drastically.

E.g to illustrate the series parallel reduction of the graph following

Visit & Downloaded from : www.LearnEngineering.in


42
Visit & Downloaded from : www.LearnEngineering.in

(b) Prove that the largest number of edges in a planar graph is 3n-6, where n is
the number of vertices in the graph.

Theorem:
In any simple, connected planar graph with f regions, n vertices, and e edges (e > 2),
the following inequalities must hold:

Proof:
Since each region is bounded by at least three edges and each edge belongs to exactly
two regions
2e ≥ 3f
Or

Substituting for f from Eulers formula inequality

Or

From the above inequality we are sure that the number of vertices in a planar graph is
less than or equal to 3n – 6. Therefore the largest number of edges in a planar graph
is 3n – 6.

(c) Show that graph K5 is non planar.

The inequality e ≤ 3n – 6, is often useful in finding out if a graph is


nonplanar. Consider the complete graph with 5 vertices K5.

Visit & Downloaded from : www.LearnEngineering.in


43
Here n=5, e=10, 3n-6
Visit=&9Downloaded
< e. from : www.LearnEngineering.in

Thus the graph violates the inequality. Thus it is nonplanar.

4. MINIMAL SPANNING TREE

 Write any two algorithms for finding the minimal spanning tree of a
graph. Explain with example.
Or
Explain in detail about Spanning trees in a weighted graph.

Minimal Spanning tree :

If Graph G is a weighted graph, then the weight of a spanning tree T of G is


defined as the sum of the weights of all the branches in T. A spanning tree with the
smallest weight in a weighted graph is called the shortest spanning tree or shortest-
distance spanning tree or minimal spanning tree.

Applications of shortest spanning tree:

 Suppose that we are to connect n cities v1,v2,….vn through a network of


roads
 The cost cij of building a direct road between vi and vj is given for all
pairs of cities where roads can be built
 The problem is to find the least expensive network that connects all n
cities together
 Thus the problem of connecting n cities with a least expensive network is
the problem of finding a shortest spanning tree in a connected weighted
graph of n vertices. The condition for the spanning tree to be shortest is
found in the following Theorem

Theorem:

Visit & Downloaded from : www.LearnEngineering.in


44
A Spanning Tree T &ofDownloaded
Visit a given weighted connected Graph G is a shortest
from : www.LearnEngineering.in
spanning tree of G if and only if there exists no other spanning tree of G at a
distance of one from T whose weight is smaller than that of T.

Proof:

Let T1 be a spanning tree in G satisfying the conditions of the Theorem.If T2 is


another shortest spanning tree in G, the weight of T1 will also be equal to that of
T2.T2 is the shortest spanning tree in G, which satisfies the conditions of the theorem.
Consider an edge e in T2 which is not in T1. Adding e to T1 forms a fundamental
circuit with branches of T1.Some of the branches in T1 that form the fundamental
circuit with e may also be in T2. Among all those edges in the circuit in T1 which are
not in T2( for example: bj) must form a fundamental circuit containing e. Hence the
spanning tree, obtained for T1 through one cycle exchange has the same
weight as T1

But T1 has one edge more in common with T2 and it satisfies the condition of
the Theorem. This proves that if none of the spanning trees at a unit distance from T
is shorter than T, no spanning tree shorter than T exists in the graph.

Algorithm for finding a Shortest Spanning tree:

There are several methods available for finding a shortest spanning tree in a
given graph.

Kruskal’s algorithm:

List all the edges of the graph G in order of non-decreasing weight. Next,
select a smallest edge of G. Then for each successive step select another smallest
edge that makes no circuit with the previously selected edges. Continue until n – 1
edges have been selected, and these edges will constitute the desired shortest
spanning tree.

Prims Algorithm:
This algorithm does not require listing all edges in order of non-decreasing
weight or checking at each step if a newly selected edge forms a circuit. Draw n
isolated vertices and label them v1, v2, v3, ………, vn. Tabulate the given weights of
the edges of G in an n by n table. Set the weights of non-existent edges as very large.
Start from vertex v1 and connect it to its nearest neighbor (i.e. to the vertex
which has the smallest entry in row 1 of the table), say vk. Now consider v1 and vk as
one subgraph, and connect this subgraph to its closest neighbor. Let this new vertex
be vi. .Next regard the tree with vertices v1, vk and vi as one subgraph, and continue
the process until all n vertices have been connected by n – 1 edges.

Visit & Downloaded from : www.LearnEngineering.in


45
Visit & Downloaded from : www.LearnEngineering.in
e.g.

Shortest spanning tree in a weighted graph

A connected weighted graph with 6 vertices and 12 edges is shown in figure.


The weight of its edges is tabulated. We start with v1 and pick the smallest entry in
row 1, which is either (v1, v2) or (v1, v5). Let us pick (v1, v5). The closest neighbor of
subgraph (v1, v5) is v4, as can be seen by examining edges selected following the
above procedure turn out to be (v4, v6), (v4, v3) and (v3, v2) in that sequence. The
resulting tree is a shortest spanning tree. It is shown in the heavy lines in the figure.
The weight of this tree is 41.5 units.

Degree-constraint shortest spanning tree:

Given a weighted connected graph G, a shortest spanning tree T in G such that


d(vi)<=k, for every vertex vi in T is called the degree-constraint shortest spanning
tree.

5. NETWORK FLOWS

 (a) Explain in detail about Network flows.

(b) Explain in detail about combinatorial and geometric graphs.

(a) Network Flows:

In a network of telephone lines, highways, railroads, it is important to know the


maximum rate of flow that is possible from one station to another in the network.
This type of network is represented by weighted connected graph in which vertices

Visit & Downloaded from : www.LearnEngineering.in


46
are the stations and
Visitthe edges are the
& Downloaded fromlines through which the given commodity
: www.LearnEngineering.in
flows. The weight, the real positive number associated with each edge represents the
capacity of the line.

Graph of a flow network

The capacity of a cut-set in a weighted connected graph G is defined as the


sum of the weights of all the edges in S.

Theorem:

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

Proof:

 Consider any cut-set with respect to vertices a and b in G


 In the subgraph G-S there is no path between a and b
 Therefore every path in G between a and b must contain atleast one edge
of S
 Thus every flow from a to b must pass through one or more edges of S
 Hence total flow rate between these two vertices cannot exceed the
capacity of S

(b) Combinatorial and geometric graphs.

A Graph exists as an abstract object devoid of any geometric meaning of its


ability of being drawn in a 3-dimensional Euclidean space. An abstract graph G1 can
be defined as G1=(V, E, Ψ) where the set V consists of the five objects named a,b,c,d
and e that is V={a,b,c,d,e}. The set E consists of seven objects named 1,2,3,4,5,6 and

Visit & Downloaded from : www.LearnEngineering.in


47
7 that is E={1,2,3,4,5,6,7}.The relationship
Visit & Downloaded between the two sets is defined by the
from : www.LearnEngineering.in
mapping Ψ which consists of

Here the symbol 1 (a,c) says that object 1 from set E is mapped onto the pair
(a,c) of objects from set V. This combinatorial abstract of G1 can also be represented
as Geometric figure.

Example:

Geometric figure

6. EDGE CONNECTIVITY AND VERTEX CONNECTIVITY

 Define the edge connectivity and vertex connectivity of a graph. Prove


that for a graph Vertex connectivity <- edge connectivity <=2e/n.

Edge Connectivity:

Visit & Downloaded from : www.LearnEngineering.in


48
Each cut-set of &a Downloaded
Visit connected graph
from :G consists of a certain number of edges.
www.LearnEngineering.in
The number of edges in the smallest cut-set is defined as the edge connectivity of G.
The edge connectivity of a tree is one.
e.g edge connectivity of the graph:2

Vertex connectivity:

The vertex connectivity of a connected graph G is defined as the minimum


number of vertices whose removal from G leaves the remaining graph disconnected.
The vertex connectivity of a tree is one.
e.g. vertex connectivity of the above graph:2

Prove that for a graph Vertex connectivity <- edge connectivity <=2e/n

Proof:

Theorem 1:

Let vertex vi be the vertex with the smallest degree in G. Let d(vi) be the
degree of vi. vertex vi can be separated from G by removing the d(vi) edges incident
on vertex vi. This proves that the edge connectivity of a graph G cannot exceed the
degree of the vertex with the smallest degree in G.

Theorem 2:

Let α denote the edge connectivity of G. Therefore there exists a cut-set S in


G with α edges. Let S partition the vertices of G into subsets V1 and V2. By removing
at most α vertices from V1 (or V2)on which the edges in S are incident, we can effect
the removal of S from G. This proves that the vertex connectivity of any graph G can
never exceed the edge connectivity of G.

Theorem 3:

The maximum vertex connectivity one can achieve with a graph G n vertices
and e edges (e ≥ n – 1) is the integral part of the number 2e/n; that is

Visit & Downloaded from : www.LearnEngineering.in


49
Proof: Visit & Downloaded from : www.LearnEngineering.in

Every edge in G contributes two degrees. The total 2e degrees is divided


among n vertices. Therefore there must be at least one vertex in G whose degree is
equal to or less than the number 2e/n. The vertex connectivity cannot exceed this
number.

The result of the above three theorems can be summarized as follows:


Vertex connectivity ≤ edge connectivity ≤ 2e/n,

And maximum vertex connectivity possible =


e.g.
For a graph with 8 vertices and 16 edges we can get a vertex connectivity as high as
four.(=2. 16/8).

Theorem 4:

A vertex V in a connected Graph G is a cut-vertex if and only if there exists


two vertices x and y in G such that every path between x and y passes through v.

Theorem 5:

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 the smallest degree in G. Let d(Vi) be the degree of
Vi. Vertex Vi can be separated from G by removing the d(Vi) edges incident on
vertex Vi. Hence the theorem.

Theorem 6:

The vertex connectivity of any graph G can never exceed the edge connectivity of G

Proof:

Let α denote the edge connectivity of G. Therefore there exists a cut-set S in


G with α edges. Let S partition the vertices of G into subsets V1 and V2. By removing
at most α vertices from V1or V2on which the edges in S are incident, we can effect
the removal of S from G. Hence the theorem.

Theorem 7:

Visit & Downloaded from : www.LearnEngineering.in


50
The maximumVisitvertex connectivity
& Downloaded fromone can achieve with a graph G of n
: www.LearnEngineering.in
vertices and e edges (e≥n-1) is the integral part of the number 2e/n.

Proof:

Every edge in G contributes two degrees. The total of degrees is divided


among n vertices. Therefore there must be atleast one vertex in G whose degree is
equal to or less than the number 2e/n

Vertex connectivity ≤ edge connectivity ≤ 2e/n

Maximum vertex connectivity possible=2e/n

A graph G is said to be k-connected if vertex connectivity of G is K. therefore


an I-connected graph is same as the separable graph.

Theorem 8:

A connected Graph G is k-connected if and only if every pair of vertices in G


is joined by k or more paths that do not intersect and atleast one pair or vertices is
joined by exactly k-edge nonintersecting paths.

Theorem 9:

A edge connectivity of Graph G is k if and only if every pair of vertices in G


is joined by k or more edge disjoint paths and atleast one pair or vertices is joined by
exactly k-edge disjoint paths.

7.FUNDAMENTAL CIRCUITS

 Explain in detail about fundamental circuits and cut-sets.

Consider a Spanning Tree T in a given connected graph G.Let ci be a chord with


respect to T and let the fundamental circuit made by ci be called consisting of k
branches b1,b2,…,bkin addition to the chord ci..

is a fundamental circuit with respect to T

Let S1 be the fundamental cut-set associated with b1, consisting of q chords in


addition to the branch b1.S1={b1,c1,c2,….,cq} is a fundamental cut-set with respect to
T.

Visit & Downloaded from : www.LearnEngineering.in


51
Theorem1: Visit & Downloaded from : www.LearnEngineering.in

With respect to a given spanning tree T, a chord cithat determines a


fundamental circuit occurs in every fundamental cut-set associated with the
branches in and in no other.

Example:

A fundamental circuit

Consider the spanning tree {b,c,e,h,k}. The fundamental circuit made by chord f is
{f,e,h,k}.The three fundamental cut-sets determined by the three branches e,h and k
are

 Determined by branch e:{d,e,f}


 Determined by branch h:{f,g,h}
 Determined by branch k:{f,g,k}
 Chord f occurs in each of these fundamental cut-sets and there is
no other fundamental cut-set that contains f

Theorem 2:

With respect to a given spanning tree T, a branch bi that determines a fundamental


cut-set S is contained in every fundamental circuit associated with the chords in S
and in no others.

Proof:

Let the fundamental cut-set S determined by a branch bi be S={bi,c1,c2,……,cp}.

Let be the fundamental circuit determined by chord c1.

Since the number of edges common to S and must be even, bi must be .In the
above example, consider branch e of spanning tree {b,c,e,h,k}.The fundamental cut-
set determined by e is {e,d,f}

Visit & Downloaded from : www.LearnEngineering.in


52
Visit &Downloaded
Determined by:chord
from d: {d,c,e}
www.LearnEngineering.in
 Determined by chord f: {f,e,h,k}

Branch e is contained in both these fundamental circuits, and none of the remaining
three fundamental circuits contains branch e.

UNIT III

MATRICES, COLOURING AND DIRECTED GRAPH


Chromatic number – Chromatic partitioning – Chromatic polynomial – Matching –
Covering – Four color problem – Directed graphs – Types of directed graphs –
Digraphs and binary relations – Directed paths and connectedness – Euler graphs.

PART-A
1. Describe the ways for Finding a Maximal Independent Set.

A reasonable method of finding a maximal independent set in a graph G will


be to start with any vertex v of G in the set. Add more vertices to the set, selecting at
each stage a vertex that is not adjacent to any of those already selected. This
procedure will ultimately produce a maximal independent set.

2. Define Chromatic Partitioning.

Visit & Downloaded from : www.LearnEngineering.in


53
Given a simple, connected
Visit & graph
Downloaded G,: partition
from all vertices of G into the smallest
www.LearnEngineering.in
possible number of disjoint, independent sets. This problem known as the chromatic
partitioning of graphs, it perhaps the most important problem in portioning of a
graph.

By enumerating all maximal independent sets and then selecting the smallest
number of sets that include all vertices of the graph, we just solved this problem. The
following four are some chromatic partitions of the graph, for example,

{ (a, c, d, f), (b, g), (e) }

{ (a, c, d, g), (b, f), (e) }

{ (c, d, f), (b, g), (a, e) }

{ (c, d, g), (b, f), (a, e) }

This Method of chromatic partitioning is efficient and needs prohibitively


large amounts of computer memory.

3. Define Dominating sets.

A dominating set in a graph G is a set of vertices that dominates every vertex


v in G in the following sense:

Either v is included in the dominating set or is adjacent to one or more


vertices included in the dominating set.

For instance, the vertex set {b, g} is a dominating set. So is the set {a, b, c, d,
f} a dominating set. A dominating set need not be independent. For example, the set
of all its vertices is trivially a dominating set in every graph.

4. What is Minimal Dominating set?

A Minimal dominating set is a dominating set from which no vertex can be


removed without destroying its dominance property.

Visit & Downloaded from : www.LearnEngineering.in


54
1. Any one vertex in Downloaded
Visit & a complete graph
from : constitutes a minimal dominating set.
www.LearnEngineering.in
2. Every dominating set contains at least one minimal dominating set.
3. A graph may have many minimal dominating sets, and of different sizes.
4. A minimal dominating set may or may not be independent.
5. Every maximal independent set is a dominating set.
6. An independent set has the dominance property only if it is a maximal
independent set.
7. in any graph G,
α (G) ≤ β (G)

5. How to Find Minimal Dominating Sets?

A method for obtaining all minimal dominating sets in a graph for finding all
maximal independent sets also uses Boolean arithmetic. To dominate a vertex vi we
must either include vi or any of the vertices adjacent to vi. A minimal set satisfying
this condition for every vertex vi is a desired set. Therefore, for every vertex vi in G.
Let us form a Boolean product of sums
(vi + vi1 + vi2 + ………. + vid ), where vi1, vi2, ………. ,vid are the vertices adjacent to
vi and d is the degree of vi.

θ = Π (vi1 + vi2 + ………. + vid) for all vi in G.

6. Define 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. A set of edges that covers a graph G is said to be an edge
covering, a covering sub graph, or simply a covering of G. For example, a graph G is
trivially its own covering.

A spanning tree in a connected graph is another covering. A Hamiltonian


circuit in a graph is also a covering.

The minimal covering is a covering from which no edge can be removed


without destroying its ability to cover the graph.

7. List out the Properties of Chromatic number.

1. A covering exists for a graph if and only if the graph has no isolated vertex.
2. A covering of an n-vertex graph will have at least [n/2] edges.
3. Every pendant edge in a graph is included in every covering of the graph.
4. Every covering contains a minimal covering.

Visit & Downloaded from : www.LearnEngineering.in


55
5. If we denote the&remaining
Visit edges
Downloaded of: awww.LearnEngineering.in
from graph by (G-g), the set of edges g is a
covering if and only if, for every vertex v, the degree of vertex in (G-g) ≤
(degree of vertex v in G) – 1.
6. No minimal covering can contain a circuit, for we can always remove an edge
from a circuit without leaving any of the vertices in the circuit uncovered.
7. A graph, in general, has many minimal coverings, and they may be of
different sizes.

8. Write short notes on 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 of a graph. A graph in
which every vertex has been assigned a color according to a proper coloring is called
proper colored graph. A graph G that requires k different colors for its proper
coloring and no less is called k-chromatic graph, and the number k is called the
chromatic number of G.

Observations

1. A graph consisting of only isolated vertices is 1-chromatic.


2. A graph with one or more edges is at least 2-chromatic.
3. A complete graph of n vertices is n-chromatic, as all its vertices are adjacent.
Hence a graph containing a complete graph of r vertices is at least r-
chromatic. For instance, every graph having a triangle is at least 3-chromatic.
4. 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.

Visit & Downloaded from : www.LearnEngineering.in


56
9. Prove the statement: If G is a connected
Visit & Downloaded graph and e = {a,b} is an edge of G,
from : www.LearnEngineering.in
then P (Ge, λ) = P (G, λ) + P (Ge’, λ)

Proof: In a proper coloring of Ge, the vertices a and b can have the same color or
different colors. In every proper coloring of G, the vertices a and b have different
colors and in every proper coloring of Ge‘ these vertices have the same color.
Therefore, the number of proper colorings of Ge is the sum of the

number of proper colorings of G and the number of proper colorings of Ge‘. That is,
P (Ge, λ) = P (G, λ) + P (Ge‘, λ)

This completes the proof of the theorem.

10. Prove that A covering g of a graph is minimal if and only if g contains no


paths of length three or more.

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)

11. Prove “Every tree with two or more vertices is 2-chromatic”

Proof:

Visit & Downloaded from : www.LearnEngineering.in


57
Visit & Downloaded from : www.LearnEngineering.in

Select any vertex v in the given tree T. Consider T as a rooted tree at vertex v.
Paint v with color 1. Paint all vertices adjacent to v with color 2.

Next, paint the vertices adjacent to these using colors 1. Continue this process
till every vertex in T has been painted.

Now in T, we find that all vertices at odd distances from v have color 2, while
v and vertices at even distances from v have color 1.

Now along any path in T the vertices are of alternating colors. Since there is
one and only one path between any 2 vertices in a tree, no two adjacent vertices have
the same color. Thus T has been properly colored with two colors. One color would
not have been enough. Though a tree is 2-chromatic, not every 2-chromatic graph is
a tree.

12. Prove that ―A graph with at least one edge is 2-chromatic if and only if it has
no circuits of odd length”.

Proof:

Let G be a connected graph with circuits of only even lengths. Consider a


spanning tree T in G. Using the coloring procedure; let us properly color T with two
colors.

Now add the chords to T one by one, Since G had no circuits of odd length,
the end vertices of every chord being replaced are differently colored in T. Thus G is
colored with two colors, with no adjacent vertices having the same color. That is, G
is 2-chromatic.

Conversely, if G has a circuit of odd length, we would need at least three


colors just for that circuit. Hence the theorem is proved.

Visit & Downloaded from : www.LearnEngineering.in


58
13. A complete matching of V1 intofrom
Visit & Downloaded V2 in a bipartite graph exists if and only if
: www.LearnEngineering.in
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.

14. Write short notes on 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.

15. Define Reflexive Digraph

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.

Visit & Downloaded from : www.LearnEngineering.in


59
Visit & Downloaded from : www.LearnEngineering.in

A digraph in which no vertex has a self-loop is called an irreflexive digraph.

PART-B

1.CHROMATIC PARTITIONING
 a) Write short notes on Chromatic Partitioning.

b) How to Find All Maximal Independent Set

c) Prove that “If dmax is the maximum degree of the vertices in a graph G,
chromatic number of G ≤ 1 + dmax”

a) Chromatic Partitioning

A proper coloring of a graph naturally induces a partitioning of the vertices


into different subsets. For example, the coloring in Figure produces the partitioning

{v1, v4}, {v2} and {v3, v5}

No two vertices in any of these three subsets are adjacent; such a subset of
vertices is called an independent set. A set of vertices in a graph is set to be an
independent set of vertices or simply an independent set, if no two vertices in the set

Visit & Downloaded from : www.LearnEngineering.in


60
are adjacent. For example, in Figure, from
Visit & Downloaded {a, c,: www.LearnEngineering.in
d} is an independent set, A single vertex
in any graph constitutes an independent set.

A maximal independent set is an independent set to which no other vertex can


be added without destroying its independence properly. The set {a,c,d,f} is a
maximal dependent set. The set {b,f} is another maximal independent set. The set
{b,g} is a third one. From the preceding example, it is clear that a graph, in general,
has many maximal independent sets; and they may be of different sizes. Among all
maximal independent sets, on with the largest number of vertices is often of
particular interest.

Each of the seven vertices of the graph is a possible code word to be used in
some communication. Some words are so close to others that they might be confused
for each other. Pairs of such words that may be mistaken for one another are joined
by edges. Find a largest set of code words for a reliable communication. This is a
problem of finding a maximal independent set with largest number of vertices. In this
simple example, {a,c,d,f} is an answer.

The number of vertices in the largest independent set of a graph G is called


the independence number (or coefficient of internal stability), β(G).

Consider a k-chromatic graph G of n vertices properly colored with k different


colors. Since the largest number of vertices in G with the same color cannot exceed
the independence number β(G).
𝑛
𝛽 𝐺 ≥
𝑘
b) Finding All Maximal Independent Set:

A reasonable method for obtaining all maximal independent sets in any graph
can developed using Boolean arithmetic on the vertices. Let each vertex in the graph
be treated as a Boolean variable. Let the logical sum a + b denote the operation of
including vertex a or b or both; let the logical multiplication ab denote the operation
of including both vertices a and b, and let the Boolean complement a‘ denote that
vertex a is not included.

Visit & Downloaded from : www.LearnEngineering.in


61
For a givenVisit
graph G, we must from
& Downloaded find :awww.LearnEngineering.in
maximal subset of vertices that does not
include the two end vertices of any edge in G. Let us express an edge(x,y) as a
Boolean product, xy, of its end vertices x and y, and let us sum all such products in G
to get a Boolean expression

φ = ∑ xy, for all (x,y) in G.

Let us further take the Boolean complement φ‘ of this expression and express
it as a sum of Boolean products:

φ‘ = f1 + f2 + …………. + fk

A vertex set is a maximal independent set if and only if φ = 0, which is


possible if and only if φ‘ = 1 (true), which is possible if and only if at least one f1 = 1.

φ = ab + bc + bd + be + ce + de + ef + eg + fg,

φ‘ = (a‘ + b‘) (b‘+ c‘) (b‘ + d‘) (b‘ + e‘) (c‘ + e‘) (d‘ + e‘) (e‘ + f‘)
(e‘ + g‘) (f‘ + g‘)

Multiplying these out and employing the usual identities of Boolean arithmetic, such
as

aa = a,

a + a = a,

a + ab = a,

we get

φ‘ = b‘e‘f‘ + b‘e‘g‘ + a‘c‘d‘e‘f‘ + a‘c‘d‘e‘g‘ + b‘c‘d‘f‘g‘

Now if we exclude from the vertex set of G vertices appearing in any


one of these five terms, we get a maximal independent set. The five maximal
independent sets are

acdf, acdg, bg, bf and ae.

These are all the maximal independent sets of a graph.

Finding Independence and Chromatic Numbers :

Ones all the maximal independent sets of G have been obtained, we


find the size of the one with the largest number of vertices to get the
independence number β(G). To find the chromatic number of G, we must find
the minimum number of these sets, which collectively include all the vertices
of G.

Visit & Downloaded from : www.LearnEngineering.in


62
Visit & Downloaded from : www.LearnEngineering.in

c) Theorem :

If dmax is the maximum degree of the vertices in a graph G, chromatic number


of G ≤ 1 + dmax

Proof:

The upper bound can be improved by 1 if G has no complete graph of dmax + 1


vertices. In that case chromatic number of G ≤ dmax

A graph G is called bipartite if its vertex set V can be decomposed into two
disjoint subsets V1 and V2 such that every edge in G joins a vertex in V1 with a
vertex in V2. Thus, every tree is a bipartite graph.

Obviously, a bipartite graph can have no self-loop. A set of parallel edges


between a pair of vertices can all be replaced with one edge without affecting
bipartiteness of a graph.

Every 2-chromatic graph is bipartite because the couloring partitions the


vertex set into two subsets V1 and V2 such that no two vertices in V1 (or V2) are
adjacent. Similarly, 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 generalizing this concept, a graph G is called p-partite if its vertex set can
be decomposed into p disjoint subsets V1 , V2 , …. , Vp, such that no dege in G joins
the vertices in the same subset. Clearly, a k-chromatic graph is p-partite if and only if

k≤p

With this Qualification, the results of k-chromatic graphs are applicable to k-


partite graphs.

2.CHROMATIC POLYNOMIAL

 a) Explain in detail about Chromatic Polynomial

b) Write Short notes on Matching.

a) Chromatic polynomial

Given a connected graph G & λ number of different colors, let us take up the
problem of finding the number of different ways of properly coloring G with these λ
colors. First, consider the null graph Nn with n vertices. In this graph, no two
vertices are adjacent. Therefore, a proper coloring of this graph can be done by

Visit & Downloaded from : www.LearnEngineering.in


63
assigning a singleVisit
color to all the vertices.
& Downloaded Thus, if there are λ numbers of colors,
from : www.LearnEngineering.in
each vertex of the graph has λ possible choices of colors assigned to it, and as such
the graph can be properly colored in λn different ways.

Next consider the complete graph Kn. In this graph, every two vertices are
adjacent, and as such there must be at least n colors for a proper coloring of the
graph. If the number of different colors available is λ, then the number of ways of
properly coloring Kn is

(i) Zero if λ < n,

(ii) One if λ = n,

(iii) Greater than 1 if λ >n.

Let v1, v2, v3….vn be the vertices of Kn and suppose λ > n.

For a proper coloring of Kn, the vertex v1 can be assigned any of the λ colors,
the vertex v2 can be assigned any of the remaining λ - 1 colors, the vertex v3 can be
assigned any of the remaining λ – 2 colors and finally the vertex vn can be assigned
any of the λ - n+1 colors. Thus, Kn can be properly colored in λ (λ -1)( λ -2) ... (λ –
n+1) different ways if λ >n. Lastly, consider the graph Ln which is a path consisting
of n vertices v1, v2, v3….vn shown below:

This graph cannot be properly colored with one color, but can be properly
colored with 2 colors – by assigning one color to v1, v3, v5…….. and another color
to v2, v4, v6…. Suppose there are λ ≥ 2 number of colors available. Then, for a
proper coloring of the graph, the vertex v1 can be assigned any one of the λ colors
and each of the remaining vertices can be assigned any one of λ-1 colors (Bear in
mind that alternative vertices can have the same color). Thus, the graph Ln can be
properly colored in λ(λ-1)n-1 different ways.

The number of different ways of properly coloring a graph G with λ number


of colors is denoted by P(G, λ). Thus, from what is seen in the above three illustrate
examples, we note that

(i) P(Nn, λ) = λn,

(ii) P(Kn, λ) = 0 if λ < n,

P(Kn, n) = 1 if λ = n, and

Visit & Downloaded from : www.LearnEngineering.in


64
P(Kn, λ) = λ (λ -1)( λ -2)
Visit ... (λ –n+1) iffrom
& Downloaded λ >:nwww.LearnEngineering.in
,

(iii) P(Ln, λ) = λ (λ -1)n-1 if λ ≥ 2 ,

We observe that in each of the above cases, P(G, λ) is a polynominal.


Motivated by these cases, we take that P(G, λ) is polynomial for all connected graph
G. This polynomial is called the Chromatic Polynomial.

It follows that if a graph G is made up of n parts, G1,G2….Gn, then P(G, λ) is given


by the following

PRODUCT RULE:

P (G, λ) = P (G1, λ). P (G2, λ)………. P (Gn, λ)

In particular, If G is made up of two parts G1 and G2, then we have P(G, λ) =P (G1,
λ).

P (G2, λ) so that

P (G2, λ) = P (G, λ) / P (G1, λ)

DECOMPOSITION THEOREM:

Let G be a graph and e = {a,b} be an edge of G. Let Ge = G – e be that


subgraph of G which is obtained by deleting e from G without deleting vertices a and
b*. Suppose we construct a new graph Ge‘ by coalescing (identifying / merging) the
vertices a and b in Ge. Then Ge‘ is subgraph of Ge as well as G.

The process of obtaining Ge and Ge‘ from G is illustrated in Figure.

The following theorem called the Decomposition theorem for chromatic


polynomials given an expression for P (G, λ) in terms of P (Ge, λ) and P (Ge‘, λ) for
a connected graph G.

MULTIPLICATION THEOREM

The following theorem gives an expression for P(G, λ) for a special class of graphs.

Theorem 2:

If a graph G has sub graphs G1 and G2 such that G1UG2 = G and G1∩G2 = Kn for
some posistive intger n, then

Visit & Downloaded from : www.LearnEngineering.in


65
P (G, λ) = P (G1, λ) . P&(G2,
Visit λ) / λ(n) from : www.LearnEngineering.in
Downloaded

Where λ(n) = λ (λ -1)( λ -2) ... (λ –n+1)

Given λ > n number of different colors, there are λ(n) = λ (λ -1) (λ -1) ( λ -2)
…..... (λ –n+1) number of proper colorings of Kn. For each of these λ(n) proper
colorings of Kn, the product rule yields P (G1,λ)/λ(n) ways of properly coloring the
remaining vertices of G1. Similarly, there are P (G2, λ)/λ(n) ways of properly
coloring the remaining vertices of G. As such

P(G, λ) = P(Kn, λ) . P(G1, λ) / λ(n).P(G2, λ) / λ(n)

= λ(n) . P (G1, λ) / λ(n) . P (G2, λ) / λ(n)

= P (G1, λ) . P (G2, λ) / λ(n)

This completes the proof of the theorem.

Example: Find the chromatic polynomial for the cycle C4 of length 4.

A cycle of length 4, namely C4, is shown in the below figure . Let us re


designate it as G and denote the edge {v2,v3} as e. Then the graph Ge and Ge‘ would
be as shown below.

We note that the graph Ge is a path with 4 vertices. Therefore, P(Ge, λ) = λ


(λ-1)3 Also, the graph Ge‘ is the graph K3. Therefore P(Ge‘, λ) =λ(λ-1)(λ-2)
accordingly, using the decomposition theorem, we find that

P(C4, λ) = P(G,λ) = P(Ge, λ) - P(Ge‘, λ)

= λ (λ-1)3 - λ (λ-1) (λ-2)

= λ4 – 4 λ3 + 6 λ2 -3 λ.

This is the chromatic polynomial for the given cycle.

Visit & Downloaded from : www.LearnEngineering.in


66
Visit & Downloaded from : www.LearnEngineering.in

b) Matching:

Suppose that four applicants are a1, a2, a3 and a4 available to fill six vacant
positions p1, p2, p3, p4, p5, p6. Applicant a1 is qualified to fill position p2 or p5,
Applicant a2 is qualified to fill position p2 or p5, Applicant a3is qualified to fill
position p1 , p2 , p3 , p4 or p6, Applicant a4 can jobs p2 or p5. The vacant positions and
applicants are represented by vertices. The edges represent the qualifications of each
applicant for filling different positions. The graph clearly is bipartite, the vertices
falling into two sets V1 = { a1 , a2, a3 , a4 } and
V2 = { p1, p2, p3, p4, p5, p6}.

A matching in a graph is a subset of edges in which no two edges are disjoint.


A single edge in a graph is obviously a matching.

A Maximal matching is a matching to which no edge in the graph can be


added. The maximal matching with the largest number of edges are called the largest
maximal matching.

Visit & Downloaded from : www.LearnEngineering.in


67
Visit & Downloaded from : www.LearnEngineering.in

3.MATCHING
 a) Prove that “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”

b) 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

a) Theorem:

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.

Visit & Downloaded from : www.LearnEngineering.in


68
Visit & Downloaded from : www.LearnEngineering.in

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

b) Theorem:

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

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

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).

4.FOUR COLOR PROBLEM


 a) Explain in detail about Four Color Problem.

b) State and prove Five – Color Theorem.

Visit & Downloaded from : www.LearnEngineering.in


69
a) Four Color Problem:
Visit & Downloaded from : www.LearnEngineering.in

 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.
 Thus, Four color conjecture can be restated as: Every planar graph has a
chromatic number of four or less.

b) Five – Color Theorem:

Statement: The vertices of every planar graph can be properly colored with five
colors.

 Proof:

Visit & Downloaded from : www.LearnEngineering.in


70
 TheVisit
theorem will be proved
& Downloaded from by induction.
: www.LearnEngineering.in
 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.

Visit & Downloaded from : www.LearnEngineering.in


71
Visit & Downloaded from : www.LearnEngineering.in

5. DIRECTED GRAPH

 a) Write Short notes on Directed Graph.

b) Write Short notes on Types of Digraphs.

a) Directed Graph

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 in-valence) 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 n

∑ d+(vi) = ∑ d–(vi)
i=1 i=1

Visit & Downloaded from : www.LearnEngineering.in


72
 The in-degree
Visitand out-degree of
& Downloaded an :isolated
from vertex are both equal to zero.
www.LearnEngineering.in
 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.

b) 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 self-loops 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.

Visit & Downloaded from : www.LearnEngineering.in


73
 A complete asymmetric
Visit digraph
& Downloaded from is an asymmetric digraph in which there is
: www.LearnEngineering.in
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 out-degree as every other vertex.

 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.

Visit & Downloaded from : www.LearnEngineering.in


74
 Equivalence relations
Visit on a setfrom
& Downloaded partition the elements of the set into classes
: www.LearnEngineering.in
called equivalence classes such that two elements are in the same class if and
only if they are related.

 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.

6. DIRECTED PATHS AND CONNECTEDNESS

 Explain in detail about Directed Paths and Connectedness.

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.

Visit & Downloaded from : www.LearnEngineering.in


75
 A path in aVisit
digraph means either
& Downloaded a directed
from path or a semipath.
: www.LearnEngineering.in
 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 sub graphs are
called fragments (or strongly connected fragments of G).
 For example, the digraph in Figure consists of two components. The
component g1 contains three fragments {e1, e2},{e5, e6, e7, e8} and
{e10}. Observe e3, e4, e9 do not appear in any fragment of g1.

 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.

Visit & Downloaded from : www.LearnEngineering.in


76
Visit & Downloaded from : www.LearnEngineering.in

 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.

UNIT IV

PERMUTATIONS AND COMBINATIONS


Fundamental principles of counting – Permutations and combinations – Binomial
theorem – combinations with repetition – Combinatorial numbers – Principle of
inclusion and exclusion – Derangements – Arrangements with forbidden positions.

PART- A

1. State the sum rule of counting. Give one example.

The Rule of Sum: If a first task can be performed in m ways, while a second
task can be performed in n ways, and the two tasks cannot be performed
simultaneously, then performing either task can be accomplished in any one of m
+ n ways.

Visit & Downloaded from : www.LearnEngineering.in


77
e.g. A college
Visitlibrary has 40 textbooks
& Downloaded mathematics and 50 textbooks on Data
from : www.LearnEngineering.in
Structures. By the rule of sum, a student at this college can select among 40 + 50
= 90 textbooks to learn more about one or the other of these two subjects.

2. What is the product rule of counting? Give one example.

The Rule of Product: If a procedure can be broken down into first and second
stages, and if there are m possible outcomes for the first stage and if, for each of
these outcomes, there are n possible outcomes for the second stage, then the total
procedure can be carried out, in the designated order, in mn ways.

e.g. Six men and eight women were being auditioned for a play. By the rule of
product the director can cast his leading couple in 6 x 8 = 48 ways.

3. What is Permutation of ‘n’ distinct objects?

Given a collection of ‗n‘ distinct objects, any arrangement of these objects is


called a permutation of the collection.
e.g.

i. All permutations (or arrangements) made with the letters a, b, c by taking


two at a time are (ab, ba, ac, ca, bc, cb).
ii. All permutations made with the letters a, b, c taking all at a time are:
( abc, acb, bac, bca, cab, cba)

If there are n distinct objects and r is an integer, with 1 ≤ r ≤ n, then the


number of permutations of size r for the n objects in which the objects cannot be
repeated is
𝑛!
P(n, r) = .
𝑛−𝑟 !

If repetitions are allowed, there are nr possible arrangements, with r ≥ 0.

When r = n, then P(n, n) = n!

4. List all the permutations for the letters a, c, t.

Solution:
The 1- permutations of a, c, t are a, c, t
The 2- permutations of a, c, t are ac, at, ct, ca, ta, tc
The 3- permutations of a, c, t are act, atc, cta, cat, tac, tca

Visit & Downloaded from : www.LearnEngineering.in


78
5. Define the combination of objects
Visit & Downloaded of size
from r from a collection of n objects.
: www.LearnEngineering.in

Consider there are n distinct objects. Each selection or combination of r of


these objects, with no reference to order, corresponds to r! permutations of size r
from the n objects. Thus the number of combinations of size r from a collection
of size n is
𝑃(𝑛,𝑟) 𝑛!
C(n, r) = = , 0 ≤ r ≤ n.
𝑟! 𝑟! 𝑛−𝑟 !

e.g. Suppose we want to select two out of three boys A, B, C. Then, possible
selections are AB, BC and CA. Here AB and BA represent the same selection.

6. How many different words can be formed from the word KULALAMPUR?

The word KULALAMPUR contains 1- K , 2- U‘s, 2- L‘s, 2- A‘s, 1- M, 1- P


and 1-R. Here the total number of letters, n = 10. Hence the required number is
10! 10 x 9 x 8 x 7!
= = 90 x 7! = 4,53,600.
1!x 2! x 2! x 2! x 1!x 1!x 1! 2 x 1 x 2 x 1 x 2x 1

7. State Binomial theorem and what is binomial co-efficient?

The binomial theorem is used to expand binomials to any given power


without direct multiplication.

If x and y are variables, and n is a positive integer, then


(x + y)n = nC0 x0yn + nC1 xy n-1 + nC2 x2yn-2+ ….+ nCn-1 x n-1 y1+nCn xn y0
= 𝑛𝑘=0 𝑛𝐶𝑘 𝑥 𝑘 𝑦 𝑛 −𝑘

Here 𝑛𝐶𝑘 is called as the binomial co-efficient.

8. Determine the co efficient of x9 y3 in the expansion of


i. (x + y)12
ii. (x + 2y)12
Solution:
Using the binomial theorem in the expansion of (x + y)n, the binomial co-efficient
is 𝑛𝐶𝑘 . here in both cases n = 12.
i. In expanding (x + y)12,
k = 9.
12!
co efficient of x9 y3 is 12C9 = 12C3 = = 220
9! x 3!

Visit & Downloaded from : www.LearnEngineering.in


79
Visit & Downloaded from : www.LearnEngineering.in
ii. (x + 2y)12
Replace 2y by t. Then expanding (x + t)12,
co-efficient of x9t3 is 12C3.
In expanding (x + 2y)12, co-efficient of x9 y3 is 12C3 x9t3 =12C3 x9(2y)3
=12C3 x923y3
= 220 x 8 = 1760.

9. Give the formula for finding the number of combinations with repetition, r
of n distinct objects and solve the following problem. A donut shop offers 20
kinds of donuts. Assuming that there are at least dozen of each kind, when
we enter the shop, in how many ways can we select a dozen donuts?

The number of combinations of n objects taken r at a time with repetition is


C(n + r – 1 , r).

Solution: n = 20, r =12. So, we can select a dozen donuts in C(20 + 12 – 1, 12)
= C(31, 12) = 31!/ 12!19! ways.

10. Define combinatorial numbers.

A combinatorial number is formed by two positive integers m and n written


one on top of the other, within brackets, 𝑚𝑛 . Here m, n be positive integers and
m ≥ n.
e.g. 52 . The formula to find the value of a combinatorial number is
𝑚 𝑚!
𝑛
=
𝑛! 𝑚 −𝑛 !

11. State the Principle of Inclusion –Exclusion.

Let S be a set with |S| =N, and let c1, c2, c3, …., ct be a collection of t
conditions or properties , each of which may be satisfied by some of the elements
of S. Some elements of S may satisfy more than one of the conditions, whereas
others may not satisfy any of them.

For all 1 ≤ i ≤ t, N(ci) will denote the number of elements in S that satisfy
condition ci. For all i, j ∈ {1, 2, 3, ….., t} where i ≠ j, N(cicj) will denote the
number of elements in S that satisfy both of the conditions ci, cj, and perhaps
some others. Counting, if 1 ≤ i, j, k ≤ t are three distinct integers, then N(cicjck)
denotes the number of elements in S that satisfying, perhaps among others, each
of the conditions ci, cj and ck.

Visit & Downloaded from : www.LearnEngineering.in


80
For each 1Visit
≤ i ≤&t,Downloaded
N(𝑐𝑖 ) = N –from
N(ci:) www.LearnEngineering.in
denotes the number of elements in S that
do not satisfy condition ci. If 1≤ i, j ≤ t with i ≠ j, N(cicj)= the number of
elements in S that do not satisfy either of the conditions ci or cj.

The number of elements of S that satisfy none of the conditions ci, 1 ≤ i ≤ t, is


denoted by 𝑁 = N(𝑐1 𝑐2 𝑐3 … . 𝑐𝑡 )where
𝑁=N- 1 ≤ 𝑖 ≤ 𝑡 𝑁(𝑐𝑖 ) + 1 ≤ 𝑖 < 𝑗 ≤ 𝑡 𝑁(𝑐𝑖 𝑐𝑗 ) - 1 ≤ 𝑖 <𝑗 < 𝑘 ≤ 𝑡 𝑁(𝑐𝑖 𝑐𝑗 𝑐𝑘 ) + ….
+ (-1)t N(c1c2 c3…ct ).

12. Define derangement.

A derangement is a permutation of objects that leaves no object in its original


position.

For e.g., the permutation 21453 is a derangement of 12345 because no number


is left in its original position. However, 21543 is not a derangement of 12345
because this permutation leaves 4 fixed.
The number of derangements of n objects is denoted by Dn. The derangements of
123 are 231 and 312. Therefore D3 = 2.
The number of derangements of n objects Dn, for all positive integers n,
1 1 1
Dn = 𝑛! 1 − + − … + (−1)𝑛 .
1! 2! 𝑛!

13. Find the number of derangements of 1,2,3,4.

Solution:
The number of derangements of n objects Dn, for all positive integers n,
1 1 1
Dn = 𝑛! 1 − + − … + (−1)𝑛 .
1! 2! 𝑛!
1 1 1 1
D4 = 4! 1 − + − +
1! 2! 3! 4!
1 1 1
= 4! 1 − 1 + − +
2 6 24
12−4+1
= 24 x
24
=9

14. Define Rook polynomials.

The rook polynomial is the generating function for the numbers of


arrangements of k non-attacking on a board C. The rooks can move and attack
horizontally and vertically. Hence for rooks to be non-attacking to each other,
they must not be placed on the same row or column of the board.

Visit & Downloaded from : www.LearnEngineering.in


81
Visit & Downloaded from : www.LearnEngineering.in
If C is any board, the rook polynomial for C written r(C, x), is the polynomial
of the form r(C, x) = r0(C) + r1(C) x + r1(C) x2 + ….. + rn(C) xn where rk(C)
denotes the number of ways placing k non-attacking rooks on forbidden squares
by the board where k ≥ 0. Always r0 =1.
That is r(C, x) = 𝑛𝑘=0 𝑟𝑘 𝐶 𝑥 𝑘

15. Calculate the number of permutations with no objects in the forbidden


positions.

Let C denote a board with shadings. Ai be the set of all permutations in which
rook i is in a forbidden position. Let rk(C) be the number of arrangements of k
rooks such that all k are in forbidden positions. If we let the remaining n – k rooks
occupy any other nontaking positions then rk(C)(n – k)!is Sk of the inclusion-
exclusion formula. The number of permutations with no objects in the forbidden
positions is
r0(C)n! - r1(C) (n – 1)! + r2(C) (n – 2)! + ….. + (-1)n-1rn-1(C) 1! + (-1)nrn(C)0!
= 𝑛𝑘=0 −1 𝑘 𝑟𝑘 𝐶 (𝑛 − 𝑘)!

PART B

1. ARRANGEMENTS

 i. Find the number of arrangement of the letters TALLAHASSEE. How


many of these arrangements have no adjacent A’s?

Solution:
Number of letters = 11.
There are 1-T, 3-As, 2-Ls,1-H, 2-Ss, 2-Es.
So, the number of arrangement of the letters TALLAHASSEE is
11!
=831,600.
1!3!2!1!2!2!
8!
When we disregard the As we have =5040 ways to arrange the
1!2!1!2!2!
remaining letters. One of these 5040 ways is shown below as a figure, where
the arrows indicate nine possible locations for the three As.

Visit & Downloaded from : www.LearnEngineering.in


82
Three of these
Visit locations can
& Downloaded frombe selected in 39 = 84 ways. And this is
: www.LearnEngineering.in
possible for all the other 5039 arrangements of E, E, S, T, L, L, S, H, by the
rule of product there are 5040 x 8 = 423, 360 arrangements of the letters in
TALLAHASSEE with no consecutive As.

ii) A message is made up of 12 different symbols and is to be transmitted


through a communication channel. In addition to the 12 symbols, the
transmitter will also send a total of 45 blank spaces between the
symbols, with at least three spaces between each pair of consecutive
symbols. In how many ways can the transmitter send such a message?

Solution:
The possible ways to arrange the 12 different symbols is 12!.For each
of these arrangements there are 11 positions between the 12 symbols. As there
must be at least 3 spaces between successive symbols, we use 33 of the 45
spaces. Now we must locate the remaining 12 spaces.

This is a selection with repetition of size 12 (the number of spaces)


from a collection of 11 (the locations). This can be done in C(11+ 12 – 1, 12)
ways, that is 646,646 ways.
By the rule of product, the transmitter can send such messages with the
required spacing in (12!) 22
12
≐ 3.097 x 1014 ways.

2. BINOMIAL THEOREM

 i) State and Prove Binomial theorem.

The Binomial theorem:

If x and y are variables and n is a positive integer, then


(x + y) = 𝑛0 x0yn + 𝑛1 x1y n-1 + 𝑛2 x2yn-2+ ….+ 𝑛−1
n 𝑛
x n-1 y1+ 𝑛
𝑛
xn y0

𝑛 𝑛
= 𝑘=0 𝑘 𝑥 𝑘 𝑦 𝑛 −𝑘
Proof:

We use a combinatorial proof.


In the expansion of the product (x + y)n , we get
(x + y)n = (x + y) (x + y) (x + y)….. (x + y) , a product of n factors.

Visit & Downloaded from : www.LearnEngineering.in


83
Visit & Downloaded from : www.LearnEngineering.in

Every term in the expansion is the result of choosing either the x or the
y from each factor. The terms in the product when it is expanded are of the
form xkyn-k for k = 0, 1, 2, …, n. The co-efficient of xkyn-k is the number of
different ways in which we can select k x‘s from the n available factors. That
is since the power of x is k, we choose x from first k factors and choose y from
the remaining n – k factors. The total number of such selections of size k from
a collection of size n is C(n, k) = 𝑛𝑘 . Therefore the co-efficient of xkyn-k is
𝑛
𝑘
.

𝑛
The co-efficients of xkyn-k and xn-kyk in (x + y)n are the same, since 𝑘
𝑛
= 𝑛−𝑘
.
𝑛
It follows that an equivalent formulation is (x + y)n = 𝑛𝑘=0 𝑘
𝑥 𝑘 𝑦 𝑛 −𝑘 .
Hence proved.
ii) Find the co-efficient of a5b2 in the expansion of (2a – 3b)7.

Solution:

To obtain the co-efficient of a5b2 in the expansion of (2a – 3b)7, first replace
2a by x and -3b by y. Now we have to find the co-efficient of x5y2 in the
expansion of
(x + y)7. By the binomial theorem the co-efficient of xkyn-k in (x + y)n is 𝑛𝑘 .
Here n =7, k =5.
7 7!
5
x5y2 = (2a)5 (-3b)2 = 21 x 32.a5.9. b2
2!5!
= 6048 a5b2 .
The co-efficient of a5b2 in the expansion of (2a – 3b)7 is 6048.

3. COMBINATIONS

 i) Determine all integer solutions to the equation


x1 + x2 + x3 + x4 = 7, where xi ≥ 0 for all 1≤ i ≤ 4.

One solution to the equation is x1 = 3, x2 = 3, x3 = 0, x4 = 1. A possible


interpretation for the solution x1 = 3, x2 = 3, x3 = 0, x4 = 1 is that we are
distributing seven identical objects among four distinct containers. Here we
have put three objects into each of the first two containers, nothing into the
third one, and the last one into the fourth container. Continuing with this

Visit & Downloaded from : www.LearnEngineering.in


84
interpretation,
Visitwe see that eachfrom
& Downloaded non: www.LearnEngineering.in
negative integer solution of the equation
corresponds to a selection with repetition of size 7 from a collection of size 4.

The number of combinations of n objects taken r at a time with repetition is


C(n + r – 1 , r).So there are C(4 +7 -1, 7) = 120 solutions.

ii) Find the co-efficient of a2b3c2d5 in the expansion of (a + 2b -3c +2d + 5)16.
Solution:
To obtain the co-efficient of a2b3c2d5 in the expansion of (a + 2b -3c +2d +
5)16, first replace a by v, 2b by w, -3c by x, 2d by y and 5 by z. Now we have
to find the co-efficient of v2w3x2y5 in the expansion of (v + w + x + y + z)16.

Applying the multinomial theorem we can determine the co-efficient of


16
v2w3x2y5. That is 2,3,2,5,4
= 302, 702, 400.
16
But 2,3,2,5,4
a2 (2b)3 (-3c)2 (2d)5z4
16
= 2,3,2,5,4
12 23 (-3)2 25 54 (a2b3c2d5)
=435, 891,456,000,000 a2b3c2d5

The co-efficient of a2b3c2d5 in the expansion of (a + 2b -3c +2d + 5)16 is


435, 891,456,000,000.

4. PERMUTATIONS

 i) The number of different ways of permuting n objects, where n1,n2,


….,nk are indistinguishable objects of type 1, type 2, …. and type k is
given by
𝐧!
P(n; n1,n2,n3, …nk) =
𝒏𝟏 !𝒏𝟐 ! 𝒏𝟑 ! …..𝒏𝒌 !

Proof:

This can be proved using the combination theory.


We can see that n1 objects of type 1 can be placed among n positions in
C(n,n1) ways, after which we are left with (n –n1) free positions.

Following this there are C(n-n1, n2) ways of placing objects of type 2,
which leave (n-n1-n2) positions free for objects of other types to be placed.
Next, objects of type 3 can be placed in C(n-n1-n2,n3) ways and so on. Finally
the object of type k can be placed in C(n-n1-n2.. …nk-1,nk) ways. Hence using

Visit & Downloaded from : www.LearnEngineering.in


85
the productVisit
principle, the total
& Downloaded number
from of different ways of permutations
: www.LearnEngineering.in
amounts to computing.

C(n,n1)c(n-n1,n2)….C(n-n1-n2…nk-1,nk)
𝑛! (𝑛−𝑛 1) ! (𝑛−𝑛 1−⋯.−𝑛 𝑘−1 ) !
= x x….x
𝑛 1 ! n−𝑛 1 ! 𝑛 2 ! n−𝑛 1 −𝑛 2 ! 𝑛 𝑘 ! n−𝑛 1 −𝑛 2 …−𝑛 𝑘−1 −𝑛 𝑘 !
𝑛!
=
𝑛 1 !𝑛 2 ! 𝑛 3 ! …..𝑛 𝑘 !

We say that
P(n,n1,n2,……,nk) = C(n,n1) x C(n-n1,n2)….C(n-n1-n2…-nk-1, nk)
𝑛!
=
𝑛 1 !𝑛 2 ! 𝑛 3 ! …..𝑛 𝑘 !

Hence proved.

ii) How many non-negative integer solutions are there to the equation
a + b + c + d = 100.

Solution:

It is clear that would we have 100 a‘s or 99 a‘s and 1 b or 98 a‘s and 2d‘s etc.
We can observe that number of slots = 100 and we have 4 categories, hence
number of transitions =3
103!
Consequently, there are C(100+3, 100) = non-negative solutions to
100!3!
the equations a + b + c + d = 100

iii) Determine the number of positive integer n such that 1 n 100


and n is not divisible by 2,3 (or) 5
Solution:

Here S ={1, 2, 3, …, 100} and N =100. For any n ∈ S, n satisfies


a. Condition c1 if n is divisible by 2
b. Condition C2 if n is divisible by 3
c. Condition C3 if n is divisible by 5

The answer to find is N(𝑐1 𝑐2 𝑐3 ).

N(C1) = 100 /2 = 50
N(C2) = 100 /3 = 33
N(C3) = 100 /5 = 20
N(C1C2) = 100 /6 =16
N(C1C3) = 100 /10 =10

Visit & Downloaded from : www.LearnEngineering.in


86
100&/15
N(C2C3) = Visit =6
Downloaded from : www.LearnEngineering.in
N(C1C2C3) = 100 /30 =3

Applying the principle of inclusion and exclusion ,


N (C1 C2 C3 )= S0 –S1 + S2 –S4
= N – [ N( C1) + N( C2) + N( C3)] +[ N (C1 C2)+ N (C1 C3)+ N (C2
C3)]
- N (C1C2 C3)
= 100 – [50+33+20] + [16+10+6] -3
= 26
These 26 numbers are
(1,7,11,13,17,19,23,29,31,37,41,43,47,49,53,59,61,67,71,73,77,79,83,89,91
and 97).
iv) In how many ways can the 26 letters of the alphabet be permuted so
that none of the patterns car, dog, pun or byte occurs?

Let S denote the set of all permutations of the 26 letters. Then |S| = 26!.
For each 1 ≤ i ≤ 4, a permutation in S is said to satisfy condition ci if the
permutation contains the pattern car, dog, pun or byte respectively.

In order to compute N(c1) we count the number of ways the 24 symbols


car, b, d, e, f, …., p, q, s, t, …., x, y, z can be permuted. So N(c 1) = 24!. And
in a similar way we obtain N(c2) = 24! = N(c3) = 24!, while N(c4) = 23!.

For N(c1c2) we deal with the 22 symbols car, dog, b, e, f, h, i, …., m, n, p, q, s,


t,….., x, y, z, which can be permuted in 22! Ways. Hence N(c1c2) = 22!.
And N(c1c3) = N(c2c3) = 22!, N(cic4) = 21!, i ≠ 4.

Also N(c1c2c3) = 20!, N(cicjc4) =19!, 1≤ i< j ≤ 3,


N(c1c2c3c4) =17!

So the number of permutations in S that contain none of the given pattern is


N (C1 C2 C3 C4 ) = 26! – [3(24!) +23!] + [3(22!) + 3(21!)] – [20! + 3(19!)]+
17!

5. DERANGEMENTS

 i) How many permutations of 1, 2, 3, 4, 5, 6, 7 are not derangements?

There are 7! = 5040 permutations of 1, 2, 3, 4, 5, 6, 7. Among these are

Visit & Downloaded from : www.LearnEngineering.in


87
1 1 1 1 1 1 1
7! 1 − Visit
+ & − Downloaded
+ − +from−: www.LearnEngineering.in
= 1854 derangements.
1! 2! 3! 4! 5! 6! 7!
So we have 5040 -1854 = 3186 permutations of 1, 2, 3, 4, 5, 6, 7 that are not
derangements.

ii) There are eight letters to eight different people to be placed in eight
different addressed envelopes. Find the number of ways of doing this so
that at least one letter gets to the right person.

Solution:
Derangement:
A derangement is a permutation of objects that leaves no object in its original
position.
The number of derangements of n objects Dn, for all positive integers n,
1 1 1
Dn = 𝑛! 1 − + − … + (−1)𝑛 .
1! 2! 𝑛!

The number of ways of placing eight letters in eight envelopes such that
atleast one letter in the right place is 8! – D8

We obtain the number of derangements, denoted by D8 as follows

1 1 1
D8 =8! [1- 1+ - + ….+ ]
2! 3! 8!
= 8! (e -1)

8! – D8 = 8! - 8! (e -1)
= 8! (1 - (e -1))
= 8! (1 – 0.3679)
= 25486.

iii) Rahul has four kids in his joint family. He bought four different
chocolates for them. These kids asked for different chocolates, each
according to their likings. What is the probability that Rahul gives these
four chocolates to the four kids such that no kids gets what he/she wished
for?

Solution:

This is a derangement problem.The number of derangements of n objects Dn,


for all positive integers n,
1 1 1
Dn = 𝑛! 1 − + − … + (−1)𝑛 .
1! 2! 𝑛!

Visit & Downloaded from : www.LearnEngineering.in


88
There are 4! =24&ways
Visit of distributing
Downloaded the four chocolates to the four kids. Let
from : www.LearnEngineering.in
the chocolates and the kids be labeled 1,2,3 and 4 respectively.
Since n=4 we have
1 1 1 1
D4 = 4! 1 − + − + = 12 - 4 +1 = 9
1! 2! 3! 4!
That is there are 9 ways in which no kids get his or her own choice of
chocolates.

The nine derangements are


(2,1,4,3),(2,3,4,1),(2,4,1,3),(3,1,4,2),(3,4,1,2),(3,4,2,1),(4,1,2,3),(4,3,1,2) and
(4,3,2,1)

The probability that a permutation of four chocolates is a derangements is


𝐷4 9
= =0.375
4! 24
Hence there are 37. Chances that kids do not get the chocolates of their
choice.

iv) Find the rook polynomial for the 3x3 board using the expansion
formula.
Solution:
3
0
+ 31 3x + 32 (3.2)x2 + 33 (3.2.1)x3
= 1 + 3 (3x) + 3 (6) x2 + 6.6 x3
= 1 + 9 x + 18 x2 + 36 x3.

6.INCLUSION AND INCLUSION

 i) How many integers between 1 and 300 (inclusive) are


a. Divisible by atleast one of 5, 6, 8?
b. Divisible by none of 5, 6, 8?

Solution:
Let S = {1, 2, 3, …., 300}. N =300.

d. Condition c1 if n is divisible by 5
e. Condition C2 if n is divisible by 6
f. Condition C3 if n is divisible by 8

The answer to find is N(𝑐1 𝑐2 𝑐3 ).

N(C1) = 300 /5 = 60
N(C2) = 300 /6 = 50

Visit & Downloaded from : www.LearnEngineering.in


89
N(C3) = 300
Visit/8& Downloaded
= 37 from : www.LearnEngineering.in
N(C1C2) = 300 /30 =10
N(C1C3) = 300 /40 = 7
N(C2C3) = 300 /40 =12
N(C1C2C3) = 300 /240 =2

Applying the principle of inclusion and exclusion ,


N (C1 C2 C3 )= S0 –S1 + S2 –S4
= N – [ N( C1) + N( C2) + N( C3)] +[ N (C1 C2)+ N (C1 C3)+ N (C2
C3)]
- N (C1C2 C3)
= [60 +50 + 37] - [10+7+12] + 2
= 120
Thus 120 elements are divisible by atleast one of 5, 6, 8

b. The number of elements that are divisible by none of 5, 6, 8


= 300 – 120 =180

Visit & Downloaded from : www.LearnEngineering.in


90
Visit & Downloaded from : www.LearnEngineering.in

UNIT V

GENERATING FUNCTIONS
Generating functions - Partitions of integers - Exponential generating function –
Summation operator - Recurrence relations - First order and second order – Non-
homogeneous recurrence relations -Method of generating functions.

PART A
1) What is a generating function? Give an example.

Let a0, a1, a2, ………… be a sequence of real numbers. The function

𝑓 𝑥 = 𝑎0 + 𝑎1 𝑥 + 𝑎2 𝑥 2 + … … … = 𝑎𝑖 𝑥 𝑖
𝑖=0

is called the generating function for the given sequence.

e.g.

For any n є Z+,


𝑛
𝑛 𝑛 𝑛 2 𝑛 𝑛
1+𝑥 = + 𝑥+ 𝑥 +⋯+ 𝑥
0 1 2 𝑛

𝑛
So 1 + 𝑥 is the generating function for the sequence
𝑛 𝑛 𝑛 𝑛
, , ,…, , 0, 0, 0, ….
0 1 2 𝑛

2) Find the generating function for the number of ways to select, with
repetitions allowed, r objects from a collection of n distinct objects.

The generating function is either (1 + x + x2 + x3 +…..+ xr)n or (1 + x + x2 + x3


+…..)n.

3) Find the generating function for each of the following sequence:


i. 0, 1, 2, 3, ………

Visit & Downloaded from : www.LearnEngineering.in


91
ii. 1, 1, 1, Visit
1,……1, 1, 1, 1,…..from
& Downloaded all terms are 1.
: www.LearnEngineering.in

Solution:
i. 0, 1, 2, 3, ………
𝑥
2
is the generating function for the sequence 0, 1, 2, 3,…….
(1−𝑥)

ii. 1, 1, 1, 1,……1, 1, 1, 1,….. all terms are 1.


1
is the generating function for the sequence1, 1, 1, 1,……
1−𝑥

4) Define convolution of the sequences.

Whenever a sequence c0, c1, c2, ………… arises from two generating function
𝑓 𝑥 [for a0, a1, a2, …………] and 𝑔 𝑥 [for b0, b1, b2, …………] then the
sequence c0, c1, c2, ………… is called the convolution of the sequences a0, a1, a2,
………… and b0, b1, b2, ………….

The function 𝑕 𝑥 = 𝑓 𝑥 𝑔 𝑥 gives the sequence a0b0 + (a0 b1 + b0 a1)x + (a0b2


+ a1b1 + a2 b0)x2 + ……,so 𝑕 𝑥 is the generating function for the sequence c0,
c1, c2, …………, where for each k ε N
ck = a0bk + a1bk-1 + a2bk-2+….. + ak-2b2 + a k-1b1 + akb0
In general ck = 𝑘𝑖=0 𝑖(𝑘 − 𝑖)2

5) Find all partitions of 7.

Solution:
1. 7
2. 6+1
3. 5+2
4. 5+1+1
5. 4+3
6. 4+2+1
7. 4+1+1+1
8. 3+2+2
9. 3+2+1+1
10. 3+3+1
11. 3+1+1+1+1
12. 2+2+2+1
13. 2+2+1+1+1
14. 2+1+1+1+1+1
15. 1+1+1+1+1+1+1

Visit & Downloaded from : www.LearnEngineering.in


92
6) What is the exponential generating
Visit & Downloaded fromfunction for a given sequence? Give an
: www.LearnEngineering.in
example.
For a sequence a0, a1, a2, ………… of real numbers,

𝑥2 𝑥3 𝑥𝑖
𝑓 𝑥 = 𝑎0 + 𝑎1 𝑥 + 𝑎2 + 𝑎3 ……… = 𝑎𝑖
2! 3! 𝑖!
𝑖=0
is called the exponential generating function for the given sequence.
e.g. ex is the exponential generating function for the given sequence 1, 1, 1, 1, 1,
…….

7) Determine the sequence generated by the exponential generating function


3e3x.

Solution:
∞ 3𝑥 𝑖
𝑓 𝑥 = 3e3x = 3 𝑖=0 𝑖! .
So 3e3x is the exponential generating function for the sequence 3, 32, 33,…

8) Find the exponential generating function for each of the sequence:


0!, 1!, 2!, 3!, ……

Solution:
1
We find that = 1 + x + x2 + x3 + …..
1−𝑥
𝑥0 𝑥1 𝑥2 𝑥3
= (0!) + (1!) +(2!) + (3!) + ……
0! 1! 2! 3!
1
So is the exponential generating function for the given sequence 0!, 1!, 2!,
1−𝑥
3!, ……

9) Define recurrence relation with example.

A recurrence relation for the sequence a(n) is an equation that expresses a n in


terms of one or more of the previous terms of the sequence an-1, an-2, ….., a1, a0
for n ≥ 0. A sequence is called a solution of a recurrence relation if its terms
satisfy the recurrence relation.

The unique solution of the recurrence relation


an+1 = dan, where n≥ 0, d is a constant and a0 = A is given by
an = Adn, where n≥ 0.

Thus the solution an = Adn, where n≥ 0 defines a discrete function whose domain
is the set N of all non negative integers.
e.g.

Visit & Downloaded from : www.LearnEngineering.in


93
Consider the recurrence
Visit relation
& Downloaded n ≥ 0, a0 = 5.
an+1: www.LearnEngineering.in
from = 3an,
The first four terms of the sequence are
a0 = 5,
a1 = 3a0 = 3(5) = 15,
a2 = 3a1 = 3(3a0) = 32(5),
a3 = 3a2 = 3(32(5)) = 33(5).
Therefore for each n≥ 0, an = 5(3n) is the unique solution of the given
recurrence relation.

10) Define first order linear homogeneous recurrence relation.

The general form of the first order linear homogeneous recurrence relation of
degree k with constant coefficients is
an = c1an-1+ c2an-2 + ….. + ckan-k
where c1, c2, …, ck are real numbers and ck ≠ 0 and n ≥ 0.
When the term an+1 depends on an which is its immediate predecessor the relation
is said to be first order. This relation is called linear because each subscripted
term appears to the first power.
Values such as a0 or a1 given in addition to the recurrence relations are called
boundary conditions. The expression a0= A, where A is a constant, is also called
as the initial condition.

11) Solve the relation an = n. an-1, where n ≥ 1 and a0 = 1.

Solution:
an = n. an-1 ; a0 =1
The first five terms defined by the relation are
a0 =1 a3=3. a2 = 3.2.1
a1=1. a0 = 1 a4=4. a3 = 4.3.2.1
a2=2. a1 = 2.1

Therefore an = n! and the solution is the discrete function an which counts the
number of permutations of n objects, n ≥ 0.

12) Find a recurrence relation with initial condition that uniquely determines
the following sequences.
i. 3, 7, 11, 15, 19, ….
ii. 2, 10, 50, 250, …..( geometric progression)

Solution:
i. 3, 7, 11, 15, 19, …
Here the first term is a0 = 3, and the sequence increases by 4.

Visit & Downloaded from : www.LearnEngineering.in


94
So the recurrence relation isfrom : www.LearnEngineering.in
Visit & Downloaded
an = an-1 + 4 for n > 1.
ii. 2, 10, 50, 250, ……
The terms can be written as
a0 = 2,
a1 = 5.2 = 5a0
a2 = 5.10 = 5a1
a3 = 5.50 = 5a2
so an = 5an-1 is the recurrence relation where n ≥ 1 and the initial condition is a0
= 2.

13) Find the unique solution of the recurrence relation


6an – 7an-1 = 0, n ≥ 1, a3 =343

Solution:
6an – 7an-1 = 0
6an = 7an-1
an = (7/6)an-1
Substituting recursively an = (7/6)a0.
Given that a3 =343
a3 =(7/6)3 a0
Now we get a0 = 216

The unique solution of the recurrence relation


an+1 = dan, where n≥ 0, d is a constant and a0 = A is given by
an = Adn, where n≥ 0.
an =216 (7/6)n for n≥ 0.

14) Define nonhomogeneus linear recurrence relation.

Let k ε Z+ and C0 ≠ 0, C1, C2, ….. Ck C0 ≠ 0 be real numbers. If an, for n≥ 0,


is a discrete function, then
C0an + C1an-1 + C2an-2 + ….. + Ckan-k =f(n), n≥ k, is a linear
recurrence relation with constant coefficients of order k. When f(n) = 0 for all n≥
0, the relation is called homogeneous; otherwise it is called nonhomogeneous.

15) What is characteristic equation and what are characteristic roots?

The homogeneous relation of order two is


C0an + C1an-1 + C2an-2 = 0, n ≥ 2.
an =crn where c ≠ 0, r ≠ 0.
Substituting an =crn into C0an + C1an-1 + C2an-2 = 0, we obtain

Visit & Downloaded from : www.LearnEngineering.in


95
n
C0 cr +C
Visit crn-1 + C2 crfrom
&1Downloaded
n-2
=: 0www.LearnEngineering.in
2
With c, r ≠ 0, this becomes C0 r + C1 r + C2 = 0, a quadratic equation which is
called the characteristic equation. The roots r1 and r2 are called characteristic
roots.

PART B

 1. Solve

i. In how many ways can 24 apples be distributed to four children so that


each gets at least three but not more than eight.

Solution:
The possibilities for the number of apples each child get can be described by
x3 + x4 + x5 + …… + x8.
There are 4 children. So the resulting generation function is
f(x) = (x3 + x4 + x5 + …… + x8)4.

We seek the coefficient of x24 in f(x) with


f(x) = (x3 + x4 + x5 + …… + x8)4.
= x12 (1 + x + x2 + … + x5)4
4
1−𝑥 6
= x12 ,
1−𝑥

The answer is the coefficient of x24 in (1 – x6)4.(1 – x)-4 is

Which is
−4 4 −4 4 −4 15 4 9 4
12
(−1)12 − 1 6
(−1)6 + 2 0
= 12
− 1 6
+ 2

= 125.

ii. In how many ways can we select, with repetitions allowed, r objects from
n distinct objects?

The generating function is either (1 + x + x2 + x3 +…..+ xr)n or (1 + x + x2 + x3


+…..)n. The number of selections of r objects is the coefficient of xr.

For each of the n distinct objects, the geometric series 1 + x + x2 + x3 +…..


represents the possible choices for the object. Considering all the n objects, the
generating function is

Visit & Downloaded from : www.LearnEngineering.in


96
+ 𝑥&2 Downloaded
𝑓 𝑥 = 1 + 𝑥Visit + 𝑥 3 + … …from
… 𝑛: and the required answer is the coefficient
www.LearnEngineering.in
r
of x in 𝑓 𝑥 .

𝑓 𝑥 = (1 – x)-n
= ∞𝑖=0 −𝑛 𝑖
𝑥𝑖
∞ 𝑛+𝑖−1
= 𝑖=0 𝑖
𝑥𝑖 .

𝑛+𝑟−1
So the answer is 𝑟
.

 2. SOLVE

i. Determine the coefficient of x8 in 𝟏 𝒙 − 𝟑 (𝒙 − 𝟐)𝟐 .


In two methods we can solve this problem.
Method 1:
Since 1/(x – a ) = (-1/a)(1/(1-(x/a)))
= (-1/a) [1 + (x/a) + (x/a)2 + …..] for any a ≠ 0 , we could solve this problem
by finding the coefficient of x8 in 1/[(x-3)(x-2)2] expressed as
−1 𝑥 𝑥 2 −2 −2 𝑥 −2 𝑥 2
1+ + + … . (1/4) 0
+ 1
− + 2
− + …. .
3 3 3 2 2

Alternative technique uses the Partial fraction decomposition:


1 𝐴 𝐵 𝐶
= + + .
𝑥−3 (𝑥−2)2 𝑥−3 𝑥−2 𝑥−2 2

This decomposition implies that

1 = A(x-2)2 + B (x-2) (x-3) + C (x-3)


Or 0. x2 + 0. x + 1 = 1 = (A+B) x2 + (- 4A – 5B + C) x + (4A +6B -3C).

By comparing coefficients (for x2, x, 1), we find that A+B=0, - 4A – 5B + C = 0,


4A +6B -3C = 1.
Solving these equations yield A=1, B=-1, C=-1. Hence
1 1 −1 −1
= + +
𝑥−3 (𝑥−2)2 𝑥−3 𝑥−2 𝑥−2 2
−1 1 1 1 −1 1
= + + 𝑥 2
3 1− 𝑥/3 2 1− 𝑥/2 4 (1− )
2
−1 ∞ 𝑥 𝑖 1 ∞ 𝑥 𝑖 −1 −2 −2 −𝑥
= 𝑖=0 3 + 𝑖=0 2 + 0
+ 1
+
3 2 4 2
−2 −𝑥 2
2
+ ….
2

Visit & Downloaded from : www.LearnEngineering.in


97
−1 1 8 1 1 8 −1 −1 8
The coefficientVisit
of x&8 Downloaded
is from
+ : www.LearnEngineering.in
+ −2
8
3 3 2 2 4 2
1 9 1 10
=- +7
3 2

ii. Find the generating function for the following sequence:


0, 2, 6, 12, 20, 30, 42, ………

Solution:
0, 2, 6, 12, 20, 30, 42, ………

Here we observe that the terms in the sequence,


a0 = 0 = 02 + 0, a1 = 2 = 12 + 1,
a2 = 6 = 22 + 2, a3 = 12 = 32 + 3,
a4 = 20 = 42 + 4, a5 = 30 = 52 + 5,
a6 = 42 = 62 + 6, …….

In general an = n2 + n, for each n ≥ 0.


𝑥(𝑥+1)
We know is the generating function for the sequence 02, 12, 22, 32,…….
(1−𝑥)3
𝑥
Also is the generating function for the sequence 0, 1, 2, 3,…….
(1−𝑥)2

𝑥(𝑥+1) 𝑥 𝑥 𝑥+1 + 𝑥 (1−𝑥)


+ =
(1−𝑥)3 (1−𝑥)2 (1−𝑥)3
𝑥 2 + 𝑥 + 𝑥 −𝑥 2 2𝑥
= =
(1−𝑥)3 (1−𝑥)3

2𝑥
is the generating function for the sequence 0, 2, 6, 12, 20, 30, 42, ………
(1−𝑥)3

 3. i) Use generating function to determine how many four element subset of


S = {1, 2, 3, 4, ……., 15} contain no consecutive integers.
Solution:
Consider one such subset say {1, 3, 7, 10} and write 1 ≤ 1 < 3 < 7 < 10 ≤ 15. We see
that this set of inequalities determines the differences 1 – 1 = 0, 3 -1 = 2 , 7 – 3 =4,
10 – 7 = 3, and 15 – 10 = 5, and these differences sum to 14. Considering another
such subset say {2, 5, 11, 15}, we write 1 ≤ 2 < 5 < 11 < 15 ≤ 15. These inequalities
yield the differences 1, 3, 6, 4, and 0 which also sum to 14.

We find that the non negative integers 0, 2, 3, 2, and 7 sum to 14 and they are the
differences that arise from the inequalities 1 ≤ 1 < 3 < 6 < 8 ≤ 15 for the subset {1, 3,
6, 8}.

Visit & Downloaded from : www.LearnEngineering.in


98
These examples suggest
Visit & aDownloaded
one-to-one from
correspondence between the four-element
: www.LearnEngineering.in
subsets to be counted and the integer solutions to c1 + c2 + c3 + c4 + c5 = 14 where 0
≤ c1, c5, and 2 ≤ c2, c3, c4. The answer is the coefficient of x14 in
f(x) = (1 + x + x2 + x3 + …..)(x2 + x3 + x4 + …..)3(1 + x + x2 + x3 + …..)
=x6(1 – x)-5.

−5
This is the coefficient of x8 in (1 – x)-5, which is 8
(-1)8
5+8−1
= 8
12
= 8
= 495.

ii) Explain the convolution of two sequences. Find the convolution of the
sequences 1, 1, 1, 1, ….. and 1,-1,1,-1,1,-1,….

Solution:
The convolution of two sequences
Let 𝑓 𝑥 = x/ (1-x)2. This is the generating function for the sequence a0, a1, a2,
………… where ak = k for all k є N. The function g(x) = x(x+1)/(1 - x)3 generates
the sequence b0, b1, b2, ………… where bk = k2 for all k є N.

The function h(x) = f(x) g(x) consequently gives us a0 b0 + (a0 b1 + a1 b0) x + (a0
b2 + a1 b1 + a2 b0) x2 +……., so h(x) This is the generating function for the
sequence c0, c1, c2, ………… where for each k є N,

ck = a0 bk + a1 bk-1 + a2 bk-2 +…….+ ak-2 b2 + ak-1 b1 + ak b0.

For eg
c0 = 0.02 = 0
c1 = 0.12 + 1.02 = 0
c2 = 0.22 + 1.12 + 2.02 = 1
c3 = 0.32 + 1.22 + 2.12 + 3.02 = 6

and in general, ck = ∑ki=0 i (k - i)2.

Whenever a sequence c0, c1, c2, ………… arises from two generating function
𝑓 𝑥 [for a0, a1, a2, …………] and 𝑔 𝑥 [for b0, b1, b2, …………] then the
sequence c0, c1, c2, ………… is called the convolution of the sequences a0, a1, a2,
………… and b0, b1, b2, ………….

1
Let 𝑓 𝑥 =
1−𝑥
= 1 + x + x2 + x3 + …..

Visit & Downloaded from : www.LearnEngineering.in


99
which generates
Visit &the sequence 1,
Downloaded 1, 1,
from 1, 1, 1, ……
: www.LearnEngineering.in

1
Let 𝑔 𝑥 =
1+𝑥
= 1 - x + x2 - x3 + …..,
which generates the sequence 1, -1, 1, -1, 1, -1,…..

1 1
Then 𝑓 𝑥 𝑔 𝑥 = .
1−𝑥 1+𝑥
1
=
1−𝑥 2
= 1 + x2 + x4 + x6 + ……..
which generates the sequence 1, 0, 1, 0, 1, 0, ……

Consequently, the sequence 1, 0, 1, 0, 1, 0, …… is the convolution of the


sequences 1, 1, 1, 1, 1, 1, …… and 1, -1, 1, -1, 1, -1,…..

 4. i. Find the coefficient of x60 in (x8 + x9 + x10 + …….)7.


Solution:
(x8 + x9 + x10 + …….)7 = (x8)7(1 + x + x2 + x3 + …..)7.

1 7
= x56
1−𝑥

= x56(1-x)-7

So the coefficient of x60 in (x8 + x9 + x10 + …….)7 is the coefficient of x4 in


(1- x)-7
−7 7+4−1
Which is 4
(−1)4 = (−1)4 4
(−1)4
10
= 4

ii. Find the generating function for pd(n), the number of partitions of a positive
integer n into distinct summands.

Let us consider 11 partitions of 6.

Visit & Downloaded from : www.LearnEngineering.in


100
Partitions 6, 7,Visit
9, 11&have distinct from
Downloaded summands. So pd(6)=4.
: www.LearnEngineering.in

In calculating pd(n), for any k є Z+, there are two possibilities either k is not used
as a summand or it is. This can be accounted for by the polynomial 1 + xk
.Consequently the generating function is
Pd(x) = (1 + x) (1 + x2) (1 + x3)….. = ∞𝑖=1(1 + 𝑥 𝑖 )

For each n є Z+, pd(n) is the coefficient of xn in (1 + x) (1 + x2) (1 + x3)….. (1 +


xn).
and pd(0) = 1. When n=6, the coefficient of x6 in (1 + x) (1 + x2) (1 + x3)….. (1 +
x6) is 4.

iii. Using generating function find the no of non negative & positive integer
solutions of the equation x1+x2+x3+x4=25.

Solution:

x1+x2+x3+x4=25
i.e c1 + c2 + c3 + c4 =25, ci ≥ 0, 1≤ i ≤ 4
for each ci the possibility can be described by
1 + x + x2 + x3 + ….. + x25. The answer is the coefficient of x25 in the generating
function
f(x)= (1 + x + x2 + x3 + ….. + x25)4 or
1
g(x)= (1 + x + x2 + x3 + ….. + x25+ x26 + ….)4 = = (1 – x)-4
(1−𝑥)4

 5. Find the exponential generating function for the number of


ways to arrange n letters, n ≥ 0, selected from each of the
following words.
a. HAWAII
b. MISSISSIPPI
c. ISOMORPHISM

Solution:
a. HAWAII
The letters H , W are appearing once. The possibilities of choosing H and W
are
(1+ x) i.e. 0 or 1
The letters A , I are appearing two times. The possibilities of choosing A and I
are
(1+ x +(x2/2!)) i.e. using exponential generating function
Therefore the function is (1+ x)2 (1+ x +(x2/2!))2

Visit & Downloaded from : www.LearnEngineering.in


101
b. MISSISSIPPI
Visit & Downloaded from : www.LearnEngineering.in

Similarly the function is (1+ x) (1+ x +(x2/2!))2(1+ x +(x2/2!) +(x3/3!)+(x4/4!)


)2
c. ISOMORPHISM
the function is (1+ x)3(1+ x +(x2/2!))4

 6. A person invests Rs. 1,00,000 at 12% interest compounded


annually.
a. Find the amount at the end of 1st, 2nd, 3rd year.
b. Write the general explicit formula.
c. How long will it take to double the investment.

Solution:
Let an represent the amount at the end of n years. Then an = an-1 +(0.12) an-1
where the second term in RHS is the interest received. Thus an = (1.12) an-1 for
n > 1.
a. Here the initial investment is
a0 = Rs. 1,00,000. Then a1 =(1.12) a0
a1 = (1.12) 1,00,000 = 1,12,000
a2 = (1.12) a1 = (1.12) 1,12,000 = 1,25,440
a3 = (1.12) a2 = (1.12) 1,25,440= 1,40,492.8.

The amounts at the end of 1st, 2nd, 3rd year are given by a1, a2, a3
respectively.

b. Here an = (1.12) an-1 for n > 1.


The explicit formula is an = (1.12)n a0

c. For a0 = 1,00,000, an = 2,00,000 as the amount is doubled in n years.


Then 2,00,000 = an = (1.12)n a0
an = (1.12)n 1,00,000
n = ln 2 / ln 1.12 = 6.12 years.

 7. SOLVE

i. Solve the recurrence relation Fn+2= Fn+1 + Fn, where n ≥ 0 and F0 = 0, F1 =


1. (Fibanocci relation)

Let Fn = crn, for c, r ≠ 0, n ≥ 0. Upon substitution we get crn+2 = crn+1 +


crn. This gives the characteristic equation r2 – r – 1 = 0. The characteristic roots
are r = (1± √5) / 2, so the general solution is

Visit & Downloaded from : www.LearnEngineering.in


102
𝑛 𝑛
1+ √5 Visit 1− √5
Fn = c1 + c& Downloaded from : www.LearnEngineering.in
2
2 2

To solve for c1, c2 we use the given initial values and write 0 = F0 = c1+ c2,
1 = F1 = c1 [(1 + √5) / 2] + c2 [(1 - √5) / 2]. Since - c1 = c2, we have 2 = c1 (1 +
√5) - c1 (1 - √5) and c1 = 1/√5. The general solution is given by
𝑛 𝑛
1 1+ √5 1− √5
Fn = − , n ≥ 0.
√5 2 2

When dealing with the Fibonacci numbers one often finds the assignments
α = (1 + √5) / 2 and β = (1 - √5) / 2, where α is known as the golden ratio. As a
result we find that
1 αn – βn
Fn = (αn – βn) = , n ≥ 0.
√5 α− β

ii. The no of bacteria in a culture is 1000 and this no increases 250% every 2
hrs. Use a recurrence relation to determine the no of bacteria present
after one day.
Solution:
a0 = 1000,
Increase rate is given for 2 hrs.
So n =24/2= 12
The recurrence relation is
an+1 = an + (250/100) an
an+1 = an + 2.5 an, n ≥ 0.

an+1 = an + 2.5 an
= 3.5 an

Since the unique solution of the recurrence relation


an+1 = dan, where n≥ 0, d is a constant and a0 = A is given by
an = Adn, where n≥ 0.

We get an = (1000) (3.5)n


For n=12, an = (1000) (3.5)12
= 3,379,220,508 approximately.

iii. Find the unique solution for the following recurrence relation
3an+1 - 4an = 0, n ≥ 0, a1 = 5

Solution:

Visit & Downloaded from : www.LearnEngineering.in


103
Given 3an+1Visit
- 4a&
n =Downloaded
0 and a1 = 5from : www.LearnEngineering.in
3an+1 = 4an
If n = 0,
3an+1 = 4an becomes 3a1 = 4a0
Substituting given value for a1 = 5 in the above 15 = 4a0,
a0 = 15/4.

The unique solution for the equation 3an+1 = 4an which is an+1 = (4/3)an is
an = (4/3)n a0
4 𝑛
an = 𝑎0
3
4 𝑛 15 4 𝑛−1 4 3∗5 4 𝑛−1
= = = 5, n ≥ 0 .
3 4 3 3 4 3

4 𝑛−1
The solution is an =5 ,n≥0.
3

iv. Solve the recurrence relation


2an+3 = an+2 + 2an+1 - an, n ≥ 0, a0 = 0, a1 = 1, a2 = 2.

Let an = crn for c, r ≠ 0 and n ≥ 0, we obtain the characteristic equation


2r3 – r2 – 2r +1 = 0
= (2r - 1)/(r -1)(r + 1).

The characteristic roots are ½, 1 and -1.

So the solution is an = c1(1)n + c2(-1)n + c3(1/2)n

= c1 + c2(-1)n + c3(1/2)n.

Given a0 = 0, a1 = 1, a2 = 2, we derive c1 = 5/2, c2 = 1/6, c3 = -8/3.


Consequently, an = (5/2) + (1/6) (-1)n + (-8/3) (1/2)n, n ≥ 0.

v. Solve the recurrence relation


an+2 - 4 an+1 + 3an = -200, n ≥ 0, a0 = 3000, a1 = 3300.

Solution:
Here an(p) = c1(3n) + c2(1n)
= c1(3n) + c2

Since f(n) = -200 = -200(1)n is a solution of the associated homogeneous


relation.

Here an(p) = An for some constant A. This leads us to

A(n + 2) – 4A(n + 1) + 3An = -200.

Visit & Downloaded from : www.LearnEngineering.in


104
An + 2A – Visit
4An & – 4A + 3An = from
Downloaded -2A =: www.LearnEngineering.in
-200.

A=100

Hence an = c1(3n) + c2 + 100n.

With a0 = 3000, a1 = 3300 we have an = 100(3n) + 2900 + 100n, n ≥ 0.

Industrial/Practical Connectivity of the subject

 Graph theoretic methods are widely used in linguistics


 Graphs are used in networks of communication, data organization
 Tree traversals are used for searching
 Trees are used to manipulate sorted list of data

Visit & Downloaded from : www.LearnEngineering.in


105
Visit & Downloaded from : www.LearnEngineering.in

Question Paper Code : 80305


B.E./B.Tech. DEGREE EXAMINATION, NOVEMBER/DECEMBER 2016.

Seventh Semester

Computer Science and Engineering

CS 6702 — GRAPH THEORY AND APPLICATIONS

(Regulations 2013)
Time : Three hours Maximum: 100 marks
Answer ALL questions.

PART A — (10 x 2 = 20 marks)


1. Define walk, path and circuit in a graph.
2. What is meant by eccentricity?
3. Define 1—isomorphic and 2—isomorphic.
4. What are the applications of planar graph?
5. Define minimal dominating set and maximal independent set.
6. Find the chromatic number of a complete graph of n vertices.
7. In how many different ways can the letters of the word 'LEADING' be
arranged in such a way that the vowels always come together?
8. A committee including 3 boys and 4 girls is to be formed from a group of
10 boys and 12 girls. How many different committees can be formed from the
group?
9. Define recurrence relation.
10. Define generating function.

PART B — (5 x 16= 80 marks)

11. (a) (i) Show that the maximum number of edges in a simple graph with n
vertices is n(n — 1)/2. (6)
Prove that if a graph has exactly two vertices of odd degree, there
must be path joining these two vertices. (5)
. Prove that any two simple connected graphs with n vertices, all of
degree two, are isomorphic. (5)
Or

Visit & Downloaded from : www.LearnEngineering.in


106
Visit & Downloaded from : www.LearnEngineering.in

(b) (i) Mention some of the properties of tree. (5)


(ii) Prove that in any tree, there are atleast two pendant vertices. (5)
(iii) Show that a Hamiltonian path is a spanning tree. (6)

12. (a) (i) Explain max- flow min -cut theorem. (10)
(ii) Explain about Fundamental cut set and Fundamental circuit in a
graph. (6)

Or
(b) (i) Prove that every connected graph has atleast one spanning tree. (6)
(ii) Prove the graphs K5 and K3,3 are non planar. (10)

13. (a) (i) Prove that every tree with two or more vertices is 2 -chromatic. (5)
(ii) Prove that a graph of n vertices is a complete graph iff its chromatic
polynomial is
(6)
Prove that a covering g of a graph is minimal iff g contains no paths
of length ,three or more. (5)

Or
(b) (i) Explain Euler digraph. (10)
(ii) Discuss about some types of digraph with suitable example. (6)

14. (a) (i) How many arrangements are there of all the vowels adjacent in
SOCIOLOGICAL? (4)
(ii) Find the value of n for the following: 2P(n, 2) +50 = P(2n,2). (5)
(iii) How many distinct four -digit integers can one make from the digits
1, 3, 3, 7, 7 and 8? (4)
(iv) In how many possible ways could a student answer a 10 -question
true -false test? (3)

Or
(b) (i) How many arrangements of the letters in MISSISSIPPI has no
consecutive S's? (4)
(ii) A gym coach must select 11 seniors to play on a football team. If he
can make his selection in 12,376 ways, how many seniors are
eligible to play? (4)
(iii) How many permutations of size 3 can one produce with the letters
m, r, a, f and t? (4)
(iv) Rama has two dozen each of n different colored beads. If she can
select 20 beads (with repetitions of colors allowed), in 230,230 ways,
what is the value of n? (4)

2. (a) (i) Discuss about exponential generating functio

(
i
i
)
Visit & Downloaded from : www.LearnEngineering.in
107
F
Visit & Downloaded from : www.LearnEngineering.in
15. (a) (i) Discuss about exponential generating function with an example.(10)

(ii) Find the unique solution of the recurrence relation 6an - 7an_j = 0, n > 1, a3 = 343 .
(6)

Or
#

(b) (i) The population of Mumbai city is 6,000,000 at the end of the year 2015. The number of
immigrants is 20000 n at the end of year n. The population of the city increases at the rate of 5%
per year. Use a recurrence relation to determine the population of the city at the end of 2025.(8)
(ii) Write short notes on summation operator.(8)

T
h
e

p
o
Visit & Downloaded from : www.LearnEngineering.in
108 p
u
Visit & Downloaded from : www.LearnEngineering.in

Question Paper Code:71691

B.E./B.Tech. DEGREE EXAMINATION, APRIL/MAY 2017.

Seventh/Eighth Semester

Computer Science and Engineering

CS 6702 — GRAPH THEORY AND APPLICATIONS

(Common to Information Technology)

(Regulations 2013)

Time : Three hours Maximum: 100 marks

Answer ALL questions.

PART A — (10 x 2 = 20 marks)

1.Define Euler graph. Show that an Euler graph is connected except for any isolated vertices the graph
may have.

2 Can there be a path longer than a Hamiltonian path (if any) in a simple,connected, undirected graph?
Why?

3. Define planar graphs.

4. Identify two spanning trees fort the following graph:

p. 5

5.Does the following graph have a maximal matching? Give reason.

Visit & Downloaded from : www.LearnEngineering.in


109
Visit & Downloaded from : www.LearnEngineering.in

6. Draw K9 and K9 and show that thickness of K9 is 2 while thickness of


K9 is 3.

7. State the rule of sum, the first principle of counting.

8. Use Venn diagram to represent the following scenario:


If S : a set, C1= condition 1 and C2 - condition 2 satisfied by some elements
of S, indicate on the diagram - S, N(C 1), N(C2 ) N(C 1, C2) and N(C 1, C 2).

9. Give explanation for the following:


+ x i° + ...)
Generating function for x + x2 + + x5
the no. of ways to have
n cents in pennies and nickels

10. Solve the recurrence relation a n+1 - a = 3n2 - n n 0 a() = 3.

PART B — (5 x 16 = 80 marks)

11. (a) Define the following terms:


(i) Walk
(ii) Euler path
(iii) Hamiltonian path
(iv) Subgraph
(v) Circuit
(vi) Complete graph • (6)
From the given graph draw the following:
(vii) Walk of length 6
(viii) Is this an Euler graph? Give reasons
(ix) Is there a Hamiltonian path for this graph? Give reasons
(x) Find atleast two complete subgraphs - (10)

Or

(b). (i) List any five properties of trees. (6)

Visit & Downloaded from : www.LearnEngineering.in


110
(ii)
Visit
Define eccentricity of a&vertex
Downloaded from
V in a tree : www.LearnEngineering.in
T and give an example tree and its eccentricity from the
root. (10)

12. (a) (i) Define spanning tree and give an example.

(ii) A farm has six walled plots full of water. The graph representation of it is
given below. Use the concepts of spanning tree, cutsets appropriately to
determine the following :

(1) How many walls will have to be broken so that all the water can be
drained out?

(2) If only one plot was full of water and this had to be drained into all
other plots, then how many walls need to be broken?

Or
(b) State the Eulers formula relating the number of vertices, edges and faces of a planar
connected graph. Give two conditions for testing for planarity of a given graph.
Give a sample graph that is planar and another that is non-planar.

13. (a) Describe the steps to find adjacency matrix and incidence matrix for a
directed graph with a simple example.

Or

(b) Write a note on chromatic polynomials and their applications.


v
14. (a) In how many ways can the 26 letters of the alphabet be permuted so that
the patterns car, dog, pun or byte occures? Use the principle of inclusion and
exclusion for this.
Or

b) When n balls numbered 1, 2, 3 ... n are taken in succession from a container, a rencontre occurs
if mt}? ball withdrawn is numbered m, 1 < m < n.

Find the probability of getting

(i) no rencontres.
(ii) exactly one rencontre
(iii) Atleast one rencontre and
(iv) r rencontries 1 < r < n. Show intermediate steps.
15 (a).If an is count of number of ways a sequence of Is and 2s will sum to n, for n > 0. Eg a3
= 3 (i) 1, 1, 1 ; (ii) 1, 2, and (iii) 2, 1 sum up to 3.
a n.
Find and solve a sequence relation for 111

Visit & Downloaded from : www.LearnEngineering.in


Visit & Downloaded from : www.LearnEngineering.in

(b) What are Ferrers diagrams? Describe how they are used to (i)represent integer
partition (ii) conjucate diagram or dual partitions (iii) Self- conjugates (iv)
representing bisections of two partition.

112

Visit & Downloaded from : www.LearnEngineering.in


Visit & Downloaded from : www.LearnEngineering.in

ADDITIONAL QUESTIONS WITH ANSWERS

UNIT-I

1. Find the number of vertices of G if it has 21 edges, 3 vertices of degree 4 and the other vertices of
degree 3.

Ans: Let n be the number of vertices in G

Given that 3 vertices of degree 4 and n-3 vertices are of degree 3,

therefore we get 3(4) + 3 (n-3) = 2(21)

=> 12+3 n-9 = 42

=> 3n=39 => n=13. That is , the graph G has 13 vertices.

2.What is the maximum possible level (height) of a binary tree of length (2n+1) (n>=0) vertices?

Ans: Let k be the height of a binary tree on (2n+1) vertices.

To get a vertex in maximum level, we must keep exactly 2 vertices in each level except the root
vertex.

That is, out of (2n+1) vertices, one is a root and the remaining 2n vertices can keep n levels.

Thus , the maximum height of a tree is n.

Hence, the maximum possible value of k is n.

This can also be shown that as:

2+2+......+2(k-times)>= 2n

=> 2k>=2n => k>=n.

Therefore the minimum value of k is n.

3.What is the minimum possible height of a binary tree on 2n-1 (n>=1) vertices?

Ans: Let k be the minimum height of a binary tree on (2n-1) vertices.

For minimum height ,we have to keep maximum number of vertices in the previous level before
placing any vertex in the next level.

Then we get, 2n-1<=20+21+.....+2k=2k+1-1

That is 2n-1<=2k+1-1

=>2n0<=2k+1

=> n<=2k. Take log on (natural log) both sides, we get log2n<=k

=> k>= log2n. Since k is an integer , the minimum value of k=[log2n] -> integral part.

113

Visit & Downloaded from : www.LearnEngineering.in


Visit & Downloaded from : www.LearnEngineering.in

4. Can a single graph have 5 vertices and 12 edges? If so , draw it otherwise why it is not possible to
have such a graph.

Ans: In a single graph, there are no parallel edges .The maximum number of edges in a complete
graph containing 5 vertices is=c(5,2) edges.5C2=10 Edges.

since 12> 10, it is not possible to have a single graph with more than 10 edges.

5. How many more edges are there in a complete graph K7than in the complete graph k5?

Ans: C(7,2) - C(5,2)= 21-10=11 Edges.

6.Prove that a simple graph with n vertices must be connected if it has more than [(n-1)(n-2)]/2
edges.

Solution: Let G be a single graph with n vertices and more than [(n-1)(n-2)]/2 edges.

Assume that G is not connected.

Then G must have at least 2 components, and let G1 and G2 be these 2 components.

Let V1 be the vertex set of G1with M number of vertices.

If V2 is the vertex set of G2, then the number of vertices in V2=n-m.

We get,(i) 1<=m n-1

(ii) There is no edge joining a vertex of V1 and a vertex of V2

(iii) Number of vertices in V2=n-m>=1.

Now |E(q)|=|E(G1 U G2)|=|E(G1)|+ |E(G2)|<=[m(m-1)]/2+[(n-m)(n-m-1)]/2

since The max. number of edges in a single graph with 'n' vertices is n(n-1)/2

=1/2 [m2-m+n(n-m-1)-m(n-m-1)]

=1/2[m2-m+n2-nm-n-mn+m2+m]

=1/2[2m2+n2-2nm-n]

Add 2n-2 and sub 2n-2 in the RHS

Therefore |E(G)|<=1/2[2m2+n2-2mn-n+(2n-2)-(2n-2)]

=1/2[(n2-2n+2)-2n(m-1)+2(m2-1)]

=1/2[(n-1)(n-2)-2n(m-1)+2(m-1)(m+1)]

=1/2[(n-1)(n-2)-2(m-1)(n-m-1)]

(ie)|E(G)|<=(n-1)(n-2)/2 , since (m-1)(n-m-1)>=0 for 1<=m<=n-1.

Which is a contradiction because G has more than (n-1)(n-2)/2 edges. Hence G is a connected graph.

114

Visit & Downloaded from : www.LearnEngineering.in


Visit & Downloaded from : www.LearnEngineering.in

UNIT-II

1.Find the fundamental circuits and cut set of the spanning tree { a,b,c,d}.

Ans: Fundamental circuits

={a,b,c,d,e},{a,b,g},{a,b,c,f} and {c,g}

The fundamental cut sets are = {a,g,f,e},{b,g,f,e},{c,e,f,h} and {e,d}.

2. Find the minimal spanning tree for the following graph G using the Kruskal's algorithm.

solution: The given graph G contains 6 vertices and hence we obtain a spanning tree with 5 edges.

Arrange the edges of the graph in increasing order of their weights as shown below:

Edge (a,e) (c,d) (a,b) (b,f) (c,f) (b,e) (a,d) (e,f) (d,f) (b,c) (e,d)
Weight 1 2 3 4 5 6 7 8 9 10 11
The minimum spanning tree is constructed as follows. weight of the minimal spanning tree is

=1+2+3+4+5=15 units

(from the above table)

3. consider the following digraph:

(a) What is the shortet distance for a path from A to K?

(b) What is the weight of the minimal spanning tree for the above graph?

ANS:(i) The shortest path from A to K can be formed by using Dijikstra's algorithm, as shown below:

We statr from vertex A . The possible vertices from A are B,C and D. Arrange these the shortest is C
with weight 1. Next all possible vertices from C are B,F.F is the smallest.

Again from F, the possible verices are E,H,I,J and G. G is with smallest distance.

From G, J is the only possible path with length 3. from J,K is the only possible vertex of length 2.

Therefore the shortest distance from A to K is A->C->F->G->J->K with distance value =


1+3+1+3+2=10

(ii)According to Kruskal's algorithm , the minimal spanning tree is (RHS graph) and the weight of the
minimal spanning tree is = 5+1+3+4+2+1+2+3+1+2=24.

4.Prove that every cut set in a connected graph G must contains at least one branch of every spanning
tree of G.

Proof: Let S be any cut set in G and T be any spanning tree of G.

Since S is a cut set, the removal of S from G splits G into H1 and H2(say).

Since T is a spanning tree, T must contains a branch joining a vertex in H1 and a vertex in H2. This
branch must belong to S.( Otherwise ,the graph does not get disconnected when this branch is
removed). Hence the proof.

115

Visit & Downloaded from : www.LearnEngineering.in


Visit & Downloaded from : www.LearnEngineering.in

5.Prove that the edge connectivity of a connected graph G cannot exceed the minimum degree of G.
that is , λ(a)<=δ(a).

Proof: Let G be a connected graph and v be a vertex of minimum degree in G.

Then the removal edges incident with the vertex V disconnects the vertex V from the graph G.

Thus , the set of all edges incident with the vertex V forms a cut set of G.

But edge connectivity is the minimum number of Edges in G whose removal disconnects G this
implies that the edge connectivity λ (G) is always less than the number of edges incident with the
vertex V. hence λ (G) <= δ (G) .

6.Let G be a graph with K components, where each component is a tree. obtain a formula for |E| in
terms of |V| and K.

ANS: Clearly |E| =Σki=1|Ei|and |V| = Σki=1|vi|

each component is a tree  |Ei|=|vi|-1 for each i

 |E|= Σki=1 (|vi|-1) = Σki=1 |vi|- Σki=1 1 = |V|-K.

7. Prove that a connected graph G is a tree iff each edge is a cut edge.

ANS: Let G be a tree we know that there is a unique path between any two vertices . Hence the
deletion of any edge in this path makes the graph disconnected.

 Each edge in G is a cut edge. conversely, let each edge in the graph be a cut edge which implies
that g has a unique path between each pair of vertices.

 G is a tree.

8. Let G be a planner graph with n vertices and E edges with F faces and K components, then n-
e+f=K+1.

Soln:

Let the ith component of G be a (ni ,ei) graph with fi faces.

 ni - ei + fi = 2 Ұ i=1,2....K

Σki=1 (ni - ei + fi )= Σki=1 (2)

=> Σki=1 ni - Σki=1 li + Σki=1 fi = 2K

=> n-e+f+(k-1)=2K

[since infinite space is connected K times in Σ fi ]

 n-e+f + k+1

9. Prove that the Kurutowski's graphs k5 and k3,3 are non - planar graphs , using Euler's formula.

116

Visit & Downloaded from : www.LearnEngineering.in


Visit & Downloaded from : www.LearnEngineering.in

soln:

(i) First consider the graph k5

k5, , n=5 , e=10

3n-6 = 3(5)-6 = 9<10=e[ l=10]

(ie)3n-6<l

This is not true for a connected planner graph G.

 k5 =G is not a planner graph.

(ii) Now consider the graph K3,3

No region in K3,3 can be founded with fewer than 4 edges.

hence if K3,3 were planer, we get 2e>= 4f

(ie)2e≥4(e-n+2)

(ie) 2(9) ≥ 4(9-6+2)[  e=9 & n=6]

(ie) 18≥20, which is not true.

 K 3 cannot be a planar.

UNIT-III

1.Find the chromatic number of the following graph.

ANS: From the given graph ∆(G) =4

 ᴪ (G)≤1+∆(G)≤1+4=5

since G has a triangle sub graph, then ᴪ (G)≥3

 3≤ ᴪ (G)≤5.

suppose ᴪ (G)≤5 , then G should have 5 vertices with degree at least 4[ Every K-chromatic graph
has at-least k-variables v such that deg(V) ≥k-1].But there are only 3 vertices in G with degree 4.

 ᴪ (G)=5 is not possible

 3≤ ᴪ (G)≤4 now consider the 3-coloring of the graph. Clearly 3-coloring is not possible  ᴪ (G)=4.

2.Apply the Welsh Powell algorithm to find the chromatic number to the following graph.

ANS: order the degree sequence(5,3,3,3,3,3,3,5) with vertices (f,a,b,c,d,e)

(i) color-1 to vertex f (having the highest degree)

(ii) color-2 to vertices a,c,e (alternative)

(iii) color-3 to vertices b and d (alternative)

117

Visit & Downloaded from : www.LearnEngineering.in


Visit & Downloaded from : www.LearnEngineering.in

 All vertices are colored .  ᴪ (G)=3.

3.Find the chromatic polynomial of the graph

ANS:

Since the given graph contains 5 vertices we have

P5(λ)=a1λ+a2 λ(λ-1)/2!+a3 λ(λ-1)( λ-2)/3!+a4 λ(λ-1)( λ-2)(λ-3)/4! + a4 λ(λ-1)( λ-2)(λ-3)( λ -4)/5!

since the graph has a triangle , it will require at-least 3 different colors for proper coloring.

 a1= a2=0 and a5 =5!.

To evaluate a3 :Suppose we have 3 colors x,y,and z. These 3 colors can be properly assigned to
vertices V1, V2 and V3 in 3! = 6 ways.

Now the V5 must have the same color as V3 and V4 must have the same color as V2 . Therefore, a3
=6.

To evaluate a4 : With four colors V1, V2, V3 can be properly colored in 4x6=24 different ways.

The 4th color can be assigned to either V4 or V5 ( with 2 choices). Therefore, a4= 2x24 ways

 P5(λ)= λ(λ-1)( λ-2)+2 λ(λ-1)( λ-2)(λ-3)+ λ(λ-1)( λ-2)(λ-3)( λ -4)

= λ(λ-1)( λ-2)( λ2-5 λ+7) and on further simplification = λ5 -7 λ4+18 λ3-20 λ2+8 λ.

4.Find the chromatic polynomial of the graph

Ans:

Since the given graph contains 4 vertices, we have P4(λ)=a1 λ+ a2 λ(λ-1)/2!+a3 λ(λ-1)( λ-2)/3!+a4 λ(λ-
1)( λ-2)( λ-3)/4!

To color the given graph at-least 2 different colors are required for proper coloring.

 a1=0 and a4=4!

To evaluate a2 : Suppose that we have 2 colors x and y . These 2 colors can be assigned properly to
vertices V1 and V2 in 2! = 2 ways. now the vertex V3 must have the same color as V1 and vertex V4
must have the same color as V2 . similarly we can assign x and y for V3 and V4.  a2 =2 =2!

To evaluate a3: Suppose that we have 3 colors x,y,z. with these 3 different colors we can properly
color V1, V2 and V3 in 6(=3!) different ways. we can assign the color applicable to V2 to V4. In a
similar way, we can proceed with V1, V4 and V3.  a3 =2*6 =2*3!

hence P4(λ)= λ(λ-1)*2!/2!+ 2 λ(λ-1)( λ-2)*3/3!+4! * λ(λ-1)( λ-2)( λ -3)/4!

= λ(λ-1)+2 λ(λ-1)( λ-2) λ(λ-1)( λ-2)( λ-3).

5.Show that a simple connected graph G with 7 vertices each of degree 4 is non-planar.

Ans: We know that Σd(vi)=2|E| => 4(7) = 2|E| =>|E|=14

118

Visit & Downloaded from : www.LearnEngineering.in


Visit & Downloaded from : www.LearnEngineering.in

if G is planar , then by the Eulers formula |R|=|E|-|V|+2+9.

The degree of each region is ≥3 and the sum of these 9 regions is 28[ Σdeg(R)=2|E|]

Hence there are 8 regions of degree 3 and 1 region of degree 4. Any region of degree 3 will require 3
colors. But we know that every simple planar graph G can be 2-coloured iff each vertex of G has even
degree. But the given graph is not 2-colourable which is a contradiction. Hence the graph is not
planar.

6.Show that a connected graph with exactly 2 vertices of odd degree has an Euler trail.

Ans: Let A and B be the only 2 vertices of odd degree in a connected graph G. Join these 2 vertices by
an edge e. Then A and B became vertices of even degree. Since all other vertices in G are of even
degree, then the graph G1=GUe is connected and has all vertices of even degree.

 G1 contains an Euler's circuit which must include e . The trail got by deleting e from this Euler
circuit is an Euler trail in G.

7.Prove that G is a 2- Chromatic if and only if G is bi partite.

Ans: Let the chromatic index of G be 2. Let G be properly colored with 2 colors 1 and 2 , Consider
the set of vertices colored with color 1 and the set of all vertices colored with color 2. These sets are
precisely partition of the vertex set of G such that no two of the vertices of the same set are adjacent
.Hence G is bipartite.

conversely let G be a bipartite graph. The vertex set V of G can be partitioned in to two independent
sets V1 and V2 .We can use color-1 to paint the vertices of V1 and color -2 to paint in vertices of V2.
Hence G is 2-chromatic.

8. Show that λ4-3 λ3+5 λ2-1 cannot be the chromatic polynomial of a graph.

Ans: Let F(G, λ ) = λ4-3 λ3+5 λ2-1

 From the previous theorem, the number of vertices in G is 4 and the number of edges in G is 3

 G is a (4,3) graph.

Case (i) Suppose G is a connected graph with 4 vertices & 3 edges. clearly, G is a tree (because a tree
with 4 vertices will have 3 edges).

 F(G, λ )= λ(λ-1)3

= λ4-3 λ3+3 λ2-1 which is a contradiction to the given polynomial.

 λ4-3 λ3+5 λ2-1 can be the chromatic polynomial of a graph.

Case(ii): Suppose G(4,3) is not a connected graph then G=K3 U K1

 F(G, λ )=F(K3, λ).f (K1, λ)

= λ(λ-1)( λ-2). λ= λ4-3 λ3+2 λ2 which is also a contradiction

 λ4-3 λ3+5 λ2-1 cannot be the chromatic polynomial of a graph.

119

Visit & Downloaded from : www.LearnEngineering.in


Visit & Downloaded from : www.LearnEngineering.in

UNIT-4

1.In how many ways can 10 people be seated in a row so that a certain pair of them are not next to
each other?

Ans: Number of ways of seating all 10 people is =10! ways . By the indirect counting ,only count the
number of ways of seating 10 where the certain pair of people (say A and B) are seated next to each
other.

Trat the pair of AB as one entry.

 Number of ways of arranging 9 entities=9! ways. A and B can sit in 2 ways (AB,BA)

 The total number of ways =2(9!) ways

 The required number of ways =10!-2(9!)

2. How many numbers can be formed using the digits 1,3,4,5,6,8,9 if no repetitions are allowed?

Ans: By applying the product rule , we can form

Number of 1-digit number =7

Number of 2-digit number =7 *6

Number of 3-digit number =7 *6*5.

.≤≤

Number of 7-digit number =7 *6*5*4*3*2*1

The events of 1-digit numbers, 2-digit numbers etc are mutually exclusive.

 By the sum rule, there are 7+7*6+7*6*5+........+7*6*5*4*3*2*1 different numbers that can be
formed using the given digits.

3.A student has to answer 12 of 15 questions in an examination . How many choices does the student
have:(a) If he must answer exactly 3 of the first 5 questions?

(b) If he must answer at-least 3 of the first questions?

Ans:(a) If he has to answer exactly 3 of the first five questions, as he has to answer total 12 questions
the remaining 9 questions he will answer from 10 questions so , the answer is =C(5,3)*C(10,9).

(b): If he has to answer at-least 3 of the first five questions means he has to answer 3 or 4 or 5 from
first 5 and remaining 9 or 8 7 from 10 questions. so the ansewr is C(5,3)*C(10,9)+ C(5,4)*C(10,8)+
C(5,5)*C(10,7).

4.how many words of 4 letters can be formed from the letters of word "EXAMINATION"

120

Visit & Downloaded from : www.LearnEngineering.in


Visit & Downloaded from : www.LearnEngineering.in

Ans: There are 11 letters A,A,I,I,N,N,E,X,M,T,O. For the selection of 4 letters we have the following
possiblities.

(i) 2 alike 2 alike (ii) 2 alike,2 different (iii) all 4 different

Case(i) There are 3 pairs of 2 letters, so selection of 2 pairs in 3c2 ways and the permutations of these
4 letters in 4!/2!*2!  The number of words in this case is 3c2*4!/2!*2!= 18.

Case(ii) We have to select one pair form 3 pairs and 2 distinct letters from 7 distinct letters which can
be done in 3c1*7c2 ways. Again the number of permutations=4!/2! (2same,2 distinct)

 The total number of words in this case is c*7c2*4!/2!

Case(iii) There are 8 distinct letters so the number of words of 4 different letters = 8c4* 4! =1680
hence by the same rule, the required answer is = 18+758+1680=2454.

5.Six married couples are to be seated at a circular table .In how many ways can they arrange
themselves so that no wife sits next to her husband?

Ans: For 1≤i≤6 , let Ci denote the condition where a seating arrangement has coupe i seated next to
each other.

To determine N(Ci ): For 1≤i≤6

Fix one couple and select one member from that couple. This gives that eleven persons for whom
seating arrangements have to be done.

Eleven distinct objects can be arranged around a circular table in (11-1)! =10! ways

 N(Ci ) =2(10!) ways , where the 2 takes in to account weather the wife in couple 1 is seated to the
left or right of her husband .

similarly, N(Ci )=2(10!)

To compute N(Ci , Cj ) for 1≤i≤j≤6.

Here we arranging 10 distinct objects couple i (consider as one object ) coupe j (likewise considered
as one object), and the other eight people.

Ten distinct objects can be arranged around a circular table in (10-1)! =9! ways.

 N(Ci , Cj )=22(9!)because there are 2 ways for the wife in couple i to be seated next to her husband ,
and 2 ways for the wife in couple j to be seated next to her husband.

 S2=(26)22(9!) based on the similar reasons,

We get N(C1 C2 C3) =23 8! , S3 =( 36) 23(8!)

N(C1 C2 C3 C4 ) = 24 7! , S4 =( 46) 24(7!)

N(C1 C2 C3 C4 C5 ) = 25 6! , S5 =( 56) 25(6!)

N(C1 C2 C3 C4 C5 C6) = 26 5! , S6 =( 66) 26(5!) Let so denote the total number of arrangements of the
12 people or 6 couples.

121

Visit & Downloaded from : www.LearnEngineering.in


Visit & Downloaded from : www.LearnEngineering.in

Then we get (10-1)!=11!

 The number of ways we can arrange the couples so that no wife sits next to her husband

= N (C1 C2 C3 C4 C5 C6)

i i
= 6 Si = 6 (i6) 2i (11-i)!
𝑖 =0(−1) 𝑖 =0(−1)

= 39,916,800-43,545,600+21,772,800-6,451,200+1,209,600-138,240+7680

=12,771,840 ways.

UNIT-V

1.Solve the recurrence relation

an-6an-1+9an-2=0 for n≥2, given that a0=5 ,a1=12

Ans: The characteristic equation of the given recurrence relation is K2-6K+9=0 (or) (K-3)2 =0

(ie) The roots K1= K2 =3

 The general solution for an is an =(A+Bn)3n

Where A and B are real constants.

From 1 and a0=5 ,

we get a0=5 =(A+0)30=A

From 1 and a1=12,


3 3
we get a1 =(A+B) = (5+B)

=> 12 = (5+B)*3 => B=-1

 an =(5-n)3n This is the solution of the given recurrence relation.

2.In how many different ways can eight identical cookies be distributed among 3 distinct children if
each child receives at-least 2 cookies and no more than 4 cookies?

Ans: Since each child receives at-least 2 but not more than 4 cookies , for each child there is a factor =
(x2+x3+x4).

Since there are 3 children, the generating function is = (x2+x3+x4)3.

We have to calculate the coefficient of x8 in this product. The reason is that x8 term in the expansion
corresponds to the ways 3 terms can be selected with one from each factor, that have exponents
adding up to 8.

Further , the expansion of term from the first , second and third factors are the number of cookies the
first, second and third children receive respectively.

122

Visit & Downloaded from : www.LearnEngineering.in


Visit & Downloaded from : www.LearnEngineering.in

From this computation the coefficient is 6  There are 6 ways to distribute the cookies so that each
child recives atleast 2 , but not more than 4 cookies.

3. Find the generating function for the number of ways an advertising against can purchase n minutes
(n€Z+) of air time if time slots for commercials come in blocks of 30 ,60 or 120 seconds.

Ans: Let 30 seconds represent one time unit . Then the answer is the number of integer solutions to
the equations

a+2b+4c=2n, with a,b,c≥0.

The associated generity function is

F(x)=(1+x+x2+....) (1+x2+x4+....) (1+x4+x8+....)

= 1/(1-x)*1/(1-x2)*1/(1-x4)

The coefficient of x2n is the number of partitions of 2n into 1's, 2's and 4's the answer to the problem.

4. A bank pays a certain % of annual interest on deposits, corresponding the interest once in 3 months
.If a deposit doubles in 6 years and 6 months, what is the annual % of interest paid by the bank?

Ans: Let the annual rate of interest be x %  The quarterly rate of interest is (x/4) % =(x/400)

Let P0 be the deposit made (in rupees) and Pn denote the value of the deposit at the end of the nth
quarter

 Pn+1 = Pn+(x/400)Pn=(1+x/400)Pn , n≥0

This is the recurrence relation for the problem . The general solution for this homogenous relation is

Pn=(1+x/400)Pn=(1+x/400)p0 , for n≥1

When n= 26 , it is given that pn = 2 p0

substitute 2 in 3 we get

(1+x/400)26P0=2p0

(ie) (1+x/400)26 =2

=> loge(1+x/400)=loge2/26=0.02666

=> 1+x/400 = e0.02666 =1.027

=> x= 400*0.027 =10.8

 The annual rate of intrest paid by the bank is 10.8 (once in 3 months compoundend).

5. Find the recurrence relation with initial condition for 6, -18, 54,-162....

Ans: 6, -18, 54 ,-162 ..... is a geometric progression with common ratio(-3)

Thus the recurrence relation is an+1= -3an , n≥0 ,a0=6.

123

Visit & Downloaded from : www.LearnEngineering.in

Potrebbero piacerti anche