A network-flow-based lower bound for the minimum weighted integer coloring problem

A network-flow-based lower bound for the minimum weighted integer coloring problem

Information Processing Letters 76 (2000) 45–50 A network-flow-based lower bound for the minimum weighted integer coloring problem Jue Xue ∗ , Ju Liu ...

77KB Sizes 7 Downloads 136 Views

Information Processing Letters 76 (2000) 45–50

A network-flow-based lower bound for the minimum weighted integer coloring problem Jue Xue ∗ , Ju Liu Department of Management Sciences, City University of Hong Kong, Kowloon, Hong Kong Received 24 March 2000; received in revised form 19 June 2000 Communicated by L.A. Hemaspaandra

Keywords: Algorithms; Graphs; Lower bounds; Network flows; Weighted colorings

1. Introduction Let G = (V , E) be an arbitrary undirected, connected and loopless graph. V = {v1 , v2 , . . . , vn } is the vertex set of G and E ⊆ V × V is the edge set of G. Each vi ∈ V has a positive integer weight wi . G, together with its weights w = {w1 , w2 , . . . , wn }, is an integer weighted graph. / S ⊆ V is a stable set if ∀vi , vj ∈ S, (vi , vj ) ∈ E. C ⊆ V is a clique if ∀vi , vj ∈ C, (vi , vj ) ∈ E. A clique C is maximal if no clique strictly contains C. C is maximumP if it is of maximum cardinality. We define w(C) = vi ∈C wi to be the weight of clique C. Let S = {S1 , . . . , Sq } be a set of stable sets of G. For S i P∈ S, the weight of Si is an integer ySi > 0. If wj 6 vj ∈Si ySi for each vertex vj ∈ V , y = (yS1 , . . . , ySq ) is a weighted integer coloring (or simply a coloring) of G. A minimum weighted integer coloring (or simply aPminimum coloring) of G is a coloring with minimum q i=1 ySi . The minimum weighted integer coloring problem (MWIP) is to find a minimum weighted integer coloring of G. * Corresponding author.

E-mail addresses: [email protected], [email protected] (J. Xue), [email protected] (J. Liu).

Let y be a coloring of G. A color class S is active if yS > 0,Pinactive otherwise. Given a subset IS ⊆ S, let yIS = Si ∈IS ySi . If G0 is a subgraph of G induced by V 0 ⊆ V (denoted by G(V 0 )), we use y 0 = y|G0 to indicate the restriction of y to G0 , where for every stable set ∅ 6= S 0 ⊆ V 0 , X yS | S ∈ S, S ∩ V 0 = S 0 . yS0 0 = MWIP has been studied in literature. For example, MWIP is called the multicoloring problem under the frequency assignment problem and the VLSI system (parallel) computation problem. Under these names, MWIP is extensively studied on some restricted classes of graphs (e.g., on planar graphs and hexagon graphs [8,11]). In 1991, Babel [1] transformed several heuristics for the unweighted coloring problem (where wi = 1 for vi ∈ V ) to MWIP. Computational results of various heuristic algorithms can be found in [1,13]. In 1997, Xue [14] presented the first branch and bound algorithm for MWIP and tested it on random graphs with integer weights from intervals [1, 1] to [1, 20]. In [14], its lower bound for MWIP is found through an edge-maximal triangulated subgraph [2], while its ordering of vertices to be colored is arbitrary.

0020-0190/00/$ – see front matter  2000 Elsevier Science B.V. All rights reserved. PII: S 0 0 2 0 - 0 1 9 0 ( 0 0 ) 0 0 1 2 1 - 6

46

J. Xue, J. Liu / Information Processing Letters 76 (2000) 45–50

The tightness of a lower bound plays an essential role in the computational efficiency of a branch and bound algorithm for graph coloring problems. An improvement on this lower bound may result in substantial savings in solving MWIP. In literature, most lower bounds for the unweighted graph coloring problem come from the size of a maximal clique [4, 6]. Using the size of a maximum clique may tighten this lower bound. In fact, this approach has been used in [10]. The drawbacks of this latter approach are that to find the size of a maximum clique is not easy and its lower bound might still be quite weak, even for unweighted case. It has been proved on unweighted random graphs that the ratio between the values of a minimum coloring and a maximum clique is θ (n/ log2 n) [5]. In this paper, we use a network flow technique to find a lower bound for MWIP. We will embed this lower bound in a branch and bound algorithm. In Section 2, we discuss our new lower and upper bounds. In Section 3, we present an ordering of vertices to be colored and a branch and bound algorithm. Our computational test results are given in Section 4.

