Here, we present efficient algorithms vertex- and edge-coloring graphs of the

Similar documents
Every planar graph is 4-colourable and 5-choosable a joint proof

A note on Baker s algorithm

Applied Mathematical Sciences, Vol. 5, 2011, no. 49, Július Czap

WORM COLORINGS. Wayne Goddard. Dept of Mathematical Sciences, Clemson University Kirsti Wash

Star Forests, Dominating Sets and Ramsey-type Problems

Introduction to Graph Theory

COLORING EDGES AND VERTICES OF GRAPHS WITHOUT SHORT OR LONG CYCLES

Coloring edges and vertices of graphs without short or long cycles

8 Colouring Planar Graphs

GRAPHS WITH 1-FACTORS

A simple algorithm for 4-coloring 3-colorable planar graphs

Chromatic Transversal Domatic Number of Graphs

Connecting face hitting sets in planar graphs

Math 443/543 Graph Theory Notes 5: Planar graphs and coloring

A THREE AND FIVE COLOR THEOREM

Key words. graph algorithms, chromatic number, circular arc graphs, induced cycles

arxiv: v1 [math.co] 7 Dec 2018

The crossing number of K 1,4,n

Straight-Line Drawings of 2-Outerplanar Graphs on Two Curves

Characterizations of graph classes by forbidden configurations

Simultaneous Diagonal Flips in Plane Triangulations

Dominating Sets in Planar Graphs 1

A Note on Vertex Arboricity of Toroidal Graphs without 7-Cycles 1

FOUR EDGE-INDEPENDENT SPANNING TREES 1

THE THICKNESS OF THE COMPLETE MULTIPARTITE GRAPHS AND THE JOIN OF GRAPHS

Bipartite Roots of Graphs

Matching Algorithms. Proof. If a bipartite graph has a perfect matching, then it is easy to see that the right hand side is a necessary condition.

Orthogonal art galleries with holes: a coloring proof of Aggarwal s Theorem

List Coloring Graphs

Bar k-visibility Graphs

Algorithmic Aspects of Acyclic Edge Colorings

Discrete Mathematics

On the Page Number of Upward Planar Directed Acyclic Graphs

Planarity: dual graphs

Improved Bounds for the Crossing Number of the Mesh of Trees

Coloring Subgraphs with Restricted Amounts of Hues

How many colors are needed to color a map?

A Linear Time Algorithm for the Minimum Spanning Tree Problem. on a Planar Graph. Tomomi MATSUI. (January 1994 )

Graph Isomorphism Completeness for Chordal bipartite graphs and Strongly Chordal Graphs

Jordan Curves. A curve is a subset of IR 2 of the form

Edge-disjoint Spanning Trees in Triangulated Graphs on Surfaces and application to node labeling 1

Dominating Sets in Triangulations on Surfaces

Acyclic Edge Colorings of Graphs

Math 777 Graph Theory, Spring, 2006 Lecture Note 1 Planar graphs Week 1 Weak 2

An Algorithm for Enumerating All Spanning Trees of a Directed Graph 1. S. Kapoor 2 and H. Ramesh 3

Discrete Mathematics

and Heinz-Jürgen Voss

arxiv: v3 [cs.dm] 12 Jun 2014

Problem Set 3. MATH 776, Fall 2009, Mohr. November 30, 2009

Discrete Wiskunde II. Lecture 6: Planar Graphs

On the Relationships between Zero Forcing Numbers and Certain Graph Coverings

List edge-colorings of series-parallel graphs

Localization in Graphs. Richardson, TX Azriel Rosenfeld. Center for Automation Research. College Park, MD

MATH 350 GRAPH THEORY & COMBINATORICS. Contents

arxiv:cs/ v1 [cs.ds] 20 Feb 2003

ifn >-- 2 is even, ifn is odd, ifn =0,

Fixed-Parameter Algorithms, IA166

Face covers and the genus of apex graphs Bojan Mohar Department of Mathematics, University of Ljubljana, 1111 Ljubljana, Slovenia

An upper bound for the chromatic number of line graphs

3 and 4-Bandwidth Critical Graphs

