Abstract

The Set Covering Problem consists in finding a subset of columns in a zero-one matrix such that they cover all the rows of the matrix at a minimum cost. To solve the Set Covering Problem we use a metaheuristic called Binary Cat Swarm Optimization. This metaheuristic is a recent swarm metaheuristic technique based on the cat behavior. Domestic cats show the ability to hunt and are curious about moving objects. Based on this, the cats have two modes of behavior: seeking mode and tracing mode. We are the first ones to use this metaheuristic to solve this problem; our algorithm solves a set of 65 Set Covering Problem instances from OR-Library.

1. Introduction

The Set Covering Problem (SCP) [13] is a classic problem that consists in finding a set of solutions which allow to cover a set of needs at the lowest cost possible. There are many applications of these kinds of problems; the main ones are location of services, files selection in a data bank, simplification of boolean expressions, and balancing production lines, among others.

In the field of optimization, many algorithms have been developed to solve the SCP. Examples of these optimization algorithms include Genetic Algorithm (GA) [47], Ant Colony Optimization (ACO) [8, 9], and Particle Swarm Optimization (PSO) [1013]. In this work we use a Cat Swarm Optimization (CSO) algorithm to solve the SCP.

By simulating the behavior of cats, CSO can solve optimization problems. It has been analysed that cats spend most of their time resting when they are awake. While they rest, they move from their position carefully and slowly. This behavioral mode is the one called seeking mode. In the tracing mode, a cat moves according to its own speed for all dimensions. This search method will be discussed in detail later in this paper.

The CSO was originally developed for continuous valued spaces. But there exist a number of optimization problems, as the SCP, in which the values are not continuous numbers but rather discrete binary integers. Sharafi et al. introduced a discrete binary version of CSO for discrete optimization problems: Binary Cat Swarm Optimization (BCSO) [14]. BCSO is based on CSO algorithm proposed by Chu et al. in 2006 [15]. The difference is that in BCSO the vector position consists of ones and zeros, instead of the real numbers of CSO.

In this paper we use a BCSO algorithm to solve the Set Covering Problem. Our proposal is tested in different instances of SCP.

To the best of our knowledge, this is the first work solving SCP with BCSO.

This paper is organized as follows. In Section 2, there is a brief description of what Set Covering Problem is. Section 3 is about what BCSO is and the explanation and algorithm of behaviors. In Section 4, there is an explanation of how BCSO was used for solving the SCP. Section 5 discusses an analysis and results table. Finally, Section 6 is the conclusions.

2. Set Covering Problem

The SCP [1618] can be formally defined as follows. Let be an -row, -column, zero-one matrix. We say that a column can cover a row if . Each column is associated with a nonnegative real cost . Let and be the row set and column set, respectively. The SCP calls for a minimum cost subset such that each row is covered by at least one column . A mathematical model for the SCP is

The objective is to minimize the sum of the costs of the selected columns, where if column is in the solution, otherwise. The constraints ensure that each row is covered by at least one column.

The SCP has been applied to many real world problems such as crew scheduling [1921], location of emergency facilities [22, 23], production planning in industry [2426], vehicle routing [27, 28], ship scheduling [29, 30], network attack or defense [31], assembly line balancing [32, 33], traffic assignment in satellite communication systems [34, 35], simplifying boolean expressions [36], the calculation of bounds in integer programs [37], information retrieval [38], political districting [39], stock cutting, crew scheduling problems in airlines [40], and other important real life situations. Because it has wide applicability, we deposit our interest in solving the SCP.

3. Binary Cat Swarm Optimization

Among the known felines, there are about thirty different species, for example, lion, tiger, leopard, and cat [41]. Though many have different living environments, cats share similar behavior patterns [42].

For wild cats, the hunting skill ensures their food supply and survival of their species [43]. Feral cats are groups with a mission to hunt for their food and are very wild feline colonies, with a range of 2–15 individuals [44].

Domestic cats also show the same ability to hunt and are curious about moving objects [4547]. Watching the cats, you would think that most of the time is spent resting, even when awake [48, 49]. In this state of alertness they do not leave; they may be listening or with wide eyes looking around [50]. Based on all these behaviors we formulate BCSO.

