9. graph colouring 9.1. vertex colouring - uni-heidelberg.de · 9.1. vertex colouring ... if we...

24
1 Graph Theory 7 1 9. Graph 9. Graph colouring colouring Vertex colouring. Vertex colouring. Edge colouring. Edge colouring. k k - - vertex vertex - - critical graphs critical graphs Approximation algorithms Approximation algorithms Upper bounds for the vertex chromatic number Upper bounds for the vertex chromatic number Brooks Theorem and Brooks Theorem and Hajós Hajós Conjecture Conjecture Chromatic Polynomials Chromatic Polynomials Colouring of planar graphs Colouring of planar graphs Vizing Vizing Theorem Theorem Edge chromatic minimal graphs Edge chromatic minimal graphs Total colouring Total colouring The The Timetabling Timetabling Problem Problem Graph Theory 7 2 Problem : We Problem : We wish wish to to arrange arrange the the talks talks in a in a congress congress in such a way in such a way that no that no participant participant will be will be forced forced to miss a to miss a talk talk he would he would like like to to hear hear . . Assuming Assuming a good a good supply supply of of lecture lecture rooms rooms enabling enabling us to hold as us to hold as many many parallel parallel talks talks as we as we like like , , how how long long will the will the program program have to have to last? last? The The graph graph - - theoretical theoretical model model : Let : Let G G be such a graph be such a graph whose whose vertices vertices are the are the talks talks and in and in which which two two talks talks are are joined joined iff there is a iff there is a particip particip - - ant ant wishing wishing to to attend attend both both . . What What is the minimal is the minimal value value of of k k for for which which V(G) V(G) can can be be partitioned partitioned into into k k classes classes , , say say V V 1 1 ,V ,V 2 2 ,…,V ,…,V k k , such that no edge , such that no edge joins joins two vertices of two vertices of the the same same class class ? ? 9.1. Vertex 9.1. Vertex colouring colouring Graph Theory 7 3 A A possible possible colouring colouring of a graph of a graph G G with with 3 3 colours colours . . G G Graph Theory 7 4 We We denote denote the minimal the minimal number number of of classes classes by by (G) (G) and and call call as the as the (vertex) (vertex) chromatic chromatic number number of of G G . . If If G G is a graph for which is a graph for which (G) = k (G) = k then then G G is is k k - - chromatic chromatic . . We We remark remark that we that we shall shall use use real real colours colours (red, (red, blue blue , ….) only if , ….) only if there are there are few few colours colours , , otherwise otherwise the the natural natural numbers numbers will be will be our our colours colours . . Thus Thus k k - - colouring colouring of the vertices of of the vertices of G G is a is a function function c: V(G) c: V(G) { { 1,2, 1,2, ,k ,k } } . . In a given colouring In a given colouring c c of a graph of a graph G G , a set consisting of all vertices , a set consisting of all vertices assigned the same colour is referred to as a assigned the same colour is referred to as a colour class colour class : : V V k k = = { { v v V(G) V(G) | | c(v c(v ) = k ) = k }. }.

Upload: lyquynh

Post on 12-Jun-2018

238 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: 9. Graph colouring 9.1. Vertex colouring - uni-heidelberg.de · 9.1. Vertex colouring ... If we colour v by the jth colour then we get a (k – 1) ... Let us suppose that the statement

1

Graph Theory 7 1

9. Graph 9. Graph colouringcolouring

Vertex colouring.Vertex colouring.

Edge colouring.Edge colouring.

kk--vertexvertex--critical graphscritical graphs

Approximation algorithmsApproximation algorithms

Upper bounds for the vertex chromatic numberUpper bounds for the vertex chromatic number

Brooks Theorem and Brooks Theorem and HajósHajós ConjectureConjecture

Chromatic PolynomialsChromatic Polynomials

Colouring of planar graphsColouring of planar graphs

VizingVizing TheoremTheorem

Edge chromatic minimal graphsEdge chromatic minimal graphs

Total colouringTotal colouring

The The TimetablingTimetabling ProblemProblem

Graph Theory 7 2

Problem : We Problem : We wishwish to to arrangearrange the the talkstalks in a in a congresscongress in such a way in such a way that no that no participantparticipant will be will be forcedforced to miss a to miss a talktalk he would he would likelike to to hearhear. . AssumingAssuming a good a good supplysupply of of lecturelecture roomsrooms enablingenabling us to hold as us to hold as manymany parallel parallel talkstalks as we as we likelike, , howhow longlong will the will the programprogram have to have to last?last?

The The graphgraph--theoreticaltheoretical modelmodel: Let : Let GG be such a graph be such a graph whosewhose vertices vertices are the are the talkstalks and in and in whichwhich two two talkstalks are are joinedjoined iff there is a iff there is a participparticip--antant wishingwishing to to attendattend bothboth..

WhatWhat is the minimal is the minimal valuevalue of of kk for for whichwhich V(G)V(G) cancan be be partitionedpartitionedinto into kk classesclasses, , saysay VV11,V,V22,…,V,…,Vkk, such that no edge , such that no edge joinsjoins two vertices of two vertices of the the samesame classclass??

9.1. Vertex 9.1. Vertex colouringcolouring

Graph Theory 7 3

A A possiblepossible colouringcolouring of a graph of a graph GG with with 33 colourscolours..

GG

Graph Theory 7 4

We We denotedenote the minimal the minimal numbernumber of of classesclasses by by ��(G)(G) and and callcall as the as the (vertex) (vertex) chromaticchromatic numbernumber of of GG..

If If GG is a graph for which is a graph for which ��(G) = k(G) = k then then GG is is kk--chromaticchromatic..

We We remarkremark that we that we shallshall useuse real real colourscolours (red, (red, blueblue, ….) only if , ….) only if there are there are fewfew colourscolours, , otherwiseotherwise the the naturalnatural numbersnumbers will be will be ourourcolourscolours. . ThusThus kk--colouringcolouring of the vertices of of the vertices of GG is a is a functionfunction

c: V(G)c: V(G) �� {{ 1,2,1,2,……,k,k}} ..

In a given colouring In a given colouring cc of a graph of a graph GG, a set consisting of all vertices , a set consisting of all vertices assigned the same colour is referred to as a assigned the same colour is referred to as a colour classcolour class::

VVkk == {{ v v V(G) V(G) | | c(vc(v) = k) = k} .} .

Page 2: 9. Graph colouring 9.1. Vertex colouring - uni-heidelberg.de · 9.1. Vertex colouring ... If we colour v by the jth colour then we get a (k – 1) ... Let us suppose that the statement

2

Graph Theory 7 5

An alternative definition: the An alternative definition: the chromatic numberchromatic number is the minimum is the minimum number of independent subsets into which number of independent subsets into which V(G)V(G) can be partitioned.can be partitioned.Each independent set is then a colour class in the Each independent set is then a colour class in the ��((G)G)--colouringcolouring of of GG so so defineddefined..

For some graphs, the chromatic number is quiet easy to determineFor some graphs, the chromatic number is quiet easy to determine::

��(C(C2k2k)) = = 2.2.

��(C(C2k+12k+1)) = = 3.3.

��(K(Knn)) = = n.n.

��(K(Knn11, n, n

22, … , , … , nn

kk)) = = k.k.

Graph Theory 7 6

G:G:

��(G)

3.(G)

3.

CC55 GG and and ��(C(C55)) = = 3, 3, it follows thatit follows that ��(G)(G) �� 3.3.

So, So, ��

(G) =3.(G) =3.

Graph Theory 7 7

Some easy statement:Some easy statement:

If a graph If a graph GG doesdoes not have an not have an oddodd cycle then cycle then ��(G(G) ) �� 22..

If a graph If a graph GG has an has an oddodd cycle then cycle then ��(G(G) ) �� 33..

��(G(G) = ) = kk iff iff GG isis kk--partitepartite butbut GG is not is not ll--partitepartite for for l < kl < k..

If If KKkk GG then then ��(G(G) )

��

k.k.

If If GG doesdoes not not containcontain h+1h+1 independent edges then independent edges then ��(G)

(G)

|G| / h.|G| / h.

UnfortunatellyUnfortunatelly, for , for k k

��

44 we do not have a we do not have a similarsimilar characterizationcharacterization of of graphs with graphs with chromaticchromatic numbernumber at least at least kk, , thoughthough there are there are somesomecomplicatedcomplicated characterizationcharacterization..

Graph Theory 7 8

Can we make a good characterization for Can we make a good characterization for kk--chromatic graphs?chromatic graphs?

The The 11--chromatic graphs are the empty graphs.chromatic graphs are the empty graphs.

The The 22--chromatic graphs are the nonempty bipartite graphs.chromatic graphs are the nonempty bipartite graphs.

No value of No value of k > 2k > 2 is such an applicable characterization known.is such an applicable characterization known.

The chromatic number of a disconnected graph is the maximum of The chromatic number of a disconnected graph is the maximum of the chromatic numbers of its components.the chromatic numbers of its components.

The chromatic number of a connected graph with cutThe chromatic number of a connected graph with cut--vertices is the vertices is the maximum of the chromatic numbers of its blocks.maximum of the chromatic numbers of its blocks.

So, we will concern with determining the chromatic number of nonSo, we will concern with determining the chromatic number of non--separable graphs; (i.e. graphs which do not have cutseparable graphs; (i.e. graphs which do not have cut--vertices).vertices).

Page 3: 9. Graph colouring 9.1. Vertex colouring - uni-heidelberg.de · 9.1. Vertex colouring ... If we colour v by the jth colour then we get a (k – 1) ... Let us suppose that the statement

3

Graph Theory 7 9

A graph A graph GG isis kk--(vertex) critical(vertex) critical if if ��(G(G) = ) = kk and and ��(G (G –– vv) = ) = kk –– 11 for all for all v v V(G).V(G). (We also (We also saysay that G is that G is criticallycritically kk--chromaticchromatic.).)

if if k = 2k = 2 then the only then the only 22--critical critical 22--chromatic graph is chromatic graph is KK22, and , and the odd cycles are the only the odd cycles are the only 33--critical critical 33--chromatic graphs.chromatic graphs.

For For k k

��

44 the the kk--critical graphs have not been characterized, although critical graphs have not been characterized, although it is quite difficult, in general, to determine whether a given it is quite difficult, in general, to determine whether a given kk--chromatic graph ischromatic graph is kk--critical or not.critical or not.

9.1.1. Vertex9.1.1. Vertex--critical Graphscritical Graphs

