A Simple Branch-and-Bound Algorithm for the k-Cut ... - Springer Link

0 downloads 0 Views 128KB Size Report
vertices, the proposed branch-and-bound algorithm is more efficient when compared to two branch-and-bound algorithms that are the same but without some ...
Int J Adv Manuf Technol (2002) 20:63–71 Ownership and Copyright  2002 Springer-Verlag London Limited

A Simple Branch-and-Bound Algorithm for the k-Cut Problem for Applications with k Target Vertices, e.g. VLSI Design W.-C. Yeh Department of Industrial Engineering, e-Integration Laboratory, Feng Chia University, Taichung, Taiwan

The problems studied here belong to a class called graph partition. They are combinatorial problems which consist of finding a partition of vertices into components in order to optimise a given measure. A variety of applications have been suggested, such as communication cost minimisation in parallel computing systems, clustering problems, VLSI design, and network reliability. A 0–1 integer programming is proposed first to define and solve the k-cut problem. Then, an efficient branchand-bound algorithm is developed to solve this problem. As evidence of the utility of the proposed approach, the extensive computational results on random test problems are presented. In computational experiments on problems with up to 37 vertices, the proposed branch-and-bound algorithm is more efficient when compared to two branch-and-bound algorithms that are the same but without some bounds and dominance rules, and the proposed 0–1 integer programming model. The results show that both the lower and upper bounds are very tight, and the branch-and-bound algorithm performs very well. Keywords: Branch-and-bound, Graph partition; 0–1 Integer programming computational analysis; k-Cut; VLSI design

1.

Introduction

Consider a graph with weights assigned to its edges and a subset of the vertices called target vertices. The k-cut problem involves minimising the sum of the weight set of edges that separates each target vertex from all of the others. A variety of applications have been suggested [1–3], such as communication cost minimisation in parallel computing systems, clustering problems, VLSI design, and network reliability. For example, in the VLSI design, complex electronic circuits are implemented on a silicon wafer to form a chip. The circuit modules communicate with each other through physical connections or wires. The first stage of integrating the modules is to place them physically relative to each other. The second stage Correspondence and offprint requests to: Dr W.-C. Yeh, Department of Industrial Engineering, Feng Chia University, PO Box 67–100, Taichung, Taiwan 407. E-mail: wcyeh얀fcu.edu.tw

is to route globally the wires connecting each module. The objective is to place and route the modules such that a minimum amount of wire is used, and the area of the chip is as compact as possible. The grouping of highly connected modules facilitates the routeing of the electrical connections and reduces the layout area. In effect, the placement of highly connected modules close to one another results in short wire length. Short wires necessitate a small area to actually be implemented on a silicon wafer. If modules are modelled as nodes and the electrical connections between them by edges, the grouping of modules according to their connectivity is a k-cut problem [4–7]. Most of the literature associated with the k-cut problem deals with the case where the k target vertices are not specified [4–12]. We focus on the k-cut problem in a general graph with arbitrary k target vertices. The k-cut problem is an NPhard generalisation of the min-cut problem [2]. Unless P = NP, we must expect exponential dependence on k. Existing methods can efficiently solve the min k-cut in the planar graph [1–3]. The purpose of this paper is to develop an 0–1 integer programming to define and solve this problem. The computer software package GAMS was employed to solve the 0–1 integer programming model and compare its result to the proposed branch-and-bound algorithm together with two different branch-and-bound algorithms shown in Section 7. An efficient branch-and-bound algorithm is proposed to solve this problem. Tighter lower/upper-bound procedures, together with some powerful dominance rules and a quick way to calculate these bounds are implemented in the proposed branch-andbound algorithm, tested on problems with up to 37 vertices. To show the efficiency of the proposed branch-and-bound algorithm, it is also compared to two branch-and-bound algorithms that are the same but without some bounds and dominance rules, and the proposed 0–1 integer programming model. The results show that both the lower and upper bounds are very tight, and the branch-and-bound algorithm performs very well.

2. Terminology and a 0–1 Integer Programming Formulation In the rest of this study, the following nomenclature and notations are used.

64

W.-C. Yeh

Fig. 1. An example.

2.1

Nomenclature

k-cut. A k-cut is an edge set. If it is removed from the graph, then the remaining graph is separated into at least k disconnected components and there is no path between any pair of target vertices. For example, K = {e14, e26, e36, e35, e45} is a k-cut in Fig. 1, where k = 3 and vertices 1, 2, and 3 are the target vertices. If K is removed, then the original graph will be separated into 3 disconnected components and there is no path connecting any pair of target vertices, as shown inFig. 2. Moreover, the total weight of K is W(K) − W(e14) + W(e26) + W(e36) + W(e35) + W(e45) =4 + 2 + 4 + 2 + 3 = 15. k-cut vector. A k-cut vector is an alternative way to express the k-cut in a vector form. The ith element in the k-cut vector denotes which target vertex is connected to the ith nontarget vertex, i.e. the (k + i)th vertex, where 1 ⱕ i ⱕ n − k. For example, K = {e14,e26,e36,e35,e45} is a 3-cut in Fig. 1, then P = (3, 2, 1) is the corresponding 3-cut vector of K. The 1st, 2nd, and 3rd elements in P are 3, 2, and 1, respectively. Therefore, the 1st, 2nd, and 3rd non-target vertices are connected to the 3rd, 2nd, and 1st target vertices (see Fig. 2), respectively. W(P) = W(K) = 15. k-cut subvector. A k-cut subvector is a partial vector of a kcut vector. It contains only the first i elements of a k-cut vector, if the number of elements of this k-cut sub-vector is i, where 1 ⱕ i ⱕ n − k. Hence, the elements and the order of the elements are all the same as the first i elements in the k-cut vector, where 1 ⱕ i ⱕ n − k. For example, P2 = (3,2) is a 3-cut subvector of P = (3, 2, 1). Assigned/unassigned non-target vertex. A non-target vertex is called an assigned non-target vertex if it is already assigned to connect to one of the target vertices. Otherwise, it is an unassigned non-target vertex.

