Home Multi-Level Refinement Algorithm of Weighted Hypergraph Partitioning Problem
Article Open Access

Multi-Level Refinement Algorithm of Weighted Hypergraph Partitioning Problem

  • Ming Leng

    Ming Leng is connected with the Key Laboratory of Watershed Ecology and Geographical Environment Monitoring of NASG, Jinggangshan University. Ming Leng was born in 1975. He received his BS from the HeFei University of Technology in 1996, MS and PhD from ShangHai University in 2003 and 2008, and then became a professor in the Jinggangshan University in 2015. His main research interest is in Design and analysis of algorithm in VLSI design automation, Integrated circuit design automation theory, China.

    , Ling-yu Sun

    Ling-yu Sun is connected with the Key Laboratory of Watershed Ecology and Geographical Environment Monitoring of NASG, Jinggangshan University. Ling-yu Sun was born in 1976. She received her BS from Nanchang HangKong University in 2000, MS from JiangXi Normal University in 2005, and then became a professor in Jinggangshan University in 2014. Her main research interest is in Design and analysis of algorithm in VLSI design automation, Cloud Computing, China.

    and Kai-qiang Guo

    Kai-qiang Guo is connected with the Key Laboratory of Watershed Ecology and Geographical Environment Monitoring of NASG, Jinggangshan University. Kai-qiang Guo was born in 1982. He received his BS from the Southwest Jiaotong University in 2003 and MS from Monash University of Australia in 2006. He is a PhD candidate in Tongji University. His research interests lie at Design and analysis of algorithm in VLSI design automation, Cloud Computing and Business Intelligence, China.

    EMAIL logo
Published/Copyright: April 19, 2016
Become an author with De Gruyter Brill

Abstract

The formal description of weighted hypergraph partitioning problem is presented. We describe the solution of the weighted hypergraph partitioning problem based on the multi-level method. We propose the multi-level discrete particle swarm optimization refinement algorithm, whose each particle’s position in |V|-dimensional can be considered as the corresponded partitioning. During the refinement process of the uncoarsening phase, the algorithm projects successively each particle’s corresponded partitioning back to the next-level finer hypergraph, and the degree of particle’s freedom increases with the increase in solution space’s dimension. The algorithm also regards the gain of vertex as particle information for the heuristic search and successfully searches the solution space based on the intelligent behavior between individuals’ collaboration. Furthermore, the improved compressed storage format of weighted hypergraph is presented and the two-dimensional auxiliary array is designed for counting the vertices of each hypergraph in different partitions. The rapid method of calculating the vertex’s gain and the cut’s size are proposed to avoid traversing each vertex of hyperedge and reduce the algorithm’s time complexity and space complexity. Experimental results show that the algorithm not only can find the better partitioning of weighted hypergraph than the move-based method but also can improve the search capability of the refinement algorithm.

1 Introduction

Graph is a kind of nonlinear structure, whose each vertex can be connected with other vertices, and their adjacent relationships are random. It is the first application of graph in engineering science that Kirchhoff analyzed the integrated circuit based on graph. With the development of science and technology, graph has been used more and more widely in the fields such as VLSI design [15], task schedule of cloud computing [19].

Take partitioning of VLSI design for an example: we divide the standard cell of VLSI design into different subsets so that we can reduce the complexity of VLSI design and improve its performance [15]. We build the mathematic model of circuit partitioning based on the graph theory in order to divide the standard cell into different subsets. Lengauer first proposed the undirected weighted graph to describe the circuit [13]. Alpert and Kahng also presented the constructive process, which builds the undirected weighted graph, intersection graph, and directed graph and other mathematic models for circuit [2]. Compared with the graph, the weighted hypergraph can provides a more precise mathematical model to divide the circuit. Each hyperedge can connect with more than two vertices, which corresponds to the wire connecting with more than two circuit cells.

Take task partitioning of cloud computing scheduler for an example: we divide a large number of tasks into different subsets in accordance with the specific constraints, which can satisfy with the same size of different subsets and the minimal number of dependency relationships among different subsets, so that we can improve the load balance of cloud computing and reduce the time span of a whole task [19]. Compared with the directed acyclic graph of meta-task schedule, the weighted directed hypergraph can provide a more precise mathematical model to describe dependent tasks and represents a heterogeneous, distribution wide area and other characteristics of cloud computing environment. It also can improve the correctness and performance of a task schedule. In the weighted directed hypergraph model, the vertex can represent the task, and the directed hyperedge can represent the successive dependency relationship among different subsets.

However, it is impossible to find the optimal solution in a reasonable time for a weighted hypergraph partitioning. Because of the importance of the partitioning problem, lots of heuristic methods are proposed to calculate the approximate optimal solution, such as move-based approaches [8, 4], geometric representations [18], combinatorial formulations [3], spectral method [9], divide and conquer approach [16, 17], cellular automata approaches [11], and multi-level method [6, 7, 20], etc.

First, we proposed the formal description of weighted hypergraph partitioning problem and described the solution of the weighted hypergraph partitioning problem based on the multi-level method, which includes the coarsening phase, initial partitioning phase, uncoarsening, and refinement phase. Second, we proposed the framework of the multi-level method based on the discrete particle swarm and the multi-level discrete particle swarm optimization refinement algorithm, whose each particle’s position in |V|-dimensional can be considered as the corresponded partitioning. Furthermore, the improved compressed storage format of weighted hypergraph is presented, and the two-dimensional auxiliary array is designed for storing the vertices number of each hyperedge in different partitions. The rapid method of calculating the vertex’s gain and the cut’s size are proposed to avoid traversing each vertex of hyperedge and reduce the algorithm’s time and space complexity. Finally, the proposed algorithm was compared with the weighted graph partitioning algorithm and the weighted hypergraph partitioning algorithm based on the FM approaches based on 18 different hyper-graphs of ISPD98 benchmark. The experimental evaluation shows that the proposed algorithm improves the search capability of the refinement algorithm.

