Covering and Coloring Mat175
Covering and Coloring Mat175
Covering and Coloring Mat175
A covering graph is a subgraph which contains either all the vertices or all the edges
corresponding to some other graph. A subgraph which contains all the vertices is called
a line/edge covering. A subgraph which contains all the edges is called a vertex
covering.
Line Covering
Let G = (V, E) be a graph. A subset C(E) is called a line covering of G if every vertex of G is
incident with at least one edge in C, i.e.,
deg(V) ≥ 1 ∀ V ∈ G
because each vertex is connected with another vertex by an edge. Hence it has a minimum
degree of 1.
Example
Take a look at the following graph –
It is also known as Smallest Minimal Line Covering. A minimal line covering with
minimum number of edges is called a minimum line covering of ‘G’. The number of edges
in a minimum line covering in ‘G’ is called the line covering number of ‘G’ (α1).
Example
In the above example, C1 and C2 are the minimum line covering of G and α1 = 2.
Every line covering does not contain a minimum line covering (C 3 does not contain
any minimum line covering.
If a line covering ‘C’ contains no paths of length 3 or more, then ‘C’ is a minimal line
covering because all the components of ‘C’ are star graph and from a star graph, no
edge can be deleted.
Vertex Covering
Let ‘G’ = (V, E) be a graph. A subset K of V is called a vertex covering of ‘G’, if every edge of
‘G’ is incident with or covered by a vertex in ‘K’.
Example
Take a look at the following graph −
The subgraphs that can be derived from the above graph are as follows −
K1 = {b, c}
K2 = {a, b, c}
K3 = {b, c, d}
K4 = {a, d}
Here, K1, K2, and K3 have vertex covering, whereas K4 does not have any vertex covering as
it does not cover the edge {bc}.
A vertex ‘K’ of graph ‘G’ is said to be minimal vertex covering if no vertex can be
deleted from ‘K’.
Example
In the above graph, the subgraphs having vertex covering are as follows −
K1 = {b, c}
K2 = {a, b, c}
K3 = {b, c, d}
Here, K1 and K2 are minimal vertex coverings, whereas in K3, vertex ‘d’ can be deleted.
It is also known as the smallest minimal vertex covering. A minimal vertex covering
of graph ‘G’ with minimum number of vertices is called the minimum vertex covering.
The number of vertices in a minimum vertex covering of ‘G’ is called the vertex
covering number of G (α2).
Example
In the following graph, the subgraphs having vertex covering are as follows −
K1 = {b, c}
K2 = {a, b, c}
K3 = {b, c, d}
Graph -
In graph coloring, the constraints that are set on the graph are colors, order of
coloring, the way of assigning color, etc. A coloring is given to a vertex or a particular
region. Thus, the vertices or regions having same colors form independent sets.
Clustering
Data mining
Image capturing
Image segmentation
Networking
Resource allocation
Processes scheduling
Sudoku
Map Coloring
Scheduling the tasks
Preparing Time Table
Conflict Resolution
Examples:
1. Suppose that you are responsible for scheduling times for lectures in a university.
You want to make sure that any two lectures with a common student occur at
different times to avoid a conflict. We could put the various lectures on a chart and
mark with an X any pair that has students in common:
Lecture A C G H I L M P S
Astronomy X X X X
Chemistry X X
Greek X X X X X
History X X X X
Italian X X X
Latin X X X X X X
Music X X X X
Philosophy X X
Spanish X X X X
A more convenient representation of this information is a graph with one vertex for
each lecture and in which two vertices are joined if there is a conflict between them:
Now, we cannot schedule two lectures at the same time if there is a conflict, but we
would like to use as few separate times as possible, subject to this constraint. How many
different times are necessary?
We can code each time with a color, for example 11:00-12:00 might be given the
color green, and those lectures that meet at this time will be colored green. The no-conflict
rule then means that we need to color the vertices of our graph in such a way that no two
adjacent vertices (representing courses which conflict with each other) have the same
color.
We shall suppose that we can properly color the graph with only three colors, and
show that this leads to a contradiction. We start by coloring G, H, and L three different
colors, as we must. We might as well assume they are the colors as shown above. Then M
must be the same color as H, since M is adjacent to G and L and there are only three colors
available. So, we color M blue as shown above. In a like manner, I must be colored green
since it is adjacent to L and M, which we have determined to be red and blue. Now S is
adjacent to H, L, and I, and so it must be a different color from them all. So, we cannot make
do with only three colors. So, four colors are needed to properly color the graph. This
means that we need to have at least four different times for lectures in our school.
Chromatic Number
Example:
In our scheduling example, the chromatic number of the graph would be the
minimum number of time slots needed to schedule the meetings so there are no time
conflicts.
This scheduling example is a simple example, so we can find the chromatic number
of the graph just using inspection. If we start by coloring vertex A with the color red, then
we can see that vertices B and C must be a different color than this since they share an edge
with A. Furthermore, B and C also share an edge, so they have to be different colors as well,
say blue and green. The only vertex left is D, and we see that it shares an edge with both B
and C, so it can't be blue or green, but it does not share an edge with A, so it can be red.
The problem can be solved by analyzing every round-trip route to determine the
shortest one. However, as the number of destinations increases, the corresponding
number of roundtrips surpasses the capabilities of even the fastest computers. With 10
destinations, there can be more than 300,000 roundtrip permutations and combinations.
With 15 destinations, the number of possible routes could exceed 87 billion.
The Brute Force approach, also known as the Naive Approach, calculates and
compares all possible permutations of routes or paths to determine the shortest unique
solution. To solve the TSP using the Brute-Force approach, you must calculate the total
number of routes and then draw and list all the possible routes. Calculate the distance
of each route and then choose the shortest one—this is the optimal solution.
This is perhaps the simplest TSP heuristic. The key to this method is to always
visit the nearest destination and then go back to the first city when all other cities are
visited. To solve the TSP using this method, choose a random city and then look for the
closest unvisited city and go there. Once you have visited all cities, you must return to
the first city.