2. Bounds for MWIP F is a triangulated graph if all its cycles of length larger than 3 contain at least one chord. An ordering PES = (v1 , . . . , vn ) of the vertices of graph G = (V , E) is a perfect elimination scheme if the neighbors of vi in subgraph G(vi+1 , . . . , vn ) form a clique, i = 1, . . . , n − 1. It is well known that a graph is triangulated if and only if it has a perfect elimination scheme. In Xue’s algorithm [14], its global lower bound for MWIP comes from a maximum weight clique of an edge-maximal triangulated subgraph F of G [13]. That is, let: • PES = (v1 , . . . , vn ) be a perfect elimination scheme of F . • NF (vi ) = {vj | vj is adjacent to vi in F } be the neighbor set of vi in F . • SucF (vk ) = {vl | l > k and vl ∈ NF (vk )} be the set of all successors of vk (in F , according to PES). From the definition of PES,  C = {vj } ∪ SucF (vj ) | 1 6 j 6 n

is a clique set of G. The weight of a maximum weight clique of C is used as a global lower bound in [14]. In the following, we assume that we have removed all non-maximal (under set inclusion) members from C. Let y be a partial coloring of G where v1 , . . . , vi−1 are colored, i.e., X yS > wj , j = 1, . . . , i − 1, vj ∈S∈S

and vi , vi+1 , . . . , vn are to be colored. Let IS = {Sj | ySj > 0 } ⊆ S be the set of active color classes of y, and let C = {u1 , . . . , uk } be a clique of an edgemaximal triangulated subgraph of G(vi , . . . , vn ). We construct a network N(C, IS) as follows: (1) There is a source s and a sink t. (2) There is an arc of capacity wui from source s to each ui ∈ C. (3) There is an arc of capacity ySj from each Sj ∈ IS to sink t. (4) ∀ui ∈ C and Sj ∈ IS, if Sj ∪ {ui } is stable, add an arc from ui to Sj with capacity +∞. Theorem 1. Given a graph G, let y, C, IS, and N(C, IS) be defined above. Let f ∗ be the value of a maximum s − t flow in N(C, IS). If y˜ is a coloring of G satisfying y| ˜ G(v1 ,...,vi−1 ) = y|G(v1,...,vi−1 ) , then the value of y˜ is at least yIS + w(C) − f ∗ . Proof. Let y 0 be a minimum coloring of G({v1 , . . . , vi−1 } ∪ C) satisfying ˜ G(v1 ,...,vi−1 ) . y 0 |G({v1 ,...,vi−1 }) = y| Then ˜ TG({v1 ,...,vi−1 }∪C) 1 > y 0 1. y˜ T 1 > y| T