T, V − T = the target vertex set {1,2,. . .,k} and the non-target vertex set {k + 1,. . .,n}, respectively; (Notice: the ith target vertex is the vertex i, but the jth nontarget vertex is the vertex k + j, where 1 ⱕ i ⱕ k and 1 ⱕ j ⱕ n − k) n,m,k = the number of vertices, edges, and target vertices, respectively = the edge in E from the vertices i to j with weight eij W(eij) = W(eji), where i 苷 j P = (p1,p2,. . .,pn-k) is a k-cut vector, where the value pi denotes the ith non-target vertex is connected to the pith target vertex = the k-cut corresponding to the k-cut vector P KP = a subvector of the first q entries in some k-cut Pq vector, where 1 ⱕ i ⱕ q ⱕ n − k and Pn−k = P = the ith entry in Pq, where 1 ⱕ i ⱕ q ⱕ n − k and Pq,i 1 ⱕ Pq,i ⱕ k W(P) = W(e ), where e 苸 {e 兩 if vertices ␣ and ␤



ij

ij

␣␤

i⬍j

Pq⊕[r] ⍀P(eij)

UB

are not in the same component after removing the corresponding Kp from G(V,E,W), where 1 ⱕ ␣, ␤ ⱕ n} = (Pq,1, Pq,2,. . .,Pq,q,r) where r is the target vertex that the (q + 1)th non-target vertex is connected to in Pq ⊕ [r] where 1 ⱕ q ⱕ n − k and 1 ⱕ r ⱕ k = W(eij) if vertices i and j are not in the same component after removing P; otherwise ⍀P(eij) = 0, where eij is the edge from vertices i to j = the current upper-bound

2.3 A 0–1 Integer Programming Formulation

A mathematical programming formulation is a natural way to attack an NP-hard problem, although it is not an efficient solution procedure. The 0–1 integer programming formulation of the min k-cut problem can be formulated as follows:

冘冘uc n

Minimize 0.5

n

ij ij

i=1 j=1

Subject to, hip − hjp + uij ⱖ 0,

冘h

i,j = 1,2,. . .,n, p = 1,2,. . .,k

n

ip

= 1,

p = 1,2,. . .,k

(1)

i=1

2.2

Notation where,

The terms used in this paper are defined as follows: G(V,E,W) = an undirected, finite and connected graph with the set of nodes V = {1,2,. . .,n}, the set of edges E, and W denotes the weight function of edges

uij =

hip =

再 再

1 if the edge from the vertices i to j is in the k-cut 0 otherwise

(2) (3)

1 if the vertex i is in the component with the target vertex p or i = p 0 otherwise

cij = the weight of the edge from vertices i to j, i.e. W(eij)

The proof of the above 0–1 integer programming model that correctly defines a min k-cut is given in the following theorem. Fig. 2. The remaining graph after removing K.

Theorem 1. The above formulation defines the min k-cut such that a min k-cut exists.

A Simple Branch-and-Bound Algorithm

Proof. Any two target vertices, say i and j, cannot be in one component. Otherwise, hii = hij = 1, which is a contradiction to the constraint (3). Therefore, every solution satisfies the constraints of the above formulation, the graph will be separated into at least k components. In addition, the graph is finite, i.e. the number of solutions is finite, and there is at least one solution that is equal to the objective. Hence, the optimal solutions for the formulation are a min k-cut. QED

LB1(Pq−k) =

The following property relates to the transformation between a k-cut vector and its corresponding k-cut. Its proof follows from the definition of the k-cut vector.

j=k+1 i=1

Property 1. P is a k-cut vector, if and only if KP is a kcut and KP = {e␣␤兩 if vertices ␣ and ␤ are not in the same component after removing Kp from G(V, E, W), where 1 ⱕ ␣, ␤ ⱕ n}. Moreover, W(P) = W(KP) = Σ W(eij), i⬍j

where eij 苸 KP.

The following corollary comes directly from Property 1. Corollary 1: If P is a k-cut vector and W(P) ⱕ W(P*) for all k-cut vectors P*, then P is a min k-cut vector and KP is a min k-cut.



冘冘 k−1

k

W(eij) +

j=1 i=j+1

冘冘 k−1

k

W(eij) +

j=1 i=j+1

冘 冋冘 n

k

j=k+1

i=1

W(eij) − max {W(eij)} i=1,· · ·,k

j=q+1

i=1



W(eij) − max {W(eij)} i=1,· · ·,k

冘冘 q

+

j−1

⍀P(eij) if k ⬍ q ⬍ n if q = n

The 1-bound is proposed by adding the actual total weight between any two assigned non-target vertices of distinct components and the minimum total weight induced by the unassigned non-target vertices into the 0-bound. In the branch-and-bound technique, establishing a tighter bound quickly is one of the major requirements. Therefore, to reduce the number of calculations and to speed up the running time, the formulation of the lower-bound LB1 is rewritten using the recursive technique as in Theorems 2 and 3: Lemma 1.

