Keywords

1 Introduction

Max-cut problem is a well-known NP-hard graph problem. For a graph \( G = (V,E) \), \( V = \{ 1,2, \ldots ,n\} \) is vertex set and \( E \) is the ordered set of undirected edges. Let \( w_{ij} \) be the weight associated with edge \( \{ i,j\} \in E \), then max-cut problem is to find an optimal partition \( (V_{1} ,V_{2} ) \) (\( V_{1} \cap V_{2} = \phi \), \( V_{1} \cup V_{2} = V \)), so that the total weights of the edges crossing different subsets is maximized, in other words, the objective function can be represented as:

$$ \sum\limits_{{i \in V_{1} ,j \in V_{2} }} {w_{ij} } = \sum\limits_{i < j} {w_{ij} \cdot \frac{{1 - x_{i} x_{j} }}{2}} $$
(1)

where \( x_{i} \in \left\{ {1, - 1} \right\}(i = 1,2, \cdots ,n) \), \( x_{i} = 1 \) represents \( x_{i} \in V_{1} \), as well as \( x_{i} = - 1 \) denotes \( x_{i} \in V_{2} \).

During the past years, many algorithms have been designed to solve it, including exact algorithm, approximate algorithm and heuristic algorithm [1, 2]. Heuristic algorithm [3,4,5] is an umbrella for all population-based stochastic optimization algorithm inspired by heuristic information [6], such as ant colony optimization [7, 8], fruit fly optimization [9], particle swarm optimization [10,11,12], artificial bee colony [13,14,15,16], social emotional optimisation algorithm [17], firefly algorithm [18,19,20,21,22] and bat algorithm [23,24,25].

For max-cut problem, Laguna et al. [26] designed a hybrid version of cross entropy method, while Lin [27] proposed a discrete dynamic convexized method. Festa et al. [28] investigated several heuristics derived from greedy randomized adaptive search procedure and variable neighborhood search. In 2007, Wang [29] proposed a hybrid algorithm combining with chaotic discrete Hopfield neural network and genetic particle swarm optimization, while in 2011, Wang [30] designed another combination with tabu Hopfield neural network and estimation of distribution algorithm. Inspired by this work, Lin [31] designed an integrated method combined with particle swarm optimization and estimation of distribution algorithm, and a local search strategy is employed to improve the accuracy. Shylo [32] also employed global equilibrium search algorithms and tabu search to improve the accuracy.

In this paper, we propose a new heuristic algorithm to combining the cuckoo search algorithm and local search strategy, and apply it to solve max-cut problem. The rest of this paper is organized as follows: In Sect. 2, the details of our proposed hybrid algorithm are presented, as well as the simulation results are reported in Sect. 3.

2 Hybrid Algorithm

2.1 Discrete Cuckoo Search Algorithm

Cuckoo search algorithm was proposed in 2009 [33], up to now, many variants are proposed to improve the performance [34,35,36]. However, max-cut problem is a combination problem, and a discrete cuckoo search algorithm is designed to solve it.

In this discrete version, the position movement will use the following strategies [37]:

Strategy 1:

