A Multilevel Tabu Search for the Maximum Satisfiability Problem

The maximum satisfiability problem (MAX-SAT) refers to the task of finding a variable assignment that satisfies the maximum number of clauses (or the sum of weight of satisfied clauses) in a Boolean Formula. Most local search algorithms including tabu search rely on the 1-flip neighbourhood structure. In this work, we introduce a tabu search algorithm that makes use of the multilevel paradigm for solving MAX-SAT problems. The multilevel paradigm refers to the process of dividing large and difficult problems into smaller ones, which are hopefully much easier to solve, and then work backward towards the solution of the original problem, using a solution from a previous level as a starting solution at the next level. This process aims at looking at the search as a multilevel process operating in a coarse-to-fine strategy evolving from k-flip neighbourhood to 1-flip neighbourhood-based structure. Experimental results comparing the mul-tilevel tabu search against its single level variant are presented.


Introduction
The satisfiability problem which is known to be NPcomplete [1] plays a central role problem in many applications in the fields of VLSI Computer-Aided design, Computing Theory, and Artificial Intelligence.Generally, a SAT problem is defined as follows.A propositional formula x i n   , takes one of the two values, True or False.A clause, in turn, is a disjunction of literals and a literal is a variable or its negation.Each clause j C has the form:  and i x denotes the negation of i x .The task is to determine whether there exists an assignment of values to the variables under which evaluates to True.Such an assignment, if it exists, is called a satisfying assignment for , and is called satisfiable.Otherwise, is said to be unsatisfiable.Most SAT solvers use a Conjunctive Normal Form (CNF) representation of the formula .In CNF, the formula is represented as a conjunction of clauses, with each clause being a disjunction of literals.The maximum satisfiability problem which is the optimization variant of SAT plays a fundamental role to many practical problems in computer science.More formally, let i denote the weight of clause i .Then expression (1) is the objective function to be maximized, with equals to 1 when is true and 0 otherwise, There exist two important variations of the MAX-SAT problem.The weighted MAX-SAT problem is the Max-SAT problem in which each clause is assigned a positive weight.The goal of the problem is to maximize the sum of weights of satisfied clauses.The unweighted MAX-SAT problem is the MAX-SAT problem in which all the weights are equal to 1 and the goal is to maximize the number of satisfied clauses.Efficient methods that can solve large and hard instances of MAX-SAT are eagerly sought.Due to their combinatorial explosion nature, large and complex MAX-SAT problems are hard to solve using systematic algorithms based on branch and bound techniques [2].One way to overcome the combinatorial explosion is to give up completeness.Local search algorithms are techniques which use this strategy and gained popularity due to their conceptual simplicity and good performance.However, most local search algorithms including tabu search algorithm rely on the 1-flip neighbourhood structure for which two truth value assignments are neighbours if they differ in the truth value of exactly one variable.A typical local search starts with any given assignment, and then repeatedly changes (flips) the assignment of a variable that leads to the largest decrease in the total number of unsatisfied clauses.Some attempts have been made to extend to consider r-flip neighbourhood structure.The quality of solutions improves if larger neighbourhood is used; however the computational time to search such neighbourhood increases exponentially with r [3].The work proposed in [4] uses a multi-flip procedure to generate the next assignment based on simultaneously flipping the value of multiple variables.The approach was able to provide better results compared to 1-flip neighbourhood on problem instances with up to 150 variables.In this paper, a tabu search combined with the multilevel paradigm is introduced.The core of the proposed algorithm involves looking at the search as a multilevel process operating in a coarse-to-fine strategy evolving from a k-flip neighbourhood to 1-flip neighbourhood-based structure enabling tabu search to take long leaps in the search space.This work is motivated by the recent results presented in [5] where the multilevel paradigm was capable of improving the asymptotic convergence of memetic algorithms dramatically on large industrial instances.The question we intend to answer in this work is whether the multilevel paradigm improves the asymptotic convergence of TS.To this end, the focus is restricted to formulas in which all the weights are equal to 1 i.e. unweighted MAX-SAT) using a offset of industrial problem instances.
The paper is organized as follows: Section 2 provides a short survey of algorithms for MAX-SAT.Section 3 describes the TS algorithm implemented in this work.Section 4 introduces TS combined with the multilevel paradigm.Section 5 presents the experimental results while finally Section 6 provides a conclusion of the the papers with future work.