Binary Cat Swarm Optimization [14] is an optimization algorithm that imitates the natural behavior of cats [51, 52]. Cats have curiosity about objects in motion and have a great hunting ability. It might be thought that cats spend most of the time resting, but in fact they are constantly alert and moving slowly. This behavior corresponds to the seeking mode. Furthermore, when cats detect a prey, they spend lots of energy because of their fast movements. This behavior corresponds to the tracing mode. In BCSO, these two behaviors are modeled mathematically to solve complex optimization problems.

In BCSO, the first decision is the number of cats needed for each iteration. Each cat, represented by , where , has its own position consisting of dimensions, which are composed by ones and zeros. Besides, they have speed for each dimension , a flag for indicating if the cat is on seeking mode or tracing mode, and finally a fitness value that is calculated based on the SCP. The BCSO keeps searching for the best solution until the end of iterations.

In BCSO the bits of the cat positions are if column is in the solution, 0 otherwise (1). Cat position represents the solution of the SCP and the constraint matrix ensures that each row is covered by at least one column.

Next the BCSO general Algorithm 1 and diagram (Figure 1) are described where MR is a percentage that determines the number of cats that undertake the seeking mode.

3.1. Seeking Mode

This submodel is used to model the situation of the cat, which is resting, looking around, and seeking the next position to move to. Seeking mode has essential factors: PMO (Probability of Mutation Operation); CDC (Counts of Dimensions to Change) which indicate how many of the dimensions varied; SMP (Seeking Memory Pool) which is used to define the size of seeking memory for each cat. SMP indicates the points explored by the cat; this parameter can be different for different cats.

Algorithm 1 (()). (1)Create cats;(2)initialize the cat positions randomly with values between 1 and 0;(3)initialize velocities and flag of every cat;(4)set some cats into seeking mode according to MR, and set the others into tracing mode;(5)evaluate the cats according to the fitness function;(6)keep the best cat which has the best fitness value into variable;(7)move the cats according to their flags; if is in seeking mode, apply the cat to the seeking mode process; otherwise apply it to the tracing mode process. The process steps are presented above;(8)repick number of cats and set them into tracing mode according to MR; then set the other cats into seeking mode;(9)check the termination condition; if satisfied, terminate the program, and otherwise repeat since step (5).

The following pseudocode and diagram (Figure 2) describe cat behavior seeking mode in which is the fitness of cat and for finding the minimum solution and for finding the maximum solution. To solve the SCP we use .

Step 1. Create SMP copies of .

Step 2. Based on CDC, update the position of each copy randomly according to PMO.

Step 3. Evaluate the fitness of all copies.

Step 4. Calculate the selecting probability of each copy according to

Step 5. Apply roulette wheel to the candidate points and select one.

Step 6. Replace the current position with the selected candidate.

3.2. Tracing Mode

Tracing mode is the submodel for modeling the case of the cat in tracing targets. In the tracing mode, cats are moving towards the best target. Once a cat goes into tracing mode, it moves according to its own velocities for each dimension. Every cat has two velocity vectors which are defined as and . is the probability of the bits of the cat to change to zero while is the probability that bits of cat change to one. The velocity vector changes its meaning to the probability of mutation in each dimension of a cat. The tracing mode action is described in the next steps and diagram (Figure 3).

Step 1. Calculate and where is the dimension of best cat, has random values in the interval of , and is a constant which is defined by the user:

Step 2. Update process of and is as follows, where is the inertia weight and is the column numbers:

Step 3. Calculate the velocity of , , according to

Step 4. Calculate the probability of mutation in each dimension; this is defined by parameter ; takes a value in the interval of :

Step 5. Based on the value of , the new value of each dimension of cat is updated as follows where is an aleatory variable :The maximum velocity vector of should be bounded to a value . If the value of becomes larger than , should be selected for velocity in the corresponding dimension.

4. Solving the Set Covering Problem

Next, the Solving SCP pseudocode is described.

