A Binary Cat Swarm Optimization Algorithm for the Non-Unicost Set Covering Problem

1Pontificia Universidad Católica de Valparaı́so, 2362807 Valparaı́so, Chile 2Universidad San Sebastián, 8420524 Santiago, Chile 3Universidad Central de Chile, 8370178 Santiago, Chile 4Universidad Autónoma de Chile, 7500138 Santiago, Chile 5Universidad Cientifica del Sur, Lima 18 Lima, Peru 6Universidad de Playa Ancha, 2360003 Valparaı́so, Chile 7Escuela de Ingenieŕıa Industrial, Universidad Diego Portales, 8370109 Santiago, Chile 8Universidad Técnica Federico Santa Maŕıa, 2390123 Valparaı́so, Chile 9Facultad de Ingenieŕıa, Universidad Santo Tomás, 2561694 Viña del Mar, Chile


Introduction
The Set Covering Problem (SCP) [1][2][3] 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.
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.

Set Covering Problem
The SCP [16][17][18] can be formally defined as follows.Let  = (  ) be an -row, -column, zero-one matrix.We say that a column  can cover a row if   = 1.Each column  is associated with a nonnegative real cost   .Let  = {1, . . ., } and  = {1, . . ., } 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 subject to The objective is to minimize the sum of the costs of the selected columns, where   = 1 if column  is in the solution, 0 otherwise.The constraints ensure that each row  is covered by at least one column.

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 [45][46][47].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 cat  , where  ∈ [1, ], 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   = 1 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.

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 (BCSO()).
(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)  The following pseudocode and diagram (Figure 2) describe cat behavior seeking mode in which   is the fitness of th cat and   =  max for finding the minimum solution and   =  min for finding the maximum solution.
To solve the SCP we use   =  max .
Step 1. Create SMP copies of cat  .
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.

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  1  and  0  . 0  is the probability of the bits of the cat to change to zero while  1   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  1   and  0  where  best, is the  dimension of best cat,  1 has random values in the interval of [0, 1], and  1 is a constant which is defined by the user: ( Step 2. Update process of  1  and  0  is as follows, where  is the inertia weight and  is the column numbers: Step 3. Calculate the velocity of cat  ,    , according to Make SMP copies of cat k Allow SMP copies to mutate based on PMO and CDC

Evaluate the fitness of all copies
Calculate the selecting probability of each candidate point according to Use roulette wheel to pick the point to move to from the candidate point Replace the current position with the selected candidate Step 4. Calculate the probability of mutation in each dimension; this is defined by parameter   ;   takes a value in the interval of [0, 1]: Step 5. Based on the value of   , the new value of each dimension of cat is updated as follows where rand is an aleatory variable ∈ [0, 1]: The maximum velocity vector of    should be bounded to a value  max .If the value of    becomes larger than  max ,  max should be selected for velocity in the corresponding dimension.

Solving the Set Covering Problem
Next, the Solving SCP pseudocode is described.

Algorithm 2 (𝑠𝑜𝑙V𝑖𝑛𝑔 SCP()).
(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).

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  1 were tested with values between 0 and 1, and both showed no influence on the results;  of 1 and  1 of 1 are the reasonable choice of parameters.
Tables 3 and 4 show the results of the 65 instances.The  opt column reports the optimal value or the best known solution for each instance.The  min ,  max , and  avg 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  opt (which 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.

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.

Table 2 :
Computation times of BCSO and ABC.

Table 3 :
Computational results on 65 instances of SCP: part 1.Instance  opt  min  max  avg RPD avg RPD min Time (s) the optimal or the best known objective value).RPD min was evaluated using   =  min and RPD avg was

Table 4 :
Computational results on 65 instances of SCP: part 2. Instance  opt  min  max  avg RPD avg RPD min Time (s)