Partition the active color classes of y 0 into FS1 , FS2 and FC. FS1 contains color classes from IS. FS2 contains color classes generated by an Si ∈ IS and a vertex of C. FC contains color classes of a single vertex of C. From y 0 being a minimum coloring of G({v1 , . . . , vi−1 ∪ C), we can assume that w(C) = 0 + y0 0 0 yFC FS2 and yFS1 + yFS2 = yIS . Based on the construction of N(C, IS), one can 0 . Hence, easily construct a feasible flow of value yFS 2 the following inequality is valid: 0 0 0 + yFS 6 yFC + f ∗. w(C) = yFC 2 0 0 0 >y + + yFS + yFC Therefore y˜ T 1 > y 0 T 1 = yFS IS 1 2 w(C) − f ∗ . 2

J. Xue, J. Liu / Information Processing Letters 76 (2000) 45–50

Algorithm 1. WCOL 1: Let X = V , UB = 0. 2: while X 6= ∅ do 3: Arrange X in descending order of their weights. Let S be a greedy maximal stable set and α = min{wu , | u ∈ S}. 4: Set wu = wu − α, ∀u ∈ S. 5: Set X = X \ {u ∈ S | wu = 0}, UB = UB + α, and yS = α. 6: end while 7: Output UB (the weight of a feasible coloring) as our initial upper bound.

Theorem 1 provides a dynamic lower bound LB = yIS + w(C) − f ∗ that depends on a (partial) coloring y and the weight of a clique C of uncolored vertices. Furthermore, since w(C) > f ∗ (C is a cut set of N(C, IS)) and yIS is non-decreasing when more vertices are colored, LB tends to increase. Unlike what is in Xue [14], our initial lower bound comes from an enhanced dynamic lower bound (see Algorithm 2) derived from Theorem 1. On the other hand, we use Algorithm 1, WCOL [1,13], to find an initial upper bound UB.

3. A branch and bound algorithm for MWIP A branch and bound method is an implicit enumeration search method that can be used to solve many combinatorial optimization problems. Because its searching mechanism can be graphically represented by a tree structure, it is also called a branch and bound search tree (or simply a search tree). The size of a search tree depends on its depth and the average number of subproblems originating from each of its nodes. Interested readers can find excellent explanations of branch and bound method in [9]. In this paper, aside from using a new lower bound to reduce the size of our search tree, we also try to decrease the average number of subproblems at each search tree node by coloring the vertices of G in a special order: from our experiments it seems more efficient to color the vertices of G in the reverse order of a perfect elimination scheme (PES) of an edgemaximal triangulated subgraph of G.

47

Algorithm 2. A branch and bound algorithm 1: Find a maximal weight clique MC in C (defined earlier) and a minimum weighted coloring of MC. Use WCOL to find a coloring y 0 of G and set UB to be the weight of y 0 . If UB = w(MC), stop. 2: Let Q = (MC, u|MC|+1 , . . . , un ) be an ordering of vertices as explained in the last section. Set k = |MC| + 1. 3: If k 6 |MC|, stop. y 0 is a minimum weighted coloring of G. 4: If k = n, update current best coloring y 0 and UB. Set k = k − 1 and go to Step 3. 5: Else, let IS be the set of active color classes of the current (partial) coloring. Let Ci be the cliques of an edge-maximal triangulated subgraph of G(uk , . . . , un ), and let fi∗ be a maximum flow of N(Ci , IS). Set LB = yIS + maxi {w(Ci ) − fi∗ }. 6: If LB > UB, set k = k − 1 and go to Step 3. 7: Else, color vertex uk : use the same branching rule as in [14]. Set k = k + 1 and go to Step 3.

We start our coloring procedure by coloring a maximal weight clique MC = {v1 , . . . , vp } of an edgemaximal triangulated subgraph F of G. Let R = V \ MC. Arrange the vertices of R in the reverse order of a PES of F . We will color the vertices of G in the order of Q = (MC, R). The coloring and branching rule we have used (at each search tree node) are the same as those used in [14]. For the sake of completeness, we have presented our coloring and branching rules in the appendix at the end of this paper. Our branch and bound algorithm for MWIP is presented in Algorithm 2.

4. Computational experiment We coded our algorithms in C language and tested on a Sun UltraSparc ET 10000 workstation. Our test problems come from a class of random graphs Gn,p , where n is the number of vertices of Gn,p and p is an independent probability for the presence of an edge between any pair of vertices. Vertex weights are integers uniformly drawn from intervals [1, K], where K equals 1, 2, 5, 10, 15, 20. In our test, n varies from 15 to 80 and p is chosen from 0.2 to 0.8, at steps of 0.2. For each triplet (n, p, K), we generated 5 instances and tried to find their minimum weighted colorings.

48

J. Xue, J. Liu / Information Processing Letters 76 (2000) 45–50

Table 1 Unsolved instances of XL & (XL–JX) K =1

p n = 50

n = 60

n = 70

n = 80

20

0(0)

0(0)

0(0)

4(2)

40

0(0)

1(1)

5(0)

5(0)

60

0(0)

5(1)

5(0)

5(0)

80

0(0)

2(1)

5(2)

5(0)

K =2 n = 35

n = 40

n = 45

n = 50

20

0(0)

0(0)

0(−2)

0(−1)

40

0(0)

0(0)

0(0)

0(0)

60

0(0)

1(0)

1(0)

4(0)

80

0(0)

0(0)

0(0)

1(−1)

K = 10 n = 20

n = 25

n = 30

20

n = 15 0(0)

0(0)

0(0)

0(−1)

40

0(0)

0(0)

0(−3)

1(1)

60

0(0)

0(−1)

0(−1)

3(−1)

80

0(0)

0(0)

0(−1)

0(−1)

K = 20 n = 15

n = 20

n = 25

n = 30

20

0(0)

0(−1)

1(−1)

2(0)

40

0(−1)

2(0)

0(−1)

2(−3)

60

0(0)

0(−1)

1(−1)

3(−2)

80

0(0)

0(0)

0(0)

3(0)

A CPU time limit of 1800 seconds was set for every instance. We have reported the numbers of unsolved instances (within 1800 seconds) in Table 1. The differences between the number of unsolved instances of our algorithm (XL) and that of Xue’s algorithm (JX, [14]) are listed in parentheses. In the five middle columns of Table 2, we have presented our computational results on the values of LB , UB, Best, Bnodes, and CPU. LB and UB stand for our initial lower bound and upper bound respectively. Best refers to the best coloring value from our branch

and bound algorithm within the CPU limit. Bnodes and CPU are the number of search tree nodes and actual solution time respectively. The values of UB and LB are the average values over 5 instances (solved and unsolved), while the other values are the averages from solved instances. As a benchmark, we have tested Xue’s algorithm [14] on the same problem instances. The differences in the above quantities (except UB) between XL and JX are presented in the four right columns of Table 2. Since not all 5 instances are solved by XL and JX within the time limit, the performance of the algorithms is only compared on instances solved by both algorithms. For example, in the case of G30,0.2 with K = 5, all 5 instances are solved by XL, while three instances are solved by JX. Value 41.09 is the average CPU time over 5 instances, while 52.96 is the difference between the average CPU time over the three instances solved by both methods. In computational tests on randomly generated graphs for the unweighted minimum coloring problem and MWIP, a common phenomenon that has been observed is that most solved instances can be solved quickly while just a few instances may take much longer time [7,14]. This phenomenon is not a surprise for unweighted case in light of theoretical results in [3, 12]. In solving MWIP we have observed the same phenomenon. For example, in the case of G30,0.2 and K = 5, the first and the fourth instances are solved by XL within 0.31 and 0.80 seconds, respectively (unsolved by JX). However, its third instance takes 204.02 and 45.42 seconds for XL and JX to solve, respectively. Above computational results suggest that our new branch and bound algorithm performs well on MWIP. From Table 1, we observe that our new algorithm has solved more problem instances except when K = 1. When K > 1, the advantage of our new algorithm is illustrated in Tables 1 and 2. In almost all cases, our algorithm has found the same or better lower bounds (LB) and colorings (Best). Our dynamic (and tighter) lower bound and the special ordering of vertices seem to contribute to the decrease in search tree size (Bnodes) and CPU time. While in the few cases our algorithm uses more CPU time, their differences are not substantial.

J. Xue, J. Liu / Information Processing Letters 76 (2000) 45–50

49

Table 2 Computational results of XL and its comparison with JX n

K

p

Performance of XL LB

20

5

10

15

20

30

5

10

15

20

Best

UB

Comparison: XL–JX Bnodes

CPU

LB

Best

Bnodes

CPU

20

12.00

12.00

12.60

11.40

0.04

0.00

0.00

0.00

0.04

40

17.20

17.40

18.20

20.00

0.05

0.00

0.00

−258980.20

−3.48

60

20.40

20.60

22.60

45.00

0.08

0.00

0.00

−55.20

0.07

80

30.60

30.60

33.00

16.00

0.03

0.00

0.00

−5.20

0.03

20

23.20

23.20

23.60

4.20

0.02

0.00

0.00

0.00

0.02

40

32.20

32.60

34.60

209.00

0.58

1.20

0.00

−30798.00

0.12

60

40.40

40.80

45.00

3441.20

3.65

0.00

−1.20

−51966.50

0.48

80

53.20

53.80

56.00

1720.80

2.64

0.00

0.00

−5839847.20

−75.89

20

32.60

32.60

34.00

11.20

0.04

0.00

0.00

0.00

0.04

40

44.60

44.60

47.60

24.40

0.05

0.00

0.00

−6086.20

−0.02

60

60.60

61.20

65.00

88981.00

175.47

1.40

−0.60

−0.33

0.11

80

78.60

79.20

84.40

467.40

0.49

1.60

−1.40

−118164.50

−1.26

20

43.20

43.20

46.00

16.60

0.06

0.00

−0.20

0.00

0.06

40

64.40

66.40

72.40

23.33

0.04

0.00

−1.40

0.00

0.04

60

68.80

70.20

74.40

488.40

1.01

0.20

0.00

−19973.25

0.05

80

123.00

123.00

126.00

7.80

0.02

0.00

0.00

−0.40

0.02

20

13.80

13.80

15.00

10928.20

41.09

0.00

−0.80

−950111.00

52.96

40

20.40

20.80

25.20

8252.00

19.80

0.20

0.00

−701729.50

10.74

60

28.80

29.40

34.20

887.40

2.17

0.40

0.00

−1624383.20

−26.80

80

38.40

39.00

43.60

562.20

1.52

0.40

0.00

−113076.80

−0.46

20

25.40

25.60

26.40

14869.00

37.63

0.00

−0.60

−102.75

0.05

40

37.20

38.00

40.20

78.25

0.32

0.00

0.20

−1793.50

0.29

60

52.60

54.20

59.00

303.00

0.90

2.60

−2.00

−8483.00

0.00

80

77.40

77.40

82.60

2962.60

3.75

0.80

−1.20

−2809439.50

−51.15

20

39.80

40.40

40.80

40093.75

203.32

0.80

−0.20

0.00

0.01

40

54.20

57.00

62.20

85110.00

200.30

0.00

−2.40

0.00

0.37

60

71.20

74.00

82.20

2098.50

6.59

1.20

−1.60

−21.00

1.85

80

103.40

107.20

120.60

37774.25

116.92

1.20

−5.00

−2505269.00

−46.44

20

49.80

50.60

51.80

183.67

0.48

0.20

−1.00

0.00

0.47

40

66.00

67.80

74.00

588794.67

328.24

1.40

−2.40

N/A

N/A

60

100.20

106.80

120.60

49825.50

55.87

3.20

−7.00

N/A

N/A

80

137.60

140.60

159.60

13313.00

7.87

1.40

−4.40

−28646000.50

−404.01

50

J. Xue, J. Liu / Information Processing Letters 76 (2000) 45–50

Appendix A Coloring and branching rule of [14]: • At a search tree node of depth i − 1 (about to color vertex vi ), let y i−1 be a coloring of Gi−1 = G(v1 , . . . , vi−1 ) with weight TW i−1 = (y i−1 )T 1. Let (S1 , . . . , St −1 ) be an ordering of active color classes of y i−1 such that Sj + vi are stable, 1 6 j 6 t − 1. • Let St = {vi }. Set yS = ySi−1 , ∀S ∈ S, and ySt = wi . • For every integer tuple (k1 , k2 , . . . , kt −1 , kt ) satisfying t X

kj = wi and kj 6 ySj ,

1 6 j 6 t,

j =1

create a coloring (a subproblem) y (k1 ,...,kt ) of Gi = G(v1 , . . . , vi ) as follows: (k ,...,kt ) = yS , ∀S ∈ S. (1) Set yS 1 (2) For j = 1, . . . , t − 1, set ,...,kt ) = kj , yS(kj 1+v i (k ,...,kt )

y Sj 1

= y Sj − k j .

(k ,...,k )

t = kt . (3) Set ySt 1 (4) Set TW i = TW i−1 + kt .

References [1] L. Babel, Heuristic coloring of weighted graphs and the maximum weight clique problem, Technical Report, TUMM9107, Technische Universität München, 1991.

[2] E. Balas, J. Xue, Minimum weighted coloring of triangulated graphs, with application to maximum weight vertex packing and clique finding in arbitrary graphs, SIAM J. Comput. 20 (2) (1991) 209–221. [3] E. Bender, H.S. Wilf, A theoretical analysis of backtracking in the graph coloring problem, J. Algorithms 6 (1985) 275–282. [4] A. Gamst, Some lower bounds for a class of frequency assignment problems, IEEE Trans. Vehicular Technol. 35 (1986) 8–14. [5] G.R. Grimmett, C.J.H. McDiarmid, On colouring random graphs, Math. Proc. Cambridge Philos. Soc. 77 (1975) 313– 324. [6] M. Kubale, B. Jackowski, A generalized implicit enumeration algorithm for graph coloring, Comm. ACM 28 (4) (1985) 412– 418. [7] A. Mehrotra, M.A. Trick, A column generation approach for graph coloring, INFORMS J. Comput. 8 (1996) 344–354. [8] L. Narayanan, S. Shende, Static frequency assignment in cellular networks, in: Proc. SIROCCO’97, Carleton Scientific Press, Ottawa, Ont., 1997, pp. 215–227. [9] G.L. Nemhauser, L.A. Wolsey, Integer and Combinatorial Optimization, Wiley, New York, 1988. [10] C. Sewell, An improved algorithm for exact coloring, in: D.S. Johnson, M.A. Trick (Eds.), Cliques, Coloring, and Satisfiability: Second DIMACS Implementation Challenge, DIMACS Series in Discrete Mathematic and Theoretical Computer Science, Vol. 26, 1993, pp. 359–373. [11] H.C. Wang, K. Hwang, Multicoloring of grid-structured PDE solvers on shared-memory multiprocessors, IEEE Trans. Parallel Distrib. System 6 (11) (1995) 1195–1205. [12] H.S. Wilf, Algorithms and Complexity, Prentice-Hall, Englewood Cliffs, NJ, 1986. [13] J. Xue, Edge-maximal triangulated subgraphs and heuristics for the maximum clique problem, Networks 24 (2) (1994) 109–120. [14] J. Xue, Solving the minimum weighted integer coloring problem, Comput. Optimization Appl. 11 (1) (1998) 53–64.