The rest of the paper is organized as follows. Section 2 provides a formal description of the weighted hypergraph partitioning problem that is used throughout the paper. Section 3 briefly describes the weighted hypergraph partitioning algorithm based on the multi-level method. Section 4 presents the framework of the multi-level method based on the discrete particle swarm optimization and proposes the multi-level discrete particle swarm optimization refinement algorithm. Section 5 presents the fast calculation of partitioning cut and vertex gain and do the space and time complexity analysis of our proposed algorithm. Section 6 experimentally evaluates our proposed algorithm and compares it with FM algorithm. Finally, Section 7 provides some concluding remarks.

2 The Formal Description of Weighted Hypergraph Partitioning Problem

Definition 1: Given a weighted hyper-graphHG(V, Eh), which consists of a set of vertices V={vi| 1≤i≤n} and a set of hyper-edgesEh={ejh|ejhV,1jm}. A decomposition of a hyper-graph into two disjoint subsets V1 and V2, such that V1V2=V and V1V2=∅. P(V1, V2) is denoted as a bi-partitioning of hyper-graphHG(V, Eh).

Definition 2: A weighted hyper-graphHG(V, Eh) is a hyper-graph that has a positive number S(vi) associated with each vertex vi, which is denoted as the weight of vertex vi according to the mapping relation S:VR. It also has a positive number W(ejh) associated with each hyper-edgeejh, which is denoted as the weight of hyper-edgeejh according to the mapping relation W:EhR.

Definition 3: Given a weighted hyper-graphHG(V, Eh), for each vertex veh, let eh be denoted as the neighbor-hyperedge of v and the neighbor-hyperedge set of v is denoted by N(v)={eh| vehehEh}.

Definition 4: Given a bi-partitioning P(V1, V2) of weighted hyper-graphHG(V, Eh), let ID(v)=ehN(V)ehV1W(eh) be denoted as v’s internal degree and is equal to the sum of weights of v’s neighbor-hyperedge whose adjacent vertices are located in the same side of the partition as v. v’s external degree denoted by ED(v)=ehN(V)ehV1W(eh) is equal to the sum of weights of v’s neighbor-hyperedge whose adjacent vertices are located in the opposite side of the partitioning. The cut of a bi-partitioning P(V1, V2) is the sum of weights of hyper-edges denoted by cut(P)=ehEhehV1ehV2W(eh), which contain vertices in V1 and V2 respectively.

Definition 5: Given a bi-partitioning P(V1, V2) of weighted hyper-graphHG(V, Eh), let vertex v belong to the partitioning V1. The gain of vertex v is the difference between the cut of original partitioning and the cut of new partitioning, denoted by gain(v), which results from moving vertex v from partitioning V1 to partitioning V2.

Definition 6: Given weighted hyper-graphHG(V, Eh) and balance constraint r, the mincut bi-partitioning problem seeks a solution P(V1, V2) that minimizes cut(P) subject to (1–r)S(V)/2≤S(V1), S(V2)≤(1+r)S(V)/2. A bi-partitioning is bisection if r is as small as possible. The task of minimizing cut(P) can be considered as the objective, and the requirement that solution P(V1, V2) will be of the same size can be considered as the constraint.

3 The Weighted Hypergraph Partitioning Algorithm based on the Multi-Level Method

With the development of weighted hypergraph partitioning algorithm, the scale of hypergraph partitioning problem continues to grow so far as to several millions of vertices, which leads to higher performance requirements for speed, accuracy, and partitioning capability. It is also difficult to compute the optimal partitioning directly in the original weighted hypergraph. A new class of hypergraph partitioning algorithms has been developed based on the multi-level paradigm. The multi-level hypergraph partitioning scheme consists of three phases, which includes the coarsening phase, initial partitioning phase, uncoarsening, and refinement phase.

Figure 1 illustrates the steps of the multi-level method of weighted hypergraph partitioning. During the coarsening phase, a sequence of successively coarser hypergraph is constructed by collapsing vertex and hyperedge until its size becomes smaller than a given threshold. The goal of the initial partitioning phase is to compute initial partitioning of the coarsest hypergraph so that the balancing constraint is satisfied, and the partitioning objective is optimized. The refinement phase is to project successively the partition of the coarser hypergraph back to the next-level finer hypergraph while applying an iterative refinement algorithm.

Figure 1: The Multi-Level Method of Weighted Hypergraph Partitioning.
Figure 1:

The Multi-Level Method of Weighted Hypergraph Partitioning.

3.1 The Coarsening Phase

In the coarsening phase, an input weighted hypergraph H0G(V0,E0h) is successively coarsened. The creation of coarse hypergraph Hi+1G from the hypergraph of the previous level HiG, consists of matching pairs of vertices of HiG(Vi,Eih) that are connected by an hyperedge, thus, obtaining a new hypergraph Hi+1G. By repeating the coarsening process, a hypergraph with fewer vertices is generated in each level until finally a coarsest hypergraph is built. The coarsening phase produces a sequence of hyper-graphs H1G,,HkG,,HlG, whose vertices are satisfied with |V1| >…>|Vk|>…|Vl|. The coarsening must stop when the number of vertices becomes less than a given threshold.

3.2 The Initial Partitioning Phase

In the initial partitioning phase, the move-based approaches [4, 8], geometric representations [18], combinatorial formulations [3], spectral method [9], cellular automata approaches [11] are applied to obtain the initial partition Pl of the coarsest weighted hypergraph HlG. The initial partition Pl is satisfied with the approximate same sum of the vertex weights of two subsets and the minimum of the sum of the hyperedge weights, which contain vertices in different subsets, respectively. According to the minimum of the hyper-edges and vertices of the coarsest weighted hypergraph, the quality of partitioning on the coarsest weighted hypergraph is better than the quality of partitioning on the original weighted hypergraph in the same computing time.