冘 W(e ) − 冘 ⍀ (e ) = W(e ), k

k

P

␭q

iq

i=1

where ␭ = Pq−k,q−k and k ⬍ q ⱕ n

The formulations of the two lower bounds, the relationships among these lower bounds, and the efficient way to calculate these lower bounds by exploiting the recursive technique are presented in this section. The lower-bound procedure is based on two lower bounds: 0-bound LB0 and 1-bound LB1, and some useful dominance rules, which are discussed in Section 5. The lower bounds will be implemented in the branch-andbound algorithm to discover more nodes and to eliminate early a feasible but non-optimal k-cut subvector. The 0-bound LB0 is defined as follows: LB0 =

k

(5)

i=1

The Derivation of the Lower Bounds

n

W(Pq−k)

iq

3.

冘 冋冘

65



(4) The first term in the definition of LB0 is the total weights between any two distinct pairs of target vertices. The underlying principle of the second term in LB0 is to assume that any non-target vertex q is in the component of the target vertex j with W(ejq) = max {W(eiq)} i=1,· · ·,k

The value LB0 of any non-target vertex is the same. Therefore, it is calculated only once at the start of the proposed algorithm. The 0-bound neglects the possible weight between any two non-target vertices in two distinct components. To overcome this weakness, another tighter lower bound but with additional calculations is proposed as:

Proof. It follows directly from the definition of the ⍀ function. The following theorem defines the relationship between the 0-bound LB0 and the 1-bound LB1 of any feasible kcut subvector P1. It assumes that the 1st non-target vertex, i.e. vertex (k + 1), is now allocated to the component containing the target vertex i instead of the target vertex ␭ where W(ei,k+1) = max {W(ei,k+1)}, then the new bound i=1,· · ·,k

can be obtained by adding in the weight of ei,k+1 and removing that of edge e␭,k+1. Theorem 2. LB(P1) = LB0 + W(ei,k+1) − W(e␭,k+1), where W(ei,k+1) = max {W(ei,k+1)} i=1,· · ·,k

and ␭ = P1,1. Proof. LB1(P1)

冘 冘 W(e ) + 冘 冋冘 W(e ) − max {W(e )}册 + 冘 ⍀ (e ) = 冘 冘 W(e ) + 冘 冋冘 W(e ) − max {W(e )}册 k−1

k

=

n

k

j=k+2

i=1

n

k

j=k+1

i=1

ij

j=1 i=j+1

ij

ij

i=1,· · ·,k

k

P

i,k+1

i=1

k−1

k

ij

j=1 i=j+1

ij

ij

i=1,· · ·,k

66

W.-C. Yeh

冋冘

册 冘

k



k

W(ei,k+1) − max {W(ei,k+1)} + i=1,· · ·,k

i=1

⍀P(ei,k+1)

i=1

and the corresponding target vertex which should be connected in the decision tree. Corollary 2. Let P1,j = (j) be a k-cut subvector. Then, Min {LB1(Pi,j)} = LB0,

From Lemma 1, LB1(P1) = LB0 + max {W(ei,k+1)} i=1,· · ·,k

− W(e␭,k+1),

LB1(P1,i) ⱖ LB1 (P1,j)

j=1,· · ·,k

while the W(ei,k+1) ⱕ W(ej,k+1), where i,j 苸 {1,2,. . .,k}. Proof. Let

where ␭ = P1,1.

QED

W(e␭,k+1) = max {W(ei,k+1)} i=1,· · ·,k

The relationship between the parent-branches and childbranches is shown in Theorem 3. From this theorem, the 1-bound can be found quickly, without recalculating, using the original definition of the 1-bound. Hence, this theorem was employed to determine the 1-bound to reduce the running time for each new branch. Theorem 3.

q

P

j=1,· · ·,k

i=1,· · ·,k

− W(ej,k+1)} = LB0 + min { max {W(ei,k+1)} j=1,· · ·,k

i=1,· · ·,k

− W(e␭,k+1)} = LB0 LB1(P1,i) = LB0 + max {W(ej,k+1)} − W(ei,k+1)

i=1,· · ·,k

冘 ⍀ (e )

