Information Processing Letters 85 (2003) 333–337 www.elsevier.com/locate/ipl
Worst case analysis of a greedy algorithm for graph thickness Sinichiro Kawano, Koichi Yamazaki ∗,1 Department of Computer Science Gunma University, 1-5-1 Tenjin-cho, Kiryu 376-8515, Gunma, Japan Received 19 February 2002; received in revised form 11 September 2002 Communicated by M. Yamashita
Abstract In this paper, we consider a greedy algorithm for thickness of graphs. The greedy algorithm we consider here takes a maximum planar subgraph away from the current graph in each iteration and repeats this process until the current graph has no edge. The greedy algorithm outputs the number of iterations which is an upper bound of thickness for an input graph G = (V , E). We show that the performance ratio of the greedy algorithm is (log |V |). 2002 Elsevier Science B.V. All rights reserved. Keywords: Greedy algorithm; Graph thickness; Maximum planar subgraph; Graph algorithms
1. Introduction In this paper, we analyze worst case of a greedy algorithm for the optimization problem of thickness of graphs. The thickness of a graph G, denoted by θ (G), is defined by the minimum number of planar graphs into which G can be decomposed (see [3,5]). We will refer to the optimization problem for thickness as G RAPH T HICKNESS. In several heuristic methods for optimization problems, the greedy strategy is the most natural and simplest one. Let us consider the following greedy algorithm Am for G RAPH T HICKNESS: Am takes a maximal planar subgraph away from the current graph in each iteration and repeats this process until the current graph has no edge, and outputs the number of iterations. Clearly the output is an upper bound of thickness for an input graph. Empirical analyses of algorithms of such a maximal type were reported [1,5]. It seems a good approach at first sight that Am takes a planar subgraph as large as possible in each iteration. It is known that finding a maximum planar subgraph of a given graph G is NP-complete. However, let us consider the extreme case, i.e., consider the following greedy algorithm AM which is a version of Am : AM takes a maximum planar subgraph away from the current graph in each iteration. Then we are interested in the following question: For G RAPH T HICKNESS is there a great advantage of taking maximum (instead of maximal) in a theoretical point * Corresponding author.
E-mail addresses:
[email protected] (S. Kawano),
[email protected] (K. Yamazaki). 1 Supported by the Scientific Grant-in-Aid for Encouragement of Young Scientists from Ministry of Education, Science, Sports and Culture
of Japan. 0020-0190/02/$ – see front matter 2002 Elsevier Science B.V. All rights reserved. PII: S 0 0 2 0 - 0 1 9 0 ( 0 2 ) 0 0 4 3 2 - 5
334
S. Kawano, K. Yamazaki / Information Processing Letters 85 (2003) 333–337
of view? I.e., Does this modification improve the performance ratio of Am drastically? We would like to emphasize that there seems an advantage in a practical point of view. It is known that there is a graph with thickness 2 for which AM may output 3 [5]. However, as far as we know, there is no report which resolves the question completely. As we will discuss in Section 2, the performance ratio of Am is O(log |V |). As we will show in Section 4, the performance ratio of AM is (log |V |). Thus there is no significant improvement of the performance ratio for G RAPH T HICKNESS. We again emphasize that the approach mentioned above is one of good strategies for G RAPH T HICKNESS in practice.
2. Performance ratios of AM and Am It is well known that for set cover problem (E, S ⊂ 2E ) the greedy algorithm (which chooses a maximum set from the current S in each iteration) guarantees to output a solution within ln |E| + 1 times the optimal. Since G RAPH T HICKNESS can be simulated by set cover problem, AM guarantees to output a solution within O(log |V |) times the optimal. It is relatively easy to show that the performance ratio of Am is (log |V |). Also it is not difficult to prove that Am guarantees to output a solution within O(log |V |) times the optimal by using the simple fact that |E(Gm )| 13 |E(GM )| for any maximal and maximum planar graphs Gm and GM of G, where E(Gm ) and E(GM ) are the edge sets of Gm and GM , respectively. Thus the performance ratio of Am is O(log |V |).
3. Approximability of G RAPH T HICKNESS It is known that the problem of determining θ (G) 2 for a given graph G is NP-complete [4]. Hence for G RAPH T HICKNESS there is no polynomial time approximation algorithm with approximation ratio 32 − ε for any ε > 0 unless P = NP. It is also known that α(G) 3θ (G) where α(G) is the arboricity of G and that given a graph G, α(G) can be computed in polynomial time using matroid partitioning algorithm [2,6]. Hence G RAPH T HICKNESS can be approximated to within the ratio 3. But the cost of implementation and execution for this approach is relatively expensive.
4. Hard graph for the greedy algorithm In this section, we demonstrate that the performance ratio of AM is (log |V |). For the purpose, given a positive integer s, we construct a hard graph G = (V , E) such that |V | < 24s , AM may output s as an upper bound of θ (G), and θ (G) 3. In order to show the construction of the hard graphs, we need the following notations. 4.1. Notation Let us define i (0 i s) as follows (see Fig. 1): 2s−2 k = 0, 0 2 k = 1, 2k−1 = 2k = 22s−3 2s−2−2i 2s−3 k−1 2s−3−2i 22s−2 − k−1 i=1 2 2 + i=1 2 k 2,
k = 1, k 2.
Let us define B2h as follows: {i, j } ∈ B2h (0 i, j 2h ) iff there exists a non-negative integer p such that i and j are multiples of 2p and |j − i| = 2p .
S. Kawano, K. Yamazaki / Information Processing Letters 85 (2003) 333–337
335
Fig. 1. The coordinates for s = 4.
Fig. 2. Graphs from G1 to G4 .
4.2. Construction of the hard graph We are now ready to show the construction of the hard graphs. The hard graphs have a recursive structure of maximum planar subgraphs as shown in Fig. 2.
336
S. Kawano, K. Yamazaki / Information Processing Letters 85 (2003) 333–337
Fig. 3. Graphs G2 and G3 .
Let V be the set {(x, y, z) | x + y + z = 22s−1 , 0 x, y, z 22s−2 (i.e., 0 x, y, z 1 )}. First let us define s graphs Gi = (Vi , Ei ) (1 i s), before we define the hard graph G = (V , E) for AM . 4.2.1. Construction of G2k Let us define V2k by {(x, y, z) ∈ V | x, y, z 2k , x, y, z are multiples of 22k−1 }, and E2k by M2k ∪ X2k ∪ Y2k ∪ Z2k , where M2k , X2k , Y2k and Z2k are as follows (see Fig. 3): M2k = (a1 , a2 , a3 ), (b1 , b2 , b3 ) ⊆ V2k × V2k | ai − bi = 22k−1, aj = bj , 1 i, j 3 , X2k = (2k , 2k−1 − i, 2k + i), (2k , 2k−1 − j, 2k + j ) | {i, j } ∈ B2k−1 −2k , 2k + i, 2k + j ∈ V2k , Y2k = (2k + i, 2k , 2k−1 − i), (2k + j, 2k , 2k−1 − j ) | {i, j } ∈ B2k−1 −2k , 2k + i, 2k + j ∈ V2k , Z2k = (2k−1 − i, 2k + i, 2k ), (2k−1 − j, 2k + j, 2k ) | {i, j } ∈ B2k−1 −2k , 2k + i, 2k + j ∈ V2k . 4.2.2. Construction of G2k−1 Let us define V2k−1 by {(x, y, z) ∈ V | x, y, z 2k−1 , x, y, z are multiples of 22k−2 }, and E2k−1 by M2k−1 ∪ X2k−1 ∪ Y2k−1 ∪ Z2k−1 , where M2k−1 , X2k−1 , Y2k−1 and Z2k−1 are as follows (see Fig. 3): M2k−1 = (a1 , a2 , a3 ), (b1 , b2 , b3 ) ⊆ V2k−1 × V2k−1 | ai − bi = 22k−2 , aj = bj , 1 i, j 3 , X2k−1 = (2k−1 , 2k−2 + i, 2k−1 − i), (2k−1 , 2k−2 + j, 2k−1 − j ) | {i, j } ∈ B2k−1 −2k−2 , 2k−2 + i, 2k−2 + j ∈ V2k−1 , Y2k−1 = (2k−1 − i, 2k−1 , 2k−2 + i), (2k−1 − j, 2k−1 , 2k−2 + j ) | {i, j } ∈ B2k−1 −2k−2 , 2k−2 + i, 2k−2 + j ∈ V2k−1 , Z2k−1 = (2k−2 + i, 2k−1 − i, 2k−1 ), (2k−2 + j, 2k−1 − j, 2k−1) | {i, j } ∈ B2k−1 −2k−2 , 2k−2 + i, 2k−2 + j ∈ V2k−1 .
S. Kawano, K. Yamazaki / Information Processing Letters 85 (2003) 333–337
337
Fig. 4. Three planar subgraphs of a hard graph.
4.3. Construction of G
Let us consider the graph G = (V , E), where E = 1is Ei . Since Gi for any 1 i s is a maximum planar subgraph of the induced graph by Vi , AM may take the edge set of graph Gi away in ith iteration (see Fig. 2). On the other hand, it is easy to see that θ (G) 3 (see Fig. 4). Hence we have the following theorem. Theorem 4.1. For G RAPH T HICKNESS, the performance ratio of AM is (log |V |).
References [1] [2] [3] [4] [5] [6]
R. Cimikowski, On heuristics for determining the thickness of a graph, Inform. Sci. 80 (1995) 1–13. E.L. Lawler, Combinatorial Optimization: Networks and Matroids, Holt, Rinehart and Winston, New York, 1976. A. Liebers, Planarizing graphs—a survey and annotated bibliography, J. Graph Algorithms Appl. 5 (1) (2001) 1–74. A. Mansfield, Determining the thickness of graphs is NP-hard, Math. Proc. Cambridge Philos. Soc. 93 (1) (1983) 9–23. P. Mutzel, T. Odenthal, M. Scharbrodt, The thickness of graphs: a survey, Graphs Combin. 14 (1) (1998) 59–73. E.R. Scheinerman, D.H. Ullman, Fractional Graph Theory: A Rational Approach to the Theory of Graphs, John Wiley & Sons, New York, 1997.