Graph Coloring

advertisement
Graph Coloring
prepared and Instructed by
Shmuel Wimer
Eng. Faculty, Bar-Ilan University
March 2014
Graph Coloring
1
Vertex Coloring
A k-coloring of a graph G is a labeling f : V(G) → { 1,…,k }.
A coloring is proper if no two vertices x and y, connected
with an edge have same color, xy ฯต E(G) => f(x) ≠ f(y).
G is k-colorable if it has proper k-coloring.
The chromatic number χ(G) is the smallest k such that G
has proper k-coloring. G is called k-chromatic.
If χ(G) = k, but χ(H) < k for every proper subgraph H, then
G is k-critical.
March 2014
Graph Coloring
2
The vertices having same color in a proper k-coloring
must be independent. Therefore, χ(G) is the minimum
number of independent sets covering G.
Hence, G is k-colorable iff G is k-partite.
Examples. Every bipartite graph is 2-colorable.
Every even cycle graph is 2-colorable (it is bipartite).
Every odd cycle graph is 3-colorable and 3-critical.
2-colorability can be tested with BFS. (How?)
We compute the distance from a vertex u. A connected
graph is bipartite iff G[X] and G[Y] are independent
sets, where X and Y are vertices of even and odd
distance from u, respectively.
March 2014
Graph Coloring
3
The largest clique size ω(G) satisfies χ(G) ≥ ω(G).
The largest independent set size α(G) satisfies χ ๐‘ฎ
≥ ๐’ ๐‘ฎ ๐œถ ๐‘ฎ , since every color class is an independent
set, therefore having at most ๐›ผ ๐บ vertices.
Yes, χ(G) may exceed ω(G)!
Is χ(G) > ω(G) possible?
s
C5
s s
s s
Ks
Proper coloring of Ks requites s colors. ๐œ” ๐บ = ๐‘  + 2,
but χ ๐บ = ๐‘  + 3. Hence χ(G) > ω(G).
Could it be constructed with C3 rather than C5?
March 2014
Graph Coloring
4
Example. Minimizing exam period in school. How to
schedule exams in as few parallel sessions as possible,
where now two concurrent exams have a common
student?
Define ๐บ ๐‘‰, ๐ธ , where ๐‘ฃ ∈ ๐‘‰ corresponds to a course,
and ๐‘’ ๐‘ข, ๐‘ฃ ∈ ๐ธ iff courses ๐‘ข and ๐‘ฃ have a common
student. Then an independent set of vertices implies a
parallel exam session, and χ(G) is the smallest number of
parallel sessions.
Example. Chemical storage. ๐‘› different chemicals, of
which the interaction between some pairs is explosive,
should be stored. What is the smallest required number
of compartments in the storage? χ(G).
March 2014
Graph Coloring
5
Upper Bounds of Chromatic Number
Easy bounds are χ(G) ≤ n(G), χ(G) ≥ ω(G), and ๐œ’ ๐บ
≥ ๐‘› ๐บ ๐›ผ ๐บ , all hold with equality for cliques.
Better than χ(G) ≤ n(G) upper bounds can be obtained
by coloring algorithms.
A greedy algorithm w.r.t V(G) order v1,…,vn , assigns to vi
the smallest color index not incident so far to vi.
Proposition. There is χ(G) ≤ โˆ†(G) + 1. (โˆ†(G) is the largest
vertex degree.)
Proof. By construction. A vertex has no more than โˆ†(G)
neighbors. Upon vi coloring there must be at least one
of 1,…, โˆ†(G)+1 colors unused. โ– 
March 2014
Graph Coloring
6
Different orderings may yield smaller upper bounds.
Finding the best ordering is hard. Is there an ordering
yielding χ(G)? It can be shown that such one exists.
Example. Register allocation and interval graphs.
Consider the registers used by a compiler, each has start
and end time. What is the smallest number of physical
registers that can be used?
Assign the symbols a, b, c, … to the registers in the code,
and draw their usage time intervals.
a
b
f
c
d
e
g
Proposition. If G is an interval graph then χ(G) = ω(G).
March 2014
Graph Coloring
7
Proof. By left-to-right traversal of the time intervals, pre
sorted by their starting time. Initializing k=0. Increasing
to k+1 at starting point and decreasing to k-1 at ending
point. โ– 
The bound χ(G) ≤ โˆ†(G)+1 may still be very poor.
For (n+1)-vertex star graph โˆ†(G) = n, whereas χ(G) = 2.
For (n+1)-vertex wheel graph โˆ†(G) = n, whereas χ(G) ≤ 4.
March 2014
Graph Coloring
8
The bound χ(G) ≤ โˆ†(G)+1 can be further improved by
considering the vertices with high degree first.
Proposition. (Welsh-Powell 1967) If the vertices are
ordered in non increasing degree, d1 ≥ d2 ≥ … dn, then
๐Œ ๐‘ฎ ≤ ๐Ÿ + ๐ฆ๐š๐ฑ ๐ฆ๐ข๐ง ๐’…๐’Š , ๐’Š − ๐Ÿ .
๐’Š
Proof. When vertex i is colored, at most min { di , i-1 } of
its neighbors have already been colored.
Its color is therefore 1 + min{ di , i-1 }. Maximization over
i yields the upper bound. โ– 
March 2014
Graph Coloring
9
The minimum degree δ(G) in G can also be used to
deduce upper bounds.
Lemma. If H is k-critical graph, then δ(H) ≥ k-1.
Proof. Assume in contrary that δ(H) < k-1. Let x ฯต H be a
vertex for which dH(x) < k-1.
Since H is k-critical, H-x is by definition (k-1)-colorable,
so let us use any k-1 colors to properly color H-x.
Since dH(x) < k-1, N(x) consume k-2 colors at most. Let
us color x by one of the k-1 not consume by N(x).
We managed to properly color H with k-1 colors, which
contradicts with H being k-critical graph (๐œ’ ๐บ = ๐‘˜). โ– 
March 2014
Graph Coloring
10
Corollary. (Szekeres-Wilf 1968) χ ๐บ ≤ 1 + max ๐›ฟ ๐ป .
๐ป⊆๐บ
Proof. Let ๐‘˜ = χ(๐บ) and ๐ป′ be a ๐‘˜-critical subgraph of ๐บ.
By the above lemma χ ๐บ − 1 = ๐‘˜ − 1 ≤ ๐›ฟ ๐ป′ .
There is also ๐›ฟ ๐ป′ ≤ max ๐›ฟ ๐ป , yielding the desired
bound. โ– 
March 2014
๐ป⊆๐บ
Graph Coloring
11
Coloring of Directed Graphs
Theorem. Let a graph G be directed with longest path
l(G), then ๐Œ ๐‘ฎ ≤ ๐Ÿ + ๐’ ๐‘ฎ . Furthermore, there are
orientations of G’s edges such that equality holds.
G
G’
Proof. Let G’ be a maximal acyclic sub digraph of G (not
necessarily a tree).
G’ must have some vertices with outgoing arcs only.
March 2014
Graph Coloring
12
2
G
4
3
1
5
G’
6
1
Define f(v) to be a coloring function assigning color 1+l(v)
to vertex v.
f is strictly increasing along a path in G’ using colors
1+l(G’) on V(G) = V(G’).
For each edge uv ฯต E(G) there exists a path in G’ between
u and v, since either there was uv ฯต E(G’) or the edge is
closing a cycle of G.
March 2014
Graph Coloring
13
That implies f(u) ≠ f(v) since f increases along paths of G’.
Consequently, f is a proper coloring and χ(G) ≤ 1 + l(G).
To prove the existence of an orientations of G’s edges
satisfying χ(G) = 1 + l(G), an orientation satisfying χ(G) ≥
1 + l(G) is shown.
Let f be an optimal coloring satisfying f(G) = χ(G). We
derive a digraph G* as follows.
Each edge uv ฯต E(G*) is oriented u → v iff f(u) < f(v).
Since f is a proper coloring, this defines an orientation.
March 2014
Graph Coloring
14
Since the color labels along paths in G* strictly increase,
and there are only χ(G) labels, there is l(G*) ≤ χ(G*) – 1,
hence χ(G*) = 1 + l(G*). โ– 
1
2
G
G*
3
4
March 2014
Graph Coloring
15
Brook’s Theorem
The bound χ ๐บ ≤ โˆ† ๐บ + 1 holds for any graph.
Brook showed that cliques and odd cycles are essentially
the only graphs where χ ๐บ = โˆ† ๐บ + 1 holds.
Theorem. (Brook 1941) If ๐บ is connected and other than
a clique or an odd cycle, then ๐Œ ๐‘ฎ ≤ โˆ† ๐‘ฎ .
Proof. Let ๐บ have ๐‘› nodes and be connected, neither a
clique, nor an odd cycle.
Let k = โˆ† ๐บ and assume ๐‘˜ ≥ 3, as otherwise for ๐‘˜
= 1 it is a clique, and bipartite or an odd cycle for ๐‘˜
= 2.
March 2014
Graph Coloring
16
Consider first the case where ๐บ is not k-regular.
Choose a vertex ๐‘ฃ๐‘› for which ๐‘‘ ๐‘ฃ๐‘› < ๐‘˜ and grow a
spanning tree rooted at ๐‘ฃ๐‘› (by any search, e.g. BSF).
Index the vertices in decreasing order as they are being
reached by the search, yielding the order ๐‘ฃ1 , ๐‘ฃ2 , … , ๐‘ฃ๐‘› .
Each vertex other than ๐‘ฃ๐‘› has a higher-indexed
neighbor along its path to root, hence it has at most ๐‘˜
− 1 lower-indexed neighbors.
Using the greedy coloring with the vertex decreasing
order obtains proper ๐’Œ-coloring.
March 2014
Graph Coloring
17
In the remaining cases G is ๐’Œ-regular. 3 cases possible.
1st case: ๐บ is 1-connected. Let ๐‘ฅ be a cut-vertex.
๐‘ฎ′
๐‘ฅ
๐‘ฎ
Let ๐บ′ be a component of ๐บ − ๐‘ฅ together with ๐‘ฅ.
The degree of ๐‘ฅ in ๐บ′ is less than ๐’Œ and a proper ๐‘˜coloring is possible.
March 2014
Graph Coloring
18
That can repeat for every components of ๐บ − ๐‘ฅ, yielding
๐‘˜-proper coloring for each (๐‘ฅ included).
By permuting colors of the subgraphs, we can make the
colorings agree on ๐‘ฅ, yielding ๐‘˜-proper coloring of ๐บ.
2nd case: G is not 2-connected.
Find a vertex ๐‘ฃ๐‘› with two non adjacent neighbors ๐‘ฃ1 and
๐‘ฃ2 (why such exist?) whose deletion leaves a connected
subgraph (otherwise G was 2-conncted).
๐‘ฃ2
๐‘ฃ1
๐‘ฃ๐‘›
March 2014
Graph Coloring
19
๐บ − ๐‘ฃ1 , ๐‘ฃ2 is connected and a spanning tree rooted at
๐‘ฃ๐‘› can be constructed (e.g. BFS).
The labels 3, … , ๐‘› are assigned to the vertices in
decreasing order as they are reached.
Starting coloring from ๐‘ฃ1 and ๐‘ฃ2 , they use same color.
Each vertex other than ๐‘ฃ๐‘› has then at most ๐‘˜ − 1 lowerindexed neighbors so ๐‘˜ colors can be used for those.
๐‘ฃ๐‘› has ๐‘˜ neighbors, of which ๐‘ฃ1 and ๐‘ฃ2 already used the
same color. The rest neighbors used at most other ๐‘˜ − 2
colors, and ๐‘ฃ๐‘› can therefore be properly colored.
All in all, ๐‘˜ proper coloring of ๐บ has been obtained.
March 2014
Graph Coloring
20
3rd case: G is 2-connected. Choose a vertex ๐‘ฅ such that
vertex connectivity ๐œฟ ๐‘ฎ − ๐’™ = ๐Ÿ.
That is possible by choosing ๐‘ฅ to be one of the two
disconnecting vertices.
๐‘ฃ1
๐‘ฃ2
๐‘ฅ = ๐‘ฃ๐‘›
๐‘ฅ has a neighbor in every block of ๐บ − ๐‘ฅ obtained by
deleting the 2nd vertex in a cut-set, otherwise ๐บ was 1connected rather than 2-connected.
March 2014
Graph Coloring
21
There is no edge connecting ๐‘ฃ1 and ๐‘ฃ2 since they reside
in different blocks.
๐บ − ๐‘ฅ, ๐‘ฃ1 , ๐‘ฃ2 is connected since blocks have no cutvertices and ๐‘ฃ1 , ๐‘ฃ2 are not such.
๐‘˜ ≥ 3 implies ๐บ − ๐‘ฃ1 , ๐‘ฃ2 is also connected.
All in all this is the same situation as the case of ๐บ not 2connected. โ– 
Brook’s Theorem implies that the cliques and the odd
cycles are the only (๐‘˜ − 1)-regular ๐‘˜-critical graphs.
(Homework)
March 2014
Graph Coloring
22
Chromatic Polynomials
We shall associate with any graph a function telling
whether or not it is 4-colorable.
This study was motivated by the hope to prove the FourColor Theorem, which by that time was a conjecture.
Let ๐‘ƒ๐บ ๐‘˜ denote the number of proper colorings of a
graph ๐บ with ๐‘˜ colors. ๐‘ƒ๐บ ๐‘˜ is called the chromatic
function of ๐บ.
Example. ๐‘ƒ๐บ ๐‘˜ = ๐‘˜ ๐‘˜ − 1 2 . The first
vertex can be colored in ๐‘˜ ways, while
each of the other two in ๐‘˜ − 1 ways.
March 2014
Graph Coloring
23
For a tree ๐‘‡ of ๐‘› vertices there is ๐‘ƒ๐‘‡ ๐‘˜ = ๐‘˜ ๐‘˜ − 1
๐‘›−1 .
For ๐บ = ๐พ3 there is ๐‘ƒ๐บ ๐‘˜ = ๐‘˜ ๐‘˜ − 1 ๐‘˜ − 2 and for ๐บ
= ๐พ๐‘› there is ๐‘ƒ๐บ ๐‘˜ = ๐‘˜ ๐‘˜ − 1 ๐‘˜ − 2 … (๐‘˜ − ๐‘› + 1).
If ๐‘˜ < χ ๐บ
๐‘ƒ๐บ ๐‘˜ > 0.
then ๐‘ƒ๐บ ๐‘˜ ≤ 0. For ๐‘˜ ≥ χ ๐บ
there is
The Four-Color Theorem for planar graph ๐บ states that
๐‘ƒ๐บ 4 > 0.
It is difficult to compute ๐‘ƒ๐บ ๐‘˜ by inspection, but it can
be systematically obtained as a sum of chromatic
functions of complete graphs.
March 2014
Graph Coloring
24
Theorem. Let ๐‘ข, ๐‘ฃ ∈ ๐‘‰(๐บ) be not incident, and let ๐บ1 be
obtained by adding the edge ๐‘ข๐‘ฃ to ๐บ , and ๐บ2 be
obtained by identifying ๐‘ข and ๐‘ฃ in ๐บ. Then ๐‘ท๐‘ฎ ๐’Œ
= ๐‘ท๐‘ฎ๐Ÿ ๐’Œ + ๐‘ท๐‘ฎ๐Ÿ ๐’Œ .
๐‘˜ ๐‘˜−1 ๐‘˜−2
๐‘ข
๐‘ฃ
๐บ
2
=
๐‘ข
๐‘ฃ
๐บ1
๐‘ข๐‘ฃ
๐บ2
๐‘˜ ๐‘˜ − 1 ๐‘˜ − 2 ๐‘˜ − 3 +๐‘˜ ๐‘˜ − 1 ๐‘˜ − 2
March 2014
Graph Coloring
25
Proof. In a proper coloring of ๐บ, ๐‘ข and ๐‘ฃ may have
either the same color or different colors.
The number of proper colorings where ๐‘ข and ๐‘ฃ have
different colors does not change if an edge ๐‘ข๐‘ฃ would
exist, yielding ๐‘ƒ๐บ1 ๐‘˜ .
Similarly, the number of proper colorings where ๐‘ข and ๐‘ฃ
have same color does not change if an ๐‘ข and ๐‘ฃ are
merged, yielding ๐‘ƒ๐บ2 ๐‘˜ . โ– 
Corollary. The chromatic function is a polynomial.
Proof. The procedure of the theorem results in two
graphs. In ๐บ1 the number of edges is increased. In ๐บ2
the number of vertices is decreased.
March 2014
Graph Coloring
26
The process is finite. It ends with producing complete
graphs, whose chromatic functions are polynomial.
The chromatic function is therefore a finite sum of
polynomials, which must be polynomial too. โ– 
For ๐‘›-vertex graph ๐บ the degree of ๐‘ƒ๐บ ๐‘˜ is ๐‘›, the
coefficient of ๐‘˜ ๐‘› is 1 and that of ๐‘˜ ๐‘›−1 is ๐ธ ๐บ , the sign
of the coefficients is alternating, and the free coefficient
is zero. (Homework).
Example. Scheduling feasibility. Lectures scheduling is
in order, for which some time slots are given (e.g.
campus is open). There is no limit on available rooms.
March 2014
Graph Coloring
27
It is known that some lectures cannot take place in
parallel (e.g. some students are registered to both).
Is scheduling feasible? How many schedules there are?
Solution. Define a graph ๐บ ๐‘‰, ๐ธ where ๐‘ฃ ∈ ๐‘‰
corresponds to a lecture, and ๐‘’ ๐‘ข, ๐‘ฃ ∈ ๐ธ corresponds
to lectures that cannot be scheduled simultaneously.
Derive the chromatic polynomial ๐‘ƒ๐บ ๐‘˜ , where ๐‘˜ is the
number of time slots.
Given ๐‘˜, valuation of ๐‘ƒ๐บ ๐‘˜ yields the number of distinct
schedules. ๐‘ƒ๐บ ๐‘˜ ≤ 0 indicated non existence of
feasible scheduling. โ– 
March 2014
Graph Coloring
28
Example.
๐‘ƒ๐บ ๐‘˜ = ๐’Œ๐Ÿ“ − ๐Ÿ•๐’Œ๐Ÿ’ + ๐‘Ž๐‘˜ 3 − ๐‘๐‘˜ 2 + ๐‘๐‘˜
=
=
March 2014
+
+
+
Graph Coloring
+
29
=
+
+2
=๐‘˜ ๐‘˜−1 ๐‘˜−2
๐‘˜−3
+
๐‘ƒ๐บ ๐‘˜
+ 3๐‘˜ ๐‘˜ − 1 ๐‘˜ − 2
๐‘˜−4
๐‘˜−3
+ 2๐‘˜ ๐‘˜ − 1 ๐‘˜ − 2
5 − 7๐‘˜ 4 + 19๐‘˜ 3 − 23๐‘˜ 2 + 10๐‘˜
=
๐‘˜
Graph Coloring
March 2014
30
Edge Coloring
A ๐’Œ-edge-coloring of a graph ๐บ is a labeling ๐‘“: ๐ธ ๐บ
→ 1,2, … , ๐‘˜ .
Edge coloring partitions ๐ธ ๐บ into ๐‘˜ sets (some possibly
empty) ๐ธ1 , ๐ธ2 , … , ๐ธ๐‘˜ .
An edge coloring is proper if adjacent edges have
different colors. All coloring henceforth are assumed
proper.
March 2014
Graph Coloring
31
Edge coloring thus partitions ๐ธ ๐บ
into ๐‘˜ sets
๐‘€1 , ๐‘€2 , … , ๐‘€๐‘˜ of matchings. (Only loopless graphs
admit proper edge coloring).
๐บ is k-edge-colorable if it has ๐‘˜-edge-coloring.
Clearly, ๐บ is ๐’Ž-edge-colorable, where ๐‘š = |๐ธ(๐บ)|.
The edge chromatic number ๐Œ′(๐‘ฎ) is the smallest ๐‘˜ such
that ๐บ has ๐‘˜ -edge-coloring. ๐บ is called ๐’Œ -edgechromatic.
Clearly, ๐Œ′ ๐‘ฎ ≥ โˆ† ๐‘ฎ .
Not 3-edge-colorable, hence ๐œ’′(๐บ) = 4.
March 2014
Graph Coloring
32
Example. Timetabling. ๐‘š teachers ๐‘ฅ1 , ๐‘ฅ2 , …, ๐‘ฅ๐‘š and ๐‘›
classes ๐‘ฆ1 , ๐‘ฆ2 , …, ๐‘ฆ๐‘› are given. Teacher ๐‘ฅ๐‘– is required to
teach class ๐‘ฆ๐‘— a lessen of period ๐‘๐‘–๐‘— . Schedule a complete
timetable having minimum total duration.
Solution. The scheduling is represented by a bipartite
graph ๐ป ๐‘‹, ๐‘Œ , ๐‘‹ = ๐‘ฅ1 , ๐‘ฅ2 , …, ๐‘ฅ๐‘š , ๐‘Œ = ๐‘ฆ1 , ๐‘ฆ2 , …, ๐‘ฆ๐‘›
vertices ๐‘ฅ๐‘– and ๐‘ฆ๐‘— are connected with ๐‘๐‘–๐‘— parallel edges.
The minimum number of colors required for ๐ป edgecoloring ensures minimum duration.
• No schedule overlap for a teacher.
• No lesson overlap for a class.
• No two lesson schedules overlap in a class. โ– 
March 2014
Graph Coloring
33
Homework.
1. Show that a ๐‘‘ -regular graph ๐บ ๐‘‰, ๐ธ is ๐‘‘ -edge
colorable iff ๐ธ can be partitioned into perfect
matchings.
2. Show by an appropriate edge coloring that ๐œ’ ′ ๐พ๐‘š,๐‘›
= max ๐‘š, ๐‘› .
3. Given graph ๐บ ๐‘‰, ๐ธ , |๐‘‰| = ๐‘›, |๐ธ| = ๐‘š, show that
๐œ’ ′ ๐บ ≥ 2๐‘š ๐‘› .
4. Eight schoolgirls go for a walk in pairs every day. Can
they arrange their outgoing so that every girl has a
different companion at every day of the week?
March 2014
Graph Coloring
34
Edge Coloring of Bipartite Graphs
Let the subgraph ๐ป span ๐บ (๐‘‰ ๐ป = ๐‘‰ ๐บ ), and ๐ถ โˆถ
= ๐‘€1 , ๐‘€2 , … , ๐‘€๐‘˜ be a ๐‘˜-edge-coloring of ๐ป.
A color is available for an edge ๐‘’ ∈ ๐ธ ๐บ \๐ธ ๐ป if it is
available in its two end vertices.
If ๐‘’ is uncolored, any of its available colors can be
assigned to extend ๐ถ to a ๐‘˜-edge-coloring of ๐ป + ๐‘’.
For ๐‘– ≠ ๐‘— , each component of ๐ป๐‘–๐‘— โ‰” ๐ป ๐‘€๐‘– ∪ ๐‘€๐‘—
either an even cycle or a path (called ๐’Š๐’‹-path). (why?)
is
Theorem. If ๐บ is bipartite then ๐œ’′ ๐บ = โˆ† ๐บ .
March 2014
Graph Coloring
35
Proof. By induction on ๐‘š = ๐ธ ๐บ . Let ๐‘’ = ๐‘ข๐‘ฃ ๐œ– ๐ธ ๐บ .
Assume that ๐ป = ๐บ\๐‘’
has a โˆ†−edge−coloring
๐‘€1 , ๐‘€2 , … , ๐‘€โˆ† .
If a color is available for ๐‘’ we are done. Otherwise, each
of the Δ colors is represented either at ๐‘ข or at ๐‘ฃ.
Since the degrees of ๐‘ข and ๐‘ฃ in ๐บ\๐‘’ are Δ − 1 at most,
there are colors ๐’Š ≠ ๐’‹, where ๐’Š is available at ๐‘ข and exists
in ๐‘ฃ, and ๐’‹ is available at ๐‘ฃ and exists in ๐‘ข.
Consider the subgraph ๐ป๐‘–๐‘— = ๐ป ๐‘€๐‘– ∪ ๐‘€๐‘— . Because ๐‘ข has
a degree one in ๐ป๐‘–๐‘— , the component containing ๐‘ข is an ๐’Š๐’‹path ๐‘ท.
March 2014
Graph Coloring
36
๐‘ข
๐‘’
๐‘ข
๐‘ƒ
๐‘’
๐‘ƒ
๐‘ฃ
๐‘ฃ
๐‘ƒ cannot terminate at ๐‘ฃ. If it did, it would started from ๐‘ข
with color ๐’‹ and end at ๐‘ฃ with color ๐’Š, hence comprising
even number of edges.
๐‘ƒ + ๐‘’ would then be an odd cycle in ๐บ, impossible for a
bipartite graph.
Interchanging the colors of ๐‘ƒ, a new Δ-edge-colorable ๐ป
is obtained, where color ๐’‹ is available at both ๐‘ข and ๐‘ฃ.
Assigning color ๐’‹ to ๐‘’ obtains a Δ-edge-coloring of ๐บ. โ– 
March 2014
Graph Coloring
37
Upper Bound of Edge Chromatic Number
Clearly, ๐œ’ ′ ๐บ ≥ โˆ† ๐บ , and for bipartite graphs there is
๐œ’′ ๐บ = โˆ† ๐บ .
What can be said about an upper bound? Surprisingly, it
is very tight.
Theorem. (Vizing 1964, Gupta 1966). Let ๐บ be a simple
graph (no parallel edges, loopless). Then ๐Œ′ ๐‘ฎ ≤ โˆ† ๐‘ฎ
+ ๐Ÿ.
Proof. Let ๐บ′ be a proper subgraph of ๐บ, edge-colored
with โˆ† ๐บ + 1 colors, but ๐‘ข๐‘ฃ could not be colored. We
present a recoloring procedure to include ๐‘ข๐‘ฃ.
March 2014
Graph Coloring
38
Since more than โˆ† ๐บ colors are used, every vertex has a
missing color.
Let ๐’‚๐ŸŽ be missing at ๐‘ข and ๐’‚๐Ÿ be missing at ๐‘ฃ. (๐’‚๐ŸŽ must
be presented at ๐‘ฃ and ๐’‚๐Ÿ at ๐‘ข.)
๐‘ข
๐‘ข
๐‘ฃ
๐‘ฃ1
๐‘ฃ
Let ๐‘ฃ1 be a neighbor of ๐‘ข such that ๐‘ข๐‘ฃ1 is colored ๐’‚๐Ÿ .
Some color ๐’‚๐Ÿ must be missing at ๐‘ฃ1 since โˆ† ๐บ + 1
colors are used.
March 2014
Graph Coloring
39
๐‘ข
๐‘ฃ1
๐‘ข
๐‘ฃ
๐‘ฃ1
๐‘ฃ
Suppose ๐’‚๐Ÿ does not appear on ๐‘ข. We could recolor ๐‘ข๐‘ฃ1
with ๐’‚๐Ÿ , free ๐’‚๐Ÿ from ๐‘ข, and then color ๐‘ข๐‘ฃ with ๐’‚๐Ÿ .
So we suppose that ๐’‚๐Ÿ appears on ๐‘ข.
The process continues for ๐‘– ≥ 2.
Finding a new color ๐‘Ž๐‘– that appears at ๐‘ข, let ๐‘ฃ๐‘– be the
neighbor of ๐‘ข such that the edge ๐‘ข๐‘ฃ๐‘– is colored ๐‘Ž๐‘– .
March 2014
Graph Coloring
40
At ๐‘ฃ๐‘– some color ๐’‚๐’Š+๐Ÿ must be missing.
If ๐’‚๐’Š+๐Ÿ is missing at ๐‘ข, we downshift color ๐‘Ž๐‘— from ๐‘ข๐‘ฃ๐‘— to
๐‘ข๐‘ฃ๐‘—−1 for 1 ≤ ๐‘— ≤ ๐‘– (๐‘ข๐‘ฃ0 = ๐‘ข๐‘ฃ).
๐‘ฃ๐‘–
๐‘ฃ๐‘–
๐‘ฃ๐‘–
๐’‚๐’Š+๐Ÿ
๐’‚๐’Š+๐Ÿ
๐’‚๐’Š+๐Ÿ
๐‘ฃ2
๐‘ข
๐‘ฃ1
๐‘ฃ
๐‘ฃ2
๐‘ข
๐‘ฃ1
๐‘ฃ
๐‘ฃ2
๐‘ข
๐‘ฃ1
๐‘ฃ
We are finished, unless ๐’‚๐’Š+๐Ÿ appears at ๐‘ข, in which case
the process continues to ๐‘ฃ๐‘—+1 and a color ๐‘Ž๐‘–+2 .
There are only โˆ† ๐บ + 1 colors, hence the repetitive
selection of ๐‘Ž๐‘–+1 must eventually repeat a color.
March 2014
Graph Coloring
41
Let ๐‘Ž1 , … , ๐‘Ž๐‘™ be the shortest non repetitive color list such
that ๐‘Ž๐‘™+1 is missing at ๐‘ฃ๐‘™ and repeats one of ๐‘Ž1 , … , ๐‘Ž๐‘™−1 .
Let ๐‘Ž๐‘™+1 = ๐‘Ž๐‘˜ for some 1 ≤ ๐‘˜ ≤ ๐‘™ − 1. This color is
missing at ๐‘ฃ๐‘˜−1 and appears on ๐‘ข๐‘ฃ๐‘˜ .
๐‘ฃ๐‘˜
๐‘ฃ๐‘˜−1
๐‘ฃ๐‘™
๐‘ข
๐‘ฃ
๐‘ฃ2
๐‘ฃ1
If ๐‘ฃ๐‘™ is missing ๐‘Ž0 , we use ๐‘Ž0 on ๐‘ข๐‘ฃ๐‘™ and downshift colors
from ๐‘ฃ๐‘™ and to complete the augmentation.
March 2014
Graph Coloring
42
Hence we assume that ๐‘Ž0 appears at ๐‘ฃ๐‘™ and ๐‘Ž๐‘˜ does not.
๐‘ฃ๐‘˜
P
๐‘ฃ๐‘˜−1
๐‘ฃ๐‘™
๐‘ข
๐‘ฃ
๐‘ฃ2
๐‘ฃ1
Let ๐‘ƒ be the longest alternating path of edges colored ๐‘Ž0
and ๐‘Ž๐‘˜ that begins at ๐‘ฃ๐‘™ (with ๐‘Ž0 ). ๐‘ƒ is unique. (why?)
Depending on the opposite end of ๐‘ƒ, recoloring can take
place to complete the augmentation. There are three
possibilities of ๐‘ƒ end: at ๐‘ฃ๐‘˜ , at ๐‘ฃ๐‘˜−1 , and elsewhere.
March 2014
Graph Coloring
43
๐‘Ž0
๐‘Ž๐‘˜
๐‘Ž0
๐‘Ž๐‘˜
๐‘ฃ๐‘˜
๐‘ฃ๐‘˜−1
๐‘ฃ๐‘˜
๐‘Ž0
๐‘ฃ๐‘™
๐‘Ž๐‘˜
๐‘ฃ๐‘˜−1
๐‘ข
๐‘ฃ
๐‘ฃ2
๐‘Ž๐‘˜
๐‘Ž๐‘˜
๐‘ฃ๐‘™
๐‘Ž0
๐‘ข
๐‘ฃ
๐‘ฃ2
๐‘ฃ1
๐‘ฃ1
If ๐‘ƒ ends at ๐‘ฃ๐‘˜ , it is with ๐‘Ž0 since ๐‘Ž0 is presented at ๐‘ฃ๐‘˜
and ๐‘ข๐‘ฃ๐‘˜ is colored with ๐‘Ž๐‘˜ .
Downshifting colors from ๐‘ฃ๐‘˜ , interchanging colors along
๐‘ƒ, and coloring ๐‘ข๐‘ฃ๐‘˜ with ๐‘Ž0 , completes the edge coloring
augmentation.
March 2014
Graph Coloring
44
๐‘Ž๐‘˜
๐‘Ž0
๐‘ฃ๐‘˜−1
๐‘Ž0
๐‘Ž๐‘˜
๐‘Ž0
๐‘ฃ๐‘˜
๐‘ฃ๐‘™
๐‘Ž๐‘˜
๐‘ฃ๐‘˜−1
๐‘ข
๐‘ฃ๐‘™
๐‘Ž๐‘˜
๐‘ข
๐‘ฃ
๐‘ฃ2
๐‘Ž๐‘˜
๐‘ฃ๐‘˜
๐‘ฃ
๐‘ฃ2
๐‘ฃ1
๐‘ฃ1
If ๐‘ƒ ends at ๐‘ฃ๐‘˜−1 , it is with ๐‘Ž0 since since ๐‘Ž0 is presented
at ๐‘ฃ๐‘˜−1 and ๐‘Ž๐‘˜ is missing from ๐‘ฃ๐‘˜−1 .
Downshifting from ๐‘ฃ๐‘˜−1 , interchanging colors along ๐‘ƒ,
and coloring ๐‘ข๐‘ฃ๐‘˜−1 with ๐‘Ž0 , completes the edge coloring
augmentation.
March 2014
Graph Coloring
45
Finally, suppose that ๐‘ƒ neither ends at ๐‘ฃ๐‘˜ nor ๐‘ฃ๐‘˜−1 , so it
ends at some vertex outside ๐‘ข, ๐‘ฃ๐‘˜ , ๐‘ฃ๐‘˜−1 .
๐‘Ž0
๐‘Ž๐‘˜
๐‘ฃ๐‘˜−1
๐‘Ž๐‘˜
๐‘Ž0
๐‘ฃ๐‘˜
๐‘ฃ๐‘™
๐‘Ž๐‘˜
๐‘ข
๐‘ฃ
๐‘ฃ2
๐‘ฃ1
๐‘ƒ ends with either of ๐‘Ž0 or ๐‘Ž๐‘˜ colored edge, so either of
๐‘Ž0 or ๐‘Ž๐‘˜ is missing from the far end of ๐‘ƒ, as otherwise it
would not be longest.
March 2014
Graph Coloring
46
Notice that the vertices along ๐‘ƒ can also touch any of
๐‘ ๐‘ข − ๐‘ฃ๐‘˜ , ๐‘ฃ๐‘˜−1 , since ๐‘Ž๐‘œ has been assumed as being
presented at those (otherwise coloring downshift had
been possible).
We downshift from ๐‘ฃ๐‘™ , assign color ๐‘Ž๐‘œ to ๐‘ข๐‘ฃ๐‘™ , and
interchange colors along ๐‘ƒ. โ– 
๐‘Ž๐‘˜
๐‘Ž0
๐‘ฃ๐‘˜−1
๐‘Ž0
๐‘Ž๐‘˜
๐‘ฃ๐‘˜
๐‘ฃ๐‘™
๐‘Ž๐‘˜
๐‘ข
๐‘ฃ
๐‘ฃ2
๐‘ฃ1
March 2014
Graph Coloring
47
Line Graphs
Many questions about vertices have natural analogues
involving edges.
Independent sets have no pairs of adjacent vertices;
matchings have no adjacent edges.
Vertex coloring partitions the vertices
into independent sets; edges can be
partitioned into matching.
Definition. The line graph ๐ฟ ๐บ is
defined by ๐‘‰ ๐ฟ ๐บ ≡ ๐ธ ๐บ and ๐‘’๐‘“
∈๐ธ ๐ฟ ๐บ
if ๐‘’ = ๐‘ข๐‘ฃ and ๐‘“ = ๐‘ฃ๐‘ค ,
where ๐‘ข, ๐‘ฃ, ๐‘ค ∈ ๐‘‰ ๐บ .
March 2014
Graph Coloring
๐‘ค
๐‘ฎ
๐‘ข
๐‘“
๐‘’
โ„Ž
๐‘ฃ ๐‘”
๐‘ง
๐‘“
๐‘ณ ๐‘ฎ
๐‘ฃ ๐‘ค
๐‘’
โ„Ž
๐‘ฃ
๐‘ฃ ๐‘ง
๐‘”
48
Line Graphs Characterization
Theorem. (Krausz 1943) A simple graph ๐บ is the line
graph of some simple graph ๐ป iff ๐‘‰ ๐บ has a partition
into cliques using each vertex of ๐บ at most twice.
Proof. Necessity follows from the fact that the edges
adjacent at a vertex of ๐ป are represented in ๐ฟ ๐ป by
vertices connected in a clique.
Since an edge connects two vertices, those vertices
imply two cliques at most.
For sufficiency, suppose ๐‘‰ ๐บ has such a partition, using
cliques ๐‘†1 , … , ๐‘†๐‘˜ . We shall construct H satisfying ๐บ
= ๐ฟ ๐ป . Assume that ๐บ has no isolated varices.
March 2014
Graph Coloring
49
Let ๐‘ฃ1 , … , ๐‘ฃ๐‘™ be the vertices of ๐บ that appear in a single
clique of ๐‘†1 , … , ๐‘†๐‘˜ (if such one exist). We define a vertex
in ๐ป for each set of ๐‘จ = ๐‘†1 , … , ๐‘†๐‘˜ , ๐‘ฃ1 , … , ๐‘ฃ๐‘™ .
Edges of ๐ป are defined such that ๐ป vertices are adjacent
if the corresponding sets (cliques) of ๐‘จ intersect.
By its construction, each vertex of G appears in exactly
two sets of ๐‘จ.
Also, two vertices cannot both appear in two sets of ๐‘จ,
as otherwise a clique was split among the sets.
March 2014
Graph Coloring
50
impossible
clique
๐บ=๐ฟ ๐ป
=>
๐ป
clique
Hence there are no parallel edges in ๐ป, so it is simple,
and there is one edge in ๐ป for each vertex of ๐บ.
Adjacent vertices in ๐บ appear together in some ๐‘†๐‘– and
the corresponding edges of ๐ป share the vertex
corresponding to ๐‘†๐‘– . Hence ๐บ = ๐ฟ ๐ป . โ– 
Krausz’s theorem does not directly yield an efficient test
for line graph, which the following does.
March 2014
Graph Coloring
51
Theorem. (Bieneke 1968) A simple graph ๐บ is the line
graph of some simple graph iff ๐บ does not contain any of
the following subgraphs as an induced subgraph.
March 2014
Graph Coloring
52
Download