3.3 The Uncoarsening and Refinement Phase

In the uncoarsening and refinement phase, the initial partitioning Pl of the coarsest weighted hypergraph HlG(Vl,Elh) is projected to the finer weighted hypergraph Hl1G(Vl1,El1h), whose partition is Pl–1. By repeating the uncoarsening process, the partitioning Pk of finer hypergraph HkG(Vk,Ekh) is projected from the partitioning Pk+1 of the coarser hypergraph Hk+1G(Vk+1,Ek+1h) until the partitioning P0 of the original hypergraph H0G(V0,E0h) is projected. At the same time, the refinement algorithm selects two subsets of vertices VkA(VkAVk1) and VkB(VkBVk2) from the partitioning Pk(Vk1,Vk2), such that the cut of the refined partitioning Pk((Vk1VkA)VkB,(Vk2VkB)VkA) is smaller than the cut of the partitioning Pk.

4 The Multi-Level Discrete Particle Swarm Optimization Refinement Algorithm

In the uncoarsening and refinement phase, the FM [7], 1-FM [7], EE-FM [7], LIFO-FM [L. Hagen et al.(1997)], FIFO-FM [5], and other FM class algorithms, the move-based approaches, are used to refine the partitioning of each level finer hypergraph. The FM algorithm adopts the gain of moving vertex as the heuristic information to search locally based on the hill-climbing method [7]. The 1-FM algorithm is added with the constraint based on the FM algorithm in which the vertex is only moved toward one way [7]. The EE-FM algorithm, the modified FM algorithm, stops the local search early when the cut of partitioning is not improved within the latest vertex migration [7]. The original FM algorithm uses a linked list of each bucket to store the gain of adjacent vertices. The Last-In-First-Out (LIFO) FM may infer that vertices are probably removed and inserted at the head of the list in which the bucket organization corresponds to a LIFO stack [5]. On the other hand, the First-In-First-Out (FIFO) FM may infer that vertices are probably removed at the head of the list and inserted at the head of the list that the bucket organization corresponds to a FIFO stack [5].

According to the analysis of the search capability of the above FM algorithms, we found that the FM algorithm’s ability of escape local optimum is very limited because of the lack of the guiding principle. That is to say, the FM algorithm selects only a vertex with minimum cost to move the other side in accordance with the greedy principles as the partitioning is permitted temporarily to increase the cut and deviate from an exact bisection in a local optimal.

Furthermore, we propose the Multi-level Discrete Particle Swarm Optimization Refinement (MDPSOR), whose each particle’s position of the swarm can be considered as a corresponded partitioningP, and the solution space is |V|-dimensional. Naturally, the fitness function to be minimized is defined as cut(P). Suppose that the scale of swarm is N, then the position of the ith (i=1, 2,..., N) particle can be represented by an n-dimensional vector (|V|=n), Xi=(xi1,xi2,,xin)T, where xid (d=1, 2,..., n) denotes the dth dimension of the position vector Xi and represents the partitioning in which the corresponding vertex belongs to. The velocity of this particle can be represented by another n-dimensional vector, Yi=(yi1,yi2,,yin)T, where each yid represents the probability of the bit xid taking the value one. The best previously visited position of the ithparticle is denoted by Qi=(qi1,qi2,,qin)T. Defining δ as the index of the best particle in the swarm and the best previously visited position of the swarm is denoted by Qδ=(qδ1,qδ2,,qδn)T. During the refinement process of the uncoarsening phase, the algorithm projects successively each particle’s corresponded partitioning back to the next level finer hypergraph, and the degree of the particle’s freedom increases with the increase in |V|-dimension solution space. The algorithm also regards the gain of vertex as particle information for the heuristic search and successfully searches the solution space based on the intelligent behavior between individuals’ collaboration.

4.1 The Framework of the Multi-Level Method based on the Discrete Particle Swarm Optimization

Algorithm 1 illustrates the framework of multi-level method based on the discrete particle swarm optimization. It is the difference between algorithm 1 and section 3 that are the initial partitioning phase and the uncoarsening and refinement phase. (1) In the initial partitioning phase, we should initially input parameters for the first call of the MDPSOR algorithm, which includes the initial partitioning Pl of the coarsest weighted hypergraph HlG(Vl,Elh) at line 8, the initial position vector Xli of each particle at line 10, the best position vector Qli of each particle at line 11, the random velocity vector Yli of each particle at line 12. (2) In the uncoarsening and refinement phase, we can get the approximate global optimal partitioning Qkδ of particle swarm by running MDPSOR algorithm on the k level finer weighted hypergraph HkG(Vk,Ekh) at line 15. With the refinement of the uncoarsening phase, we should project successively the ith particle’s velocity vector Yki, position vector Xki and best position vector Qki at the k level back to Y(k1)i,X(k1)i, and Q(k1)i of the next level finer hypergraph for the next call of the MDPSOR algorithm at lines 18–20 separately. We also should project successively the approximate global optimal partitioning Qkδ of the particle swarm at the k level back to Q(k1)δ of the next level finer hypergraph at line 22. Finally, we can get the partitioning P0 of the original hypergraph H0G(V0,E0h), the approximate global optimal partitioning Q0δ of the particle swarm, by running MDPSOR algorithm on original weighted hypergraph H0G(V0,E0h) at line 25.

Algorithm 1:

The Multi-Level Method Based on the Discrete PSO.