$$ x_{ijk}^{m + 1} = \left\{ {\begin{array}{*{20}c} {x_{ijk}^{m} ,rand() \le Sig(Step)} \\ { - 1,other} \\ \end{array} } \right. $$
(2)

where

$$ Sig(Step) = 1/(1 + \exp ( - Step)) $$
(3)

Strategy 2:

$$ x_{ijk}^{m + 1} = \left\{ {\begin{array}{*{20}c} { - 1,rand() \le Sig(Step)} \\ {x_{ijk}^{m} ,other} \\ \end{array} } \right. $$
(4)

where

$$ Sig(Step) = 1 - 2/(1 + \exp ( - Step)) $$
(5)

Strategy 3:

$$ x_{ijk}^{m + 1} = \left\{ {\begin{array}{*{20}c} {1,rand() \le Sig(Step)} \\ {x_{ijk}^{m} ,other} \\ \end{array} } \right. $$
(6)

where

$$ Sig(Step) = 2/(1 + \exp ( - Step)) - 1 $$
(7)

The most difference among three strategy is the sigma function \( sig(step) \), and jump path \( step \) is a random number with Levy distribution, to provide a deep insight, the Eqs. (3), (5) and (7) are plotted in Figs. 1, 2 and 3.

Fig. 1.
figure 1

Illustration for Eq. (3)

Fig. 2.
figure 2

Illustration for Eq. (5)

Fig. 3.
figure 3

Illustration for Eq. (7)

Algorithm 1 is the pseudocode of our discrete cuckoo search algorithm, where \( p_{r} \) is the predefined factor, and \( P_{a} \) is the probability of being discovered by the host bird.

figure a

2.2 Local Search Strategy

For any partition \( (V_{1} ,V_{2} ) \), if the vertex \( j \) is moved from the current partition to another subset, the gain index \( g_{j} \) is defined as follows:

$$ g_{j} = \left\{ {\begin{array}{*{20}c} {\sum\limits_{{\left\{ {j,k} \right\} \in E,k \in V_{1} }} {w_{jk} - \sum\limits_{{\left\{ {j,k} \right\} \in E,k \in V_{2} }} {w_{jk} ,j \in V_{1} } } } \\ {\sum\limits_{{\left\{ {j,k} \right\} \in E,k \in V_{2} }} {w_{jk} - \sum\limits_{{\left\{ {j,k} \right\} \in E,k \in V_{1} }} {w_{jk} ,j \in V_{2} } } } \\ \end{array} } \right. $$
(8)

Gain \( g_{j} > 0 \) means the vertex \( j \) should be moved with a lower objective function. With this manner, the following local search strategy is introduced:

figure b

2.3 Proposed Hybrid Algorithm

Our modification is a hybrid meta-heuristic method combining a discrete cuckoo search algorithm and local search strategy. The discrete cuckoo search is employed to find the approximate satisfied solution, while the local optimal solution is used to further improve the performance for the obtained approximate satisfied solution. Furthermore, to avoid the premature convergence, a mutation strategy is also employed to avoid the premature convergence. The pseudocode of our hybrid algorithm is listed in Algorithm 3. For each cuckoo, the mutation operation will randomly take 0.1% vertices to flip. We find that the algorithm will be improved after adding the mutation operation.

figure c

3 Performance Evolution

To test the performance of our proposed hybrid algorithm, G-set graph benchmarks are employed, and compared with the following algorithms:

  • Hybridizing the cross-entropy method (HCE, in briefly) [26];

  • A new lagrangian net algorithm (LNA, in briefly) [38];

  • Discrete Hopfield network with estimation of distribution algorithm (DHNN-EDA, in briefly) [14]

  • Discrete cuckoo search with local search (DCSLS, in briefly)

The program is implemented with MATLAB. In this set of instances, the number of vertex range from 800 to 3000, the control factor \( p_{r} \) is 0.3, the probability \( p_{a} \) are both set to 0.5, the total generation is 500.

For chosen benchmarks, each instance will run 50 times, Table 1 provides the optimal value achieved by the three algorithms and our proposed algorithm. The last line noted as “w/t/l” is the comparison results between our proposed DCSLS and its competitors. “w/t/l” represents our algorithm wins in w functions, ties in t functions, and loses in l functions. It means DCSLS is better than HCE for six functions, while only worse than HCE for three functions. DCSLS are superior than DHNN-EDA and LNA for six functions too, while DHNN-EDA and LNA only better than DCSLS with two and three functions, respectively. In one word, DCSLS achieves the best performance when compared with HCE, DHNN-EDA and LNA.

Table 1. Comparison of the results

To provide a deep comparison, two non-parametric statistics tests: Friedman test and Wilcoxon test, are employed to show the differences among these four algorithms. In Table 2, the ranking value is: DCSLS < HCE < DHNN-EDA < LNA, DCSLS maintains the lowest ranking, it means the performance of DCSLS is more better. Table 3 implies there is significantly difference between DCSLS and DHNN-EDA.

Table 2. Friedman test
Table 3. Wilcoxon test

4 Conclusion

In this paper, a new hybrid algorithm combining with discrete cuckoo search and local search strategy is designed. The cuckoo update manner of discrete cuckoo search is the same as [37], while the local search strategy is designed. Simulation results show our modification achieves the best performance when compared with other three algorithms.