0% found this document useful (0 votes)
11 views

Final Document

Uploaded by

harikarthi610
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
11 views

Final Document

Uploaded by

harikarthi610
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 22

Chapter 1

Introduction

1.1 General Introduction


Graph Theory is the study of points and lines. It is a pictorial representation that represents
the Mathematical truth. The history of graph theory may be specifically traced to 1735, when
the Swiss mathematician Leonhard Euler solved the Königsberg bridge problem. The
Königsberg bridge problem was an old puzzle concerning the possibility of finding a path
over every one of seven bridges that span a forked river flowing past an island—but without
crossing any bridge twice. Euler argued that no such path exists. His proof involved only
references to the physical arrangement of the bridges, but essentially he proved the first
theorem in graph theory.

1.2 Preliminaries

In this section we list the basic definitions and results which are needed for the
subsequent chapters.

Definition 1.2.1

A Graph G=( V ( G ) , E ( G ) ) consists of two sets, V ( G )= { v 1 , v 2 , … } is called the vertex


set of G and E ( G )={e 1 , e 2 , … } is called the edge set of G . Elements of V ( G ) and E ( G ) are
called vertices and edges respectively.

Definition 1.2.2

The vertex u is called the initial vertex of (u , v ) and v is called the end vertex of
(u , v ) .

Definition 1.2.3

In a graph, two vertices are said to be adjacent, if there is an edge between the two
vertices.

Definition 1.2.4

A vertex is incident to an edge if the vertex is one of the two vertices the edge
connects.
Definition 1.2.5

A graph G is Complete if every two distinct vertices of G are adjacent. A complete graph
of order n is denoted by K n.

Definition1.2.6
The Degree of a vertex v in a graph G is the number of edges incident with v and is
denoted by degGv. Also, deg v is the number of vertices adjacent to v.

Definition1.2.7

A u−v walk W in G is a sequence of vertices in G , beginning with u and ending at v such


that consecutive vertices in the sequence are adjacent, we can express ‘ W ’ as
W :u=v 0 , v 1 , … , v k =v , where k ≥ 0 and v i and v i+1 are adjacent for i=0 , 1 , … , k−1. Each
vertex v i(0 ≤i ≤ k) and each edge v i vi +1 (0 ≤i ≤ k−1) is said to belong to W.

 If u = v then the walk W is closed.


 If u ≠ v, then W is open.

Definition1.2.7

A graph H is called a subgraph of a graph G, written H ⊆ G, if V(H) ⊆ V(G) and


E(H) ⊆ E(G).

 If H ⊆ G and either V(H) is a proper subset of V(G) or E(H) is a proper subset of


E(G), then H is a proper subgraph.
 If a subgraph of a graph G has the same vertex set as G, then it is a spanning
subgraph of G.

Definition1.2.8

In a graph G, a u-v walk in which no vertices repeated is a u-v path.

Definition1.2.9

In a graph G, a u-v walk in which no edges is traversed more than once is a u-v trail.

Definition1.2.10

In a graph G, a circuit is a closed trail of length 3 or more. Hence a circuit begins and
ends with the same vertex but repeats no edges. A circuit that repeats no vertex, except for
the first and last, is a cycle.
Definition1.2.11

A graph G is called a planar graph G, if G can be drawn in the plane so the no two of its
edges cross each other.

Definition1.2.12

A graph G is complete if every two distinct vertices of G are adjacent. A complete graph
of order n is denoted by Kn.

Definition1.2.13

A proper vertex coloring of a graph is a vertex - coloring such that the endpoints of
each edge are assigned two different colors. A graph is said to be vertex k-colorable if it has a
proper vertex k- coloring.

For any positive integer k, a vertex k coloring that uses exactly k different colors.

Definition 1.2.14

A graph which has neither loops nor multiple edges. i.e, where each edge connects two
distinct vertices and no two edges connect the same pair of vertices is called a simple graph
of G.

Definition 1.2.15

A graph G is a bipartite graph if V(G) can be partitioned into two subsets U and W, called
partite sets, such that every edge of G joins a vertex of u and a vertex of W.

