1. Introduction
Given an undirected graph
, a dominating set (DS) is a subset of vertices
that each vertex in
is adjacent to at least one vertex in
S. For each vertex
, vertex
v must have a neigbor in
S, and this dominating set is called a total dominating set (TDS). We can easily conclude that TDS is a typical variant of DS. The minimum total dominating set (MTDS) problem aims to identify the minimum size of TDS in a given graph. MTDS has many applications in various fields, such as sensor and ad hoc communications and networks as well as gateway placement problems [
1,
2,
3].
MTDS is proven to be NP-hard (non-deterministic polynomial) [
4], which means unless P = NP, there is no polynomial time to solve this problem. At present, Zhu proposed a novel one-stage analysis for greedy algorithms [
5] with approximation ratio
where
is the maximum degree of the given graph. This algorithm also used a super-modular greedy potential function, which was a desirable property in mathematics. However, in real life and industrial production, the size of problems is always very large. When the size of problems is increased [
6,
7,
8,
9], the approximation algorithm will be invalid. Considering these circumstances, researchers often use heuristic algorithms [
10,
11,
12,
13] to deal with these problems. Although the heuristic algorithms cannot guarantee the optimality of the solution they obtain, they can find high-quality solutions effectively within a reasonable time. Thus, in this paper we propose a hybrid evolution method combining local search and genetic algorithm (HELG) to solve MTDS.
Evolutionary algorithms include genetic algorithm, genetic programming, evolution strategies and evolution programming, etc. Among them, genetic algorithm as a classical method is the most widely used. Genetic algorithm is a computational model to simulate the natural selection and genetic mechanism of Darwin’s biological evolution theory. It is a method to search the optimal solution by simulating the natural evolution process. Genetic algorithm begins with a population representing the potential solution set of the problem, and a population consists of a certain number of individuals encoded by genes. After the first generation of the population, according to the principle of survival of the fittest, the evolution of generations produces more and better approximate solutions. In each generation, the selection is based on the fitness of the individual in the problem domain. Individuals, by means of genetic operators of natural genetics, perform crossovers and mutations to produce populations representing new solution sets.
Recently, evolutionary algorithms play an important role in solving optimization problems. It is common to adjust evolutionary algorithm to solve problems by adding a different problem-related mechanism. One possible improvement is the hybrid of evolutionary method and local search algorithm. Przewozniczek et al. investigated the pros and cons of hybridization on the baseof a hard practical and up-to-date problem and then proposed an effective optimization method for solving the routing and spectrum allocation of multicast flows problem in elastic optical networks [
14]. Połap et al. proposed three proposition to increase the efficiency of classical meta-heuristic methods [
15]. In this paper, the proposed algorithm takes advantage of local search framework as well as genetic algorithm.
Firstly, the algorithm creates a population including several individuals as initial solutions in our algorithm. Then, for each initial solution, we prove its solution via the local search. After local search, a repair-based crossover operation is proposed to improve the searchability of the algorithm. The algorithm randomly selects two solutions in the population and randomly exchanges several vertices of them. After crossover, if the obtained solutions are infeasible, the algorithm will repair them. This operation enables the algorithm to search larger areas, resulting in obtaining more feaisble solutions. In addition, we use a scoring function to help the method choose vertices more effective. In detail, each vertex is assigned to a cost value, and then we calculate the scoring value of every vertex by the cost value. The scoring function is used to measure the benefits of the state changing of a vertex. Whenever the algorithm swaps a pair of vertices, we should try to increase the benefits of the candidate solution and reduce the loss. This scoring value makes our algorithm efficient. When the original HELG fails to find improved solutions, this heuristic can make the algorithm escape from the local optimal.
Based on the above strategies, we design a hybrid evolutionary algorithm HELG for MTDS. Since we are the first to solve MTDS with a heuristic algorithm, in order to evaluate the efficiency of HELG, we carry out some experiments to compare HELG with a greedy algorithm and a classical metaheuristics algorithm, the ant colony optimization (ACO) algorithm [
16,
17] for MTDS. The experimental results show that on most instances our algorithm performs much better than the greedy algorithm.
The remaining sections are arranged as follows: in
Section 2, we give some necessary notations and definitions. In
Section 3, we introduce the novel scoring heuristic. The evolution algorithm HELG for MTDS is described in
Section 4.
Section 5 gives the experimental evaluations and the experimental results analysis. Finally, we summarize this paper and list future work.
2. Preliminaries
Given an undirected graph with vertex set V and edge set E, each edge is a 2-element subset of V. For an edge , vertices u and v are the endpoints of e, and u is adjacent to v. The distance between u and v means the number of edges from the shortest path of u to v and is defined by . Then the ith level neighborhood of a vertex v is defined by . Specifically, . The of a vertex v is .
A set D of V is a dominating set if each vertex not in D is adjacent to at least one vertex in D. Total dominating set is a variant of dominating set. The definition of total dominating set is as follows.
Definition 1. (total dominating set) Given an undirected graph , a total dominating set (TDS) is a subset D of V that every vertex of G is adjacent to some vertices in D, whether it is in D or not.
The minimum total dominating set (MTDS) problem aims at identifying the TDS with the minimum size in a given graph.
3. Scoring Heuristic
In our algorithm, we need to maintain a total dominating set as a candidate solution during the construction and local search phases. It is important to decide which vertex should be added into or removed from . In this section, we will introduce an effective scoring heuristic that can be used to decide how to choose the vertices to be added and removed.
Given an undirected graph , a cost value denoted by is applied to each vertex , which will be maintained during the local search. For each vertex , is initialized as 1 in the construction phase. In the local search phase, if uncovers the vertex v, the value of will be increased by 1 such that these uncovered vertices will have more opportunities to be selected.
Based on the cost value described above, the vertex scoring method will be defined. We denote the scoring function as s, the scoring method is divided into two cases as follows:
. The value of is the total cost value of vertices which will become dominated by after adding vertex v into .
. The value of is the opposite number of the total cost value of vertices which will become not dominated by after removing vertex v from .
The vertex scoring method is used to measure the benefits of changing the state of v. Obviously, if , . Otherwise, . This method can decide how to choose the vertices to be added and removed.
4. Evolution Algorithm HELG for MTDS
In this section, we propose a hybrid evolutionary algorithm combining local search and genetic algorithm. The algorithm includes three important phases: generation of a population including n initial solutions, local search, and a repair-based crossover operation.
4.1. Population Initialization
We first generate a population including n initial solutions. We use a preprocessing method and the restricted candidate list (RCL) to initialize a population. In the process of preprocessing, based on the definition of MTDS, if the degree of a vertex is 1, its neighborhood will be added into and forbidden to be removed from during the search. A function is used to implement this process. For a vertex v, if , v will be forbidden to be removed from in the subsequent search. RCL contains the vertices with good benefits. The algorithm chooses vertices from RCL randomly to construct an initial candidate solution.
The pseudo code of construction phase is shown in Algorithm 1.
At first, the index k and population are initialized (line 1). Then the n individuals are created (lines 2–18). For each individual, the scoring function s of each vertex, the value of each vertex and the candidate solution are initialized (lines 3–5). Then, the algorithm starts the preprocessing process (lines 6–9). If the degree of a vertex corresponds to 1, the algorithm adds its neighborhood into . Then the value of them will be assigned to 1 which means that they will be forbidden to be removed from in the following phase. The algorithm then enters a loop to add vertices into until it becomes a TDS (lines 10–16). The maximum value and the minimum value of s are calculated in lines 11 and 12. The vertices whose scoring values are not less than comprise the RCL (line 13). Here, is a parameter that belongs to [0, 1]. Then we choose a vertex u from RCL randomly and add it into (lines 14–15). The scoring values of u and the 1st and 2nd level neighborhood are updated in line 16. Then the just created individual is added into the (line 17). Then, k is updated in line 18. In the end, we return the population (line 19).
Algorithm 1: create_population (n) |
|
4.2. Local Search Phase
Several candidate solutions are built in phase. The local search phase explores the neighborhood of the initial candidate solution to improve the solution quality and obtain a smaller one. If no better solution is found, the algorithm will return the current solution as a local optimum. Otherwise, the improved solution will be the new best candidate solution. This phase is executed iteratively.
The pseudo code of local search phase is shown in Algorithm 2.
At the beginning of the algorithm, the number of iterations k and the local optimal solution are initialized (line 1). Then the algorithm enters a loop until the maximum number of iterations is reached (line 2). In the search process, once a better solution is found, the algorithm updates by and removes a vertex with the highest s from (lines 3–9). The value of the selected vertex is forbidden to be 1. The number of iterations k is set to 0 (line 4). The scoring values of the just removed vertex and its 1st and 2nd level neighborhood are updated in line 8. Otherwise, the algorithm will remove a vertex v with the highest s and from , breaking ties randomly (line 9). The corresponding scoring values are updated in line 11. Subsequently, the algorithm selects a vertex with the highest score and adds it to (lines 12–13). After that, the cost value of each undominated vertex v and the scoring function of each are updated (lines 14–15). The step of iteration is increased by 1 (line 16). In the end, the algorithm returns as a local optimal solution.
Algorithm 2: LocalSearch (, ) |
|
4.3. Repair-Based Crossover Operation
Genetic algorithms often use crossover to increase the diversity of the algorithm. The central role of biological evolution in nature is the recombination of biological genes (plus mutations). Similarly, the central role of genetic algorithms is the crossover operator of genetic algorithm. The so-called crossover refers to the operation of replacing the partial structure of two parent individuals to generate a new individual. Through crossover, the searchability of genetic algorithm has been greatly improved.
In this paper, we propose a repair-based crossover operation. After local search, our algorithm obtains an improved population. We choose two solutions from the population randomly, and then exchange the vertices in the two solutions with probability 0.5.
Because of the particularity of MTDS, the obtained solutions after crossover may be infeasible. So we should repair the infeasible solutions and make them become total dominating sets. After crossover, we check if the obtained solutions are total dominating sets. If a solution is infeasible, we add some reasonable vertices through population initialization phase until it is feasible. Then we perform a redundancy remove operation. For the solution obtained by crossover, we remove a vertex and check whether the solution is feasible. If it is feasible, the vertex will be removed, and otherwise it will be added back. The redundancy remove operation performs iteratively until every vertex has been checked.
The solution obtained by the repair-based crossover operation will replace the two old solutions into the population.
4.4. The Framework of HELG
In this paper, we propose a hybrid evolutionary algorithm HELG that combines local search and genetic algorithm. The algorithm first generates a population including n initial solutions, and then applies local search to improve each solution. The obtained n solutions will perform crossover to produce new solutions. This algorithm will perform iteratively until time limit is satisfied.
The framework of HELG is shown in Algorithm 3 and described as below.
Algorithm 3: HELG(G) |
|
At first, the algorithm initializes the best solution and a population (lines 1–2). Then the algorithm performs a loop (lines 3–11). For each solution of , we use local search to improve the quality of solution and if is better than , is updated by (lines 4–7). For the obtained n solutions, we perform the repair-based crossover operation to generate new solutions (line 8). If the best solution among is better than , is updated by (lines 9–11) When the time limit is satisfied, the best solution is returned (line 12).
5. Experiments
In this section, we carry out a series of experiments to evaluate the efficiency of our algorithm. The experiments are carried out on a classical benchmark DIMACS (the Center for Discrete Mathematics and Theoretical Computer Science) [
18]. We select 61 instances in the DIMACS benchmark. The instances are from industry and generated by various models.
HELG is implemented in C++ and compiled by g++ with the -O3 option. We run the algorithm on a machine with Intel(R) Xeon(R) CPU E7-4830 @2.13Ghz and 4GB memory under Linux. For each instance, the HELG algorithm runs 30 times independently with different random seeds, until the time limit (100 s) is satisfied. HELG has three important parameters (i.e., n, and ). In the population creation phase, we set the RCL parameter and . In the local search phase, we set the maximum number of iterations .
Since we are the first to solve MTDS with a heuristic algorithm, in order to evaluate the efficiency of HELG, a greedy algorithm is as our control method which uses the same scoring heuristic. At first, the candidate solution
is empty. The greedy algorithm selects the vertex with the highest score value and adds it into
every time. When
becomes a TDS, the algorithm stops and returns
as the optimal solution. Another comparison algorithm we use is a classical metaheuristics algorithm, the ant colony optimization (ACO) algorithm [
16,
17], which uses the same initialization procedure with our algorithm. We use this algorithm as a comparison algorithm to evaluate the effectiveness of our algorithm. For each instance, the ACO also runs 30 times independently with different random seeds, until the time limit (100 s) is satisfied.
For each instance, is the minimum total dominating set found, is the average size of 10 solutions, and is the running time when the algorithm gets the minimum total dominating set. Because the greedy algorithm is only executed once for each instance, it has no average value and the time is less than 1. Better solutions and time are expressed in bold.
The experimental results are shown in
Table 1 and
Table 2. Compared with the greedy algorithm, HELG can obtain better minimum solutions in 52 instances. In the remaining 9 instances, HELG gets the same minimum solutions with the greedy algorithm. Compared with ACO, HELG can obtain better minimum solutions in 40 instances. In the remaining 21 instances, HELG gets the same minimum size with ACO. Among them, HELG gets better average values than ACO in 16 instances, and gets the same average value with ACO but performs faster in 5 instances. The DIMACS benchmark is divided into 10 groups. We choose 1 instance from every group. Every instance is run 30 times independently. The visualized comparisons of ACO and HELG can be seen by Kolmogorov-Smirnov test in
Figure 1, which shows the distribution of the total dominating set values. From these, we can observe that HELG performs much better than ACO and greedy algorithm.
To further illustrate the efficiency contribution of our algorithm, we show the time-to-target plot [
12,
19] in
Figure 2 to compare HELG with ACO on brock400_4 and its target 14. To obtain the plot, we performed 100 independent runs of each algorithm on brock400_4. The figure shows that the probabilities of finding a solution of the target value by HELG are approximately 30% and 70% in at most 13.78 and 33.43 s, respectively, whereas the probabilities of finding a solution of the target value by ACO are approximately 30% and 70% in at most 23.62 and 43.47 s respectively, considerably longer than HELG. From that, we can observe that the strategies we used in HELG are very effective.
The experimental results show that our algorithm performs much better than the comparison algorithms. This proves that the genetic algorithm and local search in our algorithm are both very effective.
6. Summary and Future Work
This paper proposes a hybrid evolutionary algorithm combining local search and genetic algorithm to solve MTDS. A scoring heuristic is used to improve the efficiency of the algorithm. In the population initialization phase, we create a population including several initial solutions. In the local search phase, the algorithm improves the initial solutions by adding and removing operations. After that, we propose a repair-based crossover operation to increase the diversity of our algorithm. A series of experiments are carried out to evaluate the algorithm. The experimental results show that HELG performs well in solving MTDS.
In the future, we would like to design more efficient evolutionary algorithms to solve MTDS. We would like to relax this problem, such as the found MTDS is missing the adjacency of one vertex. We will study evolutionary algorithms in more MDS-related problems, for example, the multi-objective MDS optimization problem.