RECURSIVE FORMULA FOR CALCULATING THE CHROMATIC POLYNOMIAL OF A GRAPH BY VERTEX DELETION

RECURSIVE FORMULA FOR CALCULATING THE CHROMATIC POLYNOMIAL OF A GRAPH BY VERTEX DELETION

2004,24B(4):577-582 ..4athemJ(~9cier1tia 1~~fJ1~ffl RECURSIVE FORMULA FOR CALCULATING THE CHROMATIC POLYNOMIAL OF A GRAPH BY VERTEX DELETION 1 Xu li...

396KB Sizes 1 Downloads 45 Views

2004,24B(4):577-582

..4athemJ(~9cier1tia

1~~fJ1~ffl RECURSIVE FORMULA FOR CALCULATING THE CHROMATIC POLYNOMIAL OF A GRAPH BY VERTEX DELETION 1 Xu lin ( 1+iii ) Department of Control Science and Engineering, Huazhong University of Science and Technology, Wuhan 430074, China. E-mail: [email protected]

Abstract A new recursive vertex-deleting formula for the computation of the chromatic polynomial of a graph is obtained in this paper. This algorithm is not only a good tool for further studying chromatic polynomials but also the fastest among all the algorithms for the computation of chromatic polynomials. Key words

Graph Theory, chromatic polynomial, vertex-deleting recursive formula

2000 MR Subject Classification

1

05C

Introduction

All graphs considered in this paper are assumed to be finite and loopless. They may, however, have multiple edges. Let P(G, oX) denote the chromatic polynomial of a graph G. The vertex-set and edge-set of graph G are denoted by V(G) and E(G) respectively. A subset V' of the vertex-set V (G) is said to be contracted if all vertices in V' are identified to a simple vertex and those edges incident with V' are incident with this new vertex. Let V' ~ V(G). We use G[V'] to denote the subgraph of G induced by V'. Other notations are the same as in [1]. The graph coloring problem has been widely applied in many areas such as Information Theory, Cryptography, and Computer Science etc. One of the main topics in the study of graph coloring is chromatic polynomials. Of course, calculating the chromatic polynomial of a graph is a basic and important problem. There are many results on chromatic polynomial of a graph and the calculation of chromatic polynomials of some special graphs[2-5]. The following is a list of the well known results. 1.1 If G has p vertices but no edges, i.e., G is a null graph with p vertices, then

P(G, oX) = 1.2

v.

If G is a complete graph with p vertices, where p

(1)

> 0, then

P(G, oX) = oX(oX - l)(oX - 2) .. · (oX - P + 1). 1 Received

April 19, 2002. This research is partially supported by NNSF of China.

(2)

578

ACTA MATHEMATICA SCIENTIA

Vol.24 Ser.B

1.3 If G has two edges with the same pair of ends then the deletion of one of them does not affect the value of P(G, A). 1.4 Let G be the union of two subgraphs Hand K whose intersection is a complete graph. Then

= P(H, >.)P(K, >.).

P(G, >.)P(H n K, >.)

1.5

Let T p be a tree with p vertices. Then P(Tp , >.)

1.6

(3)

Let

= >.(>. -

l)p-l.

(4)

c, denote a circuit of p vertices, where p ~ 2. Then (5)

and for p

> 2 we have P(C p,>.) = (>' -1)P

+ (-I)P(>' -1).

(6)

1.7 Let W p , where p ~ 2, be a wheel of p spokes. This means that W p is obtained from a circuit C p of p vertices by adjoining a new vertex v, called the hub, and then joining v to the p vertices of Cp by p new edges called spokes. Then P(Wp ,>') = >.{(>. - 2)P

1.8

+ (-I)P(>. -

2)}.

Let G be a disconnected graph with m (m 2: 2) components G 1 , G 2 ,

(7) "',

G m . Then

(8) There are three known methods of calculating chromatic polynomials of arbitrary graphs. These are given as follows. 1.9 The recursion formula by adding (or deleting) an edge Suppose u,v E V(G), and e = uv f/. E(G) in the graph G. Then P(G, >.)

= P(G + e, >.) + P(G . e, >.),

(9)

where G + e is the graph obtained from G by adding the edge e and G . e is the graph obtained from G by contracting the vertices u and v of e. 1.10 The Whithey formula Let G be a simple graph. Then the coefficient of >.i in P(G, >.) is equal to L;=o( _1)r N(i, r}, where N(i, r)denotes the number of spanning subgraph with r edges and i components, q = IE(G)I[3]. 1.11 The analytical formula Let G be an arbitrary graph with p vertices. Then p

P(G, >') =

L br[>.]r,

(10)

r=l

where b; is the number of distinct color-partitions of F(G) into r color-classes and

[>']r

= >.(>. -

1)(>' - 2)··· (>. - r

+ 1).

(11)

In this paper, a new algorithm for calculating the chromatic polynomials of graphs, called the recursive vertex-deleting formula, is presented. It will be shown that this new algorithm is more efficient than the fomulae (9), (10) and (11) in both theoretical analyses and prctical cornputaion of chromatic polynomials.

No.4

2

Xu: RECURSIVE FORMULA FOR CALCULATING CHROMATIC POLYNOMIAL

579

Recursive Formula by Deleting a Vertex

Let G be a graph and H ~ F(G). Let GH denote the graph obtained from G by deleting H together with all edges incident to it. For convenience, we replace G{u} by G u; G{u,v} by

GUt'; G{u,v,w} by G uvw, etc. for vertices u, v, wE F(G). Lemma 1 Let G be a simple graph with p vertices. Suppose Then P(G, A) = A' P(G u , A-I).

U

E F(G) and d(u)

= p-1. (12)

Lemma 2 Let G be a simple graph with p vertices. Suppose u, v E V(G) uv (j. E(G), and d(u) = p - 2. Then P(G,'\)

= ,\. {P(G u,'\ -

1)

+ P(G uv,'\ -

I)}.

(13)

The proof of Lemma 1 is omitted here. A proof of Lemma 2 can be obtained from (9) and (12). Now, we state the main result of this paper. Theorem 3 Let G be a simple graph with p vertices. Let u E F(G) be such that d(u) = p - k (1 ~ k ~ P -1). Let F: = {VI,V2,"',Vk-d c F(G) be the set of all the vertices in F(G) such that UVI,UV2,"',UVk_1 ¢ E(G). Then we have the following recursive vertex-deleting formula for the computation of the chromatic polynomial of the graph G: P(G,'\)

=x

L

P(G u,'\ - 1) +,\.

P(G{u}UH,'\ -1),

(14)

Hr;V,:

s

where the summation is extended over all independent sets H ~ F: with 1 IHI ~ k - 1. Here GJ denotes the graph obtained from G by deleting all the vertices in J c G. Proof We prove the formula by mathematical induction on k. The cases k = 1,2 are true by Lemmas 1 and 2. Suppose the result is true for all k ~ n (~ p - 1), where k 2: 2. Now, we consider the case k = n + 1. Suppose d(u) = p - n - 1 and V: = {VI, V2,"', vn} C F(G). It follows easily from the edge addition formula (9) that P(G,'\) = P(G

For the graph G P(G

+ uv n +! , '\ ) + P(G· UV n +! , '\).

+ UV n +! , by- the induction hypothesis,

+ uv n +! , '\ ) = A'

{P(G u, A-I)

+

L

(15)

we have P(G{u}UHp'\ - I)},

(16)

H1r;V1

where the set FI is the independent set

and the summation is extended over all independent sets in F I , that is,

In the graph G . UVn+l, the vertices U and Vn+l are contracted to u. Let F2 denote the subset of vertices which are not adjacent to U in G· UV n +! . Clearly, Fz ~ {VI, V2,"', Vn} = FI , and we have P(G·1LV I l + I , ' \ ) = ' \ · { P ( G t t l ' n + l , ' \ - I ) +

L

H2r; V2

P(G{lL,v n+dUH 2 , ' \ - I ) } ,

(17)

580

ACTA MATHEMATICA SCIENTIA

Vol.24 Ser.B

where the summation is extended over all independent sets H 2 Substituting (16) and (17) in (15), we have

L

P(G,A)=A·P(G u,A-l)+A·

~

V2 with 1

< IH21

:::;

1V21.

P(G{u}uH,A-l),

HC;;Y'

where V· = {VI, V2, ... , Vn+l} and the summation is extended over all independent sets H with 1 :::; IHI k. Therefore, (14) is true for k = n + 1. By Theorem 3, we can easily obtain the following special cases.

s

~



Corollary 4 Let G be a simple graph with p vertices. Let u, VI, V2, "', Vk-I E V(G) be such that d(u) = p - k (1 :::; k :::; p - 1), UVI, UV2, "', UVk-~ f/. E(G) and G[VI, V2,"', vk-d is a complete graph. Then k-I

P(G, A) = A' {P(G u, A-I)

+L

P(GUVi> A -

In·

(18)

i=1

Corollary 5 Let G be a simple graph with p vertices. Let u, VI, V2,"', Vk-I E V(G) and G[VI, V2,"', vk-d is a null graph (that is, there are no edges in such graph). Then

P(G, A) = A' {P(G u, A-I) +

L

k-I

+L

P(GUVi> A -

i=1

no.;«. A-I) +

l:::;i:::;j9-I

+ ... + P(G{U,Vl,V2"",Vk_t}, A -

In L

I:::;i:::;j:::;t:::;k-I

P(GuviVjV/l A-I)

(19)

In·

By applying the above recursive formula, we can compute the chromatic polynomial a graph G in the following five steps. In the next section, we give an example to show the computing process. Step 1. Find a vertex U in G such that its degree d(u) = ~ (G). Step 2. Find the subset V,: = {Vj V E V(G), uv ~ E(Gn. Step 3. Calculate the subgraph G u and the subgraphs G{u}UH, where H is an independent of C V,:. Step 4. Calculate P(G u, A-I) and all P(G{u}UH, A-I). Step 5. Calculate P(G, A) using P(G u, A-I) and all P(G{u}UH, A-I) in (14).

3

Example

Example 1 We now use our formula to calculate the chromatic polynomial of the graph G shown in Figure 1 (a). The computation is completed in 5 steps. Step 1. Clearly, vertex U is the maximum degree vertex in the graph G. Step 2. It is easily to obtain that the subset V,: = {v, w, x}. Step 3. \Ve only need to calculate the subgraph G«, the subgraphs Gc«. G uw, G ux, G uvw and G uvx showing in the graphs (b), (c), (d), (e), (f) and (g) shown in Figure 1, respectively.

No.4

Xu: RECURSIVE FORMULA FOR CALCULATING CHROMATIC POLYNOMIAL

581


x

w

w

v

(b): G.

(a): G



;-1

w

1.

(c): G_

(c): G••

./! 1. •

w

(e): G••

(1): G'

d

x

(g): G...

Figure 1

The sub-graphs involved in the recursive formula in Example

Step 4. By the formulas (1.2), (1.3) and (1.6) in Section 1, we have directly

P(G t) u,

= t(t -

n(t - 2)[(t - 1)4 + (t - 1)][(t - 1)5 - (t - 1)] t2(t - 1)2 2 = t(t - l)(t - 2)2(t - 3t + 3)(t 2 - 2t + 2),

P (G. t) _ --,-t(t_-----:..l)..:.-(t_-_2..:.-)~.[(.:. . .t_--,--1):.-4_+-,--:(_t-----:..1)~]·_t(.:. . .t_-_1):.-2 uv, t.t(t-l) 2 = t(t - 1)3(t - 2)(t - 3t + 3), P(G

) - P(G t) _ t(t - 1)2 . [(t - 1)5 - (t - 1)] ux, t uw, t 2 = t(t - 1)3(t - 2)(t - 2t + 2),

(20)

(21)

(22)

P(Guvx,t) = P(Guvw,t) = t(t _1)5, where for simplicity the shorthand t =

oX -

1 is used.

Step 5. Finally, by substituting (20), (21), (22), and (23) in (14), we finally obtain the

582

ACTA MATHEMATICA SCIENTIA

Vol.24 Ser.B

chromatic polynomial P(G, .\):

P(G,.\)

= .\. P(G u,.\ -

1) +.\ . {P(G uv,.\ - 1) + P(G ux,.\ - 1)

+P(GuU',.\ - 1) + P(G uvx,.\ - 1) + P(GuvU',.\ - I)} = A· {t(t - l)(t - 2)2(t2 - 3t

+t(t - 1)3(t - 2)(t 2

= .\(.\ -

-

3t

+ 3)(t 2

-

2t

+ 2)

+ 3) + 2t(t - 1)3(t - 2)(t 2 -

1)(.\ - 2){(.\ - 3)2(.\2 - 5.\

+ 7)(.\2

- 4.\

2t

+ 2) + 2t(t -

1)5}

(24)

+ 6)

+(.\ - 2)2(.\ - 3)(.\2 - 5.\ + 7) + 2(.\ - 2)2(.\ - 3)(.\2 - 4A + 6) + 2(A - 2)4}

= .\(.\ -

l)(A - 2)(.\6 - 12A5

+ 64A4

-

122A3

+ 358A2 -

378A + 182).

References 1 Bondy J A, Murty U S R. Graph Theory with Applications. New York: American Elsevier, MacMillan, 1976 2 Biggs N L. Algebraic Graph Theory. London, New York: Cambridge University Press, U K, 1993 3 Whiteny H. A Logical Expansion in Mathematics. Bull Amer Math Soc, 1932, 38: 572-579 4 Xu Jin, Liu Z H. The chromatic polynomial between graph and its complement-about Akiyama and Harary's open problem. Graphs and Combinatorics, 1995, 11(4): 337-34.5 5 Xu Jin. The triangles in a self-complementary graph. Acta Mathematica Scientia, 1996, 16(supp): 38-41