Input: original hypergraph H0G(V0,E0h)
Output: the partitioning P0 of the H0G
01:Begin
02: k=0; HkG(Vk,Ekh)=H0G(V0,E0h);
03: Hk+1G(Vk+1,Ek+1h)=RM(HkG(Vk,Ekh));
04: While (|Vk+1|≥ψ) Do Begin
05:  k=k+1;
06:  Hk+1G(Vk+1,Ek+1h)=SHEM HkG(Vk,Ekh));
07: End While
08: Pk=GGGP(HkG)/Pl=PkHlG=HkG/
09: For i=1 ToNDo
10:  Xki=Pk;
11:  Qki=Xki;
12:  Yki=Uymax,+ymax;
13: End for
14: While (k≥1) Do Begin
15:  Qkδ=MDPSOR(HkG,Yk,Xk,Qk);
16:  /* Prepare for the next call of MDPSOR */;
17:  For i=1 ToNDO
18:   Project the ithparticle’s velocityYki to Y(k1)i;
19:   Project the ithparticle’s positionXki to X(k1)i;
20:   Project the ithparticle’s best positionQki to Q(k1)i;
21:  End For
22:   Project the swarm’s best positionQkδ to Q(k1)δ;
23:  k=k–1;
24: End While
25: P0=MDPSOR(H0G,Y0,X0,Q0);
26: End

4.2 The Multi-Level Discrete Particle Swarm Optimization Refinement Algorithm

Algorithm 2 presents the pseudo-code of the multi-level discrete particle swarm optimization refinement algorithm. The main structure of the MDPSOR algorithm consists of a nested loop. The first outer loop at line 2–22 detects the stopping condition whether the MDPSOR algorithm is run for a fixed number of iterations δ, and its loop control variable of the first outer loop is t. The loop control variable of the second level loop at line 3–20 is i, whose number of iterations is the size of the particle swarm N. The loop control variable of the third inner loop at lines 5–17 is d, whose number of iterations is the dimension of particle |Vk|.

Algorithm 2:

The Multi-Level Discrete PSO Refinement Algorithm.

Input:hypergraphHkG(Vk,Ekh),inertia weight, α, scale of swarmNcognitive parameter ϕ1,social parameter ϕ2balancing constraint β, maximum velocity ymax, the maximum cycles δ
Output: swarm’s best position Qkδ
01: Begin
02:  For t=1 To δ Do /* the first outer loop*/
03:   For i=1 To N Do /* the second level loop */
04:    Initial two-dimensional auxiliary array EDG[2][m]
05:    For d=1 To |Vk| Do /*the third inner loop-each vertex v in Vk */
06:     fast calculate the dthvertex’s gain;
07:     If the dthvertex’s gain >0 Do
08:      move the dthvertex to the other side;
09:     Else
10:      yidt+1=αyidt+ϕ1(qidtxidt)+ϕ2(qiδtxidt)
11:      yidt+1=sign(yidt+1)min(abs(yidt+1),ymax)
12:      xidt+1{1ifrandom(0, 1)<1.0/(1.0+exp(1.0yidt+1))0otherwise.
13:      If xidt+1xidt Do
14:       move the dthvertex to the other side;
15:      End If
16:     End If
17:    End For
18:    Apply the EE-FM algorithm to refine Xki
19:    Update the ithparticle’s best position Qki
20:   End For
21:  Update the swarm’s best position Qkδ
22:  End For
23: End

In the third inner loop, we calculate the dth vertex’s gain of the ith particle based on the fast calculation of vertex gain method described in section 5.2. If the gain is greater than zero, we should move the dth vertex to the other side of the partitioning at line 8. Otherwise, we should execute the velocity update equation and the position update equation at lines 10–15. First, we should update the dth vertex’s velocity yidt+1 of the ith particle based on the velocity update equation at line 10. Second, it is necessary to impose a maximum value ymax on velocity yidt+1. If the yidt+1 exceeded this threshold, it will be set equal to ymax at line 11. Third, we should update the dth vertex’s position xidt+1 of the ith particle based on the position update equation at line 12. If the dth vertex’s position xidt+1 of the ith particle has changed, we also should move the dth vertex of the ith particle to the other side of the partitioning at lines 13–15.

Each particle ’s positionXki also needs to update by moving probabilistically vertices and maybe violates the balancing constraintβ. Therefore, we choose repetitively the highest-gain vertex to move from the larger side and satisfy the balance constraint of Xki by using the EE-FM algorithm [7] and the fast calculation of partitioning cut method described at section 5.3 at line 18. It may be possible to improve the quality of Xki by using the local heuristic algorithm until the local optimum is reached. If the position vector Xki of the ith particle is better than the best position vector Qki of the ith particle in the second level loop, we should update the best position vector Qki to the position vector Xki at line 19. If the best position vector Qki of the ith particle is better than the global optimal position vector Qkδ of particle swarm in the first outer loop, we should update the global optimal position vector Qkδ to the best position vector Qki at line 21.

5 The Implementation and Space-Time Complexity Analysis of the MDPSOR Algorithm

5.1 The Improved Compressed Storage Format of Weighted Hypergraph

The data physical structure, as the physical storage of data logical structure, is data mapping storage in memory according to the requirement of response speed, processing time, modification time, storage space, and processing amount per unit time [14]. It is different that the time complexity and space complexity of the partitioning algorithm are based on the different data physical structure of the weighted hypergraph [10]. Therefore, we adopt the Improved Compressed Storage Format (ICSF). Figure 2 illustrates an example of weighted hypergraph and its improved compressed storage format. It is the main characteristic of ICSF that linked list has not been used for storage of hypergraph. Therefore, it can effectively avoid retrieving adjacency and complex maintenance. It also can effectively reduce the storage space and is easy to maintain.

Figure 2: An Example of Weighted Hypergraph and its Improved Compressed Storage Format.
Figure 2:

An Example of Weighted Hypergraph and its Improved Compressed Storage Format.

In the ICSF, the adjacency structure of a hypergraph with n vertices and m hyper-edges is represented using two arrays xadj and adjncy. The xadj array is of size n+1, whereas the adjncy array is of size 2m. Assuming that vertex numbering starts from 0 (C style), then the adjacency list of vertex i is stored in array adjncy starting at index xadj[i] and ending at (but not including) index xadj[i+1] (i.e. adjncy[xadj[i]] through and including adjncy[xadj[i+1]-1]). That is, for each vertex i, its adjacency list is stored in consecutive locations in the array adjncy, and the array xadj is used to point to where it begins and where it ends.

In the ICSF, the other two arrays are used to describe hyper-edges in the hypergraph. The first array, eptr, is of size m+1, and it is used to index the second array eind that stores the actual hyper-edges. Each hyperedge is stored as a sequence of the vertices that it spans, in consecutive locations in eind. Specifically, the jth hyperedge is stored starting at location eind[eptr[j]] up to (but not including) eind[eptr[j+1]] (i.e. eind[eptr[j]] through and including eind[eptr[j+1]]-1]). The weights of the vertices (if any) are stored in an additional array called vwgts, whose size is n. The weights of the hyper-edges (if any) are stored in an additional array called hewgts, whose size is m. Specifically, the weight of the ith vertex is stored at vwgts[i], the weight of the jth hyperedge is stored at hewgts[j].

