# Vizing's theorem

In graph theory, Vizing's theorem states that every simple undirected graph may be edge colored using a number of colors that is at most one larger than the maximum degree Δ of the graph. At least Δ colors are always necessary, so the undirected graphs may be partitioned into two classes: "class one" graphs for which Δ colors suffice, and "class two" graphs for which Δ + 1 colors are necessary. A more general version of Vizing's theorem states that every undirected multigraph without loops can be colored with at most Δ+µ colors, where µ is the multiplicity of the multigraph. The theorem is named for Vadim G. Vizing who published it in 1964.

## Discovery

The theorem discovered by Soviet mathematician Vadim G. Vizing was published in 1964 when Vizing was working in Novosibirsk and became known as Vizing's theorem. Indian mathematician R. P. Gupta independently discovered the theorem, while undertaking his doctorate (1965-1967).

## Examples

When Δ = 1, the graph G must itself be a matching, with no two edges adjacent, and its edge chromatic number is one. That is, all graphs with Δ(G) = 1 are of class one.
When Δ = 2, the graph G must be a disjoint union of paths and cycles. If all cycles are even, they can be 2-edge-colored by alternating the two colors around each cycle. However, if there exists at least one odd cycle, then no 2-edge-coloring is possible. That is, a graph with Δ = 2 is of class one if and only if it is bipartite.

## Proof

This proof is inspired by Diestel (2000).
Let G = (V, E) be a simple undirected graph. We proceed by induction on m, the number of edges. If the graph is empty, the theorem trivially holds. Let m > 0 and suppose a proper (Δ+1)-edge-coloring exists for all G − xy where xy ∈ E.
We say that color α ∈ {1,...,Δ+1} is missing in x ∈ V with respect to proper (Δ+1)-edge-coloring c if c(xy) ≠ α for all y ∈ N(x). Also, let α/β-path from x denote the unique maximal path starting in x with α-colored edge and alternating the colors of edges (the second edge has color β, the third edge has color α and so on), its length can be 0. Note that if c is a proper (Δ+1)-edge-coloring of G then every vertex has a missing color with respect to c.
Suppose that no proper (Δ+1)-edge-coloring of G exists. This is equivalent to this statement:
    (1) Let xy ∈ E and c be arbitrary proper (Δ+1)-edge-coloring of G − xy and α be missing from x and β be missing from y with respect to c. Then the α/β-path from y ends in x.
This is equivalent, because if (1) doesn't hold, then we can interchange the colors α and β on the α/β-path and set the color of xy to be α, thus creating a proper (Δ+1)-edge-coloring of G from c. The other way around, if a proper (Δ+1)-edge-coloring exists, then we can delete xy, restrict the coloring and (1) won't hold either.
Now, let xy$_0$ ∈ E and c$_0$ be a proper (Δ+1)-edge-coloring of G − xy$_0$ and α be missing in x with respect to c$_0$. We define y$_0$,...,y$_k$ to be a maximal sequence of neighbours of x such that c$_0$(xy$_i$) is missing in y$_{i−1}$ with respect to c$_0$ for all 0 < i ≤ k.
We define colorings c$_1$,...,c$_k$ as
    c$_i$(xy$_j$)=c$_0$(xy$_{j+1}$) for all 0 ≤ j < i,
    c$_i$(xy$_i$) not defined,
    c$_i$(e)=c$_0$(e) otherwise.
Then c$_i$ is a proper (Δ+1)-edge-coloring of G − xy$_i$ due to definition of y$_0$,...,y$_k$. Also, note that the missing colors in x are the same with respect to c$_i$ for all 0 ≤ i ≤ k.
Let β be the color missing in y$_k$ with respect to c$_0$, then β is also missing in y$_k$ with respect to c$_i$ for all 0 ≤ i ≤ k. Note that β cannot be missing in x, otherwise we could easily extend c$_k$, therefore an edge with color β is incident to x for all c$_j$. From the maximality of k, there exists 1 ≤ i < k such that c$_0$(xy$_i$) = β. From the definition of c$_1$,...,c$_k$ this holds:
    c$_0$(xy$_i$) = c$_{i−1}$(xy$_i$) = c$_k$(xy$_{i−1}$) = β
Let P be the α/β-path from y$_k$ with respect to c$_k$. From (1), P has to end in x. But α is missing in x, so it has to end with an edge of color β. Therefore, the last edge of P is y$_{i−1}$x. Now, let P' be the α/β-path from y$_{i−1}$ with respect to c$_{i−1}$. Since P' is uniquely determined and the inner edges of P are not changed in c$_0$,...,c$_k$, the path P' uses the same edges as P in reverse order and visits y$_k$. The edge leading to y$_k$ clearly has color α. But β is missing in y$_k$, so P' ends in y$_k$. Which is a contradiction with (1) above.

## Classification of graphs

