# Five color theorem

Five color theorem A Five-Color Map The five color theorem is a result from graph theory that given a plane separated into regions, such as a political map of the countries of the world, the regions may be colored using no more than five colors in such a way that no two adjacent regions receive the same color.

The five color theorem is implied by the stronger four color theorem, but is considerably easier to prove. It was based on a failed attempt at the four color proof by Alfred Kempe in 1879. Percy John Heawood found an error 11 years later, and proved the five color theorem based on Kempe's work.

Conteúdo 1 Outline of the proof by contradiction 2 Linear time five-coloring algorithm 3 Veja também 4 Referências 5 Further reading Outline of the proof by contradiction First of all, one associates a simple planar graph {estilo de exibição G} to the given map, namely one puts a vertex in each region of the map, then connects two vertices with an edge if and only if the corresponding regions share a common border. The problem is then translated into a graph coloring problem: one has to paint the vertices of the graph so that no edge has endpoints of the same color.

Porque {estilo de exibição G} is a simple planar, ou seja. it may be embedded in the plane without intersecting edges, and it does not have two vertices sharing more than one edge, and it doesn't have loops, then it can be shown (using the Euler characteristic of the plane) that it must have a vertex shared by at most five edges. (Observação: This is the only place where the five-color condition is used in the proof. If this technique is used to prove the four-color theorem, it will fail on this step. Na verdade, an icosahedral graph is 5-regular and planar, and thus does not have a vertex shared by at most four edges.) Find such a vertex, and call it {estilo de exibição v} .

Now remove {estilo de exibição v} a partir de {estilo de exibição G} . The graph {estilo de exibição G'} obtained this way has one fewer vertex than {estilo de exibição G} , so we can assume by induction that it can be colored with only five colors. If the coloring did not use all five colors on the five neighboring vertices of {estilo de exibição v} , it can be colored in {estilo de exibição G} with a color not used by the neighbors. So now look at those five vertices {estilo de exibição v_{1}} , {estilo de exibição v_{2}} , {estilo de exibição v_{3}} , {estilo de exibição v_{4}} , {estilo de exibição v_{5}} that were adjacent to {estilo de exibição v} in cyclic order (which depends on how we write G). So we can assume that {estilo de exibição v_{1}} , {estilo de exibição v_{2}} , {estilo de exibição v_{3}} , {estilo de exibição v_{4}} , {estilo de exibição v_{5}} are colored with colors 1, 2, 3, 4, 5 respectivamente.

Now consider the subgraph {estilo de exibição G_{1,3}} do {estilo de exibição G'} consisting of the vertices that are colored with colors 1 e 3 only and the edges connecting them. To be clear, each edge connects a color 1 vertex to a color 3 vertex (this is called a Kempe chain). Se {estilo de exibição v_{1}} e {estilo de exibição v_{3}} lie in different connected components of {estilo de exibição G_{1,3}} , we can swap the 1 e 3 colors on the component containing {estilo de exibição v_{1}} without affecting the coloring of the rest of {estilo de exibição G'} . This frees color 1 por {estilo de exibição v} completing the task. If on the contrary {estilo de exibição v_{1}} e {estilo de exibição v_{3}} lie in the same connected component of {estilo de exibição G_{1,3}} , we can find a path in {estilo de exibição G_{1,3}} joining them that consists of only color 1 e 3 vértices.

Now turn to the subgraph {estilo de exibição G_{2,4}} do {estilo de exibição G'} consisting of the vertices that are colored with colors 2 e 4 only and the edges connecting them, and apply the same arguments as before. Then either we are able to reverse the 2-4 coloration on the subgraph of {estilo de exibição G_{2,4}} contendo {estilo de exibição v_{2}} and paint {estilo de exibição v} cor 2, or we can connect {estilo de exibição v_{2}} e {estilo de exibição v_{4}} with a path that consists of only color 2 e 4 vértices. Such a path would intersect the 1-3 colored path we constructed before since {estilo de exibição v_{1}} Através dos {estilo de exibição v_{5}} were in cyclic order. This is clearly absurd as it contradicts the planarity of the graph.

Então {estilo de exibição G} can in fact be five-colored, contrary to the initial presumption.

Linear time five-coloring algorithm In 1996, Robertson, Sanders, Seymour, and Thomas described a quadratic four-coloring algorithm in their "Efficiently four-coloring planar graphs".[1] In the same paper they briefly describe a linear-time five-coloring algorithm, which is asymptotically optimal. The algorithm as described here operates on multigraphs and relies on the ability to have multiple copies of edges between a single pair of vertices. It is based on Wernicke's theorem, which states the following: Wernicke's theorem: Assume G is planar, nonempty, has no faces bounded by two edges, and has minimum degree 5. Then G has a vertex of degree 5 which is adjacent to a vertex of degree at most 6.

We will use a representation of the graph in which each vertex maintains a circular linked list of adjacent vertices, in clockwise planar order.

In concept, the algorithm is recursive, reducing the graph to a smaller graph with one less vertex, five-coloring that graph, and then using that coloring to determine a coloring for the larger graph in constant time. In practice, rather than maintain an explicit graph representation for each reduced graph, we will remove vertices from the graph as we go, adding them to a stack, then color them as we pop them back off the stack at the end. We will maintain three stacks: S4: Contains all remaining vertices with either degree at most four, or degree five and at most four distinct adjacent vertices (due to multiple edges). S5: Contains all remaining vertices that have degree five, five distinct adjacent vertices, and at least one adjacent vertex with degree at most six. Sd: Contains all vertices deleted from the graph so far, in the order that they were deleted.