PACKING DIGRAPHS WITH DIRECTED CLOSED TRAILS

4 Basics of Trees. Petr Hliněný, FI MU Brno 1 FI: MA010: Trees and Forests

The Complexity of Minimizing Certain Cost Metrics for k-source Spanning Trees

G G[S] G[D]

PLANAR GRAPH BIPARTIZATION IN LINEAR TIME

Treewidth and graph minors

The NP-Completeness of Some Edge-Partition Problems

Basics of Graph Theory

Graphs with Two Disjoint Total Dominating Sets

Discrete Mathematics. Elixir Dis. Math. 92 (2016)

keywords: L(h, 1)-labeling, radio networks, outerplanar graphs, regular tiling.

Maximum number of edges in claw-free graphs whose maximum degree and matching number are bounded

Decreasing the Diameter of Bounded Degree Graphs

9 About Intersection Graphs

Domination, Independence and Other Numbers Associated With the Intersection Graph of a Set of Half-planes

On Covering a Graph Optimally with Induced Subgraphs

Deciding k-colorability of P 5 -free graphs in polynomial time

Discrete Applied Mathematics. A revision and extension of results on 4-regular, 4-connected, claw-free graphs

PLANAR GRAPHS WITHOUT CYCLES OF LENGTH 4 OR 5 ARE (3, 0, 0)-COLORABLE

a Steiner tree for S if S V(T) holds. For convenience, although T is not a rooted tree, we call each degree-1 vertex of T a leaf of T. We say that a l

Exercise set 2 Solutions

L(h,1,1)-Labeling of Outerplanar Graphs

Discrete Mathematics I So Practice Sheet Solutions 1

DOMINATION PARAMETERS OF A GRAPH AND ITS COMPLEMENT

Definition For vertices u, v V (G), the distance from u to v, denoted d(u, v), in G is the length of a shortest u, v-path. 1

On Graphs Supported by Line Sets

Power domination in block graphs

Vertex 3-colorability of claw-free graphs

Jordan Curves. A curve is a subset of IR 2 of the form

Generalized Pebbling Number

Non-extendible finite polycycles

Università degli Studi di Roma Tre Dipartimento di Informatica e Automazione Via della Vasca Navale, Roma, Italy

Discrete mathematics II. - Graphs

Acyclic Edge Colouring of 2-degenerate Graphs

Assignments are handed in on Tuesdays in even weeks. Deadlines are:

Elements of Graph Theory

Complexity Results on Graphs with Few Cliques

AN ALGORITHM WHICH GENERATES THE HAMILTONIAN CIRCUITS OF A CUBIC PLANAR MAP

Non-Hamiltonian 3 Regular Graphs with Arbitrary Girth

DRAWING PLANAR GRAPHS WITH MANY COLLINEAR VERTICES

Transcription:

SIAM J. ALG. DISC. METH. Vol. 7, No. 1, January 1986 (C) 1986 Society for Industrial and Applied Mathematics 016 EFFICIENT VERTEX- AND EDGE-COLORING OF OUTERPLANAR GRAPHS* ANDRZEJ PROSKUROWSKIf AND MACIEJ M. SYSEO* Abstract. The problems of finding values of the chromatic number and the chromatic index of a graph are NP-hard even for some restricted classes of graphs. Every outerplanar graph has an associated tree structure which facilitates algorithmic treatment. Using that structure, we give an efficient algorithm to color the vertices of an outerplanar graph with the minimum number of colors. We also establish algorithmically the value of the chromatic index of an outerplanar graph. Our algorithms are based on systematic coloring of elements (vertices and edges, respectively) of adjacent faces. AMS(MOS) subject classifications. 05C15, 05C05, 68Q25 1. Introduction. The chromatic number, x(g), of a graph G is the minimum number of colors needed for the vertices of G so that no two adjacent vertices are assigned the same color. Correspondingly, the chromatic index, X (G), is defined as the minimum number of colors needed to color the edges of G so that no two adjacent edges are assigned the same color. An assignment of at most k colors to the vertices (edges) of a graph G is called a k-vertex- (k-edge-) coloring of G. The problem of determining the chromatic number (index) of a graph G is NP-complete, even when G is restricted to be planar (respectively 3-valent, see Garey and Johnson [6], Holyer [8]). However, Gabow and Kariv [5] have designed an efficient edge-coloring algorithm for bipartite graphs, Mitchell and Hedetniemi [9] have a linear algorithm for edge-coloring trees and unicyclic graphs, and recently, Widgerson 14] has presented an efficient approximation algorithm for vertex-coloring general graphs. Arjomandi [2] and Terada and Nishizeki 13] present approximate algorithms for edge-coloring general graphs. Applying a method that follows the recursive construction of series-parallel graphs, we can easily color vertices of a series-parallel graph using the minimum number of colors in time proportional to the size of the graph. (Compare with, for instance, Takamizawa et al. [12] who do not treat explicitly the problems of vertex- or edge-coloring of graphs, however.) Here, we present efficient algorithms vertex- and edge-coloring graphs of the subclass of series-parallel graphs, known as outerplanar graphs. A planar graph G is outerplanar if and only if there exists a plane embedding of G in which all vertices lie on the exterior (unbounded) face. Such an embedding is referred to as an outerplane graph. For every 2-connected outerplane graph G there is a unique associated tree T(G). This tree has internal nodes corresponding to the interior (bounded) faces of G, and external nodes (leaves) corresponding to the exterior face, one leaf for each edge of G on the exterior face. This associated tree corresponds to the--possibly cyclic--weak dual graph of a general plane graph. To avoid confusion, we will talk about nodes of T(G) and vertices of G. The edges of T(G) correspond uniquely to edges of G in such a way that there is an edge between nodes of T(G) if and only if the two corresponding faces of G share an edge. We consider T(G) to be a plane * Received by the editors July 11, 1983, and in revised form October 18, 1984. t College of Business Administration, Creighton University, Omaha, Nebraska 68178; on leave from Department of Computer and Information Science, University of Oregon, Eugene, Oregon 97403. The work of this author was partially supported by the National Science Foundation under grant NSF-INT-83 18441. Department of Computer Science, Washington State University, Pullman, Washington 991645; on leave from Institute of Computer Science, University of Wroclaw, Wroclaw, Poland. 131

132 ANDRZEJ PROSKUROWSKI AND MACIEJ M. SYSLO tree, in which the neighborhood of each node is ordered (see Proskurowski and Syslo [11]). A choice of a node of T(G) as its root induces a natural father-son relation between adjacent nodes, and also a left-to-right ordering of brother nodes (sons of a common father). A corresponding structure for a separable outerplane graph G is the associated forest F(G). In that case, the connected components of F(G) correspond to blocks (2-connected components) of G. The tree-like structure of these blocks allow an easy "color-exchange" algorithm transforming partial solutions for blocks of G into a global solution, an optimal vertex- or edge-coloring of G. Thus, without loss of generality, we restrict our discussion of coloring vertices and edges to 2-connected outerplane graphs. We may assume that a linear time algorithm has been used to extract 2-connected components from a general outerplane graph. See Fig. 1 for an example of an outerplane graph, its associated tree and a rooting. FIG. 1. An outerplane graph, its associated tree (rooted at node 1) with a depth-first traversal order, and a partial edge-coloring following that order. In the remainder of this paper we follow the standard texts of Fiorini and Wilson [4], Garey and Johnson [6], and Harary [7] as references for edge-coloring, complexity analysis, and general graph theory, respectively. 2. Vertex-coloring. The Four Color Theorem (Appel and Haken 1]) ensures that the chromatic number of any outerplanar graph (as a planar graph) is at most 4. The fact that the chromatic number of an outerplanar graph is at most 3 is implied by the following observation. Every outerplanar graph has a vertex of degree 2. Every subgraph of an outerplanar graph is outerplanar. Hence, we can apply the Szekeres-Wilf bound on the chromatic number x(g) _-< 1+ max 8(G ), where maximum is over all subgraphs G of G, and 8(G ) is the minimum vertex degree of G. THEOREM 1. The chromatic number of an outerplanar graph is at most 3. Although the same result can be obtained using the techniques of Takamizawa et al. [12], we enclose our new algorithm for completeness of the presentation. Our method for producing an optimal vertex-coloring of a 2-connected, outerplane graph G makes use of a traversal of the associated tree T(G), rooted at an arbitrary node. We assume that the traversal is monotonic, that is, no node other than the root is visited before its father. Visiting a node C of T(G) we color the vertices of the corresponding face of G with two or three colors, depending on its length. If C is not the root, two of its adjacent vertices are already colored. These colors are subsequently used to color the cycle C. It is clear that an outerplanar graph containing an odd-length face is not bipartite. Our algorithm will produce a 3-coloring of such a graph. If all faces of G have an even length then a 2ocoloring is produced.

