Flowing Water Algorithm: A New Approach for Combinatorial Optimization Problems

: Being greatly inspired by the natural flowing regulation of water, we propose a new meta-heuristic algorithm — Flowing Water Algorithm (FWA) for the solution of combinatorial optimization problems (COPs). Since the solution space of COPs is multidimensional, complex and has many local extreme values, according to our proposed method, it appears to be similar to an endless hilly area with mountains, valleys and plateaus. The downward-flowing water in such area finds its way to the lowest point in the hill. Water always flows downward and eventually converges at the lowest place without any outside intervention except for gravity. Such a flowing course can be deemed as a process for the water to seek for the lowest point. The proposed algorithm is derived from such a water flow process. This algorithm combines a local search strategy with a population-based search strategy to improve both local and global search abilities. Four operators, including the local search, water overflow, drilling water tunnel and evaporation-rain are included in FWA, making this algorithm successfully perform tabu search, positive feedback, “survival of the fittest”, and local optimum escape. Two examples of its application in the traveling salesman problem (TSP) show that FWA outperforms the benchmark methods for both solution quality and convergence speed.


Introduction
Combinatorial optimization problems (COPs) are widely found in practical applications such as scheduling, routing, placement, investment, configuration, design and insurance. Extensive studies have been carried out to investigate the methods for solving COPs. The currently available methods can be simply classified into two categories: exact approaches and non-exact approaches [1]. The exact approaches, such as enumeration, branch and bound, branch and cut, and dynamic programming, seek optimal solutions through exact computations. However, many combinatorial optimization problems are often NP-hard, and their search space (i.e., the number of possible choices) is characterized by the "combination explosion" because of the increase in the problem size. Thus, the exact approaches cannot obtain the optimal solutions of the combinatorial optimization problems within polynomial time. In this case, non-exact approaches such as heuristic algorithms have been proposed to search for good solutions which are near-optimal within a reasonable computational time [2].
Heuristic algorithms are very popular approximate approaches used in practice. Heuristic algorithms cannot offer a convergence guarantee but can flexibly make use of the special properties of the search space to exploit the near-optimal solutions [2]. Inspired by the surrounding world (physics, nature, biology, etc.), researchers have proposed various intelligent heuristic algorithms [3], such as genetic algorithms (GA) [4], simulated annealing (SA) [5], Tabu search (TS) [6], ant colony optimization (ACO) [7] and particle swarm optimization (PSO) [8]. These techniques are widely applied to search for the satisfactory albeit not optimal solutions of combinatorial optimization problems within a limited time. Specifically, heuristic algorithms can be classified into two categories: tailored-heuristics and meta-heuristics. The standard tailored heuristics are designed to solve specific problems and tailored to fit the inherent characteristics of the problem at hand. Generally, tailored heuristics are regarded to have little value in other problems, so most researchers pay close attention to meta-heuristics which can be readily adapted for many types of problems. Meta-heuristics are designed to be sufficiently flexible to solve as many different combinatorial optimization problems as possible. The user only needs to change the neighborhood structures when applying the method to another problem domain. Many well-known meta-heuristic methods have demonstrated their usefulness and efficiency such as SA [9], TS [10], greedy search [11], GA [12], ACO [13], and PSO [14].
Local search and population search are used as the two basic principles in the development of meta-heuristics [15]. Local search methods, such as SA and TS, are directed to explore the neighborhood solution space intensively for new better feasible solutions. Population search methods, such as GAs, ACO algorithms and PSO, integrate "self-adaptation operation" with "co-operation", enabling the individuals to evolve through iterations according to certain rules. "Self-adaptation operation" denotes the individual's independent evolution path. "Co-operation" means that the individuals synergistically evolve by exchanging information with each other. To date, many meta-heuristic algorithms have been introduced in the literature based on different philosophies of intensification and diversification [16]. Though the abovementioned meta-heuristics algorithms for combinatorial optimization problems have their own advantages, they also have disadvantages. This has motivated the ongoing exploration of new, better algorithms.
Inspired by the phenomenon of flowing water in nature, we propose a new meta-heuristic algorithm -Flowing Water Algorithm (FWA) integrating two main principles: local search and population search. This algorithm integrates the advantages of the above algorithms.
The remainder of the paper is organized as follows. Section 2 gives a brief description of COPs, especially the traveling salesman problems (TSP). In section 3, this paper systematically presents the proposed FWA, including the insights from the natural flowing water phenomenon, FWA's characteristics and the detailed algorithm operation. In section 4, the advantages of FWA are demonstrated by its application to the TSP and the obtained results are compared to those obtained using some well-known meta-heuristic algorithms. Finally, conclusions are drawn in the last section of this paper.