Definition 1.2.16

A clique in a graph G is a complete subgraph of G. The order of the largest clique in a


graph is its clique number, which is demoted by ω(G).
Chapter 2

Vertex coloring

2.1 Introduction

It is not particularly, difficult to show that the map drawn in Figure 2.1 can be colored
with four colors, that is, each region of the map can be assigned one of four given colors such
that neighboring regions are colored differently. Indeed, one such coloring is shown in the
figure, where r, b, g and y denote red, blue, green and yellow, respectively. What does
coloring the regions of a map have to do with graphs? Actually, there is a close connection.
With each map, there is associated a graph G, called dual of a map, whose vertices are the
regions of the map and such that two vertices of G are adjacent if the corresponding regions
are neighboring regions. The dual of the map, whose vertices are the regions of the map and
such that two vertices of G are adjacent if the corresponding regions are neighboring regions.
The dual of the map in Figure 2.1 is a connected planar graph. In fact, the dual of every map
is a connected planar graph. Conversely, every connected planar graph is the dual of some
map.

Coloring the regions of a map suggests coloring the vertices of its dual. Indeed, it
suggests coloring the vertices of any graph. By a proper coloring of a graph G, we mean an
assignment of colors to the vertices of G, one color to each vertex, such that adjacent vertices
are colored differently.
2.1.1 Chromatic Number:

The smallest number of colors in any coloring of a graph G is called the chromatic
number of G and is denoted by χ(G). If It is possible to color (the vertices of) G from a set of
k colors, then G is said to be k-colorable. A coloring that use k colors is called a k-coloring.
If χ(G) = k, then G is also said to be k-chromatic and every k-coloring of G is a minimum
coloring of G.

Figure 2.1 shows a coloring of a graph G, namely, a coloring of the dual of the map in
Figure 2.1 Necessarily, then, G is 4-colourable; indeed, G is 4-chromatic. In fact, the coloring
of G in Figure 2.3 is suggested by the coloring of the map.

Types of Chromatic Number of Graphs:

There are various types of chromatic number of graphs, which are described as follows:

Cyclic graph:

1. The chromatic number in a cycle graph will be 2 if the number of vertices in that
graph is even.
2. The chromatic number in a cycle graph will be 3 if the number of vertices in that
graph is odd.

Plannar Graph:

1. In a plannar graph, the chromatic Number must be Less than or equal to 4.


2. The plannar graph can also be shown by all the above cycle graphs except example 3.

Complete Graph:

In a complete graph, the chromatic number will be equal to the number of vertices in that
graph.
2.1.2 Examples for Some Graph:

Simple graph:

Planar graph:

1) A Planar Graph 2) A Planar Embedding of G

Bipartite Graph :
CHAPTER 3
APPLICATIONS OF VERTEX COLORING
3.1.1 Introduction

Vertex coloring is a fundamental concept in graph theory with numerous applications


across various fields. Here are some notable applications:

 Scheduling Problems
 Register Allocation in Compilers
 Map Coloring
 Frequency Assignment
 Network Design
 Game Theory
 Social Networks
 Biological Networks
 Event Planning
 Error Detection in Coding Theory

3.1.2 Needed Results

 χ(H) ≤χ(G).
 β(G)=k if and only if ω(G ) = k.

Problem 1:

Suppose that Mr. Arun, Mr.Bala, Mr.Prem, Mr.Ram, Mr.Sakthi, Mr.sathish and Mr.Sam
are planning a ball. Mr.Arun, Mr.prem, Mr.Ram constitute the publicity committee. Mr.Prem,
Mr.Ram and Mr.Sathish are the refreshment committee. Mr.Sathish and Mr.Arun make up
the facilities committee. Mr.Bala, Mr.Prem, Mr.Ram, and Mr.Sakthi form the decorations
committee. Mr.sakthi, Mr.Arun, and Mr.Sam are the music committee. Mr.Sakthi,
Mr.Sathish, Mr.Prem form the cleanup committee. We can find the number of meeting times,
in order for each committee to meet once. We will construct a graph model with one vertex
for each committee. Each vertex is labeled with the first letter of the name of the committee
that is represents. Two vertices are adjacent whenever the committees have at least one
member in common. For example, P is adjacent to R, since Mr.Prem is on both the publicity
committee and the refreshment committee.
Graph Model for the Ball Committee Problem