Figure 2B illustrates the CSR format of the seven-vertex and eight-hyperedge hypergraph shown in Figure 2A. For example, the 6th vertex’s weight is stored at vwgts[6]=7, has f and h adjacency hyper-edges, whose corresponding weights are 4 and 1 and corresponding adjacency vertices are 7, 3 and 4.

5.2 The Fast Calculation of Vertex Gain

The time complexity analysis of the multi-level discrete particle swarm optimization refinement algorithm indicates that the operation of the highest frequency is the calculation of vertex gain. That is to say, the calculation of vertex gain dictates the time complexity of the whole MDPSOR algorithm.

According to the definition of vertex gain based on definition 5, the simple calculation of vertex gain includes the following steps:

  • Initialize the value of gain as zero.

  • Read the adjacency hyper-edges list from the adjncy[xadj[i]] to adjncy[xadj[i+1]-1], according to the starting index xadj[i] and ending index xadj[i+1] of the vertex adjacency hyper-edges.

  • Read the weight of the adjacency hyper-edges list from the hewgts[adjncy[xadj[i]]] to hewgts[adjncy [xadj[i+1]-1]].

  • Read the vertex information of the jth adjacency hyper-edge list from the eind[eptr[j]] to eind[eptr[j+1]]-1].

  • Calculate the gain of vertex according to the status of current vertex and all vertices of each adjacency hyperedge.

    1. If vertices of the adjacency hyperedge are located at the same partitioning, then the value of gain minus the weight of the adjacency hyperedge.

    2. If vertices of the adjacency hyperedge, which the current vertex are excepted, are located at the same partitioning, then the value of gain plus the weight of the adjacency hyperedge.

It is not too difficult to find that the simple calculation of vertex gain should traverse all vertices of all adjacency hyper-edges. In order to reduce the time complexity of vertex gain calculation, we introduce the two-dimensional auxiliary array EDG[2][m] for the fast calculation of vertex gain, which stores the vertices number of each hyperedge at V1 and V2 partitioning. The fast calculation of vertex gain includes the following steps:

  • Initialize:

    1. At line 4 of the pseudo-code of MDPSOR algorithm, the two-dimensional auxiliary array EDG[2][m] is initial to put zero.

    2. Read the vertex information of the each hyperedge from the eind[eptr[j]] to eind[eptr[j+1]]-1], Calculate the vertices number of each hyperedge at V1 and V2 based on the initial partitioning.

  • Update:

    1. At line 8 or 14 of the pseudo-code of MDPSOR algorithm, move the dth vertex to the other side (assume the original side is from, the new side is to).

    2. Traverse all adjacency hyper-edges eId of current vertex, the value of EDG[from][eId] minus 1 and the value of EDG[to][eId] plus 1.

  • Calculate:

    1. At line 6 of the pseudo-code of MDPSOR algorithm, fast calculate the dth vertex’s gain. Traverse all adjacency hyper-edges eId of current vertex, read the weight of the adjacency hyper-edges list from the hewgts[adjncy[xadj[i]]] to hewgts[adjncy [xadj[i+1]-1]].

      1. If EDG[from][eId] is equal to 1, the value of gain plus the weight of the eIdth hyperedge.

      2. If EDG[to][eId] is equal to 0, the value of gain minus the weight of the eIdth hyperedge.

5.3 The Fast Calculation of Partitioning Cut

The basic idea of partitioning cut calculation should traverse each hyperedge and determine whether each hyperedge is crossing-partitioning hyperedge based on the status of all vertices of current hyperedge. If the current hyperedge is crossing-partitioning hyperedge, the cut of partitioning is plus the weight of current hyperedge. However, the simple calculation of partitioning cut must traverse each vertex of the current hyperedge and determine the crossing-partitioning hyperedge whether all vertices of current hyperedge occupy at the V1 and V2 partitioning.

In order to reduce the time complexity of partitioning cut calculation and avoiding to traverse all vertices of each hyperedge, we proposed the judgment method of crossing-partitioning hyperedge based on the fast partitioning cut calculation. If the condition (EDG[from][eId]≧1) and (EDG[to]eId]≧1) are met, the current hyperedge is crossing-partitioning hyperedge, which satisfied with the vertices number of each hyperedge at the V1 and V2 partitioning is greater than or equal to 1.

5.4 The Time Complexity Analysis of Algorithm

Suppose the vertices number of the weighted hypergraph partitioning problem is n, the hyper-edge number is m, the maximum of adjacency hyperedge of any vertex is x (x<m), the maximum of vertices of any hyperedge is y (y<n), the scale of swarm is N, the maximum cycles is δ.