Combinatorial Optimization Problem Description
Combinatorial optimization problems can be formulated as follows. Given a solution = , , ⋯ , , ( , , ⋯ , , ) as a permutation of set 1, 2, ⋯ , . Let be the space of the solutions and be the problem size. Furthermore, let be the optimality function that seeks the global optimal solution * , thus * = min ∈ . Obviously, the solutions structure and the optimality function depend on the characteristics of the specific combinatorial optimization problems.
Without the loss of generality, in this paper we study the Flowing Water Algorithm by using the example of the well-known TSP as the benchmark of the combinatorial optimization problems. TSP can be described as follows. Assume cities, = 1, 2, ⋯ , is used to construct a complete weighted undirected graph, i.e., = !, " . Therefore, ! = , , ⋯ , is called the set of cities of graph and " = #$ % & , ' ∈ 1, 2, ⋯ , , ≠ ' is called the edge-set of graph . Furthermore, the distances between every two cities and ' are already known and are denoted as ) % . It is required in TSP that the salesman should travel through all cities in the city set without any repetition by taking the shortest path among all feasible paths. Thus, the mathematical model of this problem is given as: where + % denotes whether the edge $ % is passed through. If yes, then it is marked as 1; if no, then it is marked as 0.  Being greatly inspired by the natural flowing regulation of water, we propose a new meta-heuristic algorithm -Flowing Water Algorithm (FWA) to obtain the near-optimal solutions of COPs. Since the solution space of COPs is multidimensional, complex and has many local extreme values, it appears to be similar to an endless hilly area with mountains, valleys and plateaus. The downward-flowing water in such area finds its way to the lowest point in the hill. Water always flows downward and eventually converges at the lowest place without any outside intervention except for gravity. Such a flowing course can be deemed as a process for the water to seek for the lowest point as shown in Figure 1. A water source from the initial position A flows through the anchor point positions (local minima) B, C and D, and eventually reaches the lowest point E. The proposed algorithm is derived from such a water flow process. The position points that the water flows through map the feasible solutions of COPs. Specifically, flowing water possesses the following characteristics:

Flowing Water Algorithm
Local search of flowing water. Water always flows downward and keeps searching for the next better or lower positions locally, which implies its nature of local search. Consequently, it always chooses the lowest and shortest possible path during its flow. Additionally, water possesses the characteristics of tabu search because it never flows inversely.
Overflowing of water. As shown in Figure 2, the flowing water stagnates at the locally good position A that it has just found. However, with the increase of the flow, the water level rises, and the water eventually overflows from an appropriate local suboptimal point B toward the global optimal point C. From the view of the optimization algorithms, such a feature of the flowing water reflects its ability to escape from the local minimum. Drilling water tunnel. When water flows downward to the next position, the lower the position is, the greater the kinetic energy converted from the gravitational potential energy of the water. In an extreme case, if the gravitational potential energy is sufficiently high, water can chronically wear away the boundary limits to form a water tunnel which directs the following water to an even lower position. In practice, people often lead water to a lower position by artificially drilling a water tunnel. Similarly, as shown in Figure 3, when the flowing water stagnates at a locally good position A, we can drill a water tunnel to divert its path to another position B which is closer to the global optimum position C. The above phenomenon provides inspiration for solving COPs by using a "drilling water tunnel" to artificially help the searching process to jump out of the local minimum and accelerate the convergence to the globally optimal solution.
Evaporation-rain. Competition is common in natural systems. Compared to the flowing water with the large water volume in the low position, the flowing water with a small water volume in the high position evaporates much more easily into vapor. Such water vapor usually rains randomly under certain conditions and thus some new flowing waters i.e. new positions (new positions denote new solutions) are generated. From the viewpoint of the optimization algorithms, evaporation shows the flowing water system's feature of "survival of the fittest" which eliminates the relatively bad solutions. Additionally, rain diversifies the flowing waters population (new solutions) and endows the system with the capability of searching for global optima.
Convergence of water flow. In nature, flowing water tends to continually select the lower paths locally and may continuously converge to larger rivers in lower positions during the flow process and eventually find its way into the sea. Therefore, the lower paths attract more flowing water and correspondingly the water volume in these paths is larger. In other words, the paths which have accumulated more water lead the directions of the following flowing water. The above phenomenon reflects the strong positive feedback mechanism of water volume which directs the flowing water to choose the lower (optimum) paths toward the lowest position with greater probability.

Proposed Algorithm
Inspired by the natural flowing water phenomenon, the Flowing Water Algorithm (FWA) for solving COPs is proposed. This analogy endows our algorithm with advantageous characteristics of strong global search and local search capabilities, tabu search, positive feedback and the ability to escape from local minima. In FWA, we develop artificial water as an optimization tool. Compared to the natural flowing water, the artificial water has three additional characteristics as described below: Countable. Each artificial water is a numerable and discrete "point" (its location denotes a solution of COPs) with some amount of flow volume which is inversely proportional to the altitude of the point.
Communication abilities. The individuals of the artificial waters population can exchange the information about the current global optimal point. Memory abilities. Each artificial water can remember the information about all the points it has flown through including the current global optimal point.
The simple paradigm of the FWA is displayed in Figure 4. Without the loss of generality, the detailed design and corresponding operation of the FWA are given as follows: A. Encoding In FWA, each position that the artificial waters flow through denotes a single feasible solution. Different COPs usually need different encoding patterns. Taking the TSP as an example, a feasible solution to the problem is a path by which a salesman can travel through all cities without any repetition and the encoding pattern is a permutation of the cities set ! = , , ⋯ , .