Every Every kk--chromatic graph has a chromatic graph has a kk--critical subgraph.critical subgraph.

Graph Theory 7 10

The The GrötzschGrötzsch graph graph –– a a 44--critical graph.critical graph.

Graph Theory 7 11

TheoremTheorem 9.1.: If 9.1.: If GG is is kk--critical then critical then

��

(G) (G)

��

k k –– 1.1.

Proof.Proof.

By contrary: let us suppose that By contrary: let us suppose that GG is is kk--critical and critical and

��

(G) < k (G) < k –– 1 1 andandlletet v v be a vertex of degreebe a vertex of degree

��

in in GG. .

Since Since GG is is kk--criticalcritical , , G G –– vv is (is (k k –– 11))--colourable.colourable.

Let Let VV11, V, V22,…,V,…,Vkk--11 be the be the colourcolour--classesclasses of a (of a (kk––11))--colouring of colouring of G G –– vv. .

By By definitiondefinition, , vv is is adjacentadjacent in in GG to to

��

< k < k –– 1 1 vertices, vertices, thereforetherefore there there exists at least one exists at least one j, 1 j, 1

��

j j

��

k k –– 11, such that for any vertex of , such that for any vertex of VVjj is not is not adjacentadjacent to to vv in in GG..

If we If we colourcolour vv by the by the jj thth colourcolour then we then we getget a (a (k k –– 11))--colouring for colouring for GG..

This is a contradiction since This is a contradiction since GG is is kk--criticalcritical..

Can we say something generally about the Can we say something generally about the kk--colourable graphs?colourable graphs?Graph Theory 7 12

Corollary Corollary 9.9.22.: Every .: Every kk--chromatic graph has at least chromatic graph has at least kk vertices of vertices of degree at least degree at least k k –– 11..

Proof.Proof.

Let Let GG be a be a kk--chromatic graphchromatic graph, and let , and let HH be a be a kk--critical subgraph of critical subgraph of GG..

By By TheoremTheorem 9.1, each vertex of 9.1, each vertex of HH has degree at least has degree at least k k –– 11 in in HH, and , and hence also in hence also in GG..

Since Since HH, being , being kk--chromatic, chromatic, has at least has at least kk verticesvertices..

Page 4: 9. Graph colouring 9.1. Vertex colouring - uni-heidelberg.de · 9.1. Vertex colouring ... If we colour v by the jth colour then we get a (k – 1) ... Let us suppose that the statement

4

Graph Theory 7 13

G:G:

GG is a is a 33--chromatic graph.chromatic graph.

H:H:

HH is is 33--critical subgraph of critical subgraph of G.G.

Graph Theory 7 14

CorollaryCorollary 9.9.33.: For any graph .: For any graph GG, , ��(G(G) )

�� ��

+ 1+ 1..

For a complete graph For a complete graph KKnn, , ��((KKnn) ) = =

��

+ 1+ 1..

If If GG is an odd cycle, then is an odd cycle, then

��

((CCnn) = ) = 22 and and ��((CCnn) ) = 3 = = 3 =

��

+ 1+ 1..

Proof.Proof.

Let us suppose that the statement is not true. Then there existsLet us suppose that the statement is not true. Then there exists a a graph graph GG with chromatic number with chromatic number

��

+ 2+ 2. .

By By TheoremTheorem 9.2 then there exists at least 9.2 then there exists at least

��

+ 2+ 2 vertices with vertices with vertexvertex--degreedegree

��

+ 1+ 1. This is . This is impossibleimpossible..

Graph Theory 7 15

Let Let SSbe a vertex cut of a connected graph be a vertex cut of a connected graph GG, and let the components , and let the components of of GG––SS have vertex sets have vertex sets VV11, V, V22, ... , , ... , VVtt. The . The subgraphssubgraphs GGii = = GG[[VVii SS] ] are called are called the the SS––components of components of GG..

We say that colourings of We say that colourings of GG11, G, G22, ... ,, ... ,GGtt agree on agree on SS if, for every if, for every vv SS, , the same colour is assigned to the same colour is assigned to vv in each of the colourings.in each of the colourings.

Graph Theory 7 16

uu

vv

A A grahgrah G G and its {and its { u,vu,v}} --componentscomponents

GG

vvvvvv

uuuuuu

Page 5: 9. Graph colouring 9.1. Vertex colouring - uni-heidelberg.de · 9.1. Vertex colouring ... If we colour v by the jth colour then we get a (k – 1) ... Let us suppose that the statement

5

Graph Theory 7 17

Theorem 9.4. In a Theorem 9.4. In a kk––critical graph, no vertex cut is a clique.critical graph, no vertex cut is a clique.

Proof.Proof.

We prove by contradiction: suppose that We prove by contradiction: suppose that GG is a is a kk––critical graph, and critical graph, and suppose that suppose that GG has a vertex cut has a vertex cut SS that is a clique. Denote the that is a clique. Denote the SS--componenentscomponenents of of GG by by GG11, G, G22, ..., G, ..., Gtt. .

Since Since GG is is kk--critical, each critical, each GGii is (is (k k –– 11))--colourable.colourable.

Because Because SS is a clique, the vertices in is a clique, the vertices in SS must receive distinct colours must receive distinct colours in any (in any (k k –– 11))--colouring of colouring of GGii..

Then there are (Then there are (k k –– 11))--colourings of colourings of GG11, G, G22, ..., , ..., GGtt which agree on which agree on SS..

But these colourings together form a (But these colourings together form a (k k –– 11))--coloring of coloring of GG, which is , which is a contradiction.a contradiction.

Consequence: If a Consequence: If a kk--critical graph has a critical graph has a 22––vertex cut {vertex cut { u,vu,v} , then } , then uuand and vv cannot be adjacent.cannot be adjacent.

Graph Theory 7 18

Theorem 9.5. Every Theorem 9.5. Every kk––critical graph is a block.critical graph is a block.

Proof.Proof.

If If vv is cutis cut--vertex, then {vertex, then { vv} is a vertex cut which is also a (trivially) } is a vertex cut which is also a (trivially) clique.clique.

Then Then –– it follows from it follows from TheoremTheorem 9.4 9.4 –– that no critical graph has a cut that no critical graph has a cut vertex; equivalently, every vertex; equivalently, every kk--critical graph is a block.critical graph is a block.

An {An { u,vu,v}} --component component GGii of of GG is of is of type type 11 if every (if every (k k –– 11))--colouring of colouring of GGii assigns the same colour to assigns the same colour to uu and and vv, and of , and of type type 22 if every (if every (k k –– 11))--colouring of colouring of GGii assigns different colours to assigns different colours to uu and and vv. .

Graph Theory 7 19 Graph Theory 7 20

Theorem 9.6. (Theorem 9.6. (DiracDirac, 1953): Let , 1953): Let GG be a be a kk--critical graph with a critical graph with a 22--vertex cut {vertex cut { u,vu,v} . Then } . Then

(1)(1) G = GG = G1 1 G G22, where , where GGii is a {is a { u,vu,v}} --component of type component of type ii ((i = 1,2i = 1,2),),andand

(2)(2) both both GGii + + uvuv and and GG22·· uvuv are kare k--critical (where critical (where GG22·· uvuv denotedenote thethegraph obtained from graph obtained from GG22 by identifying by identifying uu and and vv).).

Proof.Proof.

Page 6: 9. Graph colouring 9.1. Vertex colouring - uni-heidelberg.de · 9.1. Vertex colouring ... If we colour v by the jth colour then we get a (k – 1) ... Let us suppose that the statement

6

Graph Theory 7 21

Since Since GG is critical, each {is critical, each { u,vu,v}} --component of component of GG is (is (k k –– 11))--colourable.colourable.

Now there cannot exist (Now there cannot exist (k k –– 11))--colourings of these {colourings of these { u,vu,v}} --components components all of which agree on {all of which agree on { u,vu,v} , since such colourings would together } , since such colourings would together yield a (yield a (k k –– 11))--colouring of colouring of GG..

Therefore there are two {Therefore there are two { u,vu,v}} --components components GG11 and and GG22 such that no such that no ((kk––11))--colouring of colouring of GG11 agrees with any (agrees with any (k k –– 11))--colouring of colouring of GG22..

So, one, say So, one, say GG11, must be of type , must be of type 11 and the other, and the other, GG22, of type , of type 22..

Since Since GG11 and and GG22 are of different types, the subgraph are of different types, the subgraph GG11 GG22 of of GG is is not (not (k k –– 11))--colourable.colourable.

Therefore, because Therefore, because GG is critical, we must have is critical, we must have GG = = GG11 GG22..

(1)(1)

Graph Theory 7 22

(2)(2)

Set Set HH11 = G= G1 1 + + uvuv. Since . Since GG11 is type is type 11, , HH11 is is kk--chromatic. We shall chromatic. We shall prove that prove that HH11 is critical by showing that, for every edge is critical by showing that, for every edge ee of of HH11, , HH11 ––ee is (is (k k –– 11))--colourable.colourable.

This is so if This is so if e = e = uvuv, since , since HH11 –– e = Ge = G11. Let . Let ee be some other edge of be some other edge of HH11..

In any (In any (k k –– 11))--colouring of colouring of G G –– ee, the vertices , the vertices uu and and vv must receive must receive different colours, since different colours, since GG22 is a subgraph of is a subgraph of G G –– ee. .

The restriction of such a colouring to the vertices of The restriction of such a colouring to the vertices of GG11 is a (is a (k k –– 11))--colouring of colouring of HH11 –– e.e.

Thus Thus GG11 + + uvuv is is kk--critical.critical.

An analogous argument shows that An analogous argument shows that GG22·· uvuv is is kk--critical.critical.

Graph Theory 7 23

Theorem 9.7.: Let Theorem 9.7.: Let GG be a critical graph with be a critical graph with 22--vertex cut {vertex cut { u,vu,v} . Then} . Thend(ud(u) + ) + d(vd(v) )

��

3k 3k –– 5.5.

Proof.Proof.

Let Let GG11 be the {be the { u,vu,v}} --component of type component of type 11 and and GG22 the {the { u,vu,v}} --component component of type of type 22..

Set Set HH11 = G= G11 + + uvuv and and HH22 = = GG22·· uvuv. .

By By TheoremTheorem 9.1and 9.1and Theorem Theorem 9.6 we get9.6 we get

ddHH11(u) + d(u) + dHH

11(v) (v)

��

2k 2k –– 2 and 2 and ddHH22(w) (w)

��

k k –– 11