To solve this problem, we have to find the chromatic number of G. Each of the four
vertices P, D, M, and C is adjacent to each of the other. Thus in any coloring of G these four
vertices must receive different colors say 1, 2, 3 and 4, respectively, as shown in Figure. Now
R is adjacent to all of these except M, so it cannot receive the colors 1, 2, or 4. Similarly,
vertex F cannot receive colors 1, 3, and 4, nor can it receive the color that R receives. But we
could color R with color 3 and F with color 2.

Result:

This completes a 4-coloring of G. Since the chromatic number of this graph is 4, four
meeting times are required.

The publicity committee meets in the first time slot, the facilities committee and the
decoration committee meets in the second time slot, refreshment and music committee meet
in the third time slot, and the cleanup committee meets last.
Problem 2:

We can find a schedule of the final exams for Math 115, Math 116, Math 185, Math 195,
CS 101, CS 102, CS 273 and CS 473, using the fewest number of different time slots, if there
are no students taking both Math 115 and CS 473, both Math 116 and CS 473, both Math
195 and CS 101, both Math 195 and CS 102, both Math 115 and Math 116, both Math 115
and Math 185, and Math 185 and Math 195, but there are students in every other
combination of courses. This scheduling problem can be solved using a graph model, with
vertices representing courses and with an edge between two vertices if there is a common
student in the courses they represent. Each time slot for a final exam is represented by a
different color. A scheduling of the exams corresponds to a coloring of the associated graph.

Time Period Courses

I Math116, CS 473

II Math 115, Math 185

III Math 195, CS 102

IV CS 101

V CS 273
Since {Math 116, Math 185, CS 101, CS 102, CS 273}, from a complete sub graph
of G, χ(G) ≥ 5. Thus, five time slots are needed. A coloring of the graph using five colors and
the associated schedule.

Problem 3:

The Mathematics department of a certain college plans to schedule the classes Graph
Theory(GT), Statistics(S), Linear Algebra(LA), Modern Algebra(MA), Advanced
Calculus(AC) and Real Analysis(RA) this summer. Ten students (see below) have indicated
the courses they plan to take. With this information, use graph theory to determine the
minimum number of time periods needed to offer these courses so that every two classes
having a student in common are taught at different time periods during the day. Of course,
two classes having no students in common can be taught during the same period.

 Karthika: LA,S Dhruv: MA, LA,RA


 Nila: MA, RA, LA Kavya: RA, LA, AC
 Roselin: AC, LA, S Ananya: RA, AC
 Nancy: GY, MA, LA Lisha: LA, GT, S
 Jennie: AC, S, LA Apsara: GT, S

Explanation:

First, we construct a graph H whose vertices are the six subjects. Two vertices (subjects)
are joined by an edge if some student is taking classes in these two subjects. The minimum
number of time periods is χ(H). Since H contains the odd cycle GT, S, AC, RA, MA, GT, it
follows that three colors are needed to color the vertices on this cycle.
Since LA is adjacent to all vertices of this cycle, a fourth color is needed for LA.

Thus, χ(H) ≥ 4.

However, there is a 4-coloring of H shown in the below graph and so χ(H)=4.


Certainly, every graph G of order n is n-colorable.

Case: 1

If G ≅ Kn, then, every two vertices must be assigned different colors and so
χ(Kn)=n.

Case: 2

If G has order n and G ≇ Kn, then G contains two non-adjacent vertices, say u and v.
Assigning u and v the color 1 and the remaining n-2 vertices the colors 2,3,…,n-1 produces
an (n-1)-coloring of G and so χ(G) ≤ n-1. That is, a graph G of order n has chromatic number
n if and only of G ≅ Kn.

Another, If H is a subgraph of a graph G, then any coloring of G produces a coloring of H as