B. Initialization
We comprehensively adopt the stochastic rule and the heuristic rule to generate the flowing artificial waters population, i.e., the initial feasible solutions. The stochastic method generates a part of the feasible solutions population randomly without any rules, thus it guarantees the diversity and randomness of the solutions population. Meanwhile, the heuristic method generates the rest of the initial solutions population according to heuristic rules, guaranteeing the goodness of the solutions population. In nature, water always flows downward and chooses the shortest possible path during its flow. Therefore, the initialization stage adopts the drop-altitude rule that the lower and shorter paths are more probable to be chosen by the artificial waters.
C. Local search operator The local search capability of FWA enables the artificial water to constantly exploit the next better positions in their neighborhood. Each artificial water independently starts the local search at an initial feasible solution in its corresponding neighborhood of solutions obtained by making small changes. A better solution is found to replace the current solution. Moreover, artificial waters possess a memory ability which ensures that the previously visited solutions are not searched again. In this work, the local search proceeds by exchanging the positions of two codes within one-step (. = 1) distance in the encoding of a solution, as illustrated in Figure 5. For example, there exists a one-step (. = 1) distance between code a and code b in the encoding pattern and a new solution is obtained by swapping the positions of the two codes as shown in Figure 5. Generally, the local search operator is combined with the overflowing water operator. The detailed illustration of the use of the local search operator with the overflowing operation is given in Figure 6.
D. Overflowing operator Overflowing operator enables the artificial water to escape from the current local optima. It forces the local search to proceed by positioning the artificial water at a suboptimum solution position. The placement of artificial water at a suboptimum solution forces it to escape from the current position and proceed to the local search; this is called the overflowing operator. In the case of Figure 2, the artificial water becomes trapped in the local optima A. Overflowing operator forces it to overflow from a suboptimum solution B which is obtained by modifying the neighborhood of the current solution A. This may deteriorate the objective function value but can definitely enable the artificial water to jump out of the local minimum and to come closer to the global optima C. Specifically, the overflowing water operator has various tactics, and here we give one paradigm of the overflowing water operator for TSP, which is shown in step 4 of Figure 6.
E. Drilling water tunnel operator To enable the artificial waters escape from the local optima and speed up the convergence to the current global optimal solution, the FWA employs the drilling water tunnel operator. In this work, we propose the following strategy for the TSP problem. First, a local optimum search for a better solution is performed with a certain number of steps from the current position to the current global best position (global optima). Specifically, firstly a comparing point in the encoding scheme is chosen and the local optimum and global optimum are compared, and then the local optimum swaps another code with the comparing point to make the comparing point have the same value as the global optima. Taking the comparing point in Figure 7 as an example, code b in the encoding scheme of the original local optimal solution is different from code c in the encoding scheme of the current global optimal solution. Thus, in order to approach the current global optimal solution, code c and code b in the encoding scheme of the local optimal solution are swapped, generating a new solution.

Solution Generation
The feasible solutions of artificial waters in the initialization stage and the artificial rain stage are generated by successively choosing a series of fragment paths according to the drop-altitude rule and the positive feedback mechanism of water volume rule. The shorter paths at the same drop in altitude are chosen with higher probability by artificial waters. This demonstrates the principle of local optimization. Meanwhile, the larger the water volume of a path is, the more likely is this path to be selected by the artificial waters, which implies the positive feedback mechanism of the water volume and stronger cooperation among all flowing artificial waters. This demonstrates the global optimization principle. For TSP, at the /th iteration, the artificial water . from point selects path , ' as the next path to the point ' with the probability of 2 % 3 / given by where E 3 denotes the collection of nodes that the artificial water . can choose to move to in the next step. For TPS, E 3 consists of all unvisited nodes that are directly connected to node in figure = !, " . % K = 1 − % * is the path distance contribution parameter, and % * = @ % − minM % NA / @maxM % N − minM % NAdenotes the normalized distance % of path , ' . R % K / = 6R % / − min @R % / A< / 6max @R % / A − min @R % / A< is the water volume contribution parameter calculated as the normalized value of R % / ; and R % / denotes the water volume of path , ' in the /th iteration. S denotes the parameter that control the relative importance of the water volume.