Algorithm 2 (()). (1)Initialize parameters in cats;(2)initialize cat positions: randomly initialize cat positions with values between 0 and 1;(3)initialize all parameters of BCSO;(4)evaluate the fitness of the population. In this case the fitness function is equal to the objective function of the SCP;(5)change the position of the cat. A cat produces a modification in the position based on one of the behaviors, that is, seeking mode or tracing mode;(6)if solution is not feasible then it is repaired. Each row must be covered by at least one column; to choose the missing columns do the cost of a column/(number of not covered rows that can cover column );(7)eliminate the redundant columns. A redundant column is one that if removed the solution remains feasible;(8)memorize the best found solution. Increase the number of iterations;(9)stop the process and show the result if the completion criteria are met. Completion criteria used in this work are the number specified maximum of iterations. Otherwise, go to step (3).

5. Results

The BCSO performance was evaluated experimentally using 65 SCP test instances from the OR-Library of Beasley [53]. The optimization algorithm was coded in Java in NetBeans IDE 7.1 and executed on a computer with 2.53 GHz Intel Core i3 M380 CPU and 3.0 GB of RAM under Windows 7 Operating System.

In all experiments the BCSO was executed with 500 iterations and 30 times each instance. See Table 1 with the parameters of BCSO.

To select these parameters, the algorithm was executed 10 times, each one for the different population sizes of 1000, 100, 50, and 30 cats, keeping all other parameters constant. As the population size was decreased, the fitness value converges towards a minimum. The value of MR was varied while all other parameters are kept constant. The value 0.5 for MR was given best solutions. The value of SMP was varied between 1000, 500, 300, 100, and 20. All values gave the same result; for very large values good results were obtained in many iterations; small values of SMP to the same results were obtained in a few iterations. The values of and were tested with values between 0 and 1, and both showed no influence on the results; of 1 and of 1 are the reasonable choice of parameters.

Tables 3 and 4 show the results of the 65 instances. The column reports the optimal value or the best known solution for each instance. The , , and columns report the lowest cost, highest cost, and the average of the best solutions obtained in 30 runs, respectively. The quality of a solution is evaluated in terms of the percentage deviation relative (RPD) of the solutions reached and (which can be either the optimal or the best known objective value). was evaluated using and RPDavg was evaluated using . And finally the time (s) column reports the average computational time in seconds. Consider

Table 2 shows the average computation times of the SCP instances set. Our proposed algorithm in the most instances was solved in less time than ABC [54]. The difference of seconds between BCSO and ABC is as follows: in the NRE instance there is a difference of 25 seconds, in NRF it is of 261.3 seconds, and in the NRH it is of 332.3. Except for the A, C, and NRG instances, all other instances were solved in less time than the ABC. Therefore, the computation time of our algorithm is much better than the ABC algorithm.

6. Conclusions

In this paper we use a binary version of Cat Swarm Optimization to solve SCP using its column based representation (binary solutions). In binary discrete optimization problems the position vector is binary. This causes significant change in BCSO with respect to CSO with real numbers. In fact in BCSO in the seeking mode the slight change in the position takes place by introducing the mutation operation. The interpretation of velocity vector in tracing mode also changes to probability of change in each dimension of position of the cats. The proposed BCSO is implemented and tested using 65 SCP test instances from the OR-Library of Beasley. As can be seen from the results, metaheuristic performs well in most of cases. This paper has shown that the BCSO is a valid alternative to solve the SCP. The algorithm performs well regardless of the scale of the problem.

We believe that the differences in the computation times between BCSO and ABC are in our favor; this difference is very obvious in the big sets; in NRH the difference of seconds is of 332.3. Table 2 shows that our proposed algorithm is better than the artificial bee colony algorithm (ABC) with respect to computation time.

We can see the premature convergence problem, a typical problem in metaheuristics, which occurs when the cats quickly attain to dominate the population, constraining it to converge to a local optimum. For future works the objective will make them highly immune to be trapped in local optima and thus less vulnerable to premature convergence problem. Thus, we could propose an algorithm that shows improved results in terms of both computational time and quality of solution.

Conflict of Interests

The authors declare that there is no conflict of interests regarding the publication of this paper.

Acknowledgments

The author Broderick Crawford is supported by Grant CONICYT/FONDECYT/REGULAR/1140897, Ricardo Soto is supported by Grant CONICYT/FONDECYT/INICIACION/11130459, and Fernando Paredes is supported by Grant CONICYT/FONDECYT/REGULAR/1130455.