well. Since it may be possible to color H with even fewer colors, by the result

χ(H) ≤ χ(G).

Opposite to an independent set of vertices in a graph is a clique. The order of the largest
clique in a graph G is its clique number, which is demoted by ω(G).

β(G)=k if and only if ω(G ) = k.

In general, there is no formula for the chromatic number of a graph. In fact, determining
the chromatic number of even a relatively small graph is often an extremely challenging
problem. However, lower bounds for the chromatic number of a graph G can be given in
terms of the independence number and clique number of G.

Result:

This tells us way to schedule these six classes during four time periods, namely,

o Period 1: Graph Theory, Advanced Calculus;


o Period 2: Real Analysis;
o Period 3: Statistics, Modern Algebra;
o Period 4: Linear Algebra.
Problem 4:

The given figure shows the traffic lanes L1,L2,…,L9 at the intersection of two busy
streets. A traffic light is located at this intersection. During a certain phase of the traffic
light, those cars in lanes for which the light is green may proceed safely through the
intersection. What is the minimum number of phases needed for the traffic light so that
(eventually) all cars may proceed through the intersection?

Explanation:

Construct a graph G to model this situation.

V(G) = {L1,L2,….L9} and two vertices (lanes) are joined by an edge if vehicles in these
two lanes cannot safely enter the intersection at the same time, as there is a possibility of an
accident.

Answering this question requires determining the chromatic number of the graph in
Figure. First notice that {L2, L4 ,L6 ,L8} ≅ K4 and so χ(G) ≥ 4. Since there exists a 4-
coloring of G, as indicated in the graph of figure χ(G) = 4.

Since the vertex set of the graph G of figure b) can be partitioned quite obviously into the
four independent sets {L1,L2,L3}, {L4,L5}, {L6,L7}, and {L8,L9}. However, this
observation (while also providing another 4-coloring of G) again only shows that χ(G) ≤ 4.
Figure b)

A coloring of a graph G can also be thought of as a function c from V(G) to the set N of
positive integers(or natural numbers) such that adjacent vertices have distinct functional
values, that is, a coloring of G is a function c: V(G) →N such that uv ∈ E(G) implies that
c(u)≠c(v).

We now present an upper bound for the chromatic number of a graph in terms of its
maximum degree. The technique used in the proof if the following result is algorithmic and
Greedy in nature, in the sense that colors are assigned to the vertices, one vertex at a time, in
what appears to be an optional manner.

Problem 5:

Problem on Scheduling Lecture Halls for the Students Eight courses are offered by a
computer institute. With a X, the table below displays which pairs of courses share one or
more students. At one time, only two lecture halls are available for usage. Determine the
number of time slots for students to attend classes without interfering with their second
course using graph coloring

MS Pr L 3-D Ph T Co Dr CAD Et Cy
MS Tools X X X X
Programming languages X X X X X
3-D animation X X X
Photoshop Techniques X X X X
Corel Draw X X X X
Auto CAD X X X X
Ethical hacking X X X X X
Cyber Law X X
Explanation :
Take the courses to be the vertices V = {V 1, V2, V3, V4, V5, V6, V7, V8}
corresponding to the courses MS Tools, Programming Languages, 3-D Animations,
Photoshop Techniques, Corel Draw, Auto CAD, Ethical Hacking, Cyber Law respectively.
The Simple Sequential Coloring Algorithm

Vertex Computer Courses

V1 MS Tools

V2 Programming Languages

V3 3 – D Animation

V4 Photoshop Techniques

V5 Corel Draw

V6 Auto CAD

V7 Ethical Hacking

V8 Cyber Law

Step 2: Plotting the vertices in such a way that the courses enrolled by the students does not
make conflict.

Step3 :

Start giving coloring on the vertices to find the minimum number of time slots that can be
allotted for the students.

(i) Plotting Red color for the vertex V1 for the students who opted MS Tools.

V1 -
(ii) From MS Tools extending the edges to mark the students who opted other courses in the
pair of MS Tools.

The students who had taken MS Tools also taken, Programming, Photoshop and Coral Draw
and Auto CAD as their second course.V1, V2,V4, V5, and V6 are adjacent.