where where ww is the new vertex obtained by identifying is the new vertex obtained by identifying uu and and vv..

From the construction of From the construction of GG11 and and GG22 it follows thatit follows that

ddGG11(u) + d(u) + dGG

11(v)

2k (v)

2k –– 44 and and ddGG22

(u) + d(u) + dGG22

(v)

k (v)

k –– 11

which yields the desired result.which yields the desired result.

Graph Theory 7 24

9.1.2. The 9.1.2. The GreedyGreedy AlgorithmAlgorithm

Order the vertices of the Order the vertices of the givengiven graph graph G G in any order.in any order.

ColourColour xx11 by the by the colourcolour 11, ,

ColourColour xx22 by by 11 if if xx11xx2 2 E(G)E(G) and by and by 22 otherwiseotherwise..

We We colourcolour each vertex the by the each vertex the by the smallestsmallest colourcolour it it cancan have athave atthe the stagestage..

The The problemproblem: : thisthis colouringcolouring maymay and and usuallyusually doesdoes useuse manymany more more colourscolours thanthan necessarynecessary..

HoweverHowever, it is also , it is also truetrue that for every graph the vertices that for every graph the vertices cancan be be orderedordered in such a way that the in such a way that the greedygreedy algorithmalgorithm usesuses as as fewfew colourscoloursas as possiblepossible..

Page 7: 9. Graph colouring 9.1. Vertex colouring - uni-heidelberg.de · 9.1. Vertex colouring ... If we colour v by the jth colour then we get a (k – 1) ... Let us suppose that the statement

7

Graph Theory 7 25

xx11

xx22

xx33

xx44

xx55

xx66

xx77

xx88

In the order In the order xx11,x,x22,…,x,…,x8 8 the the greedygreedy algorithmalgorithm needsneeds fourfour colourscolours..Graph Theory 7 26

xx11

xx77

xx88

xx22

xx55

xx33

xx66

xx44

In the order In the order xx11,x,x22,…,x,…,x88 the the greedygreedy algorithmalgorithm needsneeds twotwo colourscolours..

Graph Theory 7 27

WhatWhat kindkind of of otherother colouringcolouring algorithmsalgorithms cancan we we givegive??

AlgorithmAlgorithm 1.1.

The The colouringcolouring of a graph of a graph reducesreduces to the to the problemproblem of of colouringcolouring certaincertainsubgraphssubgraphs of it.of it.

The The processprocess cancan be be usedused if the graph is if the graph is disconnecteddisconnected oror has a has a cutvertexcutvertex oror, , slightlyslightly more more generallygenerally, contains a , contains a completecomplete subgraph subgraph whosewhose vertex vertex setset disconnectsdisconnects the graph.the graph.

Then we Then we maymay colourcolour each each partpart separatelyseparately since, at since, at worstworst by a by a changechangeof of notationnotation, we , we cancan fit fit thesethese colouringscolourings togethertogether to to produceproduce a a colouringcolouring of the original graph, as of the original graph, as shownshown in the in the nextnext exampleexample..

Graph Theory 7 28

��(G(G11)=3)=3 ��(G(G22)=3)=3 ��(G(G33)=4)=4

��((G)=maxG)=max{{ ��(G(G11), ), ��(G(G22), ), ��(G(G33))} } = = 44

The vertex The vertex setset of the of the thickthick triangletriangle disconnectdisconnect GG

Page 8: 9. Graph colouring 9.1. Vertex colouring - uni-heidelberg.de · 9.1. Vertex colouring ... If we colour v by the jth colour then we get a (k – 1) ... Let us suppose that the statement

8

Graph Theory 7 29

AlgorithmAlgorithm 2 (2 (ReductionReduction AlgorithmAlgorithm).).

Let Let aa and and bb two two nonnon--adjacentadjacent vertices of vertices of GG. Let . Let GG'' be obtained from be obtained from GG by joining by joining aa to to bb, and let , and let G'G''' be obtained from be obtained from GG by identifying by identifying aaand and b.b. ((See the next slide!See the next slide!))

AssertionAssertion 11.: The .: The colouringscolourings of of GG in in whichwhich aa and and bb getget distinctdistinctcolourscolours are in are in 11--11 correspondencecorrespondence with the with the colouringscolourings of of GG''. Indeed . Indeed c: V(G)c: V(G) �� {{ 1,2,1,2,……,k,k} is a } is a colouringcolouring of of GG with with c(ac(a) )

��

c(bc(b)) iff iff cc is a is a colouringcolouring of of GG''..

AssertionAssertion 22.: The .: The colouringscolourings of of GG in in whichwhich aa and and bb getget the the samesamecolourcolour are in are in 11--11 correspondencecorrespondence with the with the colouringscolourings of of GG''''. Indeed . Indeed c: V(G)c: V(G) �� {{ 1,2,1,2,……,k,k} is a } is a colouringcolouring of of GG with with c(ac(a) = ) = c(bc(b)) iff iff cc is a is a colouringcolouring of of GG''''..

Graph Theory 7 30

aa

bb

GG

aa

bb

GG''

abab

GG''''

The graphs The graphs GG, , GG‘ ‘ and and GG''''

Graph Theory 7 31

GG0 0

��

GG

i = 0i = 0

Is Is GGii completecomplete??

ii1i GGG ′′∨′=+

i=i+1i=i+1

Let Let ||GGii | | = k= k

A A kk--colouringcolouring of of GGii cancan be be liftedlifted to a to a kk--colouringcolouring of of G.G.

��(G)(G) is the is the minimumminimum order of a order of a completecomplete graph in graph in whichwhich a sequence a sequence GG00,G,G11,,…… cancan terminateterminate..

nono

yesyes

Graph Theory 7 32

GG

ColouringColouring a a 33--colourable graphcolourable graph

Page 9: 9. Graph colouring 9.1. Vertex colouring - uni-heidelberg.de · 9.1. Vertex colouring ... If we colour v by the jth colour then we get a (k – 1) ... Let us suppose that the statement

9

Graph Theory 7 33

GG

ColouringColouring a a 33--colourable graphcolourable graphGraph Theory 7 34

BesideBeside thesethese simple simple statementsstatements howeverhowever, it is not , it is not easyeasy to to seesee that that there are there are triangletriangle--freefree graphs of large graphs of large chromaticchromatic numbernumber..

It is It is difficaultdifficault to to givegive a a characterizationcharacterization of such graphs of such graphs whichwhich have have large large chromaticchromatic numbernumber..

We We shallshall concentrateconcentrate on on findingfinding efficientefficient waysways of of colouringcolouring a graph.a graph.

HowHow shouldshould one one trytry to to colourcolour the vertices of a graph with the vertices of a graph with colourscolours1,2,…,n1,2,…,n usingusing as as fewfew colourscolours as as possiblepossible??

Graph Theory 7 35

It is not to It is not to hardhard to to improveimprove the the efficiencyefficiency of the of the greedygreedy algorithmalgorithm::

If we If we alreadyalready knowknow a subgraph a subgraph HH00 whichwhich cancan be be colouredcoloured with with fewfewcolourscolours, , ��(H(H00),), then we then we maymay start start ourour sequence with the vertices of sequence with the vertices of HH00, , colourcolour HH00 in an in an efficientefficient way and way and applyapply only then the only then the algorithmalgorithmto to colourcolour the the remainingremaining vertices.vertices.

TheoremTheorem 9.8.: Let 9.8.: Let HH00 be a be a spannedspanned subgraph of subgraph of GG and suppose every and suppose every subgraph subgraph HH satisfyingsatisfying HH00 H GH G, , V(HV(H00) )

��

V(H),V(H), contains a vertex contains a vertex xx V(HV(H) ) –– V(HV(H00)) with with ddHH(x(x) )

k.k. Then Then

��(G)

(G)

maxmax {{ k+1, k+1, ��(H(H00) ) }}

Proof.Proof.

It is trivial. The only It is trivial. The only thingthing we need to do is to we need to do is to givegive the vertices in the the vertices in the appropriateappropriate order.order.

9.1.3. Upper Bounds for the Chromatic Number.9.1.3. Upper Bounds for the Chromatic Number.

Graph Theory 7 36

TheoremTheorem 9.9.: Let 9.9.: Let k = k = maxmaxHH

��

(H),(H), where the where the maximummaximum is is takentaken overoverall all spannedspanned subgraphssubgraphs of of GG. Then . Then ��(G) (G)

��

k+1k+1..

Proof.Proof.

Let Let xxnn a vertex witha vertex with d(xd(xnn) )

��

k, k, and letand let HHnn--11= G = G –– {{ xxnn}}

By By assumptionassumption HHnn--11 has a vertex of degree at most has a vertex of degree at most k.k.

Let Let xxnn--11 be one of be one of themthem and and putput HHnn--22 = = HHnn--11 –– {{ xxnn--11} = } = G G –– {{ xxnn,x,xnn--11}} ..

Continuing in this way we enumerate all vertices.Continuing in this way we enumerate all vertices.

The sequence The sequence xx11,x,x22,…,,…,xxnn is such that each is such that each xxjj is joined to at most is joined to at most kkvertices preceding it.vertices preceding it.

Hence the greedy algorithm will never need Hence the greedy algorithm will never need colourcolour k+2k+2 to to colourcolour a a vertex.vertex.

Page 10: 9. Graph colouring 9.1. Vertex colouring - uni-heidelberg.de · 9.1. Vertex colouring ... If we colour v by the jth colour then we get a (k – 1) ... Let us suppose that the statement

10

Graph Theory 7 37

G:G:k = k = maxmaxHH

��

(H) = 2 (H) = 2

��(G(G) )

k + 1 = 3

k + 1 = 3..

xx99

xx11

xx66

xx77

xx88

xx22

xx44xx55

xx33

Graph Theory 7 38

ConsequenceConsequence 9.10.: 9.10.: ��(G) (G)

�� ��

+ 1+ 1, where , where

��

= =

��

(G)(G) is the is the maximummaximumdegree of degree of GG. .

ConsequenceConsequence 9.11.: If 9.11.: If GG is connected and not is connected and not

��

--regularregular then then clearlyclearlymaxmaxH GH G

��

(H)

(H)

� ��

(G) (G) –– 11, and so , and so ��(G)

(G)

� ��

..

This follows This follows immediatelyimmediately fromfrom the the factfact that that maxmaxH GH G

��

(H) (H)

�� ��

(G).(G).

TheoremTheorem 9.12. (Brooks, 1941): Let 9.12. (Brooks, 1941): Let GG be a connected graph with be a connected graph with maximal degree maximal degree