COLORING OUTERPLANAR GRAPHS 133 This algorithm for coloring the vertices of an outerplane graph G takes time linear in the total size of all faces of G, which, in turn, is proportional to the number of vertices in G. 3. Breadth-first edge-coloring algorithms. The chromatic index of a graph G is bounded by the maximum degree, A(G), of a vertex of G. Vizing s theorem (see, for instance, Fiorini and Wilson [4]) states that A(G) =< x (G) =< 1 + A(G). Fiorini [3] proves that for an outerplanar graph G, X (G)= A(G) unless G is an odd cycle. However, his proof is an existential one and does not provide a method for finding an optimal edge-coloring. Another proof of the above equality given in Fiorini and Wilson [4] contains a flaw. Even corrected, their proof yields an edge-coloring algorithm of higher-than-linear complexity. Terada and Nishizeki [13] also prove this result. We present an algorithm for optimally edge-coloring an outerplanar graph, which may be consided as yet another, constructive proof of the above equality. The algorithm takes explicit advantage of the structure of a 2-connected outerplane graph by assigning edge colors as it traverses the associated tree of the graph. Our algorithm has time complexity linear with the size of the input, while the exact algorithm of Nishizeki et al. [10] for edge-coloring series-parallel graphs is less efficient, as is the approximate method of Arjomandi [2]. (They have complexity of O(mn) and O(min (mn, ha+ m/n log n)), respectively, where m and n are orders of the graph s edge and vertex sets.) The arbitrary monotonic traversal of the arbitrarily rooted associated tree T(G), used above in an optimal vertex-coloring of an outerplanar graph G fails in an attempt to edge-color G. The free choice of coloring edges along a cycle, when restricted by an algorithmic method may lead to an eventual coloring conflict. See Fig. 1, where a monotonic traversal is used. The edges of the triangular face corresponding to node 8 cannot be colored without the use of a fifth color. We will give a traversal method of a carefully rooted associated tree T(G), and a judicial coloring of the corresponding cycles of G that produces an optimal edgecoloring. We define a breadth-first traversal of the internal nodes of a rooted plane tree T as the traversal of the nodes of T in left-to-right order in levels defined by the distance from the root. Figure 2 indicates the order of node visits in the breadth-first traversal of a rooted plane tree. The process of visiting a node E during the traversal of T(G) corresponds to edge-coloring the corresponding face E of G. Although at most one edge e of E has a color already assigned (during a visit of the node s father, C), the color assignment to the two edges of E adjacent to e is restricted by other colored edges adjacent to e. This restriction may prevent an optimal coloring if, in the A FIG. 2. A paradigm of edge-coloring.