The main structure of the MDPSOR algorithm consists of a three-level nested loop. The cycle index of the first outer loop is δ, the cycle index of the second level loop is N×δ, the cycle index of the third inner loop is n×N×δ. The time complexity of the MDPSOR algorithm includes six parts:

  • Initialization of the two-dimensional auxiliary array EDG[2][m] of the second level loop:

    1. Traverse all vertices of each hyperedge and Calculate the vertices number of each hyperedge at the V1 and V2 partitioning.

    2. The time complexity is Θ (N×δ×m×y).

  • Calculation of the dthvertex’s gain of the ithparticle of the third inner loop:

    1. Traverse all adjacency hyper-edges of current vertex and Fast Calculate the gain of current vertex.

    2. The time complexity is Θ (n×N×δ×x).

  • Update of each particle’s velocity and position of the third inner loop:

    1. Calculate the velocity update equation and the position update equation of each particle.

    2. The time complexity is Θ (n×N×δ×2).

  • Execution of the EE-FM algorithm of the second level loop:

    1. In general, the EE-FM algorithm only refines the 1% vertices required by the FM algorithm. Moreover, the quality of the partitioning produced by the EE-FM algorithm are, in general, only slightly worse (if any) than those produced by the FM algorithm.

    2. The time complexity of the EE-FM algorithm can often be ignored in comparison to particle swarm optimization algorithm.

  • Update of each particle’s best position of the second level loop:

    1. Calculate the cut of each particle’s best position based on the fast calculation of partitioning cut.

    2. The time complexity is Θ (N×δ×m).

  • Update of the global optimal position of the first outer loop:

    1. If the best position vector Qki of the ith particle is better than the global optimal position vector Qkδ of the particle swarm, we should update the global optimal position vector Qkδ to the best position vector Qki.

    2. The time complexity is Θ (δ×1).

Regardless of the impact of the lower rank factors, the whole time complexity of the MDPSOR algorithm can be reduced as Θ (N×δ×m×y+n×N×δ×x).

5.5 The Space Complexity Analysis of Algorithm

Suppose the vertices number of the weighted hypergraph partitioning problem is n, the hyper-edges number is m, the sum of vertices number of each hyperedge is z, the scale of swarm is N.

The space complexity of the MDPSOR algorithm includes five parts:

  • the particle swarm:

    1. The velocity vector, the position vector, and the best position vector of each particle

    2. The space complexity is Ω (3×n×N).

  • the global array adjncy and eind:

    1. The size of adjncy and eind array is z

    2. The space complexity is Ω (2×z).

  • the global array hewgts and eptr:

    1. The size of hewgts and eptr array is m

    2. The space complexity is Ω (2×m).

  • the global array vwgts and xadj:

    1. The size of vwgts and xadj array is n

    2. The space complexity is Ω (2×n).

  • the two-dimensional auxiliary array EDG:

    1. The size of two-dimensional auxiliary array EDG[2][m] is 2×m

    2. The space complexity is Ω (2×m).

Therefore, the whole space complexity of the MDPSOR algorithm is Ω (3×n×N+4×m+2×n+2×z).

6 The Comparison and Analysis of the Partitioning Experiment of Weighted Hypergraph based on the ISPD98 Benchmark

6.1 ISPD98 Benchmark

In [1], Professor Alpert of IBM Austin Research Laboratory introduced the ISPD98 benchmark suite, which consists of 18 circuits and used for the researchers of academic and industrial to compare and validate electronic design automation algorithms. In our experiments, we use 18 weighted graphs and weighted hyper-graphs converted from the ISPD98 benchmark suite based on the pseudo-code of algorithm for converting ISPD98 netlist into weighted graphs [12] and weighted hyper-graphs [11] separately, which also converts the circuit netlist partitioning into the weighted graphs and weighted hyper-graphs partitioning. Table 1 presents the characteristics of 18 weighted graphs and weighted hyper-graphs of ISPD98 benchmark. The characteristics of 18 weighted graphs are ranging from 12752 to 210613 vertices and from 109183 to 2235716edges. The characteristics of 18 weighted hyper-graphs are ranging from 12752 to 210613 vertices and from 14111 to 201920hyper-edges.

Table 1:

The Characteristics of 18 Weighted Graphs and Weighted Hyper-Graphs of ISPD98 Benchmark.

BenchmarkCellsPadPinsModulesEdgesHyper-edges
ibm0112506246505661275210918314111
ibm0219342259811991960134340919584
ibm0322853283935732313620606927401
ibm04272202871058592750722042331970
ibm052814612011263082934734967628446
ibm06323321661281823249832130834826
ibm07456392871756394592637332848117
ibm08510232862048905130973255050513
ibm09531102852220885339547877760902
ibm10686857442975676942970796975196
ibm11701524062807867055850844281454
ibm12704396373177607107674837177240
ibm13837094903570758419974450099666
ibm141470885175468161476051125147152772
ibm151611873837158231615701751474186608
ibm161829805047788231834841923995190048
ibm171847527438600361854952235716189581
ibm182103412728196972106132221860201920

We implement the MDPSOR algorithm in ANSI C and integrate with the leading edge partitioner UMpack. In the evaluation of our algorithm, we must make sure that the results produced by our algorithm can be easily compared against those produced by the Metis and hMetis tools, which are state-of-the-art tools of multi-level method. We use the same balance constraint b and random seed in every comparison. The quality of bipartitioning (nparts=2) is evaluated by looking at two different quality measures, which are the minimum cut (MinCut) and the average cut (AveCut). To ensure the statistical significance of our experimental results, two measures are obtained in twenty (Nruns=20) runs whose random seed is different to each other. For all experiments, we use a 49–51 bipartitioning balance constraint by setting b to 0.02.