Several authors have provided additional conditions that classify some graphs as being of class one or class two, but do not provide a complete classification. For instance, if the vertices of the maximum degree Δ in a graph G form an independent set, or more generally if the induced subgraph for this set of vertices is a forest, then G must be of class one.
Erdős & Wilson (1977) showed that almost all graphs are of class one. That is, in the Erdős–Rényi model of random graphs, in which all n-vertex graphs are equally likely, let p(n) be the probability that an n-vertex graph drawn from this distribution is of class one; then p(n) approaches one in the limit as n goes to infinity. For more precise bounds on the rate at which p(n) converges to one, see Frieze et al. (1988).

## Planar graphs

Vizing (1965) showed that a planar graph is of class one if its maximum degree is at least eight. In contrast, he observed that for any maximum degree in the range from two to five, there exist planar graphs of class two. For degree two, any odd cycle is such a graph, and for degree three, four, and five, these graphs can be constructed from platonic solids by replacing a single edge by a path of two adjacent edges.
In Vizing's planar graph conjecture, Vizing (1965) states that all simple, planar graphs with maximum degree six or seven are of class one, closing the remaining possible cases. Independently, Zhang (2000) and Sanders & Zhao (2001) partially proved Vizing's planar graph conjecture by showing that all planar graphs with maximum degree seven are of class one. Thus, the only case of the conjecture that remains unsolved is that of maximum degree six. This conjecture has implications for the total coloring conjecture.
The planar graphs of class two constructed by subdivision of the platonic solids are not regular: they have vertices of degree two as well as vertices of higher degree. The four color theorem (proved by Appel & Haken (1976)) on vertex coloring of planar graphs, is equivalent to the statement that every bridgeless 3-regular planar graph is of class one (Tait 1880).

## Graphs on nonplanar surfaces

In 1969, Branko Grünbaum conjectured that every 3-regular graph with a polyhedral embedding on any two-dimensional oriented manifold such as a torus must be of class one. In this context, a polyhedral embedding is a graph embedding such that every face of the embedding is topologically a disk and such that the dual graph of the embedding is simple, with no self-loops or multiple adjacencies. If true, this would be a generalization of the four color theorem, which was shown by Tait to be equivalent to the statement that 3-regular graphs with a polyhedral embedding on a sphere are of class one. However, Kochol (2009) showed the conjecture to be false by finding snarks that have polyhedral embeddings on high-genus orientable surfaces. Based on this construction, he also showed that it is NP-complete to tell whether a polyhedrally embedded graph is of class one.

## Algorithms

Misra & Gries (1992) describe a polynomial time algorithm for coloring the edges of any graph with Δ + 1 colors, where Δ is the maximum degree of the graph. That is, the algorithm uses the optimal number of colors for graphs of class two, and uses at most one more color than necessary for all graphs. Their algorithm follows the same strategy as Vizing's original proof of his theorem: it starts with an uncolored graph, and then repeatedly finds a way of recoloring the graph in order to increase the number of colored edges by one.
More specifically, suppose that uv is an uncolored edge in a partially colored graph. The algorithm of Misra and Gries may be interpreted as constructing a directed pseudoforest P (a graph in which each vertex has at most one outgoing edge) on the neighbors of u: for each neighbor p of u, the algorithm finds a color c that is not used by any of the edges incident to p, finds the vertex q (if it exists) for which edge uq has color c, and adds pq as an edge to P. There are two cases:
* If the pseudoforest P constructed in this way contains a path from v to a vertex w that has no outgoing edges in P, then there is a color c that is available both at u and w. Recoloring edge uw with color c allows the remaining edge colors to be shifted one step along this path: for each vertex p in the path, edge up takes the color that was previously used by the successor of p in the path. This leads to a new coloring that includes edge uv.
* If, on the other hand, the path starting from v in the pseudoforest P leads to a cycle, let w be the neighbor of u at which the path joins the cycle, let c be the color of edge uw, and let d be a color that is not used by any of the edges at vertex u. Then swapping colors c and d on a Kempe chain either breaks the cycle or the edge on which the path joins the cycle, leading to the previous case.
With some simple data structures to keep track of the colors that are used and available at each vertex, the construction of P and the recoloring steps of the algorithm can all be implemented in time O(n), where n is the number of vertices in the input graph. Since these steps need to be repeated m times, with each repetition increasing the number of colored edges by one, the total time is O(mn).
In an unpublished technical report, Gabow et al. (1985) claimed a faster $O(m{\sqrt {n}}\log n)$ time bound for the same problem of coloring with Δ + 1 colors.

## History

In both Gutin & Toft (2000) and Soifer (2008), Vizing mentions that his work was motivated by a theorem of Shannon (1949) showing that multigraphs could be colored with at most (3/2)Δ colors. Although Vizing's theorem is now standard material in many graph theory textbooks, Vizing had trouble publishing the result initially, and his paper on it appears in an obscure journal, Diskret. Analiz.