��

. Suppose . Suppose GG is is neitherneither a a completecomplete graph graph nornor an an oddoddcycle. Then cycle. Then ��(G) (G)

�� ��

..

Proof. (Proof. (LovászLovász, 1973), 1973)

We We maymay assumeassume that that GG is connected and is connected and

��

--regularregular. . FurthermoreFurthermore, we , we maymay assumeassume that that

�� ��

33, since a , since a 22--regular regular 33--chromatic graph is an chromatic graph is an oddodd--cyclecycle..

Graph Theory 7 39

If If GG is is 33--connected, let connected, let xxnn be any vertex of be any vertex of GG and let and let xx11, x, x22 be two be two nonnon--adjacentadjacent vertices in vertices in

��

((xxnn).).

If If GG is not is not 33--connected, let connected, let xxnn be a vertex for be a vertex for whichwhich G G –– xxnn is is separable, separable, has at least two blocks. has at least two blocks.

Since Since GG is is 22--connected, each connected, each endblockendblock of of G G –– xxnn has a vertex has a vertex adjacentadjacent to to xxnn. Let . Let xx11 and and xx22 be such vertices be such vertices belongingbelonging to different to different endblocksendblocks..

In In eithereither casecase we have we have foundfound vertices vertices xx11,x,x22 and and xxnn such that such that G G ––{{ xx11,x,x22} is connected, } is connected, xx11xx22 E(G) E(G) butbut xx11xxnn E(G) E(G) and and xx22xxnn E(G). E(G). Let Let xxnn--11 V V–– {{ xx11,x,x22,x,xnn} be a } be a neighbourneighbour of of xxnn, let , let xxnn--22 be a be a neighbourneighbour of of xxnn

or or xxnn--11 etc. etc.

Then the order Then the order xx11,x,x22,x,x33,… ,,… ,xxnn is such that each vertex other than is such that each vertex other than xxnn is is adjacent to at least one vertex following it.adjacent to at least one vertex following it.

ThusThus the the greedygreedy algorithmalgorithm will will useuse at most at most

��

colourscolours, since , since xx11 and and xx22

getget the the samesame colourcolour and and xxnn is is adjacentadjacent to to bothboth..

Graph Theory 7 40A blockA block--cutvertexcutvertex tree and tree and endblocksendblocks..

Page 11: 9. Graph colouring 9.1. Vertex colouring - uni-heidelberg.de · 9.1. Vertex colouring ... If we colour v by the jth colour then we get a (k – 1) ... Let us suppose that the statement

11

Graph Theory 7 41

Although no necessary and sufficient condition for a graph to beAlthough no necessary and sufficient condition for a graph to be kk--chromatic is known when chromatic is known when k k

��

33, a plausible necessary condition has , a plausible necessary condition has been proposed by been proposed by HajHajóóss ((19611961):):

HajósHajós'' conjecture: If conjecture: If GG is is kk--chromatic, then chromatic, then GG contains a subdivision contains a subdivision of of KKkk..

For For k = 1k = 1 and and k = 2k = 2, the validity of , the validity of HajósHajós conjecture is obvious. conjecture is obvious.

It is also easily verified It is also easily verified k = 3k = 3, because a , because a 33--chromatic graph chromatic graph necessanecessa--ryry contains an odd cycle, and every odd cycle is a subdivision of contains an odd cycle, and every odd cycle is a subdivision of KK33. .

The The k = 4k = 4 case was proved by case was proved by DiracDirac in in 19521952..

The conjecture has not yet been settled in general, and its resoThe conjecture has not yet been settled in general, and its resolution lution is known to be a very difficult problem.is known to be a very difficult problem.

A A subdivision of a graph subdivision of a graph GG is a graph that can be obtained from is a graph that can be obtained from GGby a sequence by a sequence of edge divisionsof edge divisions..

Graph Theory 7 42

A subdivision of A subdivision of KK44..

Graph Theory 7 43

TheoremTheorem 9.13.: If 9.13.: If GG is is 44--chromatic, then chromatic, then GG contains a contains a subdividionsubdividion of of KK44..

Proof.Proof.

Let Let GG be a be a 44--chromatic graph. (Note that if some subgraph of chromatic graph. (Note that if some subgraph of GGcontains a subdivision of contains a subdivision of KK44, then so does , then so does GG.).)

W.l.o.gW.l.o.g. we may assume that . we may assume that GG is critical. Then is critical. Then GG is a block with is a block with

��

��

3.3.

If If n = 4n = 4 then then GG is is KK44, and the , and the theoremtheorem is is truetrue..

We will We will useuse induction on induction on nn..

Assume the Assume the theoremtheorem is is truetrue for all for all fourfour chromaticchromatic graphs with graphs with fewerfewerthanthan nn vertices, and let vertices, and let n > 4n > 4..

Graph Theory 7 44

First, we suppose that First, we suppose that GG has a vertex has a vertex cutcut {{ u,vu,v} . By } . By TheoremTheorem 9.69.6, , GGhas two {has two { u,vu,v}} --componentscomponents GG11 and and GG22, where , where GG11 + + uvuv is is 44--critical.critical.

Since |Since |VV((GG11 + + uvuv))| < || < |VV((GG)|, we )|, we cancan applyapply the induction the induction hypothesishypothesisand and deducededuce that that GG11 + + uvuv contains a contains a subdivisionsubdivision of of KK44. .

It follows that, if It follows that, if PP is a (is a (u,vu,v))--pathpath in in GG22, then , then GG11 PP contains a contains a subdivisionsubdivision of of KK44. .

Hence, so Hence, so doesdoes G,G, since since GG11 PP GG..

Page 12: 9. Graph colouring 9.1. Vertex colouring - uni-heidelberg.de · 9.1. Vertex colouring ... If we colour v by the jth colour then we get a (k – 1) ... Let us suppose that the statement

12

Graph Theory 7 45

NowNow, suppose that , suppose that GG is is 33--connected. Since connected. Since

�� �

3, G

3, G has a cycle has a cycle CC of of lengthlength at least at least fourfour. .

Let Let uu and and vv be be nonconsecutivenonconsecutive vertices vertices on on CC..

Since Since GG –– {{ u,vu,v} is connected, } is connected, there is a path there is a path PP in in GG –– {{ u,vu,v} } connectingconnecting two components of two components of CC –– {{ u,vu,v} . } .

Assume that the two Assume that the two endverticesendvertices of of PP on on CC are are xx and and yy..

SimilarlySimilarly, , there is a path there is a path QQ on on GG –– {{ x,yx,y} .} .

If If PP and and QQ have no vertex in have no vertex in commoncommon, the , the C C PP QQ is a is a subdivisionsubdivisionof of KK44..

OtherwiseOtherwise, , let let ww be the be the firstfirst vertex of vertex of PP on on QQ, and let , and let PP'' denote (denote (x, x, ww))-- section ofsection of PP..

Then Then CC PP'' QQ is a is a subdivisionsubdivision of of KK44. Hence, in . Hence, in bothboth casescases, , GGcontains a contains a subdivisionsubdivision of of KK44..

Graph Theory 7 46

G:G:

C:C:

uu

vv

xxyyPP

QQ

wwPP''

Graph Theory 7 47

9.1.5. Chromatic Polynomials9.1.5. Chromatic Polynomials

In the study of colourings, some insight can be gained by considIn the study of colourings, some insight can be gained by considering ering not only the existence of colourings but the number of such not only the existence of colourings but the number of such colourings.colourings.

This approach was developed by This approach was developed by BirkhoffBirkhoff ((19121912) as a possible ) as a possible means of attacking the fourmeans of attacking the four--colour conjecture.colour conjecture.

Let Let ppkk((GG) be the ) be the number of distinct colouringsnumber of distinct colourings of of GG. .

ppkk((GG) ) > 0> 0 iff iff GG is is kk--colourable.colourable.

Two colouringsTwo colourings are regarded as are regarded as distinctdistinct if some vertex is assigned if some vertex is assigned different colours in the two colourings.different colours in the two colourings.

Graph Theory 7 48

In case of colourings we do not speak about isomorphism: first wIn case of colourings we do not speak about isomorphism: first we e label the vertices and two colourings are distinct if any label the vertices and two colourings are distinct if any labeledlabeledvertex has different colours in the two colourings:vertex has different colours in the two colourings:

For example, a triangle (For example, a triangle (KK33) has six distinct ) has six distinct 33--colourings. Even colourings. Even though there is exactly one vertex of each colour in each colourthough there is exactly one vertex of each colour in each colouring, ing, we still regard these six colourings as distinct. we still regard these six colourings as distinct.

If If GG is empty, then each vertex can be independently assigned any is empty, then each vertex can be independently assigned any one of the one of the kk available colours.available colours.Therefore Therefore ppkk((GG)) = k= knn..On the other hand, if On the other hand, if GG is complete, then there are is complete, then there are kk choices of choices of colour for the first vertex, colour for the first vertex, k k –– 11 for the second, for the second, k k –– 22 for the third, for the third, and so on. and so on. In this case, In this case, ppkk(G(G) = ) = k(kk(k –– 1)(k 1)(k –– 2)...(k 2)...(k –– n + 1).n + 1).

Page 13: 9. Graph colouring 9.1. Vertex colouring - uni-heidelberg.de · 9.1. Vertex colouring ... If we colour v by the jth colour then we get a (k – 1) ... Let us suppose that the statement

13

Graph Theory 7 49

Theorem 9.14.: If Theorem 9.14.: If GG is simple, then is simple, then ppkk(G(G) = ) = ppkk(G(G –– e) e) –– ppkk(G(G ·· e)e) for for any edge of any edge of GG..

Proof.Proof.

Let Let e = (e = (u,vu,v)). To each . To each kk--colouring of colouring of G G –– ee that assigns the same that assigns the same colour to colour to uu and and vv, there corresponds a , there corresponds a kk--colouring of colouring of G G ·· ee in which in which the vertex of the vertex of G G ·· ee formed by identifying formed by identifying uu and and vv is assigned the is assigned the common colour of common colour of uu and and vv..

This correspondence is a This correspondence is a bijectionbijection. .

Therefore Therefore ppkk(G(G ·· e) e) is preciselyis precisely the number of the number of kk--colourings of colourings of G G –– eein which in which uu and and vv are assigned the same colour.are assigned the same colour.

