MA2005 – Graphs and Networks Graphs 4 4. Vertex Colouring Aims - To introduce the topic of vertex colouring and an application of it to a storage problem. - To define the term, chromatic number, and present methods of determining it. 4.1 Introduction A chemical company wants to ship 6 chemicals, C1 ,, C6 , in such a way that those which react violently together are stored in separate containers. The problem is how to store the chemicals using minimum number of containers. Pairs of chemical that react violently together are: C1C 2 , C1C6 , C1C5 , C 2 C3 , C2 C6 , and C5 C6 . The problem can be solved by drawing a ‘react violently’ graph, F, whose vertices are C i and its edges are Ci C j (i, j 1,,6) , where C i and C j react together violently. If we now assign colours to the vertices of F so that no two adjacent vertices have the same colour, we see that we require at least three colours. This minimum number of colours is called the chromatic number and is denoted by the Greek letter , (chi). For this problem, therefore, ( F ) 3 , as two colours would not be sufficient to colour the adjacent vertices differently. So three containers are required to transport the chemicals safely. C1 (red) C6 (green) Red Blue Green C1 C2 C6 C3 C5 C2 (blue) OR: C5 (blue) C3 (red) C4 C4 (red) In general, for a simple graph G, we say that G is k-colourable if we can colour each vertex from a set of k colours in such a way that for every edge its two end vertices have a different colour. The smallest k for which this is possible is called the chromatic number of G, denoted by (G ) . Note that the graph F above is tripartite. Its vertices can be split into three sets (red, blue and green) and the edges connect vertices in different sets. Examples (G ) 1 iff G has no edges, that is, G is a null graph. (G ) 2 iff G is bipartite and non-null. ( K n ) n , where K n is a complete graph with n vertices. (Ceven ) 2 and (Codd ) 3 , where C is a cycle graph with even or odd number of vertices. 1 MA2005 – Graphs and Networks Graphs 4 If H is a subgraph of G, then (G ) ( H ) . For example, the odd cycle C 5 is a subgraph of Petersen graph, P, so ( P) (C5 ) 3 . In fact ( P ) 3 . Max Degree This is denoted by (G ) and is the maximum degree of any vertex in graph G. Theorem (Brooks 1941). If G is a simple connected graph which is not an odd cycle or a K n , then (G ) (G ) . (That is, G is (G ) -colourable.) Remark We have (Codd ) 3 2 (Codd ) and we have ( K n ) n ( K n ) n 1 , hence these two classes of graphs are excluded from the statement of Brook’s theorem above. 4-colour theorem (Appel and Haken 1976). Every simple PLANAR graph is 4-colourable. (i.e. (G ) 4 for any planar graph G.) 4.2 The Independence Number and Cliques An independent set in a graph G is a set of vertices of G, no two of which are adjacent. The independence number of a graph G, denoted by i (G ) , is the size of the largest independent set. It is useful to know i (G ) as it can be used to find the lower bound for (G ) as n i(G) (G ) (G) , where n is the number of vertices of G and the symbol a means the smallest integer greater than or equal to the real number a. Cliques If G is an undirected graph, any subgraph of G that is a complete graph is called a clique in G. A clique-partition of G is a partition of all vertices of G into cliques. A graph can have many clique-partitions. For example, for graph L below i i i 3 parts clique-partition K5, K3, K3 5 parts clique-partition K4, K3, K2, K1, K1 2 MA2005 – Graphs and Networks Graphs 4 Given a clique-partition of a graph G with k parts, an independent set of G can have at most one vertex from each part, since vertices from the same part are adjacent. So i (G ) k . For L above, we have found a clique-partition with 3 parts, and one with 5 parts; so i ( L ) 3 . Now try to use the clique-partition with 3 parts to find an independent set of size 3. This is possible for L as the 3 vertices labelled i form an independent set of size 3, so i ( L) 3 . In the above example, we had equality between i (L ) and some k. This need not always be the case. For example the Petersen graph, P, has no K 3 ' s, K 4 ' s, as subgraphs; only K 2 ' s (edges) and K1 ' s (vertices). It has 10 vertices, so every cliquepartition with k parts must have k 5 . But i( P) 4 k . So clique-partitions cannot always be used to find the independence number. Exercises 4.1 1. Determine the chromatic number of each of the following graphs. (i) (ii) (iii) (iv) Petersen graph 2. For the graphs in 1 above, find the independence number and the Max degree in each case and check that (G ) obeys the bounds n i(G) (G ) (G) . 3 MA2005 – Graphs and Networks Graphs 4 4.3 Chromatic Polynomials A k-colouring of a graph G is the number of ways of assigning colours from a set of k colours to the vertices of G so that for every edge its two end vertices receive different colours. Note that all k colours need not be used. The smallest k for which G has a kcolouring is called the chromatic number of G, which we denoted by (G ) . The question that we are now interested in is how many k-colourings does a graph have. Let G (k ) be the number of k-colourings of G. Then (G ) is the smallest k for which G (k ) 1 , since this means that there is at least one (G ) -colouring of G, (and no k-colourings of G for k (G ) because G (k ) 0 for these k). So this gives another method of computing the chromatic number of a graph. Example Let H be the path on 3 vertices. Then, H (1) 0 , H (2) 2 , (so ( H ) 2 ), H (3) 12 , H (4) 36 , and so on. k k -1 k -1 k -1 k k -1 OR So we have H (k ) k (k 1) 2 . More examples 1. Null graphs. If G N n is the null graph with n vertices, then G (k ) k n . 2. Trees. If G Tn is any tree with n vertices, then G (k ) k (k 1) n 1 . For example, the graph H above is a T3 . 3. Complete graphs. If G K n is the complete graph with n vertices, then G (k ) k (k 1)(k 2)(k n 1). For example, for the graph K 4 we have k k -1 K (k ) k (k 1)( k 2)( k 3). 4 k -3 k -2 4 MA2005 – Graphs and Networks Graphs 4 Labelling Procedure Labelling K 4 as above illustrates the general procedure. As you label vertices with k, k -1, … you can label a new vertex with k – i provided its labelled neighbours form an i-clique (a complete subgraph K i ). Example Consider the graph J blow. k -1 k -2 k -2 k OR k k -2 k -2 k -1 J (k ) k (k 1)( k 2) 2 . Sometimes, when labelling, you might reach a conflict, i.e. the labelled neighbours of a vertex you want to label do not form a clique. A different labelling may avoid this. For example, the labelling on the left below reaches a conflict but the one on the right works. k –1 k k k –2 k -3 k -1 k -2 or k -3 ? k –2 k -1 k –2 J (k ) k (k 1)( k 2) 2 (k 3) However, there are some graphs that CANNOT be labelled in a conflict free manner. We need the deletion-contraction theorem to break such graphs into two or more graphs, each of which having a conflict free labelling. The graph F below, for example, cannot be labelled in a conflict free manner. k ? k -1 k –2 k -1 Deletion-Contraction Theorem Recall that G – e denotes the graph obtained from G by deleting edge e, and G \ e denotes the graph obtained by contracting e. Let e be an edge in a graph G, then G (k ) G e (k ) G \ e ( k ) . 5 MA2005 – Graphs and Networks Graphs 4 This is a useful result as the two graphs on the right-hand side of the above equation have fewer edges than G, so we can use the Deletion-Contraction theorem repeatedly until we reach graphs for which we can compute the chromatic polynomial by a conflict free labelling, e.g. for null graphs, complete graphs or trees. We can now find the chromatic polynomial of F by applying the above result. k -1 e k-2 k -2 k k -1 F F–e F (k ) = F e (k ) = = = F \ e (this is K4) F \ e (k ) - k (k 1)( k 2)( k 3) k (k 1) (k 2) k (k 1)(k 2)(k 1)(k 2) (k 3) k (k 1)(k 2)(k 2 4k 5) . 2 2 Hence, F (1) F (2) 0 , but F (3) 12 . So F (k ) 3 and F has 12 threecolourings. Note that the quadratic expression in F (k ) cannot be factorised (unless complex numbers are used), and that is why F could not be labelled in a conflict free manner. Exercises 4.2 1. Find the chromatic polynomials of the following graphs. (i) (ii) (iii) 2. In how many ways can the graph in part (iii) above be coloured (a) with 3 colours? (b) with 4 colours? 3. Find the chromatic polynomial of the disconnected graph. 6
© Copyright 2026 Paperzz