Keywords

1 Introduction

One of the most relevant integer programming tasks is partitioning, considered in combinatorial part of the graph theory. Modern VLSI contains tens of millions of transistors, so due to the limited possibilities of the computing resources (memory, speed) the entire scheme topology can not be designed. Normal scheme partitioning is implemented by grouping components into the blocks. The partitioning results in variety of blocks and interconnections between the blocks [1].

A hierarchical partitioning structure is applied to large schemes. By now most of the developed partitioning algorithms use graph or hypergraph as a scheme model. Graph partitioning procedure is part of a large number of algorithms solving various problems. Often, this procedure is implemented in iterative structures [2]. This requires high quality and time standards to the problem of finding the maximal matching.

Existing to date a greater number of partitioning algorithms provide acceptable results obtained when solving the problems of low and medium complexity [3]. The needs for the problems of large and very large dimension appear to be the motivation to research and develop new effective algorithms. Analysis of the literature shows that the most successful in these circumstances are the methods based on simulation of evolutionary processes [4].

2 Main Provisions

The partitioning of the hypergraph with the weighted vertices and edges is formulated the following way [5].

Let \( H = \left( {X,E} \right) \) be given a hypergraph, where X = {x i | i = 1, 2 ,…, n} is the set of vertices and E = {e j | e j ⊂ X, j = 1, 2, …, m} is a set of edges (each edge links a subset of vertices). Let Φ =  i | i = 1, 2, …, n} be given a set of vertice weights and Ψ =  i | i = 1, 2, …, n} be given a set of edge weights. It is necessary to form K - nodes, that is the set X divided into K non-empty and disjoint subsets X v , X v , X = ∪X v , (∀ i,j) [X i ∩ X j  = ∅], X v ≠∅ .

Restrictions are applied to the formed nodes. Vector P = {p v | v = 1, 2, …, k} defines maximal total weight of vertices assigned to node v, and vector N = {n v | v = 1, 2, …, k} designates maximal number of vertices assigned to node v.

The capacity restrictions are:

$$ \sum\nolimits_{i \in I} {\varphi_{i} \le p_{v} ,} I = \left\{ {\left. i \right|x_{i} \in X_{v} } \right\}, v = 1,2, \ldots ,k $$
(1)
$$ \left| {X_{v} } \right| \le n_{v} , v = 1,2, \ldots ,k $$
(2)

Equation (1) is a restriction on the maximal weight of the node, and the Eq. (2) - on the maximal number of vertices in the node [6].

Sometimes the number of outputs γ max for the nodes is given. The restriction takes the form of:

$$ \begin{array}{*{20}c} {\gamma_{v} \le \gamma_{max} , v = 1,2, \ldots ,k} \\ {\gamma_{v} = \left| {E_{v} } \right|, E_{v} = \left\{ {e_{j} |\left( {e_{j} \mathop \cap \nolimits X_{v} \ne \emptyset } \right)\& \left( {e_{j} \mathop \cap \nolimits X_{v} \ne e_{j} } \right)} \right\}} \\ \end{array} $$
(3)

E v is the set of edges connecting set of vertices X v with the vertices of the rest nodes.

The main criterion is F 1 that denotes the total cost of edges in the cut.

$$ F_{1} = \sum\nolimits_{j = J} {\varphi_{j} ,} \,J = \left\{ {j|e_{j} \in {\text{C}}} \right\} $$
(4)

C = {e j | (∀v) [e j ∩ X v ≠ e j ]} – the set of edges in the cut.

Second frequently used criterion is F 2 - the total number of outputs [7].

$$ F_{2} = \sum\nolimits_{v = 1}^{v} {\gamma_{v} } $$

The criterion F can be also used, it is an additive convolution of criteria F 1 and F 2 .

$$ F = k_{1} \cdot F_{1} + k_{2} \cdot F_{2} $$

Here is an example. Let G = (X, U) be given a graph, shown in Fig. 1.

Fig. 1.
figure 1

Initial partitioning of graph G

The task is to form three nodes. Considered legal number of vertices assigned to nodes is n 1  = 3, n 2  = 4, n 3  = 3. Initial partitioning X 1  = {x 1 , x 2, x 3 }, X 2  = {x 4 , x 10, x 7 , x 6 }, X 3  = {x 8 , x 5, x 9, } is given [8]. The number of connections between nodes set to 4. The state of object to be optimized is estimated by vector S = {s i | i = 1, 2, …, n}. The value s i appears to be the serial number of a vertice x i . Elements s i that satisfy 1  i  n i correspond to the first node X 1 . Elements s i that satisfy n 1  + 1  i  n 1  + n 2 correspond to the second node X 2 and so on. In our case, S н  = {x 1 , x 2, x 3, , x 4 , x 10, x 7 , x 6 , x 8 , x 5, x 9} [9].

Optimal partitioning of graph G, described by the vector S o  = {x 2 , x 3, x 5, , x 1 , x 4, x 7 , x 10 , x 6 , x 8, x 9 } is shown in Fig. 2

Fig. 2.
figure 2