Related Work
The simplicity of MAX-SAT combined with its wide applicability made several researchers eager to develop efficient algorithms for solving large MAX-SAT problems.Stochastic Local search algorithms (SLS) are amongst the many different approaches proposed to deal with MAX-SAT.They are based on what is perhaps the oldest optimization method trial and error.Typically, they start with an initial assignment of values to variables randomly or heuristically generated.During each iteration, a new solution is selected from the neighbourhood of the current one by performing a move.Choosing a good neighbourhood and a method for searching it is usually guided by intuition, because very little theory is available as a guide.All the methods usually differ from each other on the criteria used to flip the chosen variable.One of the earliest local search for solving SAT is GSAT.The GSAT algorithm operates by changing a complete assignment of variables into one in which the maximum possible number of clauses are satisfied by changing the value of a single variable.Another widely used variant of GSAT is the WalkSAT based on a two stage selection mechanism originally introduced in [6].Other algorithms [7,8] have emerged using history-based variable selection strategy in order to avoid flipping the same variable.Numerous other methods have also such as Simulated Annealing [9], Evolutionary Algorithms [10] and Greedy Randomized Adaptive Search Procedures [11] have also been proposed.Lacking the theoretical guidelines while being stochastic in nature, the deployment of several SLS involves extensive experiments to find the optimal noise or walk probability settings.To avoid manual parameter tuning, new methods have been designed to automatically adapt parameter settings during the search [12,13] and results have shown their effectiveness for a wide range of problems.The work conducted in [14] introduced Learning Automata (LA) as a mechanism for enhancing SLS based SAT solvers, thus laying the foundation for novel LA-based SAT solvers.Finally, a new recent strategy based on an automatic procedure for integrating selected components from various existing solvers have been devised in order to build new efficient algorithms that draw the strengths of multiple algorithms [15,16].

Tabu Search
Tabu Search algorithm (TS) was proposed by Glover [17].The main feature of the algorithm is the ability to avoid returning in a previous state by keeping a trace of the optimization history.In this section, the tabu search algorithm used in this work is described in Algorithm 1. First, an initial solution of the problem is introduced (line 2).Then during each pass of the algorithm, given the current solution, one examines its corresponding neighbourhood and choose to move to the solution that most improves the objective function.At the end of each pass, the literal with the highest gain is selected (line 10) (randomly).To avoid getting stuck in a local minimum, historical information from the last k iterations is used.The value k may be fixed or a variable that depends on the search.The set of moves determined by this information forms a tabu list.Hence, the method has a short term memory remembering which trajectories have been recently explored.To prevent the method from cycling between the same solutions, one forbids the reverse of any move contained in the tabu list.The algorithm proceeds by choosing a random unsatisfied clause (line 5).Thereafter, a non tabu and unvisited literal is chosen randomly and flipped (lines 6, 7 and 8).The tabu list is updated be- fore the start of every new pass (line 11).The selected literal during each pass is inserted into the tabu list with a value k that will determine the number of iterations it will remain tabu.During each pass, the value k assigned to each tabu literal is decremented by 1.When the value k reaches the value 0, its corresponding literal becomes non tabu.
constructed from 0 by merging literals.The merging is computed using a randomized algorithm similar to [20].
The literals are visited in a random order.If a literal i has not been matched yet, then a randomly unmatched literal j l l is selected, and a new literal k l (a cluster) consisting of the two literals i and j l is created.Un- merged literals are simply copied to the next level.The new formed literals are used to define a new and smaller problem and recursively iterate the reduction process until the size of the problem reaches some desired threshold (lines 3,4 and 5 of Algorithm 2).This process is graphically illustrated in Figure 1 using an example with 12 literals.The coarsening phase uses two levels to coarsen the problem down to three clusters.0 corresponds to the original problem.The random coarsening procedure is used to merge randomly the literals in pairs leading to a coarser problem with 5 clusters.This process is repeated leading to the coarsest problem with 3 clusters.An initial solution is generated where the clusters are assigned randomly the value of true or false.The figure shows an initial solution where one cluster is assigned the value of true and the remaining two clusters are assigned the value false.Thereafter, the computed initial solution is then improved with WalkSAT.As soon as the convergence criteria is reached at 2 , the ucoarsen-ing phase takes the assignment reached at 2 and then extends it so that it serves as an initial assignment for the parent level 1 and then proceed with a new round of TS.This iteration process ends when TS rea-ches the stop criteria that is met at .

Multilevel Tabu Search
Multilevel techniques have already been introduced for a limited number of combinatorial optimization problems.They were first introduced when dealing with the graph partitioning problem (GCP) [18][19][20][21][22][23] and have proved to be effective in producing high quality solutions.The traveling salesman problem (TSP) was the second combinatorial optimization problem to which the multilevel technique was applied [24,25] and has shown a clear improvement in the asymptotic convergence of the solution quality.However, the results obtained when the multilevel paradigm was applied to the graph coloring problem [26] did not seem to be in line with the general trend observed in GCP and TSP as its ability to enhance the convergence behavior of the local search algorithms.
Graph drawing is another area where multilevel techniques gave a better global quality to the drawing and is suggested to both accelerate and enhance force drawing placement algorithms [27].A recent survey over existing multilevel techniques is given in [28,29].The implementation of the multilevel paradigm requires four basic components: a coarsening algorithm, an initialization algorithm, an extension algorithm (which takes the solution on one problem and extends it to the parent problem), and a refinement algorithm.This section describes all these components which are necessary to derive a tabu algorithm operating in a multilevel context.