In the scheme choices of three phases offered by the multi-level method, we use the RM [6] and SHEM [6] combination strategy during the coarsening phase, the GGGP [7] algorithm during the initial partitioning phase that consistently finds smaller edge-cuts than other algorithms, the weighted graphs refinement algorithm based on the FM algorithm (Metis-FM-Graph), the weighted hyper-graphs refinement algorithm based on the FM algorithm (hMetis-FM-HyperGraph), and the weighted hyper-graphs refinement algorithm based on the MDPSOR algorithm (UMpack-MDPSOR-HyperGraph) during the refinement phase. These measures are sufficient to guarantee that our experimental evaluations are not biased in any way. Furthermore, we adopt the experimentally determined optimal set of parameter values for the MDPSOR algorithm, the scale of swarmN is 40, the maximum cyclesδ is 40, the inertia weightα is 1, the cognitive parameterϕ1 is 0.5, the social parameterϕ2 is 0.5.

Table 2 presents the min-cut bipartitioning results allowing up to 2% deviation from the exact bisection, which the Metis-FM-Graph algorithm result comes from paper [9] and the hMetis-FM-HyperGraph algorithm result comes from paper [10]. The comparison and analysis indicate that:

  • The cut of Metis-FM-Graph algorithm is greater than the cut of hMetis-FM-HyperGraph algorithm and UMpack-MDPSOR-HyperGraph algorithm. Compared with the weighted graphs, the weighted hyper-graphs provide more precise mathematical model for the circuit partitioning whose wire can connect with more than two circuits. That is to say, each hyperedge can connect with more than two vertices.

  • The cut of UMpack-MDPSOR-HyperGraph algorithm is superior to the cut of hMetis-FM-HyperGraph algorithm. According to “the global optimal partitioning of the coarsest weighted hypergraph might be the local optimal partitioning of the original weighted hypergraph” and “the global optimal partitioning of the coarser weighted hypergraph might be the local optimal partitioning of the finer weighted hypergraph,” the UMpack-MDPSOR-HyperGraph algorithm can improve the search capability of the refinement algorithm.

Table 2:

The Experiment Comparison of the Min-cut Bipartitioning Results with up to 2% Deviation from Exact Bisection among Metis-FM-Graph, hMetis-FM-HyperGraph, and UMpack-MDPSOR – HyperGraph.

BenchmarkMetis-GhMetis-HGMDPSOR-HG
MinCutAveCutMinCutAveCutMinCutAveCut
ibm015171091469602235241
ibm02426811076421477338344
ibm031019012353133820809621088
ibm04227357168941969635794
ibm05120931505812319355220242801
ibm0674081358689217928291114
ibm073219414099518409211259
ibm0811980381801492271312751427
ibm092888477217003029667730
ibm1010066177471788280616821822
ibm1124525095148238339451168
ibm1212911276913582592933183693
ibm136395134691551228711791642
ibm148142129032657694224133275
ibm1522525461876020969731753594
ibm1611534221562533542524262977
ibm1716146262023208589827623169
ibm1815470200182076342018532354

7 Conclusion

According to the weighted hyper-graph partitioning problem, we propose the multi-level discrete particle swarm optimization refinement algorithm based on the swarm intelligence, whose each particle’s position in |V|-dimensional can be considered as the corresponded partitioning. That is to say, the particle’s position in each dimensional represents the partitioning in which the corresponding vertex belongs to. During the refinement process of the uncoarsening phase, the algorithm projects successively each particle’s corresponded partitioning back to the next level finer hypergraph, and the degree of the particle’s freedom increases with the increase of solution space’s |V|-dimension. The algorithm also regards the gain of vertex as particle information for the heuristic search and successfully searches the solution space based on the intelligent behavior between the individuals’ collaboration. Furthermore, the time complexity analysis of the MDPSOR algorithm indicates that the operation of the highest frequency is the calculation of vertex gain in iteration process. Therefore, the two-dimensional auxiliary array is designed for storing the vertices number of each hypergraph in different partitions. The rapid method of calculating the vertex’s gain and the cut’s size are proposed to avoid traversing each vertex of hyperedge and reduce the algorithm’s time complexity and space complexity. Our experimental evaluations on 18 different circuits of ISPD98 benchmark show that the MDPSOR algorithm not only can find the better partitioning of weighted hypergraph than the move-based method but also can improve the search capability of the refinement algorithm.

About the authors

Ming Leng

Ming Leng is connected with the Key Laboratory of Watershed Ecology and Geographical Environment Monitoring of NASG, Jinggangshan University. Ming Leng was born in 1975. He received his BS from the HeFei University of Technology in 1996, MS and PhD from ShangHai University in 2003 and 2008, and then became a professor in the Jinggangshan University in 2015. His main research interest is in Design and analysis of algorithm in VLSI design automation, Integrated circuit design automation theory, China.

Ling-yu Sun

Ling-yu Sun is connected with the Key Laboratory of Watershed Ecology and Geographical Environment Monitoring of NASG, Jinggangshan University. Ling-yu Sun was born in 1976. She received her BS from Nanchang HangKong University in 2000, MS from JiangXi Normal University in 2005, and then became a professor in Jinggangshan University in 2014. Her main research interest is in Design and analysis of algorithm in VLSI design automation, Cloud Computing, China.

Kai-qiang Guo

Kai-qiang Guo is connected with the Key Laboratory of Watershed Ecology and Geographical Environment Monitoring of NASG, Jinggangshan University. Kai-qiang Guo was born in 1982. He received his BS from the Southwest Jiaotong University in 2003 and MS from Monash University of Australia in 2006. He is a PhD candidate in Tongji University. His research interests lie at Design and analysis of algorithm in VLSI design automation, Cloud Computing and Business Intelligence, China.

