Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
in
ENGINEERING COLLEGES
2016 – 17 Odd Semester
Department of CSE
SUBJECT CODE: CS6702
Regulation: 2013
Copyright © SCAD
SYLLABUS
OBJECTIVES:
Be familiar with the most fundamental Graph Theory topics and results.
Be exposed to the techniques of proofs and analysis.
UNIT I INTRODUCTION 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.
TOTAL: 45 PERIODS
OUTCOMES:
TEXT BOOKS:
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.
4. Rosen K.H., ―Discrete Mathematics and Its Applications‖, Mc Graw Hill, 2007.
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
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
Be familiar with the most fundamental Graph Theory topics and results.
Be exposed to the techniques of proofs and analysis.
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.
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.
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
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
21 III Covering 1 21 T1
30 IV Binomial theorem 1 30 T2
32 IV Combinatorial numbers 2 34 T2
37 V Generating functions 1 38 T2
38 V Partitions of integers 1 39 T2
40 V Summation operator 1 42 T2
41 V Recurrence relations 2 44 T2
Non-homogeneous recurrence T2
43 V 2 47
relations
44 V Method of generating functions 2 49 T2
PART A
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.
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.
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.
A graph which contains multiple edges (parallel edges) but no loops is called
multi graph.
e.g.
v1
v3
v2
6. Define component.
Euler graph:
The above figure is an Euler graph which is arbitrarily traceable from the vertex c.
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.
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.
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.
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
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.
Infinite graph
2. THEOREMS IN GRAPHS
Prove that
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.
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.
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.
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
(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
Is complement of G.
5. THEOREMS IN EULER GRAPHS
(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.
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
6. THEOREMS IN TREES
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.
Proof:
To interconnect n distinct points, the minimum number of line segments needed is n
– 1. The resulting structure is a tree.
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.
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
(e) If in a Graph G, there is one and only one path between every pair of
vertices, G is tree.
Proof:
Proof:
The theorem will be proved by induction on the number of vertices. It is true
for n=1,2, and 3.
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.
UNIT II
PART-A
e.g. cut-set {a, c, d, f} connects vertex set {v1,v2, v6} with {v3, v4, v5}
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.
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.
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.
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.
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.
PART B
1. SPANNING TREES
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.
2. CUT-SET
Show that
(i) Every circuit has an even number of edges in common with any cut-set.
Proof:
(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.
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.
In this figure consider the ring sums of the following three pairs of cut-sets.
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:
3. PLANAR GRAPHS
Example:
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 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.
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.
o The sum of all angles subtended at each vertex in the polygon net is
Theorem 4:
Example:
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
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.
(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
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.
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.
Theorem:
Proof:
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.
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.
5. NETWORK FLOWS
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:
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
Edge Connectivity:
Vertex connectivity:
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:
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
Theorem 4:
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:
Theorem 7:
Proof:
Theorem 8:
Theorem 9:
7.FUNDAMENTAL CIRCUITS
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
Theorem 2:
Proof:
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}
Branch e is contained in both these fundamental circuits, and none of the remaining
three fundamental circuits contains branch e.
UNIT III
PART-A
1. Describe the ways for Finding a Maximal Independent Set.
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,
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.
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.
6. Define Coverings.
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.
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
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‘, λ)
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.
Proof:
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:
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.
Each of these relations is defined only on pairs of numbers of the set, thus the
name binary relation.
A digraph is a natural way of representing a binary relation on a set X. Each
xi X is represented by a vertex xi. If xi has a relation R to xj, a directed edge
is drawn from vertex xi to xj for every pair (xi, xj).
Every binary relation on a finite set can be represented by a digraph without
parallel edges and vice versa.
Reflexive Relation: A relation R on X that satisfies xiRxi for every xi X is
called a reflexive relation.
The digraph of a reflexive relation will have a self-loop at every vertex. Such
a digraph representing a reflexive binary relation on its vertex set is called a
reflexive digraph.
PART-B
1.CHROMATIC PARTITIONING
a) Write short notes on Chromatic Partitioning.
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
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
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.
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.
Let us further take the Boolean complement φ‘ of this expression and express
it as a sum of Boolean products:
φ‘ = f1 + f2 + …………. + fk
φ = 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
c) Theorem :
Proof:
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.
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
2.CHROMATIC POLYNOMIAL
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
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
(ii) One if λ = 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.
P(Kn, n) = 1 if λ = n, and
PRODUCT RULE:
In particular, If G is made up of two parts G1 and G2, then we have P(G, λ) =P (G1,
λ).
P (G2, λ) so that
DECOMPOSITION THEOREM:
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
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
= λ4 – 4 λ3 + 6 λ2 -3 λ.
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}.
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”
a) Theorem:
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.
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
Statement: The vertices of every planar graph can be properly colored with five
colors.
Proof:
5. DIRECTED GRAPH
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).
∑ d+(vi) = ∑ d–(vi)
i=1 i=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:
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
PART- A
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.
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.
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
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?
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?
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.
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.
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
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
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.
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.
2. BINOMIAL THEOREM
𝑛 𝑛
= 𝑘=0 𝑘 𝑥 𝑘 𝑦 𝑛 −𝑘
Proof:
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
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.
4. PERMUTATIONS
Proof:
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
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
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
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.
5. 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
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:
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.
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
N(C1) = 300 /5 = 60
N(C2) = 300 /6 = 50
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
e.g.
𝑛
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.
Solution:
i. 0, 1, 2, 3, ………
𝑥
2
is the generating function for the sequence 0, 1, 2, 3,…….
(1−𝑥)
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, ………….
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
Solution:
∞ 3𝑥 𝑖
𝑓 𝑥 = 3e3x = 3 𝑖=0 𝑖! .
So 3e3x is the exponential generating function for the sequence 3, 32, 33,…
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!, ……
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.
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.
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.
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
PART B
1. Solve
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.
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?
𝑓 𝑥 = (1 – x)-n
= ∞𝑖=0 −𝑛 𝑖
𝑥𝑖
∞ 𝑛+𝑖−1
= 𝑖=0 𝑖
𝑥𝑖 .
𝑛+𝑟−1
So the answer is 𝑟
.
2. SOLVE
Solution:
0, 2, 6, 12, 20, 30, 42, ………
2𝑥
is the generating function for the sequence 0, 2, 6, 12, 20, 30, 42, ………
(1−𝑥)3
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}.
−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,
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
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 + …..
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, ……
1 7
= x56
1−𝑥
= x56(1-x)-7
ii. Find the generating function for pd(n), the number of partitions of a positive
integer n into distinct summands.
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 + 𝑥 𝑖 )
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
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
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.
7. SOLVE
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
iii. Find the unique solution for the following recurrence relation
3an+1 - 4an = 0, n ≥ 0, a1 = 5
Solution:
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
= c1 + c2(-1)n + c3(1/2)n.
Solution:
Here an(p) = c1(3n) + c2(1n)
= c1(3n) + c2
A=100
Seventh Semester
(Regulations 2013)
Time : Three hours Maximum: 100 marks
Answer ALL questions.
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
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)
(
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
Seventh/Eighth Semester
(Regulations 2013)
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?
p. 5
PART B — (5 x 16 = 80 marks)
Or
(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) 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.
(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
(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
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.
2.What is the maximum possible level (height) of a binary tree of length (2n+1) (n>=0) 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.
2+2+......+2(k-times)>= 2n
3.What is the minimum possible height of a binary tree on 2n-1 (n>=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.
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
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?
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.
Then G must have at least 2 components, and let G1 and G2 be these 2 components.
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]
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)]
Which is a contradiction because G has more than (n-1)(n-2)/2 edges. Hence G is a connected graph.
114
UNIT-II
1.Find the fundamental circuits and cut set of the spanning tree { a,b,c,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
(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.
(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.
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
5.Prove that the edge connectivity of a connected graph G cannot exceed the minimum degree of G.
that is , λ(a)<=δ(a).
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.
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:
ni - ei + fi = 2 Ұ i=1,2....K
=> n-e+f+(k-1)=2K
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
soln:
(ie)3n-6<l
(ie)2e≥4(e-n+2)
K 3 cannot be a planar.
UNIT-III
ᴪ (G)≤1+∆(G)≤1+4=5
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.
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.
117
ANS:
since the graph has a triangle , it will require at-least 3 different colors for proper coloring.
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
= λ(λ-1)( λ-2)( λ2-5 λ+7) and on further simplification = λ5 -7 λ4+18 λ3-20 λ2+8 λ.
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.
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!
5.Show that a simple connected graph G with 7 vertices each of degree 4 is non-planar.
118
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.
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.
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
119
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.
Number of ways of arranging 9 entities=9! ways. A and B can sit in 2 ways (AB,BA)
2. How many numbers can be formed using the digits 1,3,4,5,6,8,9 if no repetitions are allowed?
.≤≤
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?
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
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.
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)
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.
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 .
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.
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
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
Ans: The characteristic equation of the given recurrence relation is K2-6K+9=0 (or) (K-3)2 =0
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).
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
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
= 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
This is the recurrence relation for the problem . The general solution for this homogenous relation is
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
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....
123