Since each Since each kk--colouring of colouring of G G –– ee that assigns different colours to that assigns different colours to uuand and vv is a is a kk--colouring of colouring of GG, and conversely, , and conversely, ppkk(G(G)) is the number of is the number of kk--colourings of colourings of G G –– ee in which in which uu and and vv are assigned different colours.are assigned different colours.

So, the statement of the theorem follows.So, the statement of the theorem follows.

Graph Theory 7 50

Graph Theory 7 51

ConsequenceConsequence 9.15. : 9.15. : ppkk(G(G –– e) = e) = ppkk(G(G ) + ) + ppkk(G(G ·· e)e)

TheoremTheorem 9.16.: Let 9.16.: Let GG be a graph with be a graph with n n

��

11 vertices, vertices, mm edges. Then edges. Then

where where aa00=1, a=1, a1 1 = m= m and and aaii > 0> 0 for every for every i, 0 i, 0

��

i i

��

n n –– 1.1.

�−

=

−−=1n

0i

ini

iG ,ka)1()k(p

We We applyapply induction on induction on n + m.n + m.

If If n + m =1n + m =1 then the then the assertionsassertions hold so we pass to the induction hold so we pass to the induction stepstep..

Proof.Proof.

If If m = 0m = 0, (, (i.ei.e. no edge in . no edge in GG) then every ) then every mapmap f:f: V(G)V(G) �� {{ 1,2,1,2,……,k,k}}is a is a colouringcolouring of of GG, we have , we have ppkk(G(G) = k) = knn..

Graph Theory 7 52

If If m > 0 m > 0 then we pick two then we pick two adjacentadjacent vertices of vertices of GG, , saysay aa and and bb. Let . Let e= (ab).e= (ab).Then Then ||V(G V(G –– e)e)|| = = nn and and ||E(G E(G –– e)e)|| = = m m –– 1. 1. SimilarlySimilarly,, ||V(V(G G ·· ee))|| = = n n –– 11 and and ||E(E(G G ·· ee))|| = = m m –– 1.1.So, we can use the induction hypothesis for both of the graphsSo, we can use the induction hypothesis for both of the graphs G G –– e e and and G G ·· e.e.ThereforeTherefore

where where bbii > 0> 0 for each for each ii , and, and

where where ccii > 0> 0 for each for each ii ..

�−

=

−− −+−−=−1n

2i

ini

i1nnk kb)1(k)1m(x)eG(p

,kc)1(k)eG(p1n

2i

ini

i1nk �

=

−− −−=⋅

Page 14: 9. Graph colouring 9.1. Vertex colouring - uni-heidelberg.de · 9.1. Vertex colouring ... If we colour v by the jth colour then we get a (k – 1) ... Let us suppose that the statement

14

Graph Theory 7 53

Hence, by Hence, by TheoremTheorem 9.149.14

=⋅−−= )eG(p)eG(p)G(p kkk

�−

=

−− =+−+−=1n

2i

inii

i1nn k)cb()1(mkk

�−

=

−− −+−=1n

2i

ini

i1nn ,ka)1(mkk

where where aaii > 0> 0 for each for each ii ..

ppkk(G(G)) will be will be calledcalled the the chromaticchromatic polinomialpolinomial of of GG..

Graph Theory 7 54

by repeatedly applying the recursion by repeatedly applying the recursion ppkk(G(G) = ) = ppkk(G(G –– e) e) –– ppkk(G(G ·· e), e), and thereby expressing and thereby expressing ppkk(G(G) ) as a linear combination of chromatic as a linear combination of chromatic polynomials of empty graphs.polynomials of empty graphs.

by repeatedly applying the recursion by repeatedly applying the recursion ppkk(G(G –– e) = e) = ppkk(G(G )+ )+ ppkk(G(G ·· e)e)and thereby expressing and thereby expressing ppkk(G(G) ) as a linear combination of chromatic as a linear combination of chromatic polynomials of complete graphs.polynomials of complete graphs.

Theorem Theorem 9.14 9.14 provides a means of calculating the chromatic provides a means of calculating the chromatic polinomialpolinomial of a graph of a graph recursively.Itrecursively.It can be used in either of two can be used in either of two ways:ways:

The first method is more suited to graphs with few edges, whereaThe first method is more suited to graphs with few edges, whereas s the second one can be applied more effectively to graphs with mathe second one can be applied more effectively to graphs with many ny edges.edges.

Graph Theory 7 55

== –– ==

–– ––

––++33–– 33

–– ==

==

= k= k44 –– 3k3k3 3 + 3k+ 3k2 2 –– k k

Graph Theory 7 56

== ++

++ ++++

==

==

+ + 22 ++ ==

= = k(kk(k –– 1)(k 1)(k –– 2)(k 2)(k –– 3)+2k(k 3)+2k(k –– 1)(k 1)(k –– 2)+k(k 2)+k(k –– 1)1)

Page 15: 9. Graph colouring 9.1. Vertex colouring - uni-heidelberg.de · 9.1. Vertex colouring ... If we colour v by the jth colour then we get a (k – 1) ... Let us suppose that the statement

15

Graph Theory 7 57

The calculation of chromatic polynomials can sometimes be The calculation of chromatic polynomials can sometimes be facilitated by the use of a number of formulae relating the chrofacilitated by the use of a number of formulae relating the chromatic matic polynomial of polynomial of GG to the chromatic to the chromatic polynomalspolynomals of various of various subgraphssubgraphsof of GG::

if if G G is a cycle of length is a cycle of length nn, then , then ppkk(G(G) = (k ) = (k –– 1)1)nn + (+ (--1)1)nn(k (k –– 1),1),

if if GG is a tree then is a tree then ppkk(G(G) ) = = k(kk(k –– 1)1)nn--11,,

if if GG has has cc components then components then ppkk(G(G) ) = = ppkk(G(G11)) ... ... ppkk(G(Gcc) ) ..

Graph Theory 7 58

Although many properties of chromatic polynomials are known, no Although many properties of chromatic polynomials are known, no one has yet discovered which polynomials are chromatic.one has yet discovered which polynomials are chromatic.

Read (1968) conjectured that the sequence of coefficients of anyRead (1968) conjectured that the sequence of coefficients of anychromatic polynomial must first rise in absolute value and then chromatic polynomial must first rise in absolute value and then fallfall--in other words, that no coefficient may be flanked by two in other words, that no coefficient may be flanked by two coefficients having greater absolute value. coefficients having greater absolute value.

The condition is not sufficient: The condition is not sufficient: kk44 –– 3k3k33 + 3k+ 3k22 is not chromatic is not chromatic polynomial of any graphs.polynomial of any graphs.

No good algorithm is known for finding the chromatic polynomial No good algorithm is known for finding the chromatic polynomial of of a graph. a graph. It would provide an efficient way to determine the chromatic It would provide an efficient way to determine the chromatic number.number.

Graph Theory 7 59

One of the most One of the most famousfamous problemproblem in graph in graph theorytheory is the is the fourfour colourcolourproblemproblem: : proveprove that every plane graph is that every plane graph is 44--colourable.colourable.

The The weakerweaker assertionassertion is is almostalmost immediate immediate consequenceconsequence of Eulerof Euler's 's formula:formula:

TheoremTheorem 9.17.: Every plane graph is 9.17.: Every plane graph is 55--colourable.colourable.

Proof.Proof.

Let us suppose that the Let us suppose that the assertionassertion is is falsefalse, and let , and let GG be be 66--colourable colourable plane graph with minimal plane graph with minimal numbernumber of vertices. Then, by the of vertices. Then, by the CorollaryCorollary7.6, 7.6, GG has a vertex has a vertex xx of degree at most of degree at most 55..

PutPut H = G H = G –– x.x. Then Then HH is is 55--colourable, colourable, saysay with with colourscolours 1,2,3,4,5.1,2,3,4,5.

9.1.6. Colouring of Planar Graphs.9.1.6. Colouring of Planar Graphs.

Graph Theory 7 60

Each of Each of thesethese colourscolours mustmust be be usedused to to colourcolour at least one at least one neighbourneighbour--hoodhood of of xx, , otherwiseotherwise the the missingmissing colourcolour couldcould be be usedused to to colourcolour xx, , and so and so GG would be would be 55--colourable.colourable.

So, we So, we maymay assumeassume that that d(x)=5d(x)=5, and we , and we denotedenote themthem by by xx11,x,x22,…,x,…,x55,,and and we we colourcolour xxi i by by i, i=1,2,…,5.i, i=1,2,…,5.

Denote by Denote by H(i,jH(i,j )) the subgraph of the subgraph of HH spannedspanned by the vertices of by the vertices of colourcolourii and and j:j:

H(i,jH(i,j ) = ) = maxmax { { H'H' HH : : v V(H') v V(H') c(vc(v) = i ) = i c(vc(v) = j) = j}}

Suppose Suppose firstfirst that that xx11 and and xx33 belongbelong to to distinctdistinct components of components of H(1,3).H(1,3).InterchangingInterchanging the the colourscolours 11 and and 33 in the in the componentcomponent of of xx11 we we obtainobtainanotheranother colouringcolouring of of HH..HoweverHowever, in , in thisthis 55--colouring colouring bothboth xx11 and and xx33 getget colourcolour 33, so , so 11 is not is not usedused to to colourcolour any of the vertices any of the vertices xx11,x,x22,…,x,…,xnn..So, So, xx11 is is colourablecolourable with the with the colourcolour 11, , whichwhich is a contradiction.is a contradiction.

Page 16: 9. Graph colouring 9.1. Vertex colouring - uni-heidelberg.de · 9.1. Vertex colouring ... If we colour v by the jth colour then we get a (k – 1) ... Let us suppose that the statement

16

Graph Theory 7 61

So, we So, we cancan suppose that suppose that xx11 and and xx33 belongbelong to the to the samesame component.ofcomponent.ofH(1,3). H(1,3). ThenThen, , there is an there is an xx11––xx33 path path PP1313 in in HH whosewhose vertices are vertices are colouredcoloured 11 and and 33. .

SimilarlySimilarly, it is also , it is also truetrue that that xx22 and and xx44 are in the are in the samesame componentcomponent and and theythey cancan be be colouredcoloured by by 22 and and 44, and there exists an , and there exists an xx22––xx44 path path PP2424 in in H.H.

Is Is thisthis possiblepossible??

TheThe cycle cycle x xx x1 1 PP13 13 xx33 of of GG separates separates xx22 fromfrom xx44 butbut PP2424 cannotcannot meetmeetthisthis cycle.cycle.So, So, GG is not a is not a planarplanar graph, graph, whichwhich contradictscontradicts ourour assumptionassumption..

Graph Theory 7 62

= = 55= = 44= = 33= = 22= = 11

xx11 xx22

xx33

xx44

xx55

xx

G:G:H:H:

Graph Theory 7 63

Not every Not every planarplanar graph is graph is 33--colourable. The simplest colourable. The simplest exampleexample is the is the completecomplete graph graph KK44..

Is there any Is there any planarplanar graphgraph 33--colorable?colorable?

Let Let ��

00 = = maxmax {{ ��(G): G(G): G is is planarplanar} .} .

The The consequenceconsequence of the of the 55--colour colour theoremtheorem: : 4 4

�� ��

00

��

5. 5.

��

0 0

4 ?

4 ?

Graph Theory 7 64

The original form of the The original form of the fourfour colourcolour problemproblem was was posedposed by: by: Francis Guthrie in Francis Guthrie in 18521852: show that every : show that every olaneolane mapmap cancan be be colouredcoloured with with fourfour colourscolours..

His His teacherteacher, de Morgan, , de Morgan, circulatedcirculated the the problemproblem amongamong his his colleaguescolleagues, , butbut the the problemproblem was was firstfirst mademade popularpopular in in 18781878 by by CaleyCaley, , whowho mentionedmentioned it it beforebefore the Royal Society.the Royal Society.

The The firstfirst ��proofsproofs� � werewere givengiven by Kempe (by Kempe (18791879) and ) and TaitTait ((18801880).).

HeawoodHeawood's refutation of 's refutation of Kempe'sKempe's proof was published in proof was published in 18911891. . He modified the proof to obtain the five He modified the proof to obtain the five colourcolour problem.problem.

Petersen in Petersen in 18901890 proved that proved that Kempe'sKempe's proof contained false proof contained false assumptions: He proved that the four assumptions: He proved that the four colourcolour problem is equivalent problem is equivalent to the conjecture that every cubic graph has edge chromatic to the conjecture that every cubic graph has edge chromatic number three.number three.

Page 17: 9. Graph colouring 9.1. Vertex colouring - uni-heidelberg.de · 9.1. Vertex colouring ... If we colour v by the jth colour then we get a (k – 1) ... Let us suppose that the statement

17

Graph Theory 7 65

BirkhoffBirkhoff ''s s introductionintroduction of the of the chromaticchromatic polynomialpolynomial at the at the beginningbeginning of the 20. of the 20. centurycentury contributedcontributed to the to the solutionsolution..DuringDuring the 20. the 20. centurycentury a lot of a lot of worksworks werewere mademade by by variousvariousauthorsauthors givinggiving lowerlower boundsbounds on the order of a on the order of a possiblepossiblecounterexamplecounterexample..In In 19431943 HadwigerHadwiger mademade a a deepdeep conjectureconjecture containingcontaining the the fourfourcolourcolour problemproblem as a as a specialspecial casecase: if : if ��(G) =(G) = kk then then GG is is contractiblecontractible to to KKkk..The The problemproblem was at last was at last solvedsolved by by AppelAppel and Haken in and Haken in 19761976usingusing fast fast electronicelectronic computercomputer and and consideringconsidering more more thanthan 1900 1900 reduciblereducible configurationsconfigurations to to completecomplete the the proofproof..

Graph Theory 7 66

Graph Theory 7 67 Graph Theory 7 68

Problem Problem 22.: Each of .: Each of nn businessmenbusinessmen wisheswishes to hold to hold confidentalconfidentalmeetingsmeetings with with somesome of the of the othersothers. . AssumingAssuming that each that each meetingmeeting lastslastsa a dayday and at each and at each meetingmeeting exactlyexactly two two businessmenbusinessmen are are presentpresent, in , in howhow manymany daysdays cancan the the meetingmeeting be be overover??

The The graphgraph--theoreticaltheoretical modelmodel: Let : Let HH be such a graph be such a graph whosewhose vertices vertices correspondcorrespond to the to the nn businessmenbusinessmen and two vertices are and two vertices are adjacentadjacent iff the iff the two two businessmenbusinessmen wishwish to hold a to hold a meetingmeeting..

WhatWhat is the minimal is the minimal valuevalue of of kk for for whichwhich E(H)E(H) cancan be be partitionedpartitionedinto into kk classesclasses, , saysay EE11,E,E22,…,E,…,Ekk, such that no two edges , such that no two edges fromfrom the the samesameclassclass are are adjecentadjecent??

9.2. Edge 9.2. Edge ColouringColouring

Page 18: 9. Graph colouring 9.1. Vertex colouring - uni-heidelberg.de · 9.1. Vertex colouring ... If we colour v by the jth colour then we get a (k – 1) ... Let us suppose that the statement

18

Graph Theory 7 69

The The (edge) (edge) chromaticchromatic numbernumber ��''(G)(G), of a , of a looplessloopless graph graph GG, is the , is the minimumminimum kk for for whichwhich GG is is kk--edgeedge--colourablecolourable. . GG is is kk--edgeedge--chromaticchromaticif if ��''(G) = k.(G) = k.

A A kk--edge colouring edge colouring CC of a of a looplessloopless graph graph GG is an assignment of is an assignment of kkcolours, colours, 1, 2, ... , k1, 2, ... , k, to the edges of , to the edges of GG. . The colouring The colouring CC is is proper proper if no if no two adjacent edges have the same colour. two adjacent edges have the same colour.

A proper A proper kk--edge colouring is a edge colouring is a kk--edge colouring (edge colouring (EE11, E, E22, ... , , ... , EEkk) in ) in which which each subset each subset EEii is a matchingis a matching..

A graph A graph GG is is kk--edgeedge--colourablecolourable if if GG has a proper has a proper kk--edgeedge--colouring.colouring.

Every Every looplessloopless graph graph GG is is ||EE ||--edgeedge--colourablecolourable,,if if GG is is kk--edgeedge--colourablecolourable, then , then GG is also is also ll --edgeedge--colourablecolourable for for every every k k

��

l l

��

||EE |. |.

Graph Theory 7 70

A proper A proper 55--edge edge colouringcolouring of a graph of a graph GG..

G:G:

Graph Theory 7 71

aadd

cc

ee

ff

gg bb

A graph A graph whichwhich has a proper has a proper 44--colouring.colouring.

EE11 = {= { a,ga,g} } EE22 = {= { b,eb,e} } EE33 = {= { c,fc,f} } EE44 = {= { dd}}

Graph Theory 7 72

The edge The edge chromaticchromatic numbernumber of a graph of a graph GG is at least as large as the is at least as large as the maximummaximum degree degree ��(G) (G)

��

maxmaxxxd(xd(x), so ), so ��'(G) '(G)

��(G). (G).

The edge The edge setset E(G)E(G) of a of a bipartitebipartite graph graph cancan be be partitionedpartitioned into into ��(G)(G)classesclasses of independent edges, so of independent edges, so ��'(G) '(G) = = ��(G).(G).

WhatWhat aboutabout the the upperupper boundsbounds??

Since for the Since for the exampleexample we we cancan not not givegive a proper a proper 33--edge edge colouringcolouring, so , so the the inequalityinequality maymay be be strictstrict..

Page 19: 9. Graph colouring 9.1. Vertex colouring - uni-heidelberg.de · 9.1. Vertex colouring ... If we colour v by the jth colour then we get a (k – 1) ... Let us suppose that the statement

19

Graph Theory 7 73

TheoremTheorem 9.18.: 9.18.: ��'(G) '(G)

��

22��(G) (G) –– 11. .

Proof.Proof.

Each edge is Each edge is adjacentadjacent to at most to at most 2(2(��(G) (G) –– 1) 1) edges.edges. ApplyApply the result the result of the of the Theorem 9.9 Theorem 9.9 we will we will getget the desired the desired statementstatement. .

TheoremTheorem 9.19.: If 9.19.: If ��(G) (G)

��

3, 3, then then ��'(G) '(G)

��

22��(G) (G) –– 2. 2.

Proof.Proof.

The The statementstatement of the of the theoremtheorem follows follows immediatelyimmediately fromfrom the the Brooks Brooks Theorem.Theorem.

Graph Theory 7 74

TheoremTheorem 9.22. (9.22. (VizingVizing): ): ��(G)

(G)

��'(G) '(G)

��(G) + 1. (G) + 1.

Proof.Proof.

Let Let �� = = ��((GG) and ) and assumeassume that we have that we have usedused 1,2,1,2,……,, ��+1+1 to to colourcolour all all butbut one of the edges. We are one of the edges. We are readyready if we if we cancan show that show that thisthisuncoloureduncoloured edge edge cancan also be also be colouredcoloured one of the one of the ��+1+1 usedused colourescoloures..

We We saysay that that a a colourcolour is is missingmissing at a vertex at a vertex zz if no edge if no edge incidentincident with with zz getsgets that that colourcolour..

If If zz is is incidentincident with with dd''(z)

(z)

d(zd(z) )

��

�� edges that have edges that have beenbeen colouredcoloured, , then then ��+1+1–– dd''(z)(z) colourscolours are are missingmissing at at zz..

Since Since dd''(z) > 0 (z) > 0 then at each vertex at least one then at each vertex at least one colourcolour is is missingmissing..

OurOur aimaim is to is to movemove aroundaround the the colourscolours and the and the uncoloureduncoloured edge in edge in such a way that a such a way that a colourcolour will be will be missingmissing at at bothboth endverticesendvertices of the of the uncoloureduncoloured edge, edge, enablingenabling us to us to completecomplete the the colouringcolouring..

Graph Theory 7 75

xx yy11

G:G:

Let Let ss (red)(red) and and tt11 ((blueblue)) be be missingmissing colourscolours at at xx and and yy11 respectivellyrespectivelly. .

We We shallshall constructconstruct a sequence of edges a sequence of edges xyxy11, xy, xy22,…,,…, and a sequence of and a sequence of colourscolours tt11, t, t22,…,… such that such that ttii is is missingmissing at at yyii and and xyxyi+1i+1 has has colourcolour ttii ..

xyxy11 is an is an uncoloureduncoloured edge.edge.

Graph Theory 7 76

Suppose we have Suppose we have constructedconstructed xyxy11,…,xy,…,xyii and and tt11,…,t,…,tii. .

There is at most one edge There is at most one edge xyxy of of colourcolour ttii. .

If If y y {{ yy11,,……,,yyii} , we put } , we put yyi+1i+1= y= y and pick a and pick a colourcolour tti+1i+1 missing atmissing at yyi+1 i+1 , , otherwise we stop the sequence. otherwise we stop the sequence.

These These sequencessequences have to have to terminateterminate at most at most ��(G)(G) termsterms. Let . Let xyxy11,,……, , xyxyhh and and tt11,,……,t,thh be the be the completecomplete sequencessequences. .

WhatWhat kindkind of of reasonsreasons maymay occuroccur that a sequence that a sequence terminatesterminates??

No edge No edge xyxy has has colourcolour tthh..

Then Then recolourrecolour the edges the edges xyxyii, i < h, i < h, , givinggiving xyxyii the the colourcolour ttii .. In the In the colouringcolouring we we obtainobtain every edge is every edge is colouredcoloured, , exceptexcept xyxyhh..

Since Since tthh occursoccurs neitherneither at at xx nornor at at yyhh, we , we maymay completecomplete the the colouringcolouring by by assigningassigning tthh to to xyxyhh..

Page 20: 9. Graph colouring 9.1. Vertex colouring - uni-heidelberg.de · 9.1. Vertex colouring ... If we colour v by the jth colour then we get a (k – 1) ... Let us suppose that the statement

20

Graph Theory 7 77

For For somesome j < hj < h the edge the edge xyxyjj has has colourcolour tthh..

RecolourRecolour the edges the edges xyxyii, , i < ji < j , , givinggiving xyxyii the the colourcolour ttii . . In In thisthiscolouringcolouring the the uncoloureduncoloured edge is edge is xyxyjj..

Let Let H(s,tH(s,thh)) be the subgraph of be the subgraph of GG formedformed by the edges of by the edges of colourcolour ssand and tthh..

Each vertex of Each vertex of H(s,tH(s,thh)) is is incidentincident with at most with at most 22 edges in edges in H(s,tH(s,thh))(one of (one of colourcolour ss and the and the otherother of of colourcolour tthh) so the components of ) so the components of H(s,tH(s,thh)) are paths and are paths and cyclescycles. .

Each of the vertices Each of the vertices x, x, yyjj and and yyhh has degree at most has degree at most 11 in in H(s,tH(s,thh),),so so theythey cannotcannot belongbelong to the to the samesame componentcomponent of of H(s,tH(s,thh).).

So, at least one of the So, at least one of the followingfollowing two two casescases has to hold:has to hold:

Graph Theory 7 78

The vertices The vertices xx and and yyjj belongbelong to to distinctdistinct components of components of H(s,tH(s,thh).).

InterchangeInterchange the the colourscolours ss and and tthh in the in the componentcomponent containingcontaining yyjj..

Then the Then the colourcolour s s is is missingmissing at at bothboth xx and and yyjj, so we , so we maymaycompletecomplete the the colouringcolouring by by givinggiving xyxyjj the the colourcolour s.s.

The vertices The vertices xx and and yyhh belongbelong to to distinctdistinct components of components of H(s,tH(s,thh).).

ContinueContinue the the recolouringrecolouring of the edges of the edges incidentincident with with xx by by givinggivingxyxyii the the colourcolour ttii for each for each i < h, i < h, therebythereby makingmaking xyxyhh the the uncolouruncolour--eded edge.edge.

So, So, xyxyhh will will thisthis recolouringrecolouring doesdoes not not involveinvolve edges of edges of colourscolours ssand and tthh, so , so H(s,tH(s,thh)) has not has not beenbeen alteredaltered..

SwitchSwitch aroundaround the the colourscolours in the in the componentcomponent containingcontaining yyhh. .

This This switchswitch makesmakes suresure that the that the colourcolour ss is is missingmissing at at bothboth xx and and yyhh,, so we so we cancan useuse ss to to colourcolour the so far the so far uncoloureduncoloured edge edge xyxyhh..

Graph Theory 7 79

VizigVizig proved a more general theorem: If G is proved a more general theorem: If G is looplessloopless then then ��(G)

(G)

��'(G) '(G)

��(G) + (G) + �� (G)(G)..

The maximum number of edges joining two vertices in The maximum number of edges joining two vertices in GG is called is called the the multiplicity of multiplicity of GG, and it is denoted by , and it is denoted by �� (G).(G).

This theorem is best possible in the sense that, for any This theorem is best possible in the sense that, for any ��, , there exists there exists a graph G such that a graph G such that ��'(G) '(G) = = ��(G) + (G) + �� (G)(G)..

It leaves open one interesting question: which simple graphs satIt leaves open one interesting question: which simple graphs satisfy isfy

��'(G) '(G) = = ��(G)(G)??

A nonempty graph is said to be of A nonempty graph is said to be of class oneclass one if if ��'(G) '(G) = = ��(G) (G) and of and of classclass twotwo if if ��'(G) '(G) = = ��(G) + 1.(G) + 1.

Graph Theory 7 80

CCnn ((n n ��

33) is of class one if ) is of class one if nn is even and of class two if is even and of class two if nn is odd.is odd.KKnn is class one if is class one if nn is even and of class two if is even and of class two if nn is odd.is odd.Every regular graph of odd order is of class two.Every regular graph of odd order is of class two.

It is not true that every regular graph of even order is of clasIt is not true that every regular graph of even order is of class one: s one: the Petersen graph is of class two.the Petersen graph is of class two.

There are considerable more class one graphs than class two grapThere are considerable more class one graphs than class two graphs: hs: Erd�sErd�s and Wilson (and Wilson (19771977) proved that the probability that a graph of ) proved that the probability that a graph of order order nn is of class one is of class one approchesapproches 11 as as nn approaches infinity.approaches infinity.

An An independent set of edgesindependent set of edges in a graph in a graph GG is a set of edges, each two is a set of edges, each two of which are nonadjacent.of which are nonadjacent.

The The edge independent number edge independent number

��

11(G)(G) is the is the maximummaximum cardinalitycardinalityamongamong the independent the independent setssets of edges of of edges of GG..

Page 21: 9. Graph colouring 9.1. Vertex colouring - uni-heidelberg.de · 9.1. Vertex colouring ... If we colour v by the jth colour then we get a (k – 1) ... Let us suppose that the statement

21

Graph Theory 7 81

Theorem Theorem 9.23.: Let 9.23.: Let GG be a graph of size be a graph of size mm. If . If mm > > ��((GG) )

��

11(G)(G) then then GGis of is of classclass two.two.

Proof.Proof.

Assume that Assume that GG is of class one. is of class one.

Then Then ��'(G) '(G) = = ��(G)(G). Let a . Let a ��'(G'(G))--colouringcolouring of of GG be given. be given.