(iii) Moving on to the next step, join the vertices and give coloring for the next pair of
courses.

This shows the students who took the course programming also associated with MS Tools, 3-
D Animation, Photoshop, Ethical Hacking and Cyber law. From the vertex V 2, it connects to
the vertices V1, V3, V4, V7 and V8.
(iv) From the vertex V3, extend the edges to connect the courses to their pairs .This shows
the students who opted for course 3 –D Animation also choose MS Tools,Corel Draw and
Cyber law as their second option. So,from the vertex V 3 the edges lines up to the vertices
V1,V5,and V8 .

(v)Now, moving further, from the vertex V 4 stretches its edges towards, the courses which
has been paired with it.This shows the students who opted for course Photoshop also chooses
MS Tools, Programming, Auto CAD, and Ethical Hacking as their second option. So, from
the vertex V4 the courses connect towards to the vertices V1, V2, V6 and V7.

(vi) Moving forward to the next step, the vertex V 5 holds the vertices which are all its
corresponding pair courses. The above graph describes that the students who chosen corel
Draw, in addition they choose MS Tools, Programming , 3-D Animation, Auto CAD as their
next preference.
(vii) Then, the next step is to take the vertex V6 extend its vertices to its paired courses.

From the above graph, we come to know that the candidates who had chosen auto CAD,also
chooses MS Tools,Photoshop, Corel Draw and Ethical Hacking.

(viii) The final step is to connect the last vertex V 7 with its corresponding vertices. Stepping
forward to the next procedure, the vertex v 7,pairs with the vertices V1,V2,V4,V6, and
V8,corresponding to their courses.

The following graph insists that the course Ethical hacking taken students also taken MS
Tools, Programming, Photoshop, Auto CAD and Cyber law as their choices.
Now, we have connected all the vertices with their corresponding courses.

STEP 4:

To determine the minimum time slots for the courses, given the there will be only two
lecture halls available. By grouping the colors, we can deduce the perfect time slots for the
courses without clashing with other courses at a time.

Result :

Time slot 1: Red color – V1 and V8 – MS Tools and Cyber law.

Time slot 2: Blue Color – V2 and V6 – Programming and Auto CAD.

Time slot 3;Purple Color –V3 and V4 – 3D – Animation and Photoshop.

Time slot 4:Yellow Color –V5 and V7 – Corel Draw and Ethical Hacking.

Hence, the chromatic number x(G) = 4

Therefore, the minimum time slots for the given eight courses are four. There will be four
classes will be held per day in two lecture classes which the courses will not clash with each
other.
3.1.3. EXAM SCHEDULING

Let’s suppose algebra, physics, statistics and calculus are four courses of study in our
college. And let’s say that following pairs have common students :

1. Algebra and Statistics

2. Algebra and Calculus

3. Statistics and Physics

Problem:

Say Algebra and statistics exam is held on same day then students taking both courses have
to miss at least one exam. They can’t take both at same time. How do we schedule exams in
minimum no of days so that courses having common students are not held on same day?

Explanation:

First draw a graph with courses as vertex and they are connected by edges if they have
common students. Second color the graph such that no two adjacent vertices are assigned the
same color as shown below:
Look at the above graph. It solves our problem. We can conduct exam of courses on same
day if they have same color.

Solution:
DAY 1: Algebra and Physics
DAY 2: Statistics and Calculus

This solves our problem of scheduling exams so that all students can take exams without
worrying about missing one.

χ(G)=2, because 2 is minimum number of colors required to color above graph.


CHAPTER 4

CONCLUSION

Vertex coloring problem plays a major role in solving many day–to-day life problems. This
part of work explains the solution for the real- life problem which includes scheduling and
storing. A detailed explanation of two fascinating situations has been handle using some
interesting algorithms. Hence ,we can deduce solution for any kind of real time critical
situations using these vertex coloring algorithms.
References:

 Gary Chartrand and Ping Zhang: “Introduction to Graph theory”.


 https://www.britannica.com/topic/graph-theory.

You might also like