Min {LB1(P1,j)} = min {LB0 + max {W(ei,k+1)} j=1,· · ·,k

Moreover, if W(ei,k+1) ⱕ W(ej,k+1), then

LB1(Pq−k) = LB1(Pq−k−1) + max {W(eiq)} − W(e␭q) +

where ␭ 苸 {1,· · ·,k}. Then

j=1,· · ·,k

ⱖ LB1(P1,j) = LB0 + max {W(ei,k+1)} − W(ej,k+1)

iq

i=1,· · ·,k

i=k+1

The following property immediately follows from the definition of the initial lower-bound LB0, the second lowerbound LB1, and the objective value of a k-cut subvector.

where ␭ = Pq−k,q−k and k + 1 ⬍ q ⱕ n. Proof. We have

冘 冘 W(e ) k−1

LB1(Pq−k) =

k

ij

j=1 i=j+1

冘 冋冘 W(e ) − max {W(e )}册 + 冘 冘 ⍀ (e ) = 冘 冘 W(e ) + 冘 冋冘 W(e ) − max {W(e )}册 − 冋冘 W(e ) − max {W(e )}册 + 冘 冘 ⍀ (e ) + 冘 ⍀ (e ) ) − 冋冘 W(e ) − max {W(e )}册 = LB (P + 冘 ⍀ (e ) = LB (P ) + max {W(e )} − W(e ) + 冘 ⍀ (e ) where ␭ = P n

k

q

+

ij

j=q+1

k−1

P

i=1,· · ·,k

i=1

k

n

k

j=q

i=1

ij

LB0 ⱕ LB1(Pi) ⱕ LB1 (P) = W(P) =

ij

j=k+1 i=1

ij

j=1 i=j+1

j−1

ij

Property 2. If P is any one k-cut vector and Pi is the kcut subvector with only the first i elements in P, where k ⬍ i ⱕ n, then

冘 W(e ) ij

i⬍j

where eij 苸 KP.

ij

i=1,· · ·,k

4. The Initial Upper Bound

k

iq

iq

i=1,· · ·,k

i=1

q−1

j

q

P

ij

P

j=k+1 i=1

iq

i=1

k

1

q−k−1

iq

iq

i=1,· · ·,k

i=1

q

P

iq

1

q−k−1

iq

i=1,· · ·,k

i=1

q

␭q

P

iq

q−k,q−k

i=k+1

QED From the beginning of each new branch, the vertex with the smallest 1-bound will be selected. It is important to determine quickly the minimal 1-bound among all unassigned vertices. The following corollary is a short cut to determine the minimal 1-bound of the first non-target vertex

An initial upper bound is presented to be objective value of the problem at the beginning of the branch-and-bound algorithm. The upper bound is updated whenever a k-cut vector that improves the upper bound is generated during the branching process. If the lower bound of a k-cut subvector is not less than the current upper bound, then this k-cut subvector cannot yield a better solution, and hence the branching process is stopped to branch from the corresponding node in the search tree. We calculate the initial upper bound using:



UB0 = min W( j苸T



Ci)

i苷j,i苸T



(6)

where Ci is a min-cut separating target vertex i from T − {i}. The relationship between the initial upper bound and the total weight of a min k-cut is defined as follows. Theorem 4. If



UB0 = min W ( j苸T

then 1 ⱕ



Ci )

i苷j,i苸T

UB0 ⱕk−1 W(C)



A Simple Branch-and-Bound Algorithm

bound algorithm. If the 1-bound of such a branch is greater than the current upper bound, then so is its brother-branch that is not created. Hence, this branch is discarded together with its uncreated brother-branch. Thus, we have the following corollary.

where C is a min k-cut. Proof. Let C*j =



Ci

i苷j,i,j苸T

If we remove Cj* from G, then any pair of target vertices in T cannot be in the same component. Hence, Cj* is also a kcut, i.e.



W(C) ⱕ min w ( j苸T





Ci) ⱕ W(C*j )

i苷j,i苸T

j苸T





Proof. If Pq−1 is a k-cut subvector in a min k-cut vector P and Pq = Pq−1 ⊕ [i] 苸 P, where i 苸 {1,2, . . ,k}, then, LB1(Pq) ⱖ min {LB1 (Pq−1 ⊕ [j])} ⬎ UB, i.e. Pq is not a k-cut sub-

i苸T

j=1,· · ·,k

vector in any min k-cut vector according to Property 3. This is impossible, i.e. the corollary follows. QED

ⱕ (k−1) W(C) Therefore,



W(C) ⱕ min W ( j苸T

i.e. 1 ⱕ

傼 i苷j,i苸T

min {LB1(Pq−1 ⊕ [j])} ⬎ UB then Pq−1 is not a k-cut subvector in any min k-cut vector, where UB is the current upper bound and k ⬍ q ⱕ n.

Ci) ⱕ (k − 1) min {W(Ci)}

i苷j,i苸T

Corollary 3. If j=1,· · ·,k

where j 苸 T. Since W(Ci) ⱕ W(C), we have min W ( 傼

67



Ci) ⱕ (k−1) W(C)

In the traditional branch-and-bound algorithm, it is necessary to search all possible branches. To increase the efficiency of the proposed branch-and-bound algorithm, a special stop criterion is implemented, as follows, to truncate the search space.

* i

min{W(C )} ⱕk−1 W(C) QED

Clearly, the efficiency of the branch-and-bound algorithm depends to a large extent on the quality of the bounds obtained. The average relative error between the proposed upper bound and the optimal solution, i.e. (the upper-bound value) − (the optimal solution) (the optimal solution) which is only 0.008509375 during 2800 tests (see Section 7), and can be used to find the upper bound of even large-scale problems. Our goal is to develop a procedure which is fast, easy to apply, and provides a tight bound.

Corollary 4. If LB0 = UB = W(P), then P is a min k-cut vector and the qth non-target vertex belongs to the component of the target vertex j, i.e. j = Pk+q,k+q, such that W(ej,k+q) = max {W(ei,k+q)}. i=1,· · ·,k

Proof. From Property 3, LB0 ⱕ W(P*) for all k-cut vectors, P*, includes any min k-cut vector. Therefore, if LB0 = UB and UB = W(P), then P is a min k-cut vector. Moreover, from the definition of LB0, any non-target vertex (k + q) is in the component of the target vertex j with W(ej,k+q) = max {W(ei,k+q)}, where j = Pk+q,k+q. Hence, this corollary foli=1,· · ·,k

lows. QED

5.

The Dominance of the Lower Bounds

Some simple but useful dominance rules for the problem are discussed here to reduce the number of branches in a branchand-bound search tree. The first dominance rule comes from the definition of 1-bound and upper bound as follows. Property 3. If LB1(Pq)⬎UB, then Pq is not the k-cut subvector in any min k-cut vector, where UB is the current upper-bound. The number of all combinations of k-cut vectors is finite in the graph with a finite number of edges and vertices. Thus, there is at least a min k-cut vector. It this study, we focus only on finding a min k-cut vector and the weight of any min k-cut vector instead of all of the min k-cut vectors. Therefore, the corresponding branch is discarded if its 1-bound is equal to the current upper bound. Thus, we have the following property. Property 4. If LB1(Pq) = UB, then either Pq is not the k-cut subvector in any min k-cut, or the k-cut vector that makes the current upper bound UB is a min k-cut. The first child-branch of each node is created by selecting the one with the minimal 1-bound in the proposed branch-and-

6. Algorithm and Complexity The proposed branch-and-bound algorithm uses the depth first search (DFS) strategy to search the tree to save memory space in the computer. Since O(m) = O(n2), the edge number m is larger than the vertex number n in most graphs. To reduce the size of the search tree without scanning the whole graph to check if the current branch is a feasible min k-cut, the proposed branch-and-bound algorithm is a vertex-based method instead of an edge-based method, i.e. each node in the search tree represents a vertex not an edge. All target vertices are dealt within a fixed order, and it is the choice of target vertex that is being referred to. We now describe the implementation of the branch-and-bound algorithm as follows. The 0-bound is calculated only once at the beginning of the procedure using Eq. (4). A simple procedure is then employed using Eq. (6) to determine the initial upper bound. The upper bound is updated whenever a k-cut vector generated during the branching process improves the upper bound. If the current

68

W.-C. Yeh

upper bound is equal to the 0-bound, then the set of edges that makes the current upper bound is a min k-cut by Corollary 4. There are (n − k) levels in the entire search tree of the branch-and-bound algorithm. Each level includes, at most, k brother-branches. The jth brother-branch of the ith level is denoted as the ith non-target vertex , i.e. the (k + i)th vertex in the graph, is connected to the jth target vertex, where 1 ⱕ j ⱕ k and 1 ⱕ i ⱕ n − k. At each branching step in the search tree, all of the 1-bounds of the current new branch are calculated first by applying the efficient method presented in Theorem 3, arranged in increasing order. If the 1-bound is larger than the current upper bound, not only is that node discarded but also all of its brother-branches that have not yet been searched. Otherwise, the branch from the vertex for this current subprogram is used to create a new branch when this vertex is not the nth vertex, or a branch from the current node to its brother-branch, in which the order of the 1-bound is just right after the order of the 1-bound of the current vertex. The worst bound for the time complexity of the proposed branch-and-bound algorithm is less than O((n − k)k) according to the definition of the k-cut vector.

7.

An Example

One example is presented to illustrate this branch-and-bound algorithm. Example 1. We want to find the min 3-cut in Fig. 1, where vertices 1, 2, and 3 are the target vertices, i.e. T = {1, 2, 3}. Solve: Step 0. Set the upper bound UB = min{W(



冘冘 2

LB0 =

3

W(eij) +

j=1 i=j+1

冘 冋冘 6

3

j=4

i=1



W(eij) − max (W(eij)} = i=1,2,3

0 + {(4 + 0 + 2 − 4) + (0 + 4 + 2 − 4) + (2 + 2 + 4 − 4) = 8 STEP 1. By Theorem 2: LB(P1) = LB0 + max {W(ei,k+1)} − W(e␭,k+1) =



LB1(P2) ⬍ UB, we need to create an new branch from vertex 5 (the 2nd non-target vertex). Step 3. Calculate all of the 1-bounds of the 3rd non-target vertex, i.e. vertex 6: LB1(P2 ⊕ [1]) = 13, LB1(P2 ⊕ (2)) = 13 and LB1(P2 ⊕ (3)) = 11. LB1(P2 ⊕ [3]) is the one with the minimal weight and P3 = P2 ⊕ [3] = (1, 2, 3). Since LB1(P3) = 11 ⬍ UB and vertex 6 is the last non-target vertex, the upper bound is updated to UB = 11. The entire decision tree for finding the min 3-cut in Fig. 1 is shown in Fig. 3. The final result of the min 3-cut is {e16, e62, e34, e35, e45} with total weight 11 as shown in Fig. 4.

8. Computational Result

Ci)} = W(C3*) = 12

i苷j,i,j苸T

and the 0-bound

Fig. 3. The decision tree.

i=1,· · ·,k

8 if P1 = (1)

12 if P1 = (2) 10 if P1 = (3)

The closer to the optimum, the higher the quality of the upper/lower bound. To compare the efficiency (running time) of the proposed entire branch-and-bound method and the quality of the proposed lower-bound procedure, upper-bound procedure, and the dominance rule, four methods were employed. All of the algorithms were implemented in C++, and run on a Pentium II-350 personal computer except for Method 4 which was solved using the software package GAMS. The unit of the running time was the CPU second. The weight of each edge in every data set was randomly generated in a uniform distribution U(0,9) × U(0,9). Each running time was truncated to a multiplication of 0.054945 because of the characteristics of the computer. For example, if the running time was less than 0.054945, then it would be truncated into 0. Moreover,

we have P1 = (1), LB(P1) = 8, and non-target vertex 4 and target vertex 2 are impossible in the same component after removing a min 3-cut. Step 2. By Theorem 3, LB1 (P1 ⊕ [1]) = LB1 (P1) + [ max {W(ei,5)} − W(e15)]



i=1,2,3

4

+

⍀(ei,5) = 8 + [4 − 0] + 0 = 12

i=4

LB1 (P1 ⊕ (2)) = 11 P2 = P1⊕[2] = (1, 2)

and and

LB1 (P1 ⊕ (3)) = 13. Hence, LB1(P2) = 11. Moreover,

Fig. 4. The set of edges crossed by the dashed line is a min 3-cut of the example.

A Simple Branch-and-Bound Algorithm

if the running time of any test problem was greater 10 min, the process would stop. 8.1

The Test on Four Different Algorithms

Because of the characteristics of NP-hard problems and the limitations of personal computers, the branch-and-bound methods solve only medium-sized problems. Therefore, in this part of this experiment, the number of vertices, n, was only from 10, 11, to 25 and there were three different target vertices k: [n/4], [n/2] and [3n/4] to each n, where the value [N] is the greatest integer value that is smaller than N. For each different n, there are 10n problems, and there are 5n, 2.5n, and 2.5n problems for k = [n/2], [n/4] and [3n/4], respectively. For example, there are 10 × 10 = 100 problems for n = 10. Moreover, among these 100 problems, there are 25, 50, and 25 problems for k = 3, 5, and 7, respectively. Therefore, there were 2800 test problems in this experiment. As summarised in Table 1, the proposed branch-and-bound algorithm is implemented in Method 0. To test the efficiency and quality of the upper bound, Method 1 is just like Method 0, but without implementing the upper-bound procedure. In order to demonstrate the influence of the dominance of the lower bounds, Method 2 is also like Method 1 but without implementing Theorem 2. Finally, the proposed 0–1 integer programming is solved by the software package GAMS and is called Method 3 in Table 1. Table 2 provides the average CPU times from four methods for each group problem. To evaluate the effectiveness of the node-discovering methods, the average number of nodes created by each of Methods 0–3 are also measured and reported in Table 2. In Table 2, the notations Tu and Vu represent the average running time and the average upper bound in Methods 0 and 2, respectively. The notations Ti, Vi and Ni denote the average running time, the average final solution, and the average number of nodes created in the decision tree of Method i, individually, where i = 0, 1, 2, and 3. Notice that, because of the limitation of running time, the final solution Vi of each problem may be the optimum value or just the final objective value obtained just before the process is stopped. Furthermore, if the running time of the process is over the time limitation of 10 min, then Ti is set to be 600 and Ni is set to be the total number of nodes created in the decision tree just before the process is stopped, where i = 0, 1, 2, and 3. The number of running times that were over the time limitation (10 min) of each problem are given in Table 3. Table 1. The 4 methods. Method

Remarks

Method 0 Method 1

The proposed branch-and-bound algorithm As in Method 0 but without implementing the lower-bound procedure and dominance rule as stated in Theorem 2 As in Method 0 but without implementing the upper bound The 0–1 integer programming solved by GAMS

Method 2 Method 3

69

From Table 2, we can see that when k is close to or equal to .n, it is more difficult to find a solution than for other value of k. The 0–1 integer programming model solved in Method 3 was the worst, and could only solve the problem with up to 13 vertices in this experiment. Without the lowerbound procedure and the dominance rules, Method 2 can only solve the k-cut problem with up to 20 vertices within a reasonable time. However, as in Method 1, the proposed branch-and-bound algorithm performed very well even without the upper-bound procedure. The average relative error between the proposed upper bound and the optimal solution is only 0.008509375 during 2800 tests, and can be used to find the upper bound of even largescale problems from Tables 2 and 3. Moreover, the proposed branch-and-bound (Method 0) is not only better in running time and the number of nodes created in the procedure, but is also better in the solution quality obtained before the time limitation, than the other methods. Therefore, the dominance of the lower bounds really plays an important role when comparing Method 0 to Methods 1 and 2. 8.2 The Experiment on the Maximum Vertex Number in the Solvable Problem

To determine the maximum number of vertices for a k-cut problem that can be solved by the proposed branch-and-bound algorithm, Table 4 presents the aggregated computational results for the proposed algorithm, tested on 12 group problems (vertex numbers are 26, 17, . . ., 37). Each group problem contained 10 different data sets. Since, when k = [n/2], it is most difficult to solve as shown in Table 2, all of the data sets in the same group have the same target vertex number k = [n/2]. The computation of a data set was abandoned to prevent excessive running time, when it was not solved within the time limit of 100 min. The results include the average running time in seconds, the average number of nodes created, and the number of unsolved data sets (out of 10). Note that all of the above items in Table 4 include the average running time, the average number of nodes created, and the average final solution of the abandoned problems. Table 4 shows that while n = 26 and k = 13, all of 10 data sets in this group were solved with an average running time of T0 = 12.6978 (s) and average number of created nodes N0 = 11 531 830.7. However, the number of solved data sets decreased to 3 with an average running time of T0 = 4210.797 (s) and the average number of nodes created was N0 = 1 870 664 386 for n = 37 and k = 18. The average running time Tu = 2.233 for the upper-bound procedure in the proposed branch-and-bound algorithm is less than 3 s even for n = 37. The corresponding average upper-bound value Vu = 8927.3 is also close to the average final solution V0 = 8832.2. Therefore, the upper-bound procedure is an efficient heuristic method.

9. Conclusions The special case of a computationally difficult k-cut problem was discussed in this paper. A branch-and-bound algorithm

3 5 7 3 5 8 3 6 9 3 6 9 3 7 10 3 7 11 4 8 12 4 8 12 4 9 13 4 9 14 5 10 15 4 9 14 5 10 15 4 9 14 5 10 15 4 9 14

10

25

24

23

22

21

20

19

18

17

16

15

14

13

12

11

k

n

0.91 0.91 0.95 0.94 0.93 0.93 0.92 0.94 0.99 0.93 0.95 1.01 0.95 1.00 1.04 0.96 1.04 1.10 1.00 1.04 1.09 0.98 1.06 1.15 0.98 1.10 1.19 1.01 1.13 1.24 1.10 1.18 1.29 1.05 1.22 1.35 1.05 1.26 1.42 1.08 1.31 1.53 1.14 1.37 1.61 1.16 1.40 1.66

Tu

344.65 617.97 829.90 300.36 564.65 835.36 336.54 767.38 1055.83 369.38 816.15 1185.46 461.11 1153.39 1519.11 563.17 1557.00 2215.93 820.38 1682.16 2271.16 790.15 1618.55 2213.62 865.03 2043.46 2675.42 1106.55 2617.26 3562.26 1353.00 2664.08 3477.08 1282.07 2546.90 3372.69 1551.11 3337.23 4310.34 1600.85 3571.10 4778.37 2070.27 3974.29 5156.29 2022.04 3960.79 5172.80

Vu

Upper Bound

0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.01 0.00 0.01 0.06 0.00 0.00 0.05 0.01 0.00 0.11 0.00 0.04 0.27 0.01 0.01 0.39 0.05 0.16 0.46 0.05 0.08 0.59 0.02 0.39 1.58 0.03 0.30 5.09 0.29

T0 344.65 614.97 814.20 300.36 560.27 815.77 336.54 765.13 1049.08 369.38 858.95 1167.96 461.11 1150.14 1494.11 563.17 1556.18 2196.93 820.22 1678.75 2246.94 790.15 1617.25 2184.85 865.03 2043.38 2664.50 1106.55 2617.05 3545.13 1353.00 2664.03 3462.93 1251.83 2511.08 3326.50 1520.39 3300.67 4241.50 1570.41 3524.41 4757.00 2022.98 3924.44 5120.40 1936.14 3885.87 5109.66

V0

N0 116.25 276.92 90.30 191.32 660.08 82.91 158.25 567.17 136.13 262.96 3377.85 471.12 427.82 3830.17 576.07 245.60 4146.80 607.57 2259.38 12307.67 1214.25 6249.41 59186.90 2715.88 3450.11 43278.33 6744.11 2560.95 101922.24 6469.47 34765.75 252874.50 5833.50 8203.33 352063.41 48044.64 141827.05 429250.33 54121.82 66777.28 548149.77 20051.87 338328.00 1340044.77 31945.50 265557.72 3462181.01 287236.80

Method 0

Table 2. Performance of 4 methods in Experiment 1.

0 0 0 0 0 0 0 0 0 0.004227 0.113412 0.010566 0.003925 0.163527 0.019623 0.003663 0.358974 0.032967 0.054945 1.102907 0.024038 0.159987 8.136716 0.163219 0.206044 26.62648 0.404456 0.211105 47.00405 0.566802 7.134615 146.6209 0.881868 1.478284 447.1001 9.566981 21.82068 532.1474 14.45929 15.96512 549.0552 10.13736 322.294 600 27.08448 278.722 600 222.8967

T1 344.65 614.97 814.20 300.36 560.27 815.77 336.54 765.13 1049.08 369.38 858.95 1167.96 461.11 1150.14 1494.11 563.17 1556.18 2196.93 820.22 1678.75 2246.94 790.15 1617.25 2184.85 865.03 2043.38 2664.50 1106.55 2617.05 3545.13 1353.00 2664.03 3462.93 1251.83 2517.44 3326.50 1520.39 3308.78 4241.50 1570.41 3533.93 4757.00 2023.63 3926.81 5120.40 1937.40 3931.24 5112.20

V1

Method 1 T2

486.90 0 1216.67 0.002747 358.40 0 486.82 0 2822.50 0.004163 522.18 0 498.25 0 8092.67 0.005342 791.25 0 1499.42 0 43117.08 0.032403 4468.85 0.002113 1847.89 0 61850.75 0.04775 8882.14 0.005887 1194.70 0.001832 134816.27 0.1221 13041.97 0.009158 44291.75 0.044643 836935.92 0.831616 19250.63 0.012019 123439.41 0.360375 6117779.45 13.77074 129307.06 0.187459 158877.78 0.389194 19737089.17 36.91952 314721.69 0.434982 162630.21 0.339792 34666291.74 56.94139 436532.53 0.601504 5372443.00 9.072802 107509509.85 178.5298 674874.00 0.942308 1138142.62 322319184.31 7157623.57 11160209.16 16777216.00 10346788.00 9081444.39 16777216.00 5947140.48 16590634.04 16777216.00 11311868.79 195566187.04 419769665.09 154444126.60

N1 344.65 614.97 814.20 300.36 560.27 815.77 336.54 765.13 1049.08 369.38 858.95 1167.96 461.11 1150.14 1494.11 563.17 1556.18 2196.93 820.22 1678.75 2246.94 790.15 1617.25 2184.85 865.03 2043.38 2664.50 1106.55 2617.05 3545.13 1353.00 2665.09 3462.93

V2

Method 2 T3

801.15 1.2885 1802.917 46.22317 374.15 45.402 697.3636 2.312727 3616.439 92.57061 522.9091 93.58 609.875 3.977917 9387.75 168.7922 796.5 210.0567 2131.154 5.002692 52640.38 211.6619 5010.577 275.9524 2360.571 11.52286 75628.83 308.1539 9133.571 1677.8 185440 13735.7 70833.75 1153745 19600.13 272721.4 10328839 146876.5 295476.7 27192526 336360.6 257508.4 41739114 460089 6806457 130271507 7148108

N2

344.65 617.10 814.20 300.36 571.48 815.77 336.54 810.94 1055.92 369.38 917.50 1217.08 461.11 1240.72

V3

Method 3

70 W.-C. Yeh

A Simple Branch-and-Bound Algorithm

71

Table 3. The number of process time is over 600 s to each n of Methods 0–2. n

Method 0

Method 1

Method 2

19 20 21 22 23 24 25

0 0 0 0 0 0 0

0 11 88 127 130 166 185

1 17 0

Table 4. Performance of the proposed branch-and-bound algorithm in Experiment 2. n

k

26 27 28 29 30 31 32 33 34 35 36 37

13 13 14 14 15 15 16 16 17 17 18 18

Tu

Vu

1.509 1.465 1.655 1.623 1.772 1.787 1.948 2.013 2.134 2.195 2.180 2.233

4259.4 4925.7 4885.1 5532.9 6102.3 6925.9 6611.2 6819.3 7701.0 7598.6 8289.9 8927.3

T0

12.6978 12.80769 16.57692 38.34066 248.8956 173.9066 1399.538 95.60989 2082.604 1811.297 1487.06 4210.797

based on powerful lower- and upper-bound procedures was presented. Some simple but useful dominance rules were also derived to aid discovery of more unpromising nodes in the branch-and-bound search tree and allow an early elimination of a feasible but non-optimal k-cut subvector. The computational tests indicated that our upper-bound procedure is robust in producing near-optimal solutions for larger problems. The proposed branch-and-bound method can obtain optimal solutions efficiently with up to 37 vertices, which outperforms the 0–1 integer programming model. The method has several engineering applications, e.g. VLSI design. However, the use of tighter but slower bounds within a conventional branch-and-bound procedure has so far not been proved to be effective [10]. To solve much larger sized problems and ensure quick solutions, further work is required to develop stronger dominance rules, and tighter but faster upper/lower bounds to discover extensively and further cut down the size of the branch-andbound tree. One extension of this work would be to investigate efficient methods to solve min k-cut problem and its variants. Acknowledgements

This research was supported in part by the National Science Council of Taiwan, ROC under grant NSC 82–0113-E-214– 027-T. The considerable contribution Professor Min-Sung Yeh has made to this research is also acknowledged.

V0

4177.3 4886.9 4862.7 5401.3 5951.8 6769.5 6532.8 6709.1 7577.5 7576.2 8187.2 8832.2

N0

11531830.7 11682888.1 15096372.2 35003110.8 223285099.5 156651319.5 705326909.1 87182542.4 1033925561 804402479.4 796347665.7 1870664386

number of unsolved data sets 0 0 0 0 0 0 2 0 3 3 2 7

References 1. W. C. Yeh, “A simple algorithm for the planar multiway cut problem”, Journal of Algorithms, 39(1), pp. 68–77, 2001. 2. E. Dalhaus, D. S. Johnson, C. H. Papadimitriou, P. D. Seymour and M. Yannakakis, “The complexity of the multiway cuts”, SIAM Journal of Computing, 23, pp. 864–894, 1994. 3. W. C. Yeh, “On k-Cuts in Graphs”, PhD dissertation, UT. Arlington, 1992. 4. O. Goldschmidt, “Deterministic and probabilistic aspects of the kcut problem”, PhD dissertation, UC Berkeley, 1988. 5. C. C. Chen, “Placement and partitioning methods for integrated circuit layout”, PhD dissertation, UC Berkeley, 1985. 6. B. W. Kernighan and S. Lin, “An efficient procedure for partitioning graphs”, Bell System Technology Journal, 49, 1978. 7. R. M. MacGregor, “On partitioning a graph: a heuristic and empirical study”, Technical Report UCB/ERL M78/14, Electronic Research Laboratory, UC Berkeley, 1978. 8. O. Goldschmidt and D. S. Hochbaum, “Polynomial algorithm for the k-cut problem”, Proceedings, 29th IEEE FOCS, 1988. 9. O. Goldschmidt and D. S. Hochbaum, “Asymptotically optimal linear algorithm for the minimum k-cut in a random graph”, SIAM Journal of Discovery, 3(1), pp. 58–73, 1990. 10. X. He, “An improved algorithm for the planar 3-cut problem”, Journal of Algorithms, 12, pp. 23–37, 1991. 11. D. S. Hochbaum and D. B. Shmoys, “An O(兩V兩2) algorithm for the planar 3-cut problem”, SIAM Journal on Algebraic and Discrete Methods, 6(4), pp. 707–712, 1985. 12. D. S. Hochbaum and L. Tsai, “A greedy algorithm for the 3-cut problem and its worse case bound”, Technical Report IP-318, UC Berkeley, Economic Theory and Econometrics, 1983. 13. C. N. Potts and L. N. Van Wassenhove, “A branch-and-bound algorithm for the total weighted tardiness problem”, Operations Research, 33, pp. 363–77, 1985.

Suggest Documents