INFORMS Journal on Computing informs Vol. 17, No. 4, Fall 2005, pp. 402–412 ® issn 1091-9856 eissn 1526-5528 05 1704 0402 doi 10.1287/ijoc.1040.0075 © 2005 INFORMS
Planar Branch Decompositions I: The Ratcatcher
Illya V. Hicks Department of Industrial Engineering, Texas A&M University, College Station, Texas 77843-3131, USA, [email protected]
he notion of branch decompositions and its related connectivity invariant for graphs, branchwidth, were Tintroduced by Robertson and Seymour in their series of papers that proved Wagner’s conjecture. Branch decompositions can be used to solve NP-hard problems modeled on graphs, but finding optimal branch decom- positions of graphs is also NP-hard. This is the first of two papers dealing with the relationship of branchwidth and planar graphs. A practical implementation of an algorithm of Seymour and Thomas for only computing the branchwidth (not optimal branch decomposition) of any planar hypergraph is proposed. This implementation is used in a practical implementation of an algorithm of Seymour and Thomas for computing the optimal branch decompositions for planar hypergraphs that is presented in the second paper. Since memory requirements can become an issue with this algorithm, two other variations of the algorithm to handle larger hypergraphs are also presented. Key words: planar graph; branchwidth; branch decomposition; carvingwidth History: Accepted by Jan Karel Lenstra, former Area Editor for Design and Analysis of Algorithms; received December 2002; revised August 2003, January 2004; accepted February 2004.
1. Introduction Seymour conceived of two new ways to decompose a A planar graph is a graph that canbe drawnona graph that were beneficial toward the proof. Decom- sphere or plane without having edges that cross. posing a graph by a branch decomposition is one of A subdivisionof a graph G is a graph obtained from these ideas. G by replacing its edges by internally vertex disjoint Branch decompositions open algorithmic possibil- paths. Inthe 1930s, Kuratowski (1930) proved that a ities for intractable problems that can be modeled graph G is planar if and only if G does not contain a ongraphs. Arnborg et al. (1991) showed that sev- eral NP-complete problems canbe solved inpoly- subdivisionof K5 or K3 3. Wagner (1937) later proved that a graph G is planar if and only if G does not con- nomial time using dynamic-programming techniques on input graphs with bounded treewidth, another tain K5 or K3 3 as a minor of G. A graph H is a minor of a graph G if H canbe obtainedfrom a subgraph related connectivity invariant for graphs introduced by RobertsonandSeymour (1983). Actually, the work of G by contracting edges. Let be a class of graphs. of Arnborg et al. was spurred from the work of Cour- is minor closed when all the minors of any member celle (1990). Inaddition,similar results have been of also belong to . Givena minorclosed class of obtained by Borie et al. (1992). The Arnborg et al. graphs , the obstruction set of is the set of minor result is also equivalent to graphs with bounded minimal graphs that are not elements of . Clearly, branchwidth since the branchwidth and treewidth of a anyclass of graphs embeddable ona givensurface graph bound each other by constants (Robertson and is a minor closed class. The question of characteriz- Seymour 1991). Inaddition,there is a plethora of the- ing the obstruction set for other surfaces remained ory about branchwidth and branch decompositions. openuntil1979–1980 whenArchdeacon(1980) and For example, branchwidth and branch decomposi- Glover et al. (1979) solved the case for the projec- tionshave beenshownuseful inproducingmatroid tive plane where they proved that there are 35 minor analogs of the graph minors theorem and shorter minimal “nonprojective-planar” graphs. In the 1930s, proofs of the graph minors theorem related to graphs Erdös posed the questionof whether the obstruc- with bounded branchwidth/treewidth (Geelen et al. tionset for a givensurface is finite.Archdeaconand 2002). Also, Seymour and Thomas (1994) proposed Huneke (1989) proved that the obstruction set for a polynomial-time algorithm to compute the branch- any nonorientable surface is finite, and Robertson and width for planar graphs, which will be referred to as Seymour (1985) proved the case for any surface as a the ratcatcher method. corollary of the graph minors theorem, which proved Despite the number of theoretical results about Wagner’s conjecture, every minor closed class has branch decompositions and branch decomposition- a finiteobstructionset. Inaddition,Robertsonand based algorithms for solving NP-hard problems, there
402 Hicks: Planar Branch Decompositions I: The Ratcatcher INFORMS Journal on Computing 17(4), pp. 402–412, © 2005 INFORMS 403 has beenlittle effort to develop practical algorithms. for the details of the algorithms with a proof of cor- Examples of practical branch decomposition-based rectness for the additional algorithms. Finally, §§5 algorithms are the work of Cook and Seymour (2003) and 6 contain computational results and conclusions, onthe travelingsalesmanproblem (TSP) andthe work respectively. The reader is referred to West (2001) for of Hicks (2004a) on the minor containment problem. background material on graph theory. One is also referred to the work of Christian (2003) for other examples of branch decomposition-based algo- 2. Preliminaries rithms. Similar results for tree decomposition-based algorithms have beengivenby Koster et al. (2002) 2.1. Branch Decompositions for their work onpartial constrainsatisfactionprob- Throughout this paper, a graph is only considered to lems, and Alber and Neidermeier (2002) for their be undirected and may have loops and multiple edges work ondominationproblems. These examples exem- unless stated otherwise. Also, we may assume that all plify the possible usefulness of branch decomposition graphs are biconnected. For instance, for a graph G, and tree decomposition-based algorithms for other onecanderive anoptimal branchdecompositionfor NP-hard problems. G from the optimal branch decompositions of G’s Seymour and Thomas (1994) proved that testing connected components. In addition, for a connected graph G , onecanderive anoptimal branchdecompo- whether a general graph has branchwidth at most k, o sitionfor G from the optimal branch decompositions some input integer, is NP-complete. However, the o of the biconnected components of G . aforementioned ratcatcher method is a polynomial- o A hypergraph H consists of a finite set VH of time algorithm used to compute the branchwidth nodes, a finite set EH of edges, and an incidence of planargraphs. Givenaninteger k, the ratcatcher relationbetweenthem that is notrestricted to two method tests whether the branchwidth of the graph is ends for each edge. Thus, hypergraphs are general- at least k by finding a structure in the graph that pro- izations of graphs where edges can have any num- hibits finding a branch decomposition of the graph ber of ends. Since this paper is about planar graphs with width at most k−1. Seymour and Thomas (1994) and planar hypergraphs, let us define planarity for also proposed a polynomial-time algorithm using the hypergraphs. Let H be a hypergraph; then IH , the ratcatcher method to compute optimal branch decom- incidence graph of H, is the simple bipartite graph positions for planar graphs, which will be referred with vertex set VH ∪ EH such that v ∈ VH is to as the edge-contraction method. Thus, the current adjacent to e ∈ EH if and only if v is anendof e knowledge base to compute optimal branch decom- in H. Seymour and Thomas (1994) define a hyper- positions for planar graphs is a two-stage process. The graph H as being planar if and only if IH is planar. two-stage process involves first finding the branch- In addition, we will denote G∗ as a planar dual of an width of the input planar graph using the ratcatcher embedding of the graph G inthe sphere or plane.Fur- method, then using the edge-contraction method in thermore, for a planar graph G drawninthe sphere, conjunction with the ratcatcher method to examine RG will denote the set of regions of G. planar hypergraphs needed to construct the optimal Let us now define branch decompositions and branch decomposition for the input planar graph. branchwidth of a graph. Let G be a graph with node A more detailed discussionof the implementationof set VG and edge set EG . Let T be a tree having the edge-contractionmethodwith the additionof a EG leaves in which every nonleaf node has degree heuristic, the cycle method, for runtime speedup is three. Let be a bijectionbetweenthe edges of G presented in the related paper (Hicks 2005). and the leaves of T . The pair T is called a branch This paper is spurred from the Seymour and decomposition of G. Notice that removing an edge e Thomas (1994) paper; a practical implementation of of T partitions the edges of G into two subsets Ae the ratcatcher method is presented. Unfortunately, the and Be. The middle set of e, denoted by mide , is the set algorithm requires a significant amount of memory to VAe ∩ VBe . The width of a branch decomposition achieve the proposed complexity of Oe2 where e is T is the maximum cardinality of the middle sets the number of edges in the input graph. This mem- over all edges in T . The branchwidth of G, denoted by ory requirement limits the size of the input graphs for G , is the minimum width over all branch decom- this algorithm (up to 5,000 edges). Thus, two addi- positions of G. A branch decomposition of G is opti- tional methods, the comprat method and the memrat mal if its width is equal to the branchwidth of G.If method, with complexity Oe3 , are presented to han- there exists a nonleaf node in T with degree greater dle medium (up to 20,000 edges) and large (up to thanthree, thenthe pair T is called a partial branch 70,000 edges) graphs respectively. decomposition. Figure 1 offers anexample planargraph Foundational definitions are given in §§2.1, 2.2, with anoptimal branchdecompositionwhere some and 2.3. Section 2.4 describes the two-player game of the middle sets are given. Graphs of small branch- related to the algorithm. Sections 3 and 4 are reserved width are characterized by the following theorem. Hicks: Planar Branch Decompositions I: The Ratcatcher 404 INFORMS Journal on Computing 17(4), pp. 402–412, © 2005 INFORMS
Separation of order 0 2 3 7 8 0 a b G Separations of order 1 {a, e, f} {f, g, h} 2 3 4 e f Gv G ∀ v ∈ VG 6 10 Separations of order 2 Gv ∪ Gw G ∀ vw ∈ VG {a, d, f, g} 1 6 7 5 GeG\e ∀ e ∈ EG Separations of order 3 Gv ∪ Gw ∪ Gu G ∀ vwu ∈ VG 5 11 8 g h Gv ∪ Ge G\e ∀ e ∈ EG and v ∈ VG {a, b, f} {a, c, g} such that v is not incident to e 9 10 Gef G\e f ∀ pairs ef ∈ EG c d such that e and f share a node 0 4 1 9 11 G0 1 2 G\a G0 4 5 G\b Figure 1 Example Planar Graph and Optimal Branch Decomposition G1 9 11 G\c G2 3 6 G\e Theorem 1 (Robertson and Seymour 1991). Let G G3 4 7 G\f be a graph. G5 10 11 G\d • G = 0 if and only if every component of G has G6 8 9 G\g ≤1 edge. G7 8 10 G\h • G ≤ 1 if and only if every component of G has ≤1 node of degree ≥2. Figure 2 Tangle of Order Four for the Graph of Figure 1 • G ≤ 2 if and only if G has no K minor. 4 “k-connected” component of G will either be onone Therefore, 1-factors (perfect matchings) have side or the other for any separation of . Robertson branchwidth equal to zero; stars (trees with only one and Seymour (1991) proved a strong min-max relation nonleaf node) are the only connected graphs with between tangles and branchwidth: branchwidth equal to one; all forests that are not in Theorem 2 (Robertson and Seymour 1991). For the union of one factors and stars have branchwidth any simple graph G such that EG = , maxG 2 = equal to two. Also, series-parallel and outerplanar G . graphs have branchwidth at most two because these In terms of finding branch decompositions for gen- graphs do not have K4 as a minor. The branchwidth of other familiar graphs canbe foundinHicks (2000). eral graphs, there is analgorithm inRobertsonand To achieve a better understanding of the ratcatcher Seymour (1995) to approximate the branchwidth of method, it would behoove us to discuss the min-max a graph withina factor of three. For example, the relationship associated with branchwidth. Let G be a algorithm decides whether a graph has branchwidth graph and let k ≥ 1 be aninteger. A separation of a of at least five or finds a branch decomposition with graph G is a pair G1G2 of subgraphs of G with a width at most fifteen. This algorithm has not been G1 ∪ G2 = V G1 ∪ VG2 EG1 ∪ EG2 = G and used ina practical implementationandits improve- EG1 ∩ EG2 = and the order of this separationis ments by Bodlaender (1996), Bodlaender and Kloks defined as VG1 ∩ VG2 .Atangle in G of order k (1996), and Reed (1997) have not been shown to be is a set of separations of G, each of order
(T2) if A1B1 , A2B2 , A3B3 ∈ , then A1 ∪A2 ∪ shownto be practical onlyfor a particular type of A3 = G;and 3-tree. Bodlaender and Thilikos (1997) also devel- (T3) if AB ∈ then VA = VG . oped a tree decomposition-based linear-time algo- These are called the first, second,andthird tangle rithm for finding an optimal branch decomposition, axioms. The tangle number of G, denoted by G ,is but it appears to be impractical. the maximum order of any tangle in G. Figure 2 gives Under practical algorithms, Kloks et al. (1999) gave anexample of a tangleof order 4 for the graph of a polynomial-time algorithm to compute the branch- Figure 1 where GS denotes the induced subgraph width of interval graphs, but for general graphs, one of G by the set S, which could be a node set or has to rely onheuristics. Cook andSeymour (2003) anedge set. Notice inFigure 2 that the inclusionof gave a heuristic algorithm to produce branch decom- separations of the graph of order four to the tan- positions that shows promise. In addition, Hicks gle would result ina violationof oneof the tangle (2000, 2002) also found another branchwidth heuris- axioms. A tangle of G with order k canbe thought tic that was comparable to the algorithm of Cook of as a “k-connected” component of G because some and Seymour. Recently, Tamaki (2003) has presented a Hicks: Planar Branch Decompositions I: The Ratcatcher INFORMS Journal on Computing 17(4), pp. 402–412, © 2005 INFORMS 405 linear-time heuristic for near-optimal branch decom- carving decomposition of G. Notice that removing an positions of planar graphs. This algorithm performs edge e of T partitions the nodes of G into two sub- well whencompared to the heuristics of Cook and sets Ae and Be. The cut set of e is the set of edges that Seymour (2003) and Hicks (2002) and may give some are incident to nodes in Ae and to nodes in Be (also insight to finding an algorithm for optimal branch denoted &Ae or &Be ). The width of a carving decom- decompositions of planar graphs with lower complex- position T % is the maximum cardinality of the cut ity than the currently known methods. sets for all edges in T . The carvingwidth for G, 'G ,is Robertson and Seymour (1983) conceived a new the minimum width over all carving decompositions way to decompose a graph to display the simi- of G. A carving decomposition is also known as a larities between the graph and trees. This concept, minimum-congestion routing tree and one is referred to tree decompositions, and the associated connectivity Alvarez et al. (2000) for a link between carvingwidth invariant, treewidth, have beenextensivelyresearched and network design. The ratcatcher method is really by Thomas (1990), Seymour and Thomas (1993), an algorithm to compute the carvingwidth for planar Bodlaender and Kloks (1996), Bodlaender (1996, 1998), graphs. To show the relationbetweencarvingwidth Ramachandramurthi (1997), Reed (1992, 1997) and and branchwidth we need another definition. many others (see the survey papers by Bodlaender Let G be a planar graph and denote the planar 1993, 1997). The reader is also referred to the work embedding of the graph on the sphere. For every of Koster et al. (2001, 2002), Telle and Proskurowski node v of G, the edges incident to v canbe ordered (1997), and Alber and Neidermeier (2002) for some ina clockwise or counter-clockwise order. This order- computational results related to tree decompositions ing of edges incident to v is the cyclic order of v. Let and tree decomposition-based algorithms. The dif- MG be a graph with the vertex set EG and let ference between branchwidth and treewidth is that the edges of MG be the union of cycles Cv for all v ∈ VG where C is the cycle through the nodes of branchwidth deals with edges and treewidth deals v with nodes. MG that correspond to the edges incident with v Since the ratcatcher method is related to a game, it according to v’s cyclic order. MG is called a medial was only right to discuss a game related to treewidth. graph of G. The medial graph of Figure 1 is givenin Figure 3. One can notice that every connected pla- Seymour and Thomas (1993) presented a characteriza- nar hypergraph G with EG = has a medial graph tion of treewidth of any connected graph by a search and every medial graph is planar. In addition, notice game conducted on that graph. The game consists of that their is a bijectionbetweenthe regionsof MG a robber and k cops where k is some positive inte- and the nodes and regions of G. Using this relation- ger. The robber, with immense speed, can travel from ship, Hicks (2000) proved that if a planar graph and node to node using paths of the graphs. The robber its dual are both loopless thenthey have the same cannot run through a node occupied by a cop. Each branchwidth. Figure 4 illustrates this result by pre- of the cops is either ona nodeof the graph or ina senting one branch decomposition for both cube3 and helicopter enroute to a node.Clearly, the objective the octahedron. For the relationship between branch- of the cops is for at least one cop to land on a node width and carvingwidth, Seymour and Thomas (1994) occupied by the robber; the robber’s objective is to proved: avoid capture. Inaddition,the robber canobserve a helicopter approaching a node and may run to a new Theorem 3 (Seymour and Thomas 1994). Let G be node before the helicopter lands. The game stops once a connected planar graph with EG ≥2, and let MG the robber has beencaptured. Seymour andThomas be the medial graph of G. Then the branchwidth of G is (1993) showed that the graph has treewidth of at most half the carvingwidth of MG . k if and only if k + 1 cops cancapture the robber onthe graph. For other games related to treewidth, 0 the reader is referred to anexcellentsurvey paper by Bienstock (1991). ca cb 2 3 4 2.2. CarvingDecompositions cce f Now that we have a attained a good grasp of the 1 6 7 5 definitions associated with branchwidth and branch cg ch decompositions, we can concentrate on definitions rel- 9 8 10 evant to the ratcatcher method. Let G be a graph with cc cd node set VG and edge set EG . Let T be a tree hav- ing VG leaves in which every nonleaf node has 11 degree three. Let % be a bijectionbetweenthe nodes of G and the leaves of T . The pair T % is called a Figure 3 Medial Graph of the Graph in Figure 1 Hicks: Planar Branch Decompositions I: The Ratcatcher 406 INFORMS Journal on Computing 17(4), pp. 402–412, © 2005 INFORMS
2 3 7 8 Inaddition,part of the proof of Theorem 3 is a the- orem by Robertson and Seymour (1994) that for any a b a 0 graph G that is embeddable ona surface +, a relation- 2 e f 4 6 10 3 * * 0 5* * ship is developed betweenuniform slopes of the dual 1 1 11 6 7 5 b c of the medial graph of G embedded in + and tangles 4* 8 7* g h * 3* of G restricted by the embedding. 5 11 2 d 10* 9 10 6* 8* Finally, we can define antipodalities and give the c d e f 11 9* relationship between carvingwidth, tilts, slopes, and 0 4 1 9 antipodalities. Given a planar graph G and its dual G∗, anedge e of G is incident with a region r ∈ RG Figure 4 Cube3 and the Octahedron Have Branchwidth Four if e∗ is incident to r ∈ VG∗ .Awalk in G is a sequence
v0e1v1e2///etvt, where v0v1///vt ∈ VG , Therefore, computing the carvingwidth of MG e1e2///et ∈ EG ,andvi−1vi is the set of ends of ei gives us the branchwidth of G. Also, having a carv- 1 ≤ i ≤ t . A walk is closed if v0 equals vt.Anantipo- ing decomposition of MG , T % , gives us a branch dality in G of range at least k is a function 2 with decompositionof G, T , such that the width of domain EG ∪ RG , such that for all e ∈ EG , 2e is T is exactly half the width of T % . The rat- a nonnull subgraph of G, and for all r ∈ RG , 2r is catcher method actually computes the carvingwidth a nonempty subset of VG , satisfying: of planar graphs. In addition, the ratcatcher method (A1) If e ∈ EG then no end of e belongs to V 2e . does not search for low cut sets in the medial graph (A2) If e ∈ EG , r ∈ RG ,ande is incident to r, but for objects that prohibit the existence of low cut then 2r ⊆ V 2e , and every component of 2e has sets. These objects are called antipodalities. a vertex in 2r . (A3) If e ∈ EG and f ∈ E2e thenevery closed 2.3. Tilts, Slopes, and Antipodalities walk of G∗ using e∗ and f ∗ has length ≥k. To discuss fully the relationship between carving- Inaddition,anantipodality 2 is called connected if width and antipodalities, more definitions are needed. 2e is connected for all edges e of G. The mainresult Let G be a graph. A tilt in G of order k is a collection in Seymour and Thomas (1994) is the following. of subsets of VG such that the following hold: (B1) for every X ⊆ VG such that &X