Acknowledgments

The authors would like to thank professor Karypis in the University of Minnesota for supplying the source code of MeTiS. The authors also would like to thank Alpert in IBM Austin Research Laboratory for supplying the ISPD98 benchmark suite. This work was supported by the National Natural Science Foundation of China under Grant No. 61363014, 61163062, Young Scientist Training Program of Jiangxi under Grant No. 20153BCB23003, Key Technology Research and Development Program of Jiangxi under Grant No. 20132BBE50048, Natural Science Foundation of Jiangxi under Grant No. 20132BAB201035, Key laboratory of watershed ecology and geographical environment monitoring of NASG under Grant No. WE2015012.

Bibliography

[1] C. J. Alpert, The ISPD98 Circuit Benchmark Suite, in: Proceedings of ACM International Symposium of Physical Design, pp. 80–85, ACM Press, New York, USA, 1998.10.1145/274535.274546Search in Google Scholar

[2] C. J. Alpert and A. B. Kahng, Recent directions in netlist partitioning, integration. VLSI J.19 (1995), 1–81.10.1016/0167-9260(95)00008-4Search in Google Scholar

[3] J. Dongarra, G. Fox and K. Kennedy, Sourcebook of parallel computering, Morgan Kaufmann Publishers, San Francisco, 2003.Search in Google Scholar

[4] C. Fiduccia and R. Mattheyses, A linear-time heuristics for improving network partitions, in: Proceedings of the 19th Design Automation Conference, pp. 175–181, IEEE Computer Society Press, Los Alamitos, USA, 1982.10.1109/DAC.1982.1585498Search in Google Scholar

[5] L. Hagen, D. Huang and A. Kahng, On implementation choices for iterative improvement partitioning algorithms, IEEE Trans. Comput.-Aided Design Integr. Circuits Syst.16 (1997), 1199–1205.10.1109/EURDAC.1995.527400Search in Google Scholar

[6] G. Karypis, R. Aggarwal and V. Kumar, Multilevel hypergraph partitioning: applications in VLSI domain, in: Proceedings of 34th Design Automation Conference, pp. 271–283, ACM Press, New York, USA, 1998.10.1145/266021.266273Search in Google Scholar

[7] G. Karypis, R. Aggarwal and V. Kumar, Multilevel hypergraph partitioning: applications in VLSI domain, IEEE Transactions on VLSI Syst.7 (1999), 69–79.10.1145/266021.266273Search in Google Scholar

[8] B.W. Kernighan and S. Lin, An efficient heuristic procedure for partitioning graphs, Bell Syst. Tech. J49 (1970), 291–307.10.1002/j.1538-7305.1970.tb01770.xSearch in Google Scholar

[9] M. Leng, L.Y. Sun and S.N. Yu, Spectral-based weighted undirected graph partitioning algorithm, Appl. Res. Comput.26 (2009), 2086–2089 (in Chinese).Search in Google Scholar

[10] M. Leng, L.Y. Sun, J.N. Bian, Y.C. Ma and P. Zhu, Research on cellular automata model of hypergraph partitioning problem and its algorithm, Comput. Eng.38 (2012), 23–27 (in Chinese).Search in Google Scholar

[11] M. Leng, L.Y. Sun, K.Q. Guo and P. Zhu, An effective converter to translate VLSI design into weighted hypergraph, Microelectron. Comput.29 (2012), 7–13 (in Chinese).Search in Google Scholar

[12] M. Leng, L.Y. Sun, P. Zhu, J.N. Bian and Y.C. Ma, Comparative experiment of the core property of weighted hypergraph based on the various matching strategies, Comput. Eng.39 (2013), 85–90 (in Chinese).Search in Google Scholar

[13] T. Lengauer, Combinatorial algorithms for integrated circuit layout, John Wiley and Sons Co, New York, 1990.10.1007/978-3-322-92106-2Search in Google Scholar

[14] E. Montagn and A. Ekambaram, An optimal storage format for sparse matrices, Inf. Process Lett.90 (2004), 87–92.10.1016/j.ipl.2004.01.014Search in Google Scholar

[15] G.F. Nan, Research on algorithm solving key problem in VLSI physical design, Ph.D. Dissertation, Tianjing University, 2004 (in Chinese).Search in Google Scholar

[16] F. Pellegrini, Scotch 5.1 Userąŕs guide. Technical report, LaBRI, University Bordeaux I, August 2008. Available from http://www.labri.fr/pelegrin/scotch/.Search in Google Scholar

[17] F. Pellegrini and J. Roman, Scotch: A software package for static mapping by dual recursive bipartitioning of process and architecture graphs, in: Proceedings of the HPCN’96, pp. 493–498, LNCS 1067, Brussels, 1996.10.1007/3-540-61142-8_588Search in Google Scholar

[18] J. Pilkington, Partitioning with space filling curves, Ph.D. Dissertation, University of California, 1994.Search in Google Scholar

[19] H. L. Shi, Research on job scheduling on cloud computing, Ph.D. Dissertation, Nanjing University of Science and Technology, 2012 (in Chinese).Search in Google Scholar

[20] R. Soufiane, Hypergraph cuts and unsupervised representation for image segmentation, Fundam. Inform.96 (2009), 153–179.10.3233/FI-2009-172Search in Google Scholar

Received: 2015-6-2
Published Online: 2016-4-19
Published in Print: 2017-7-26

©2017 Walter de Gruyter GmbH, Berlin/Boston

This article is distributed under the terms of the Creative Commons Attribution Non-Commercial License, which permits unrestricted non-commercial use, distribution, and reproduction in any medium, provided the original work is properly cited.

Downloaded on 19.9.2025 from https://www.degruyterbrill.com/document/doi/10.1515/jisys-2015-0058/html
Scroll to top button