Each edgeEach edge--colourcolour class of G has at most class of G has at most

��

11(G)(G) edges.edges.

ThereforeTherefore mm �� ��((GG) )

��

11(G)(G)..

A graph A graph GG is is overfulloverfull if if mm > > ��((GG)

)

n/2n/2

��

CorollaryCorollary 9.24.: Every overfull graph is of class two.9.24.: Every overfull graph is of class two.

Graph Theory 7 82

A graph A graph GG is is minimal with respect to edge chromatic numberminimal with respect to edge chromatic number if if

��(G(G–– ee) = ) = ��(G(G) ) –– 11 for all for all e e E(G).E(G).

TheoremTheorem 9.25.(Vizing, 9.25.(Vizing, 19651965): Let ): Let GG be a connected graph of class be a connected graph of class two that is minimal with respect to edge chromatic number. Then two that is minimal with respect to edge chromatic number. Then every vertex of every vertex of GG is adjacent to at least two vertices of degree is adjacent to at least two vertices of degree ��(G)(G). . In In particularparticular, , GG contains at least contains at least threethree vertices of degree vertices of degree ��(G)(G). .

TheoremTheorem 9.26.(Vizing, 9.26.(Vizing, 19651965): Let ): Let GG be a connected graph of class be a connected graph of class two that is minimal with respect to edge chromatic number. If u two that is minimal with respect to edge chromatic number. If u and and v are adjacent vertices with deg u = k, then v is adjacent to atv are adjacent vertices with deg u = k, then v is adjacent to at least least ��(G) (G) –– k + 1 vertices k + 1 vertices of degree of degree ��(G)(G). .

