Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                

Graphs 4 Print PDF

Download as pdf or txt
Download as pdf or txt
You are on page 1of 9

1

V. Adamchik

Graph Theory
Victor Adamchik
Fall of 2005
Plan
1. The Chinese Postman Problem
2. The Traveling Salesman Problem
3. Graph Coloring

The Chinese Postman Problem


The Chinese Postman Problem (CPP) is a close cousin to finding an Euler cycle.
Given a connected weighted graph or digraph G the CPP is the problem of finding the
shortest cycle that uses each edge in G at least once. The name comes from the fact that a
Chinese mathematician, Mei-Ko Kwan (1962), developed the first algorithm to solve this
problem for a rural postman.
We will develop a method for solving this type of problem.
In the best situation, where each vertex has even degree, any Euler circuit solves the problem.
Consider a case when a graph has two vertices of odd degree.

V. Adamchik

21-127: Concepts of Mathematics

A
H

B
2

1
C

II
I
4

This picture immitates the mail delivery. A number assigned to an edge represents the time
needed to travel along the edge. Our job is to find a shortest route starting and ending at
vertex A.
The graph does not have an Euler cycle but an Euler path, because there are two vertices of
odd degrees. Therefore in order to cover all edges we will have to retrace edges IC and CF.
This will increrase the total time by 10.
3

A
H

B
2

1
C

II
I
4

The total time is 2

49

Is there faster route? Yes, we do not retrace CF, but rather use FE+ED+DC which is shorter
by 1.

V. Adamchik

Generally, it might be not so simple to find a shortest path between two vertices. In this
case we might use Dijkstra's algorithm (15-211).
What if the graph has more than two vertices of odd degree?

In this graph there are four vertices of odd degree B, D, F, H. If we connect two pairs of
these four vertices by two edges, the new graph will have an Euler cycle. It follows that we
need to find the two paths (connecting chosen pairs) with total weight as small as possible.

First we need to list all the ways to put the four odd vertices in two pairs.
Pairing

Path

Weight

Path

Weight

BD && FH

B-A-D

F-E-H

10

BF && DH

B-E-F

D-E-H

12

BH && DF

B-E-H

D-E-F

10

Then, for each set of two pairs we find the shortest path joining the two vertices in each of
the two pairs. Thje first pairing has the samllest total time 18. To find a specific route,
take the given graph and add the retraced streets as multiple edges. Then, find an Euler
circuit for this multigraph.

V. Adamchik

21-127: Concepts of Mathematics

The Traveling Salesman Problem


The Traveling Salesman Problem (TSP) is a close cousin to finding an Hamiltonian cycle.
Given a weighted graph G, you want to find the shortest cycle (may be non-simple) that
visits all the vertices.
Consider the following graph:

One cycle is a b c f e d a that has a total weight 26. Is there a shorter cycle?
The approximation algorithm. This algorithm does not solve the problem but rather yeilds a
solution which is within a factor of 2 of optimal (in the worst-case).
Here is the alghorithm
Step 1: find a MST.
Step 2: do a DFS of the MST.

V. Adamchik

Graph Coloring
Your mission color the entire map of South America.
1. No country may touch another country of the same color.
2. You will be charged each time you use a color
3. You must color the map as cheaply as possible.
We start with the graph representation: vertices represent countries. Two vertices are adjacent if two countries have a common boarder. So we reduce a problem to vertex coloring.
Adjacent vertices must be colored in different colors.

Definition. The chromatic number of a graph is the least number of colors required to do a
coloring of a graph.

V. Adamchik

21-127: Concepts of Mathematics

What is the largest possible chromatic number?


This question has puzzled mathaticians for a very long time. It has now been proved that
any planar graph will have a chromatic number of at most 4. This is called the Four Color
Problem. The problem was solved in 1976 by Appel and Heken. They developed an algorithm that solves the problem. The Four Colour Theorem is the first major theorem to be
proved using a computer, The disadvantage of this computer aid approach is that the proof
cannot be verified by hand.
Theorem
In any connected planar graph G (with at least 3 vertices), E

3V

6.

By means of this theorem we can prove that K5 is not planar. Indeed, K5 has 5 vertices and
10 edges. By the theorem 10

15

9 which is not true.

Proof.
a) If the graph has no cycles, E
E

V
E

1
V

V . Also, V
2V

3 or 2 V
E

3V

b) If the graph has a cycle. We will count the number of pairs (edge, face).
e1, F1 , e1, F2 , e2, F1 , e2, F2 , e3, F1 , e3, F2

V. Adamchik

On one hand, each face is bounded by at least 3 edges. So


edge, face

3F

On other hand, each edge is associated with at most two faces,


edge, face

2E

Combining these together, yeilds


3F

edge, face

2E

or
3F

2E

By the Euler formula


2

3V

3F

3E

3V

2E

3E

3V

QED
Corollary
V, E has a vertex of degree less than 6.

Every simple planar graph G


Proof.

Using the handshaking theorem combined with the previous theorem


deg v
v V

Find the average degree

3V

V. Adamchik

21-127: Concepts of Mathematics

1
V

deg v

6V

12
V

v V

12
V

So, at least one vertex has a degree less than 6.


QED
Theorem. (Six Color Theorem)
Any simple planar graph G can be colored with 6 colors.
Proof (by induction on number of vertices).
If G has six or less vertices, then the result is obvious.
Suppose that all such graphs with n

1 vertices are 6-colorable.

We have proved (see Corollary in the previous chapter) that any planar graph has at least
one vertex of degree less than 6. Let us call it v. Remove this vertex v from the graph. By
inductive hypothesis, that new graph G

v is 6-colorable. Then, since there are at most 5

adjacent vertices to v, there must be a color available to use. This completes the proof.
QED.
Theorem. (Heawood)
Every simple planar graph can be colored with less than or equal to 5 colors.
Proof.
We going to repeat the previous theorem proof to the point where it fails. The proof fails
when a picked vertex v has degree 5. In this case the proof goes as follows. Label the vertices adjacent to v as x1 , x2 , x3 , x4 and x5 . Assume that x4 and x5 are not adjacent to each
other. (the fact that not all xk joined by edges follows from the observation that if the are
then the graph of these 6 vertices will be K5 which is not planar).

V. Adamchik

Next we remove edges v, x1 , v, x2 and v, x3 and then contract edges v, x4 and v, x5 .


In the procces of contraction, vertices v, x4 , x5 will be replaced by a new vertex y, and all
neighbors of v, x4 , x5 will be neighbors of y.

We obtain a new graph H with two less vertices. By inductive hypothesis we can color it
with 5 colors.
Next we color vertices in our original graph G with the same coloring as for H, except
vertices v, x4 , x5 . We assign y's color to vertices x4 and x5 (remember they are not adjacent). We give v a color different from all colors used on the four vertices x1 , x2 , x3 and y
QED.

You might also like