134 ANDRZEJ PROSKUROWSKI AND MACIEJ M. SYSLO case of a triangular face E with end-vertices u and v of the base e, u and v are incident each with A(G)- 1 edges already assigned colors, the same for both u and v. Fortunately, this cannot happen in a breadth-first traversal of T(G) for an outerplane graph G with the maximum degree A(G)>= 5. LEMMA 1. Let a 2-connected, outerplane graph (3 with the maximum degree A(G) _-> 5 be partially edge-colored by a breadth-first coloring algorithm using A colors. This A-coloring can be extended to a face E of G corresponding to the next-to-be visited node of T( G), the associated tree of graph G. Proof. We proceed by induction on the number of visited nodes of T(G). If E is the first face to be colored, then at most 3 < A(G) colors are needed. Therefore, let us assume that C is the father node of E and the corresponding faces of G share an edge e with end vertices u and v (cf. Fig. 2). At most one of these two vertices may be incident with A(G)- 1 previously colored edges" if v is in the face corresponding to some ancestor of the node C, then u may be in at most one colored face other than C, namely, that corresponding to the left brother of node E. Thus, the number of previously colored edges incident with u is at most 3 < A(G)- 1 (edges a, b, and e in Fig. 2), and edges of E can be colored using only A(G) colors. The above lemma does not translate directly for the case A(G)=4, because of the distinct possibility that the base edge of a partially colored triangle face is adjacent to four colored edges forcing the same colors on both of the triangle s sides (cf. face 8 in Fig. 1). The edge-coloring during the visit of the corresponding node s father must prevent an occurrence of this situation. The coloring process will have to preserve the following property. Property P4. A partial 4-edge-coloring of a 2-connected outerplanar graph G with A(G) 4 has property P4 if and only if G does not have a colored edge (u, v) shared by a partially colored face E such that three colors are used to color all edges incident with vertices u and v. In the breadth-first edge-coloring algorithm, property P4 can be endangered only in two situations when coloring edges of the face corresponding to the father C of the node E. The first one, in which C s right brother would also be his leftmost brother (in the circular orientation of the root s children), is eliminated by rooting the associated tree in a leaf node. The second situation can be reached only through the sequence of face coloring (tree traversal) illustrated in Fig. 2. The node visiting order is A... BC... DE. Coloring edges of C we have to consider two cases of C s left brother B, which can be either external (corresponding to the outer face of the graph) or internal (see Fig. 2). In the former case, there is a choice of two colors for the first (leftmost) edge of C. This guarantees that the next to the last (rightmost) edge of C (edge a in Fig. 2) can be colored so as to preserve property P4 (with respect to face E), namely by assigning it a color different from those assigned to edges c and d of face A. In the latter case, when the color of the first edge of C is forced by the formerly colored edges of A and B, we have additionally to consider the length of C. If C is a triangle, then the property P4 might not be preserved. However, this property is not necessary for maintaining the property P4 for coloring of E since C s leftmost son node (D in Fig. 2) cannot be interior. If C has length greater than 3, then there is enough freedom in coloring its edges to preserve property P4. Thus, we have the following Lemma. LEMMA 2. Property P4 can be preserved in a partial coloring of an outerplane graph G with k A(G)=4 colors following the breadth-first order coloring algorithm. An immediate corollary gives the desired statement about edge-coloring such graphs.

COROLLARY 3. COLORING OUTERPLANAR GRAPHS 135 Let a 2-connected outerplanar graph G with the maximum degree A(G) 4 be partially A-edge-colored by a breadth-first coloring algorithm. The A-edgecoloring can be extended to a face C of G corresponding to the next-to-be-visited node of T(G). When A(G) 3, the property of a partial 3-edge coloring required to avoid forced situations can be obtained directly from P4. Property P3. A partial 3-edge-coloring of a 2-connected, outerplane graph O with A(G) 3 has property P3 if and only if O does not have a colored edge e shared by a not yet colored face such that the two colored edges adjacent to e have the same color. LEMMA 4. Let O be a partially 3-edge-colored subgraph ofa 2-connected, outerplane graph (3 with A( O) 3. Let this partial 3-edge-coloring have property P3 and be obtained through the breadth-first coloring algorithm. Let C be the next-to-be-visited node of T( G). The 3-edge-coloring of G can be extended to C preserving property P3. Proof. First, let us assume that C is the first face of G to be colored and that it has n edges. Let e be an edge shared by C and another face, C. Such an edge always exists since A(G) 3 > 2. We observe that the edges of C adjacent to e (or any other edge shared by another face) do not belong to any other face, because of the degree constraint. We assign color 2 to e and color other edges of C (say, clockwise) depending on the value of n. If n-= 0 mod 3, then coloring edges by 1-2-3 (with e appropriately included in the sequence) ensures property P3- If n 1 mod 3, then we color edges of C by 1-2-3 starting with an edge adjacent to the initially colored e, but excluding e. The only two edges that could violate property P3 are adjacent to e and thus belong only to C, since A(G)< 4. If n 2 mod 3, we again color edges along C by 1-2-3 starting with an edge adjacent to e. This time, however, the three last edges of C (i.e. f, g, h in Fig. 3) are colored differently, depending on adjacencies of f. If f is shared with another face, then it is colored 3, with colors 2 and 3 assigned to the remaining edges. Otherwise, the three edges are colored 2-1-3, respectively. Beside the edges adjacent to e, the only possibly offensive edges in the former case are adjacent to f and thus in no other face than C. In the latter case, only f and one edge adjacent to e have adjacent edges assigned the same color. By the remark above, they are in no other face and thus the property P3 holds. Next, consider a (3 with property P3 and a face C corresponding to the next-to-be-visited node of T((3). Our inductive assumption yields that the three colored edges of C are assigned colors 3-2-1. The same case analysis as the one above proves that C can be colored to ensure property P3. Thus (3 can be colored with three colors. D 2 2 2 2 0 2 mod 3 FIG. 3. Coloring the first face of G. The amount of work necessary to color the edges of each face is proportional to the length of that face. Therefore, the total time spent edge-coloring an outerplanar graph is bounded by a linear function of the graph s size. Preprocessing a given outerplanar graph to obtain its rooted associated tree can also be performed in linear

136 ANDRZEJ PROSKUROWSKI AND MACIEJ M. SYSLO time (see Proskurowski and Systo [ 11 ]). Collecting the results of this section, we finally have the following theorem. THEOREM 2. The breadth-first coloring algorithm produces an optimal edge-coloring of an outerplanar graph in time proportional to the size of the graph. REFERENCES K. APPEL AND W. HAKEN, Every planar map is 4-colorable, Illinois J. Math., 21 (1977), pp. 429-567. [2] E. ARJOMANDI, An efficient algorithm for colouring the edges of a graph with A + colour, INFOR, 20 (1982), pp. 82-101. [3] S. FIORINI, On the chromatic index ofouterplanar graphs, J. Combin. Theory B, 18 (1975), pp. 35-38. [4] S. FIORINI AND R. J. WILSON, Edge-Coloring of Graphs, Research Notes in Mathematics 16, Pitman, London, 1977. [5] H. N. GABOW AND O. KARIV, Algorithms for edge coloring bipartite graphs and multigraphs, SIAM J. Comput., 11 (1982), pp. 117-129. [6] M. R. GAREY AND D. S. JOHNSON, Computers and Intractability, Freeman, San Francisco, 1979. [7] F. HARARY, Graph Theory, Addison-Wesley, Reading, MA, 1969. [8] I. HOLYER, The NP-completeness of edge-coloring, SIAM J. Comput., 10 (1981), pp. 718-720. [9] S. L. MITCHELL AND S. T. HEDETNIEMI, Linear algorithms for edge-coloring trees and outerplanar graphs, Inform. Proc. Lett., 9 (1979), pp. 110-112. [10] Z. NISHIZEKI, O. TERADA AND O. LEVEN, Algorithm for edge-coloring graphs, TRECIS 83001, Dept. Electrical Comm., Tokyo Univ., Tokyo, 1983. 11] A. PROSKUROWSKI AND M. M. SYSLO, Minimum dominating cycles in outerplanar graphs, Internat. J. Comput. Inform. Sci., 10 (1981), pp. 127-139. 12] K. TAKAMIZAWA, T. NISHIZEKI, AND N. SAITO, Linear-time computability ofcombinatorial problems on series-parallel graphs, J. Assoc. Comput. Mach., 29 (1982), pp. 623-641. 13] O. TERADA AND T. NISHIZEKI, Approximate algorithms for the edge-coloring ofgraphs, Trans. IECE Japan, J65-D, 11 (1982), pp. 1382-1389. [14] A. WIDGERSON, Improving the performance guarantee for approximate coloring, J. Assoc. Comput. Mach., 30 (1983), pp. 729-735.