Graph Theory 7 83

What is the situation with planar graphs?What is the situation with planar graphs?

It is easy to find planar graphs It is easy to find planar graphs GG of class one for which of class one for which ��(G)(G) = = ddfor each for each d d

��

2 2 since all since all starstar graphs are graphs are planarplanar and of and of classclass one.one.There There existexist planarplanar graphs graphs GG of of classclass two with two with ��(G)(G) = = dd for for d = 2, d = 2, 3, 4, 5. 3, 4, 5.

It is not known whether there exist planar graphs of class two It is not known whether there exist planar graphs of class two having maximum degree having maximum degree 66 or or 77..VizingVizing proved that if proved that if GG is planar and is planar and ��(G)(G) �� 8, 8, then then GG mustmust be of be of classclass one.one.

Graph Theory 7 84Planar graphs of class two.Planar graphs of class two.

��(G) = 2(G) = 2 ��(G) = 3(G) = 3 ��(G) = 4(G) = 4

��(G) = 5(G) = 5

Page 22: 9. Graph colouring 9.1. Vertex colouring - uni-heidelberg.de · 9.1. Vertex colouring ... If we colour v by the jth colour then we get a (k – 1) ... Let us suppose that the statement

22

Graph Theory 7 85

There is a colouring that assigns colours to both the vertices aThere is a colouring that assigns colours to both the vertices and nd edges of a graph: a edges of a graph: a total colouringtotal colouring of a graph of a graph GG is an assignment of is an assignment of colours to the elements (vertices and edges) of colours to the elements (vertices and edges) of GG so that adjacent so that adjacent elements and incident elements of elements and incident elements of GG are coloured differently.are coloured differently.

A A kk--total colouringtotal colouring is a total colouring that uses is a total colouring that uses kk colours.colours.

The minimum The minimum kk for which a graph for which a graph GG admits admits kk--total colouring is total colouring is called the called the total chromatic numbertotal chromatic number of of GG and denoted by and denoted by ��

TT(G(G).).

It is trivial that It is trivial that ��

TT(G(G) ) �� ��((GG) + ) + 11..

Total Colouring Conjecture: for every graph Total Colouring Conjecture: for every graph GG, , ��

TT(G(G) ) �� ��((GG) + ) + 22..

Graph Theory 7 86

The The TimetablingTimetabling ProblemProblem