Principle of Updating Water Volume
Simulating the natural convergence and evaporation regulation of flowing water, the FWA updates the water volume after each iteration. Specifically, after the /th iteration, the water volume R % / + 1 of path , ' is updated as where U ∈ 0, 1] denotes the evaporation ratio of the water volume.
After the iteration, the water volume of the artificial water . is denoted as 3 / and the corresponding altitude is denoted as ) 3 / . These are inversely correlated as described by where [ is a constant. After the /th iteration, the correspondingly water volume increment on any fragment path , ' flowed through by the artificial water . is identical to 3 / , so ΔR % 3 / = 3 / .

Computational Experiments
Our FWA is elaborately devised based on the natural regulation of flowing water and is characterized by strong global and local search capabilities, tabu search, positive feedback and the ability to escape from local premature. To demonstrate its utility and effectiveness, this section will show the examples of its application to two standard TSPs with test data sets Eil51 and CH130.
The standard TSP Eil51 has about fifty-one cities and to date, the best solution to this problem is known as 426. In our experiment, the parameters for this problem are set as below: the number of flowing artificial waters population = 100; the number of maximum iterations E! W?\ = 100 ; the evaporation proportion of the waters population $] 2 = 0.8; the probability of drilling water tunnels ]$ = 0.2 ; the weight of water volume S = 0.5; the evaporation ratio of water volume U = 0.1.
We ran FWA twenty times using the parameters specified above, and the best result is achieved as 428.9816 which is very close to the known best value of 426. Correspondingly, the best tour is (44,17,37,15,45,33,39,10,49,5,38,11,32,1,22,2,16,50,9,30,34,21,29,20,35,36,3,28,31,8,26,7,43,24,23,48,6,27,51,46,12,47,4,18,14,25,13,41,40,19,42), where the numbers represent the codes of the cities and their sequence reflects the travelling schedule. This tour can be observed in Figure 8 which gives the locations of all cities. Figure 9 illustrates the processes of the iterations and the lower line and the upper line respectively stand for the best tour length value and the average tour length value. Compared to the results obtained by SA, TS, GAs, ACO and PSO methods reported in the literature [17] that ran for the same times with the same number of maximum iterations as that in our experiment, it can be obviously seen from Table 1 that the results obtained by FWA are much closer to the already-known best solution to this problem than those of the other meta-heuristics algorithms. Furthermore, the FWA achieves these results using many fewer iterations. To evaluate the effectiveness of FWA in solving large-scale combinatorial optimization problems, this paper uses the standard TSP test data CH130 with approximately 130 cities which has the exact solution of 6110. In our experiment, the parameters for this problem are set as follows: the number of flowing waters population = 100; the number of maximum iterations E! W?\ = 500 ; the evaporation proportion of the waters population $] 2 = 0.8; the probability of drilling water tunnels ]$ = 0.2; the weight of water volume S = 0.5; the evaporation ratio of water volume U = 0.1.
We ran FWA twenty times using the parameters above, obtaining the best result of 6188.9484 which is very close to the exact solution of 6110. Correspondingly, the best tour is (39, 71, 50 Figure 10 which gives the locations of all cities. Figure 11 illustrates the processes of iterations and the lower line and the upper line, respectively, represent the best tour length value and the average tour length value.
Compared to the results obtained using the SA, TS, GAs, ACO and PSO methods as reported in the literature [17], where the same times with the same number of maximum iterations were use as in our experiment, the results obtained by the FWA are much closer to the exact solution of 6110 than those obtained by the other meta-heuristics algorithms as shown in Table 2. Additionally, the FWA requires relatively fewer iterations.

Conclusion
This paper proposes the novel meta-heuristic algorithm, FWA, inspired by the natural phenomenon of flowing water, for the solution of COPs. FWA integrates four operators including the local search operator, overflowing operator, drilling water tunnel operator and evaporation-rain operator. It displays six search properties, including (i) combination of local search and population search, (ii) feature of tabu search strategy because water never flows inversely, (iii) ability of escaping from local convergence by using the overflowing water operator, (iv) acceleration of the convergence speed to the global optimum by using the drilling water tunnel operator; (v) ability to speed up the search for global optimal solutions with the evaporation-rain operator, which embodies the idea of "survival of the fittest" and diversifies the flowing waters population; (vi) allowing water volume positive feedback for a more efficient and effective search by the synergy of artificial waters. We adopt FWA for solving TSP and test its efficiency using two representative TSP cases. The results show that FWA outperforms the benchmark meta-heuristic algorithms with respect to the quality of final solutions, number of iterations and convergence speed.
The research on the FWA in this paper is currently only in the preliminary stage, and many further studies should be carried out for the characteristics of this algorithm in the future, such as the astringency, theoretical basis, the sensitivity and the impact that the parameters have on the optimization. Given that the FWA displays its remarkable superiority in optimization of combinatorial optimization problems, it can be anticipated that this algorithm possesses broad prospects of application, requiring ongoing explorations and in-depth investigations in future studies.