Initial Solution
The reduction phase ceases when the problem size shrinks to a desired threshold.Initialization is then trivial and consists of generating an initial solution for the population of the problem m using a random procedure.The clusters of every individual in the population are assigned the value of true or false in a random manner (line 7 of Algorithm 2).

Reduction Phase
Let 0 (the subscript represents the level of problem scale) be the set of literals.The next coarser level is

Projection Phase
The Projection phase refers to the inverse process followed during the reduction phase.Having improved the assignment on

Improvement Phase
The idea behind the improvement phase is to use the projected assignment at 1 m Level  as the initial assigment for m for further refinement using TS described in Section 3.Even though the assignment at the 1 m

Level
Level  is at a local minimum, the projected assignment may not be at a local optimum with respect to m .The projected assignment is already a good solution leading WalkSAT to converge quicker to a better assignment (line 10 of Algorithm 2).

Test Suite & Parameter Settings
The performance of MLV-TS is evaluated against TS using a set of real industrial problems taken from SAT03 benchmark website (http://www.informatik.tu-darmstadt.de/AI/SATLIB).Due to the randomization nature of both algorithms, each problem instance was run 100 times with a cut-off parameter (max-time) set to 60 minutes.The symbols V and C denote respectively the number of variables and the number of clauses.
The tests were carried out on a DELL machine with 800 MHz CPU and 2 GB of memory.The code was written in C++ and compiled with the GNU C compiler version 4.6.The following parameters have been fixed experimentally and are listed below:  Stopping criteria for the reduction phase: The reduc-tion process stops as soon as the size of the coarsest problem reaches 100 variables (clusters). Convergence during the refinement phase: If there is no observable improvement of the function value during 1000 consecutive iterations, TS is assumed to have reached convergence and moves to a higher level. Tabu length: The length of tabu list is set to be equal to: 0.01875 × n + 2.8125 as proposed in [30] where n is the number of variable in the problem.Figures 2-4 show the development of the mean satisfied clause for both algorithms.Both algorithms start from nearly identical initial solutions.The plots show immediately the dramatic improvement obtained using the  MLV-TS uses the multilevel paradigm and draw its strength from coupling the refinement process across different levels.This paradigm offers two main advantages which enables TS to become much more powerful in the multilevel context.During the refinement phase, TS applies a local a transformation (i.e. a move) within the neighbourhood (i.e. the set of solutions that can be reached from the current one) of the current solution to gen-erate a new one.The coarsening process offers a better mechanism for performing diversification (i.e., the ability to visit many and different regions of the search space) and intensification (i.e., the ability to obtain high quality solutions within those regions).By allowing TS to view a cluster of variables as a single entity, the search becomes guided and restricted to only those configurations in the solution space in which the variables grouped within a cluster are assigned the same value.
As the size of the clusters varies from one level to another, the size of the neighbourhood becomes adaptive and allows the possibility of exploring different regions in the search space while intensifying the search by ex-ploiting the solutions from previous levels in order to reach better solutions.Tables 1 and 2 show the results of comparing MLV-TS against TS).The table shows that MLV-TS showed a better asymptotic convergence compared to TS in 32 cases out of 50 with an improvement lying within 9%.The cases where TS gave better results than MLV-TS, the difference in quality does not exceed 2%.Finally the plot depicted in Figure 5 shows the variations in quality between the two algorithms as the size of the problem increases.For problems with a number of clauses less than 20,000, there seems to be no advantage in using the multilevel paradigm as the difference in quality is very small while tending in favour of TS.As the size of the problem    increases the multilevel paradigm appears to provide in general better results compared to TS and might be considered the right tool to use for solve larger problems.

Conclusion
This paper introduced the first tabu search algorithm combined with the multilevel paradigm for MAX-SAT.The multilevel paradigm is a simple process during which the search is carried out through different levels evolving from a k-flip neighbourhood to 1-flip neighbourhoodbased structure enabling tabu search to take long leaps in the search space.Thus, in order to get a comprehensive picture of the multilevel tabu algorithm's performance, a set of industrial instances has been used.It is obvious from the examples above that the multilevel paradigm can aid TS to provide better results at a faster rate.The broad conclusions that can be drawn from these results are that for small problems the multilevel framework does not appear to offer any improvement to the convergence of tabu search.Further, at least for the examples considered in this paper, the multilevel tabu search appears to offer better asymptotic convergence and the differences in quality becomes apparent as size of the problem increases.It would be of great interest to further validate the conclusions of this paper by extending the range of benchmark problems instances.Obvious further work include the use of different coarsening schemes and the design of a self-adapting tabu list length since the length of the tabu list is a critical parameter that may affect the performance of TS.


with m clauses and n Boolean variables is given.Each Boolean variable,

Algorithm 1 .Figure 1 .
Figure 1.The various phases of the multilevel paradigm combined with TS.

1 m
, the assignment must be extended on is parent m .The extension algorithm is simple; if a cluster 1 i m  is assigned the value of true then the merged pair of clusters that it represents, true value (line 9 of Algorithm 2).