The The problemproblem: In a : In a schoolschool, there are , there are mm teachersteachers XX11, X, X22, … , , … , XXmm, and , and nnclassesclasses YY11, Y, Y22, … , , … , YYnn. . GivenGiven that that teacherteacher XXii is is requiredrequired to to teachteach classclassYY for for ppijij periodsperiods. Schedule a . Schedule a completecomplete timetabletimetable in the in the minimumminimumpossiblepossible numbernumber of of periodsperiods..

The The modelmodel: we : we representrepresent the the teachingteaching requirementsrequirements by a by a bipartitebipartitegraph graph GG with with bipartitionbipartition ((X,YX,Y), where ), where

X =X = {{ xx11, x, x22, … , , … , xxmm} } YY = {= { yy11, y, y22, … , , … , yynn} } and vertices are and vertices are joinedjoined byby ppijij edges.edges.

We have, at least, the We have, at least, the assumptionassumption that in any one that in any one periodperiod each each teacherteachercancan teachteach at most one at most one classclass, and each , and each classclass cancan be be thaghtthaght by at most by at most one one teacherteacher..

Graph Theory 7 87

In In thisthis modelmodel a a teachingteaching scheduleschedule for one for one periodperiod correspondscorresponds to a to a matchingmatching in the in the bipartitebipartite graph and, graph and, converselyconversely, each , each matchingmatchingcorrespondscorresponds to a to a possiblepossible assignementassignement of of teachersteachers to to classesclasses for one for one periodperiod..

ThereforeTherefore, , ourour problemproblem is to is to partitionpartition the edges of the edges of GG into as into as fewfewmatchingmatching as as possiblepossible oror, , equivalentlyequivalently, to , to properlyproperly colourcolour the edges of the edges of GG with as with as fewfew colurscolurs as as possiblepossible..

Since Since GG is is bipartitebipartite, we , we knowknow, that , that ��'' = = ��..

Case A.:Case A.: if no teacher teaches for more than if no teacher teaches for more than pp periods, and if no periods, and if no class is class is thaughtthaught for more than for more than pp periods, the teaching periods, the teaching requirements can be scheduled in a requirements can be scheduled in a pp--period timetable.period timetable.

Since we need to solve a matching problem, there is a good Since we need to solve a matching problem, there is a good algorithm for constructing such a timetable.algorithm for constructing such a timetable.

Graph Theory 7 88

CaseCase BB : if only a : if only a limitedlimited numbernumber of of classroomsclassrooms are are availableavailable then then howhow manymany periodsperiods are are neededneeded to to scheduleschedule a a completecomplete timetabletimetable??

Suppose that Suppose that altogetheraltogether there are there are ll lessonslessons to be to be givengiven, and that , and that theytheyhave have beenbeen scheduledscheduled in a in a pp--periodperiod timetabletimetable. .

Since Since thisthis timetabletimetable requiresrequires an an averageaverage of of l/pl/p lessonslessons to be to be givengiven in in each each periodperiod, so at least

, so at least

l/pl/p

roomsrooms are are occupiedoccupied in any one in any one periodperiod. .

This is the This is the consequenceconsequence of the of the followingfollowing theoremtheorem..

Page 23: 9. Graph colouring 9.1. Vertex colouring - uni-heidelberg.de · 9.1. Vertex colouring ... If we colour v by the jth colour then we get a (k – 1) ... Let us suppose that the statement

23

Graph Theory 7 89

ConsiderConsider the graph the graph HH = = GG[[MM NN]. Then each ]. Then each componentcomponent of of HH is is eithereither an an eveneven cycle with edges cycle with edges alternatelyalternately in in MM and and NN, , oror elseelse a path a path with edges with edges alternatelyalternately in in MM and and NN..

Since |Since |MM| > || > |NN|, |, somesome path path componentcomponent PP of of HH mustmust start and end with start and end with edges of edges of MM..

Let Let P = vP = v00ee11vv11ee22…e…e2n+12n+1vv2n+12n+1, and , and setset

MM'' == ((M M \\ {{ ee11,e,e33, … , e, … , e2n+12n+1} ) {} ) { ee22, e, e44, … , e, … , e2n2n}}

MM'' == ((M M \\ {{ ee22,e,e44, … , e, … , e2n2n} ) {} ) { ee11, e, e33, … , e, … , e2n+12n+1}}

Then Then MM'' and and NN'' are are matchingsmatchings of of GG that that satisfysatisfy the the conditionsconditions of the of the lemmalemma..

Lemma 9.27.: Let Lemma 9.27.: Let MM and and NN be be disjointdisjoint matchingsmatchings of of GG with |with |MM | > | > ||NN |. Then there are |. Then there are disjointdisjoint matchingsmatchings MM'' and and NN'' of of GG such that |such that |MM'' | | = |= |MM | | –– 11, |, |NN'' | = || = |NN | + | + 11 and and MM'' NN'' = M = M NN..

Proof.Proof.

Graph Theory 7 90

Theorem 9.28.: If Theorem 9.28.: If GG is is bipartitebipartite, and if , and if p p

��

��, then there , then there existexist ppdisjointdisjoint matchingsmatchings MM11, M, M22, , …… , , MMpp of of GG such thatsuch that

E(G) = ME(G) = M11 MM22 … … MMpp (*)(*)and for and for 1 1

��

i i

��

pp[|[|EE((GG)| / )| / pp] ] � |� |MMii | �

|| �

|EE((GG)| / )| / pp

. (**)

. (**)

Proof.Proof.

First we First we notenote that the last that the last inequalitiesinequalities saysay that any two that any two matchingsmatchings MMii

and and MMjj differdiffer in in sizesize by at most one.by at most one.Let Let G G be a be a bipartitebipartite graph. Then the edges of graph. Then the edges of GG cancan be be partitionedpartitionedinto into �� matchingsmatchings . . ThereforeTherefore, for any , for any p p

��

��, there , there existexist p p disjointdisjoint matchingsmatchings(with = (with = for for i i > > ��) such that ) such that

∆M,...,M,M 21 ′′′

p21 M,...,M,M ′′′ iM ′

p21 MMM)G(E ′′′= ����

Graph Theory 7 91

By By repeatedlyrepeatedly applyingapplying Lemma 9.27 Lemma 9.27 to to pairspairs of of thesethese matchingsmatchings that that differdiffer in in sizesize by more by more thanthan one, we one, we eventuallyeventually obtainobtain pp disjointdisjointmatchingsmatchings MM11, M, M22, … ,, … ,MMpp of of GG satisfyingsatisfying (*) and (**), as (*) and (**), as requiredrequired..

Let us Let us considerconsider the the followingfollowing exampleexample: suppose there are : suppose there are fourfourteachersteachers and and fivefive classesclasses, and the , and the teachingteaching requirementrequirement matrixmatrix is is givengiven..

One One possiblepossible 44--period period timetabletimetable is is givengiven on the on the nextnext pagepage..

We We cancan representrepresent thisthis timetabletimetable by a by a decompositiondecomposition into into matchingsmatchingsof the edge of the edge setset of the of the bipartitebipartite graph graph G G corespondingcoresponding to to PP..

From the timetable we see that four classes are taught in periodFrom the timetable we see that four classes are taught in period 11, , and so, four rooms are needed.and so, four rooms are needed.

Graph Theory 7 92

However, |However, |E(G)E(G) | = | = 1111 and so, by and so, by Theorem 9.28Theorem 9.28, a , a 44--period timeperiod time--table can be arranged so that in each period either table can be arranged so that in each period either 22 ( = [( = [11 / 411 / 4] ) or ] ) or 3 3 ( = {( = { 11 / 311 / 3} ) classes are } ) classes are thaughtthaught..

Let Let MM11 be the matching with the red lines and be the matching with the red lines and MM44 the matching with the matching with the green lines. (|the green lines. (|MM44 | = | = 44 and |and |MM11 | =| = 22.).)

We can now find a We can now find a 44--period period 33--room timetable room timetable by considering by considering GG[[MM11 MM44 ].].

GG[[ MM11 MM44 ]] has two components, each consisting of a path of length has two components, each consisting of a path of length three. Both paths start and end with red edges and so, by three. Both paths start and end with red edges and so, by interchanging the interchanging the matchingsmatchings on one of the two paths, we shall reduce on one of the two paths, we shall reduce the red matching to one of three edges, and the same time increthe red matching to one of three edges, and the same time increase ase the green matching to the green matching to one of three edgesone of three edges. .

This gives the revised timetable where only This gives the revised timetable where only three rooms are needed three rooms are needed at any time.at any time.

Page 24: 9. Graph colouring 9.1. Vertex colouring - uni-heidelberg.de · 9.1. Vertex colouring ... If we colour v by the jth colour then we get a (k – 1) ... Let us suppose that the statement

24

Graph Theory 7 93

Suppose now that there are just two rooms available. Suppose now that there are just two rooms available. Theorem 9.28 Theorem 9.28 tells us that there must be a tells us that there must be a 66--period timetable that satisfies our period timetable that satisfies our requierementsrequierements since {since { 11/611/6} = } = 22. Such a timetable is given on the . Such a timetable is given on the next figure. next figure.

In practice, most problems on timetabling are complicated by In practice, most problems on timetabling are complicated by preassignementspreassignements (that is, conditions specifying the periods during (that is, conditions specifying the periods during which certain teachers and classes must meet). which certain teachers and classes must meet).

Such problem has been studied by Such problem has been studied by DempsterDempster and de and de WerraWerra..

XX11

XX22

XX33

XX44

1 2 3 4 5 6 1 2 3 4 5 6

Y5Y4

Y2Y3Y4

Y4Y2

Y1Y1Y3Y4

Graph Theory 7 94

����

����

=

1

0

0

0

1000

1110

1010

1102

P

YY1 1 YY2 2 YY3 3 YY4 4 YY5 5

XX11

XX22

XX33

XX44 ––Y5Y4

Y2–Y4Y3

–Y4–Y2

Y4Y3Y1Y1XX11

XX22

XX33

XX44

1 2 3 41 2 3 4

XX11 XX22 XX33 XX44

YY11 YY22 YY33 YY44 YY55

Graph Theory 7 95

XX11 XX22 XX33 XX44

YY11 YY22 YY33 YY44 YY55

GG[[ MM11 MM44 ].].

XX11 XX22 XX33 XX44

YY11 YY22 YY33 YY44 YY55

Y4–Y5–

Y2–Y4Y3

–Y4–Y2

Y1Y3Y1Y4XX11

XX22

XX33

XX44

1 2 3 41 2 3 4