Optimal partitioning of graph G

Each decision (each vector S) corresponds to adjacency matrix R which rows and columns are labeled with nodes of graph G in the same order as in corresponding vertices are located in S. Adjacency matrixes for vectors S н and S o are shown in Figs. 3 and 4. Since the adjacency matrix is symmetrical about the main diagonal, in the figures the top part of the matrix is not filled in and is not considered [10]. Thus, the rows and columns from 1 to n 1 are designated by serial numbers of vertices belonging to the first node, and the rows and columns from ((n 1  + n 2 +… + n i ) + 1) to ((n 1  + n 2  + … + n i ) + n i+1  + ni + 1) - belonging to (n i+1 ) node [11].

Fig. 3.
figure 3

Initial state of adjacency matrix

Fig. 4.
figure 4

Final state of adjacency matrix

Let the columns and rows of the matrix with the numbers from l to l + m are designated by elements belonging to the one X i node. Now we’ll consider area Q i of matrix R formed by the intersection of columns and rows with the numbers from l to (l + m) symmetrically about the main diagonal [12]. Elements of the range Q i of matrix R reflect the connections between the corresponding vertices of the node X i . The number h i of nonzero elements of the area Q i of matrix R equals the number of internal connections between the vertices of node X i .

The number F of non-zero elements of matrix R that do not belong to any range Q i equals the number of external connections between the nodes X i . Figures 3 and 4 show areas Q 1 , Q 2 , Q 3 formed respectively at the intersection of 1–3, 4–7 and 8–10 rows and columns of the adjacency matrix. Let NQ be the elements set of matrix R not belonging to any area Q i .

Suppose that we call NQ external relations range. For a matrix shown in Fig. 3 Q 1  = 2, Q 2  = 3, Q 3  = 1, F = 6, for matrix in Fig. 4 Q 1  = 3, Q 2  = 4, Q 3  = 3, F = 2. The graph partitioning into nodes is made for the purpose of minimization of the number of connections between the nodes [13]. The problem is form an area of external connections NQ with a minimal value F by means of rearranging rows and columns in the adjacency matrix of the graph [15].

3 Evolutionary Mechanisms to Form a Minimal Area of External Relations

Area of external relations NQ with the minimal value F in matrix R is formed within its evolutionary modifications. The evolutionary modification of the matrix R is carried out by means of selective group permutations of adjacent rows and columns. It provides a directional consistent movement of elements of the matrix R with nonzero values from the area of external relations NQ to areas Qi. Adaptive process consists of repeated steps, each of them is a transition from one solution (state of matrix R) to the best one [17].

At each step pairs of adjacent rows and columns (i, i + 1) are analyzed. The analysis is carried out in two strokes. In the first stroke all pairs (i, i + 1) where the first element i is an odd number are analyzed. In the second stroke all pairs where the first element i is even are analyzed.

For example, let n = 10, then in the first stroke pairs of rows and columns {(1,2), (3,4), (5,6), (7,8), (9,10)} are considered. In the second stroke pairs {(2,3), (4,5), (6,7), (8,9)} are considered.

Pairs of rows and columns are analyzed independently. According to the analysis the decision to interchange adjacent pair of rows and columns is made.

Local permutations goal is to move the non-zero elements of the matrix from bottom to up and from the right to the left. The global objective is to form an area of external connections NQ with the minimal value F, that is a partitioning of graph G with the minimal number of connections between the nodes [17].

The pair of rows and columns (l, l + 1) in n*n matrix \( R = \left| {\left| {r_{ij} } \right|} \right| \) is selected for analysis. And let the rows and columns intersect the area Q k , formed at the intersection of columns and rows with numbers from v to w. According to the following formulas parameters S 1, S 2 , S 3, S 4 are calculated.

$$ \begin{array}{*{20}c} {\sum\limits_{j = 1}^{v - 1} {r_{lj} } = S_{1} ;} & {\sum\limits_{j = 1}^{v - 1} {r_{l + 1,j} } = S_{2} .} \\ \end{array} $$
$$ \begin{array}{*{20}c} {\sum\limits_{i = w + 1}^{n} {r_{il} } = S_{3} ;\,\,\,\, \cdot } & {\sum\limits_{i = w + 1}^{n} {r_{i,l + 1} } = S_{4} .} \\ \end{array} $$

S 1 and S 2 are the sums of l-th and l + 1-th raws in matrix R, the elements do not belong to the area Q k .

S 3 and S 4 are the sums of l-th and l + 1-th columns in matrix R, the elements do not belong to the area Q k .

If a pair of raws (l, l + 1) in matrix R belong to two adjacent areas Q k and Q k+1 , the parameters S 1, S 2 , S 3, S 4 are calculated as follows:

$$ \begin{array}{*{20}c} {\sum\limits_{j = 1}^{l - 1} {r_{lj} } = S_{1} ;} & {\sum\limits_{j = 1}^{l - 1} {r_{l + 1,j} } = S_{2} } \\ \end{array} $$
$$ \begin{array}{*{20}c} {\sum\limits_{i = l + 2}^{n} {r_{il} } = s_{3} ;} & {\sum\limits_{i = l + 2}^{n} {r_{i,l + 1} } = S_{4} } \\ \end{array} $$

