R-BBG 2 : Recursive Bipartition of Bi-connected Graphs
RR-BBG : Recursive Bipartition of Bi-connected Graphs Ngoc-Tu Nguyen and Zhi-Li Zhang Department of Computer Science & EngineeringUniversity of Minnesota, Twin CitiesMinneapolis MN 55455, USA. [email protected] and [email protected]
Abstract.
Given an undirected graph G ( V, E ) , it is well known that partitioning agraph G into q connected subgraphs of equal or specificed sizes is in general NP-hardproblem. On the other hand, it has been shown that the q-partition problem is solvablein polynomial time for q-connected graphs. For example, efficient polynomial timealgorithms for finding 2-partition (bipartition) or 3-partition of 2-connected or 3-connected have been developed in the literature. In this paper, we are interested inthe following problem: given a bi-connected graph G of size n , can we partition it intotwo (connected) sub-graphs, G [ V ] and G [ V ] of sizes n and n such as both G [ V ] and G [ V ] are also bi-connected (and n + n = n )? We refer to this problem as therecursive bipartition problem of bi-connected graphs, denoted by R-BBG . We showthat a ploynomial algorithm exists to both decide the recursive bipartion problemR-BBG and find the corresponding bi-connected subgraphs when such a recursivebipartition exists. Keywords:
Bipartition, bi-connected, recursive bipartition.
1. Introduction
Nowadays, graph partitioning has been widely studied and applied for image processing, databases, operating systems and cluster analysis applications [1, 2, 3, 4]. Graph partitioning is aclass of the optimization problem, where we expect to break a given graph into parts satisfyingcertain constraints. Given a graph G ( V, E ) with weights on the vertices, the concept of partition is formalized as follows: find a partition of the vertex set V into q parts V , V , . . . , V q such thatthe weight of every part is as equal as possible. The problem is called Max Balanced Connectedq-Partition Problem (
BCP q ) [5, 6, 7].The unweighted version of BCP q is a special case in which all vertices have weight and the graph is expected to be bipartitioned into two parts V and V in which each inducesa connected subgraph of G, namely 1-BCP . For simplicity, throughout this paper we usenotation BCP to refer to bipartition problem of unweighted version of BCP . The BCP isNP-hard in general [8] and will be defined formally in Section 2. However, BCP is solvable inpolynomial time for bi-connected graphs [9]. In [9], the authors introduced a linear algorithmfor bipartition of bi-connected graphs for BCP . Later, the polynomial algorithms for q ≥ were also obtained. In , the authors in [10] proposed an O ( n ) algorithm to find 3-partition for 3-connected graph. In [11], Nakano, Rahman and Nishizeki introduced a linear-time algorithm for four-partitioning four-connected planar graphs. The authors in [12] coveredthe problem in general. They presented an O ( q n ) algorithm to find q-partition of q-connectedgraph. Especially, many researchers pay a lot of attention to solve the bipartition problem.Most of them rely on geometrical properties of some specific graphs [13, 14, 15] such as mesh a r X i v : . [ c s . D S ] O c t nd are thus only applicable for some limited problems. Although there are polynomial al-gorithms of finding a 2-partition (bipartition), 3-partition, or q-partition for the undirected bi-connected, 3-connected, or q-connected graph, respectively, there is no general algorithm ofrecursive finding partition of graph. The requirement that makes the problem interesting, andalso difficult, is that each part has to induce a bi-connected subgraph of G . In this paper adecision algorithm of recursive finding bipartition of bi-connected graph is investigated.The remaining of this paper is organized as follows. In Section 2 we give some def-initions and establish the notation. In Section 3 we show some properties of bipartition withbi-connected graphs. We also present a decision algorithm to solve the recursive bipartitionproblem of bi-connected graphs, namely decision algorithm in Section 4. Section 5 concludesthe paper.
2. Definitions and Notation
Let G ( V, E ) be an undirected bi-connected graph in which for every vertex u ∈ V , G − { u } is connected. Let | V | = n ( n ≥ ) be the number of vertices/nodes. In this paper we shall useterminology vertex and node, bi-connected and 2-connected interchangeably. For any subset V (cid:48) ⊆ V , we denote by G [ V (cid:48) ] the subgraph of G induced by V (cid:48) ; and we denote by w ( V (cid:48) ) thenumber of vertices in V (cid:48) , that is, w ( V (cid:48) ) = | V (cid:48) | . For any v ∈ V , let N v be a set of v ’s neighborsin which any v (cid:48) ∈ N v is adjacent to v . We first show the decision version of bipartition problemas follows: INSTANCE: G ( V, E ) , s , s ∈ V , ( s , s ) ∈ E , n , n ≥ . QUESTION:
Does there exist a bipartition V , V of vertex set V such that s ∈ V , s ∈ V , w ( V ) = n and w ( V ) = n , and each of V and V induces a connected subgraph G [ V ] and G [ V ] of G ? ... C C C k s s Figure 1. An example of k components of G . In this research we expect that a bipartition of graph G is a division of its vertex setinto two subsets V and V of exactly equal sizes, so throughout this paper we assume that n = n = n (if graph has even number of vertices), or n = (cid:100) n (cid:101) and n = (cid:100) n (cid:101) − (if graphhas odd number of vertices). The bipartition problem is NP-hard in general [8]. Although it isNP-hard to tell whether there is a solution satisfying above conditions; however, in this case,s indicated by Theorem 1 if the graph G is bi-connected there is always such a solution and itcan be found easily in linear time using the st-numbering between two nodes. Theorem 1 (Lovasz [16])
Let G be a q-connected graph with n vertices, q ≥ , and let n , n , . . . , n q be positive natural numbers such that n + n + . . . + n q = n . Then G hasa connected q-partition ( V , V , . . . , V q ) such that | V i | = n i for i = 1 , , . . . , q . Even though there are polynomial algorithms of finding a 2-partition (bipartition) [9], 3-partition [10], or q-partition [12] for the undirected bi-connected, 3-connected, or q-connectedgraph, respectively, there is no general algorithm of recursive finding partition of graph. Therequirement that makes the problem interesting, and also difficult, is that each part has to inducea bi-connected subgraph of G . In this paper a decision algorithm of recursive finding bipartitionof bi-connected graph is investigated. RESEARCH PROBLEM:
In this paper we will concentrate on bi-connected graph andshow that we can recursively construct good bipartitions in which subgraphs are bi-connectedand most equal size to each other in every bipartition, namely
R-BBG problem (No relatedwork guarantees that each part of bipartition has to induce a bi-connected subgraph).We realize that the solution of R-BBG problem can be found by recursively applyingbipartition as Algorithm 1, the problem becomes how to optimally bipartition a bi-connectedgraph into two bi-connected and equal sized pieces in the first step. Algorithm 1
Recursive algorithm.(bi-connected graph G ( V, E ) , s , s ∈ V , s (cid:54) = s , n , n ) Find: an ”optimal” bipartition G [ V ] , G [ V ] of G if w ( V ) ≥ or w ( V ) ≥ then • Recursively bipartition G [ V ] • Recursively bipartition G [ V ] end if Return the subgraphs: G [ V ] , G [ V ] , . . . , G q [ V ] , G q [ V ] ;For simplicity of conveying the idea, note that the following notations and results areonly for bi-connected graph. Suppose C , . . . , C k are k components of G induced by removalsof s , s , and all relative links of s and s . Throughout this paper, whenever we mention theremovals of s and s , it means we refer to the removals of s , s and all relative links of s and s . Consider for example the graph G shown in Fig. 1. This example graph is divided into k components (each is shown in a circle) by the removals of s and s .
3. Bipartition and bi-connected graph
In general, a vertex u of G is an articulation point (or cut vertex) if u (cid:48) s removal disconnectsgraph. It is obvious that G is bi-connected if it is connected and has no articulation points. Bythe fact that G is bi-connected, we have following property: Property 1
G is a bi-connected graph if and only if for any two vertices u, v ∈ V , there are paths in G joining u and v without intersecting inner vertex. It also obvious that C i (cid:84) N s ≥ and C i (cid:83) N s ≥ for ≤ i ≤ k . Otherwise, either s or s is an articulation point of G . Lemma 1 If k > , then G cannot be partitioned into bi-connected subgraphs (each containsat least 3 nodes) such that s ∈ V and s ∈ V . ..C C k-1 C k s s G[V ] G[V ] (a) ...C C k-1 s s G[V ] G[V ] C k G k (1) G k (2) (b) Figure 2. An example to illustrate for Lemma 2.
Proof 1
Let G [ V ] and G [ V ] be any bipartition of G ( V, E ) , where s ∈ V , s ∈ V , and w ( V i ) ≥ for i = 1 , . Without loss of generality, suppose:For i (cid:54) = j C i (cid:83) C j (cid:83) { s } induces G [ V ] .It is easy to see s is an articulation point of G [ V ] and also an articulation point of G .This constitutes a contradiction because G ( V, E ) is bi-connected and there is no articulationpoint exists in G , and thus completes the proof. Lemma 2 If k > , suppose G can be partitioned into two bi-connected subgraphs G [ V ] and G [ V ] . Note that Lemma 1 indicates that either s , s ∈ V or s , s ∈ V . Withoutloss of generality, assume that s , s ∈ V . Then G [ V ] contains k − out of k components C , C , . . . , C k . We also assume that w ( C i ) ≤ n ∀ ≤ i ≤ k − . Furthermore, we haveeither: 1. V = (cid:83) ≤ i ≤ k − C i (cid:83) { s , s } , G [ V ] is bi-connected, and G [ V ] = C k is bi-connected (see Fig. 2(a) for an illustration). ( I )
2. or V k = C k (cid:83) { s , s } , G [ V k ] then can be partitioned into two bi-connectedsubgraphs G k (1) and G k (2) in which G k (1) (cid:83) G k (2) = G [ V k ] , G k (2) = G [ V ] ,and s , s ∈ G k (1) (see Fig. 2(b) for an illustration). ( II ) Proof 2
Note that since s , s ∈ G [ V ] , we have that if there exists i and j such that G [ V ] (cid:84) C i (cid:54) = ∅ , G [ V ] (cid:84) C j (cid:54) = ∅ ; on the other words, G [ V ] includes two or more compo-nents of G , then G [ V ] is disconnected. Hence, there exists exactly one components C i suchthat G [ V ] (cid:84) C i (cid:54) = ∅ (in this case, let i = k , we have G [ V ] = C k ). The conditions in ( I ) and ( II ) are required for G [ V ] and G [ V ] to be bi-connected. In this paper we are frequently dealing with block , and in the following, we will furthercharacterizes ( I ) and ( II ) in terms of blocks of every component C i , so let us define block and block tree of graph. A block of G is defined as a maximal bi-connected subgraph of G . The s … hi B i B i B i B hi B C i G[V ] u (a) s s … i B i B i B hi B C i G[V ] hi G hi G (b) Figure 3. An example of blocks of component of graph. block tree of G [ ? , ? ] is a bipartite graph B ( G ) with bipartition ( B , A ) , in which B is the set ofblocks of G , A is the set of articulation points of G. It is easy to see that a block B ∈ B and anarticulation point u ∈ A are adjacent in B ( G ) if and only if B contains u . A block B of G isa leaf block if B is a leaf of the block tree B ( G ) . Note that a leaf block contains at most onearticulation point of G . Lemma 3
For ≤ i ≤ k , suppose C i can be decomposed into h blocks. Let B i = { B i , B i , . . . , B hi } be the set of blocks of C i . Let A i also be the set of articulation points of C i . Without loss of generality, assume that B hi be a leaf block. Then, we have: | B hi (cid:84) N s | + | B hi (cid:84) N s | ≥ Proof 3
Suppose there exists the leaf block B hi such that | B hi (cid:84) N s | + | B hi (cid:84) N s | < . Then,it is easy to see that node u ∈ B hi (cid:84) A i is an articulation points of graph G [ C i (cid:83) { s , s } ] , andtherefore also of G . This constitutes a contradiction because G ( V, E ) is bi-connected and thereis no articulation point exists in G , and thus completes the proof. Take Fig. 3(a) for example. Block B i and B hi are two leaf blocks of component C i inwhich B i has links to connect to both s and s , and B hi has links to connect to s . Note that if B hi (cid:84) N s = ∅ , then node u ( u ∈ B hi (cid:84) A i ) is an articulation point of G . From the propertiesof Lemma 3, we now characterize ( II ) .Again, without loss of generality, we also assume that there exists G i (2) is a bi-connected subgraph of a leaf block B hi . Let G i (2) be the rest of block B hi without G i (2) such that G i (2) = B hi \ G i (2) (see Fig. 3(b)). Furthermore, we have G i (2) (cid:84) N s (cid:54) = ∅ .From above results, we have a complete characteristic of a bi-connected graph G . Claim 1
Given a bi-connected graph G ( V, E ) such that ∃ ( s , s ) ∈ E | the removals of s and s lead to k components C , C , . . . , C k , with k > , in terms of the blocks of C i ( ≤ i ≤ k ), G can be bipartitioned into bi-connected subgraphs G [ V ] and G [ V ] with s , s ∈ V , ifand only if G [ V ] = G hi (2) in which G hi (2) is a subgraph of B hi , B hi is a leaf block of C i ( ≤ i ≤ k ), G hi (2) is bi-connected, and G hi (2) = B hi \ G hi (2) is bi-connected as well. We also C s s G[V ]G[V ] Figure 4. An example of graph G with at most two components . have G hi (2) (cid:84) N s (cid:54) = ∅ (otherwise node v ∈ G hi (2) (cid:84) A i is an articulation of G ). Note that G hi (2) = ∅ if G [ V ] = B hi (as shown in Fig. 3(a)). Take Fig. 3(b) for example. Component C i is decomposed into blocks B i , B i , . . . , B hi in which B hi is a leaf block of C i . G hi (2) is a subgraph of B hi , G hi (2) is bi-connected and w ( G hi (2)) = n . G hi (2) is the rest of block B hi without G hi (2) , G hi (2) is bi-connected, and G hi (2) (cid:84) N s (cid:54) = ∅ . G is bipartitioned into G [ V ] and G [ V ] with G [ V ] = G hi (2) , and s , s ∈ V .Now we consider the case in which given a bi-connected graph G ( V, E ) , such that ∀ ( s , s ) ∈ E , the removals of s and s lead to at most two components C and C . It is easyto see C k (cid:84) N s (cid:54) = ∅ and C k (cid:84) N s (cid:54) = ∅ ( k = 1 , ) (otherwise either s or s is an articulationpoint of G ). Property 2
Suppose G can be bipartitioned into 2 bi-connected subgraphs, G [ V ] and G [ V ] ,such that s ∈ V , s ∈ V , and w ( V ) = n , w ( V ) = n . Without loss of generality, assumethat V = C (cid:83) { s } and V = C (cid:83) { s } . Then, we have C (cid:84) N s ≥ , and C (cid:84) N s ≥ . From the property 2 we have:
Property 3
Given a bi-connected graph G ( V, E ) , suppose G can be bipartitioned into 2 bi-connected subgraphs, G [ V ] and G [ V ] , such that s ∈ V , s ∈ V , and w ( V ) = n , w ( V ) = n . Then, | N s | ≥ , | N s | ≥ . Claim 2
Given a bi-connected graph G ( V, E ) such that ∃ ( s , s ) ∈ E | the removals of s and s lead to at most components C , C . Graph G can be bipartitioned into bi-connectedsubgraphs G [ V ] and G [ V ] with s ∈ V , s ∈ V if and only if C i (cid:84) N s i ≥ ( i = 1 , ), C i (cid:84) N s j ≥ ( ( i, j ) = { (1 , , (2 , } ), | C (cid:83) { s }| = n , | C (cid:83) { s }| = n , and G [ V ] and G [ V ] are bi-connected (see Fig. 4 for an illustration). We continue expanding the
R-BBG problem on bi-connected graph in the third casesuch that ∀ ( s , s ) ∈ E , the removals of s and s lead to a single connected component C . Sup-pose C can be decomposed into h blocks ( C is not bi-connected). Let B = { B , B , . . . , B h } ( h ≥ ) be the set of blocks of the component C . Then, suppose G can be partitioned into 2bi-connected graphs G [ V ] and G [ V ] such that: s … B B B h B h G h G G[V ]G[V ] (a) B B s s G[V ] G[V ] (b) Figure 5. An example of graph G with only one component and s , s ∈ V (a), s ∈ V , s ∈ V (b). s , s ∈ V (we also may have s , s ∈ V , without loss of generality, weassume s , s ∈ V ). Then there exists a leaf block B h ∈ B in which B h can bepartitioned into 2 subgraphs G h (2) and G h (2) , in which G [ V ] = G h (2) , G h (2) is bi-connected subgraphs, G h (2) (cid:84) N s (cid:54) = ∅ , the graph which is induced by G h (2) (cid:83) { s } is also bi-connected (an illustration is shown in Fig. 5(a)). Notethat if G [ V ] = B h then G h (2) = ∅ .2. s ∈ V , and s ∈ V (an example is shown in Fig. 5(b)). Then it is easy toverify that h = 2 (otherwise either s or s will be an articulation point of G [ V ] or G [ V ] ). Since h = 2 , without loss of generality, suppose B is a leaf block of C . Then, we have: • B (cid:84) N s ≥ and G [ V ] is induced by B (cid:83) { s } . • B (cid:84) N s ≥ and G [ V ] is induced by B (cid:83) { s } .Now we consider a special case in which C is bi-connected subgraph. Suppose C canbe decomposed into 2 bi-connected subgraphs G (1) and G (2) . Then, G can be partitionedinto 2 bi-connected subgraphs G [ V ] and G [ V ] if either:1. G (1) (cid:84) N s ≥ and G [ V ] is induced by G (1) (cid:83) { s } , and G (2) (cid:84) N s ≥ and G [ V ] is induced by G (2) (cid:83) { s } .2. or s , s ∈ V . Then G [ V ] is induced by G (1) (cid:83) { s , s } and G [ V ] = G (2) in which both are bi-connected.For example, in Fig. 6 the graph contains only one component C if removing s and s and all relative links. The component C then is decomposed into bi-connected subgraphs G (1) and G (2) in which in Fig. 6(a) s ∈ V , s ∈ V , and in Fig. 6(b) s , s ∈ V .From above results we have: (2) s s G[V ] G[V ] G (1) C (a) G (2) s s G[V ]G[V ]G (1) C (b) Figure 6. An example of graph G with one component C , and C contains only one block in which s ∈ V , s ∈ V (a), and s , s ∈ V (b). Claim 3
Given a bi-connected graph G ( V, E ) , a sequence pair of numbers ( n , n ) , . . . , ( n p , n p ) ∈ N ∗ , and ( s , s ) , ( s , s ) , . . . , ( s p , s p ) ∈ E (even though wehave supposed that n i ≈ n i ∀ ≤ i ≤ p , in general we may have n i (cid:54) = n i ).1. There is feasible solution for R-BBG problem such that in every step s i ∈ V i , s i ∈ V i , w ( V i ) = n i , w ( V i ) = n i , and G i [ V ] , G i [ V ] are bi-connected ( G i [ V ] and G i [ V ] are induced by V i and V i , respectively) if either: • the removals of s i and s i lead to only one component. • or the removals of s i and s i lead to at most two components.
4. Decision Algorithm
Let C denote the set of components of G induced by removals of s and s . We have C = C , C , . . . , C k . The details of the algorithm are shown in the flowchart (Fig. 7). Referringto the flowchart, in step . if the unique component C of graph is bi-connected, we canrecursively solve the problem by solving the problem with a reducing C to a graph G (cid:48) in which G (cid:48) = G \{ s , s } is still connected.Continue examining the flowchart we see that since removals of s and s lead to two ormore components as shown in steps . and . , the requirement of s , s to be on two differentparts after partition causes the algorithm to be stopped in general. For | C | ≥ the only casemakes the bipartition decision valid with s ∈ V , s ∈ V is in the step . if the removals of s and s lead to at most components, and satisfies Claim 2. The details of the behavior of thealgorithm on bi-connected graph G in the steps . and . indicated in Lemma 1 and Claim2. Moreover, every passage through the NO branch of step leads to finding a leaf block B hi in component C i ( ≤ i ≤ k ). Step of the flowchart illustrates for the behavior of thealgorithm on G indicated by Claim 1. Theorem 2
Decision algorithm solves problem with a time complexity O ( m nt |B| ) nput Bi-connected graph
Start k =2k = 1 k > 2
C: bi-connected
YESNO YES NO , s V s V STOP
YES NO , s V s V STOP
FIND: Leaf block hi i
B B C Satisfies Claim 1
STOP
NOYES
Reselect appropriate s s Satisfies Claim 2
YES NO Figure 7. Flowchart of the decision algorithm.
Proof 4
If the algorithm stops at steps . , . , and . , by Lemma 1, Claim 2 and 1, we knowthat the investigated problem is infeasible. We consider the case that problem is feasible. Ineach iteration of the algorithm, it takes O ( mn ) time to decompose every component to blocksand find leaf block. Let |B| be the number of leaf blocks in each iteration. In addition, let O ( t ) be the time complexity of finding the subgraph G hi (2) of any leaf block B hi of any component C i such that G hi (2) = G [ V ] . We know that the time complexity of finding G hi (2) may takeexponential time; however, the number of nodes in each leaf block is very small. Because atmost m ( m = | E | ) iterations are in the decision algorithm, the time complexity is bounded in O ( m nt |B| ) . This completes the proof.
5. Conclusion
In this paper we investigated the problem of recursive bipartition (