In this case, the sums S 1 and S 2, S 3 and S 4 include all the elements of l-th and (l + 1)-th rows, l-th and (l +1)th columns of the triangular matrix R, except element r l+1,l .

The main idea of the analysis is to determine the truth value of the 2 following conditions.

  1. 1.

    \( (S_{2} - S_{1} ) + \, (S_{3} - S_{4} ) > 0. \)

  2. 2.

    \( (S_{2} - S_{1} ) + \, (S_{3} - S_{4} ) = 0. \)

The answer is a qualified “yes”, that is - to rearrange, answer is generated if the condition 1 holds. In the case the condition 2 is satisfied the answer “yes” is generated with the a priori probability P. Answer “No” is generated in all the other cases [13].

Adaptive search procedure continues until there are pairs, for which conditions 1 and 2 hold. As a result, the area of external connections NQ with the minimal value F will be formed and the graph partitioning with the minimal number of connections between nodes will be defined [18].

Example.

Figure 1 shows graph G. Initial partitioning is given. The adjacency matrix of a graph G is shown in Fig. 3.

At the first step and first stroke pairs {(1,2), (3,4), (5,6), (7,8), (9,10)} are considered, at the second stroke - pairs {(2 3), (4,5), (6,7), (8,9)}. Pair of rows and columns is rearranged, if one of the above two conditions is fulfilled. In the initial matrix R columns and rows are labeled with serial numbers of vertices of the graph G. Swap of adjacent pair of rows and columns (i, i + 1) also leads to a rearrangement of its labels. Further rows and columns will be identified by its labels [19].

Step 1, stroke 1: (1.2) - yes; (3.4) - no; (10.7), yes; (6.8) - no; (9.5), yes. Thus, the rearrangement is carried out on pairs (1,2), (10,7), (9.5) at the 1st stroke of the 1st step. The modified matrix R shown in Fig. 5.

Fig. 5.
figure 5

Step 1, stroke 1

  • Step 1, stroke 2: (1.3) - yes; (8.5) - yes. The modified matrix is shown in Fig. 6.

    Fig. 6.
    figure 6

    Step 1, stroke 2

  • Step 2, stroke 1: (6.5) - yes. The modified matrix R is shown in Fig. 7.

    Fig. 7.
    figure 7

    Step 2, stroke 1

  • Step 2, stroke 2: (10.5) - yes. The modified matrix R is shown in Fig. 8.

    Fig. 8.
    figure 8

    Step 2, stroke 2

  • Step 3, stroke 1: (7.5) - yes. The modified matrix R is shown in Fig. 9.

    Fig. 9.
    figure 9

    Step 3, stroke 1

  • Step 3, stroke 2: (4.5) - yes. The modified matrix R is shown in Fig. 10.

    Fig. 10.
    figure 10

    Step 3, stroke 2

  • Step 4, stroke 1: (1.5) - yes. The modified matrix R is shown in Fig. 4.

  • Step 4, stroke 2: no permitted permutations.

After the four steps in the modified matrix the area of external relations NQ with a minimal value F = 2 is formed [20, 21].

To overcome the local barrier approaches based on a combination of different types of evolution are used.

The first approach uses the idea of annealing simulation method. In case the analysis shows that conditions 1,2,3 are not met, the rearrangement is performed with the probability P = exp(∆F/kT), where T denotes the temperature, ΔF - the difference in the sums of the analyzed raws.

The second approach uses one of the genetic search structures. The population appears to be the set of adjacent matrixes (encoded as chromosomes). Decoding, that is obtaining solutions, is carried out by the described above adaptive process.

Time complexity of adaptive procedures in one step is O(n). Comparison with the known algorithms has shown that the betters results are obtained in less time.

4 Conclusion

Due to the fact that the partitioning problem considered in the scope of combinatorial graph theory, is one of the most relevant integer programming tasks, an algorithm was developed to solve this problem.

It is known that a hierarchical partitioning structure is applied to large schemes.

To set partitioning problem hypergraph was used as a scheme model.

Graph partitioning procedure is part of a large number of algorithms to solve various problems. This procedure is quite often implemented in iterative structures as the high demands are made to the quality and the time to solve the problem of finding the maximal matching.

Paper shows as the state of the optimization object is estimated by vector S, which is associated with the adjacency matrix R.

The developed procedure has allowed to simplify the problem of graph partitioning into nodes with the minimal number of interconnections. The goal is to form the external connections area with the minimal criterion value F by means of rows and columns permutations in the adjacency matrix.

The evolutionary modification of the formation process of external connections with the minimal criterion value in the matrix R. The modification point is to permutate adjacent rows and columns of the matrix R, which provides a consistent directional movement of the elements within the matrix.

Implemented adaptive process consists of repeated steps, each of that is a transition from one solution to the better one and is performed in two strokes.

Experimental studies have been carried out to prove the high efficiency of the proposed evolutionary procedures.