The simplicity of the maximum satisfiability problem (MAX-SAT) combined with its applicability in many areas of artificial intelligence and computing science made it one of the fundamental optimization problems. This NP-complete problem refers to the task of finding a variable assignment that satisfies the maximum number of clauses (or the sum of weights of satisfied clauses) in a Boolean formula. The Walksat algorithm is considered to be the main skeleton underlying almost all local search algorithms for MAX-SAT. Most local search algorithms including Walksat rely on the 1-flip neighborhood structure. This paper introduces a variable neighborhood walksat-based algorithm. The neighborhood structure can be combined easily using any local search algorithm. Its effectiveness is compared with existing algorithms using 1-flip neighborhood structure and solvers such as CCLS and Optimax from the eighth MAX-SAT evaluation.

Many optimization algorithms have been developed for successfully solving a wide range of optimization problems. Although these techniques have demonstrated excellent search capabilities for solving small or medium sized optimization problems, they still encounter serious challenges when applied to solving large scale optimization problems, that is, problems with several hundreds to thousands of variables. How well optimization algorithms handle this sort of real world large scale optimization problems still remains an open question for various optimization problems including MAX-SAT. MAX-SAT is a widely used modeling framework for solving various combinatorial problems. Many important applications can be naturally expressed as MAX-SAT [

In this paper a variable neighborhood Walksat-based algorithm is introduced for MAX-SAT. The key feature of this algorithm aims at identifying improved neighbor solutions without explicitly enumerating and evaluating all the neighbors in the neighborhood. The strategy involves looking at the search as a process evolving from a

The rest of the paper is organized as follows. A definition of MAX-SAT is given in Section

Generally, the satisfiability problem (SAT) which is known to be NP-complete [

The task is to determine whether there exists an assignment of values to the variables under which

Stochastic local search algorithms [

In this section, the Walksat/SKC (WS) algorithm originally introduced in [

(1)

(2)

(3)

(4)

(5)

(6)

(7)

(8) Chosen-Variable

(9)

(10) Chosen-Variable

(11)

(12)

(13)

(14)

The algorithm starts with a random assignment (line 3). Thereafter, a random unsatisfied clause is selected (line 5). If there exists a variable belonging to the selected clause with break count equal to zero (line 6), this variable is flipped; otherwise a random variable (line 8) or the variable with minimal break count (line 10) is selected with a certain probability (noise probability: line 7). The break count of a variable is defined as the number of clauses that would be unsatisfied by flipping the chosen variable. It turns out that the choice of unsatisfied clauses, combined with the randomness in the selection of variables, can enable Walksat to avoid local minima and to better explore the search space. The flips are repeated until a preset value of the maximum number of flips is reached (MAX-FLIPS) and this phase is repeated as needed up to MAX-TRIES times.

The main difference between metaheuristics relies in the way neighborhood structures are defined and explored. Some metaheuristics work only with a single neighborhood structure. Others, such as numerous variants of variable neighborhood search, operate on a set of different neighborhood structures. Variable neighborhood search (VNS for short) [

(1)

(2)

(3)

(4)

(5)

(6)

(7)

(8)

(9)

(10)

(11)

(12)

(13) return (

Example illustrating the different phases of the algorithm.

The performance of VNS-WS is evaluated against WS using a set of real industrial problems. This set is taken from the eighth MAX-SAT 2013 organized as an affiliated event of the 16th International Conference on Theory and Applications of Satisfiability Testing (SAT-2013). Due to the randomization nature of both algorithms, each problem instance was run 50 times with a cutoff parameter (max-time) set to 30 minutes. 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:

WS spends equal amount of time (max-time/

Noise probability: the performance of WS depends highly on the walking probability setting which in turns depends on the class of problems to be solved. The plots in Figures

Noise probability versus number of unsatisfied clauses: (a) i2c-master1.dimacs.filtered.cnf: variables = 82429, clauses = 285987, (b) mem-ctrl-debug.dimacs.cnf: variables = 381721, clauses = 505547.

Figures

Log-Log Plot: (a) rsdecoder2.dimacs.filtered.cnf: variables = 415480, clauses = 1632526, (b) rsdecoder-fsm1.dimacs.filtered.cnf: variables = 238290, clauses = 936006. Time development for 100 runs in 15 minutes.

Log-Log Plot: (a) rsdecoder1-blackbox-CSEEblock-problem.dimacs-32.filtered: variables = 277950, clauses = 806460, (b) rsdecoder-multivec1.dimacs.filtered: variables = 394446, clauses = 1626312. Time development for 100 runs in 15 minutes.

Figures

Convergence speed.

Convergence speed.

WS versus VNS-WS: clause to variable ratio.

Tables

SAT2013 industrial benchmarks: comparison among VNS-WS, WS, W-w, and VW2.

Instances | Instance input | Unsatisfied clauses | ||||
---|---|---|---|---|---|---|

Var | Cls | WS | W-w | VW2 | VNS-WS | |

diverders11.dimacs.filtered | 45552 | 162982 | 2434 | 2101 | 4169 | 715 |

fpu8-problem.dimacs24.filtered | 160232 | 548848 | 6328 | 6306 | 11290 | 3043 |

fpu-fsm1-problem.dimacs15.filtered | 160200 | 548843 | 6125 | 6213 | 11855 | 3055 |

i2c-master2.dimacs.filtered | 63816 | 221320 | 615 | 590 | 2037 | 161 |

b14-opt-bug2-vec1-gate-0.dimacs | 130328 | 402707 | 1763 | 1749 | 5985 | 1279 |

b15-bug-fourvec-gate-0.dimacs | 581064 | 1712690 | 7241 | 7596 | 22082 | 3184 |

b15-bug-onevec-gate-0.dimacs | 121836 | 359040 | 1122 | 1244 | 4094 | 493 |

c1-DD-s3-f1-e2-v1-bug-fourvec-gate-0.dimacs | 391897 | 989885 | 955 | 1317 | 4966 | 60 |

c1-DD-s3-f1-e2-v1-bug-onevec-gate-0.dimacs | 102234 | 258294 | 62 | 191 | 592 | 2 |

c2-DD-s3-f1-e2-v1-bug-onevec-gate-0.dimacs | 84525 | 236942 | 2537 | 2634 | 3699 | 1362 |

c3-DD-s3-f1-e1-v1-bug-fourvec-gate-0.dimacs | 33540 | 86944 | 4 | 4 | 4 | 4 |

c3-DD-s3-f1-e1-v1-bug-onevec-gate-0.dimacs | 8358 | 21736 | 1 | 1 | 1 | 1 |

c4-DD-s3-f1-e1-v1-bug-gate-0.dimacs | 797728 | 2011216 | 3761 | 5714 | 15798 | 1129 |

c4-DD-s3-f1-e2-v1-bug-fourvec-gate-0.dimacs | 448465 | 1130672 | 1834 | 1993 | 7772 | 516 |

c4-DD-s3-f1-e2-v1-bug-onevec-gate-0.dimacs | 131548 | 331754 | 439 | 482 | 1899 | 105 |

SAT2013 industrial benchmarks: comparison among VNS-WS, WS, W-w, and VW2.

Instances | Instance input | Unsatisfied clauses | ||||
---|---|---|---|---|---|---|

Var | Cls | WS | W-w | VW2 | VNS-WS | |

c5315-bug-gate-0.dimacs.seq.filtered | 1880 | 5049 | 1 | 1 | 1 | 1 |

c5-DD-s3-f1-e1-v1-bug-fourvec-gate-0.dimacs | 100472 | 270492 | 25 | 25 | 943 | 4 |

c5-DD-s3-f1-e1-v1-bug-gate-0.dimacs | 200944 | 540984 | 97 | 153 | 2026 | 8 |

c5-DD-s3-f1-e1-v2-bug-gate-0.dimacs | 200944 | 540984 | 59 | 101 | 1873 | 8 |

c5-DD-s3-f1-e1-v1-bug-onevec-gate-0.dimacs | 25118 | 67623 | 11 | 11 | 65 | 1 |

c6288-bug-gate-0.dimacs.seq.filtered | 3462 | 9285 | 14 | 16 | 63 | 1 |

c6-DD-s3-f1-e1-v1-bug-fourvec-gate-0.dimacs | 170019 | 454050 | 1668 | 1644 | 4900 | 921 |

c6-DD-s3-f1-e1-v1-bug-gate-0.dimacs | 298058 | 795900 | 3188 | 3332 | 9340 | 1752 |

c6-DD-s3-f1-e1-v1-bug-onevec-gate-0.dimacs | 44079 | 117720 | 277 | 302 | 986 | 175 |

c6-DD-s3-f1-e2-v1-bug-fourvec-gate-0.dimacs | 170019 | 454050 | 1645 | 1705 | 5066 | 919 |

c7552-bug-gate-0.dimacs.seq.filtered | 2640 | 7008 | 1 | 1 | 1 | 1 |

divider-problem.dimacs-11.filtered | 215964 | 709377 | 9992 | 10090 | 15889 | 3978 |

divider-problem.dimacs12.filtered | 229482 | 751921 | 10914 | 10844 | 17297 | 4667 |

divider-problem.dimacs1.filtered | 215676 | 708801 | 10181 | 10308 | 16102 | 4295 |

divider-problem.dimacs2.filtered | 228874 | 750705 | 10688 | 11180 | 17319 | 4392 |

SAT2013 industrial benchmarks: comparison among VNS-WS, WS, W-w, and VW2.

Instances | Instance input | Unsatisfied clauses | ||||
---|---|---|---|---|---|---|

Var | Cls | WS | W-w | VW2 | VNS-WS | |

divider-problem.dimacs3.filtered | 216900 | 711249 | 10054 | 10727 | 16249 | 3972 |

divider-problem.dimacs4.filtered | 225340 | 743637 | 11030 | 11536 | 17240 | 4406 |

divider-problem.dimacs5.filtered | 228874 | 750705 | 11194 | 11929 | 17459 | 5139 |

mot-comb1-red-gate-0.dimacs.seq.filtered | 2159 | 5326 | 1 | 1 | 1 | 1 |

mrisc-mem2wire1.dimacs.filtered | 168960 | 641598 | 823 | 998 | 8191 | 293 |

rsdecoder2.dimacs.filtered | 415480 | 1632526 | 3799 | 4811 | 24221 | 461 |

rsdecoder-fsm1.dimacs.filtered | 238290 | 936006 | 1703 | 1906 | 12689 | 179 |

rsdecoder-problem.dimacs-34.filtered | 226040 | 728516 | 3016 | 3880 | 11408 | 386 |

s15850-bug-fourvec-gate-0.dimacs.seq.filtered | 88544 | 206252 | 62 | 84 | 176 | 21 |

s15850-bug-onevec-gate-0.dimacs.seq.filtered | 22136 | 51563 | 3 | 1 | 5 | 2 |

SM-AS-TOP-buggy1.dimacs.filtered | 145900 | 694438 | 3791 | 4023 | 11888 | 1549 |

SM-MAIN-MEM-buggy1.dimacs.filtered | 870975 | 3812147 | 45360 | 52045 | 97604 | 20196 |

SM-RX-TOP.dimacs.filtered | 235456 | 934091 | 3645 | 3528 | 13487 | 2456 |

spi2.dimacs.filtered | 124260 | 515813 | 1872 | 1985 | 9993 | 581 |

Comparing VNS-WS with CCLS and Optimax.

Instance | CCLS | Optimax | VNS-WS | |||
---|---|---|---|---|---|---|

Quality | Time | Quality | Time | Quality | Time | |

brock400-1 | 255 | 0.38 | 340 | 0.08 | 255 | 15.02 |

brock400-2 | 252 | 0.84 | 310 | 0.08 | 252 | 24.02 |

brock400-3 | 238 | 1.27 | 278 | 0.08 | 238 | 9.05 |

brock400-4 | 249 | 0.73 | 374 | 0.08 | 249 | 4.05 |

brock800-1 | 205 | 0.95 | 273 | 0.09 | 205 | 1.05 |

brock800-2 | 207 | 0.97 | 270 | 0.09 | 207 | 3.08 |

brock800-3 | 203 | 0.47 | 315 | 0.07 | 203 | 10.01 |

brock800-4 | 200 | 0.32 | 310 | 0.13 | 200 | 4.07 |

hamming10-2 | 400 | 0.09 | 532 | 0.08 | 400 | 1.04 |

hamming10-4 | 319 | 0.42 | 341 | 0.09 | 319 | 64.03 |

hamming6-2 | 832 | 1.18 | 1100 | 0.13 | 843 | 55.01 |

hamming6-4 | 192 | 1.00 | 312 | 0.13 | 192 | 1.06 |

hamming8-2 | 441 | 0.12 | 551 | 0.13 | 441 | 1.05 |

s2v120c1600-8 | 240 | 2.55 | 289 | 0.09 | 251 | 118 |

s2v140c1200-3 | 155 | 2.97 | 195 | 0.08 | 165 | 107 |

s2v140c1300-4 | 164 | 2.34 | 208 | 0.10 | 181 | 74 |

s2v140c1400-3 | 193 | 3.38 | 239 | 0.12 | 206 | 121 |

s2v140c1500-5 | 205 | 2.111 | 248 | 0.13 | 218 | 145 |

s3v80c600-5 | 12 | 1.02 | 16 | 32.61 | 12 | 1.06 |

s3v80c700-6 | 18 | 1.56 | 26 | 4.28 | 18 | 1.06 |

s3v80c800-2 | 32 | 1.24 | 59 | 0.12 | 32 | 48.02 |

s3v80c900-1 | 35 | 1.76 | 73 | 0.12 | 35 | 25.02 |

s3v80c900-10 | 35 | 1.60 | 59 | 0.11 | 35 | 33.07 |

s3v80c900-2 | 37 | 1.71 | 64 | 0.08 | 37 | 1.06 |

t5pm3-7777.spn | 78 | 1.46 | 120 | 0.10 | 78 | 23.05 |

t6pm3-8888.spn | 136 | 3.30 | 222 | 0.09 | 144 | 36.02 |

t7pm3-9999.spn | 209 | 4.36 | 343 | 0.11 | 233 | 87 |

In this work, a variable neighborhood search combined with Walksat (VNS-WS) for the maximum satisfiability problem is introduced. VNS-WS follows a simple principle that is based on systematic changes of neighborhood within the search. The set of neighborhoods proposed in this paper can easily be incorporated into any local search used for MAX-SAT. Starting the search from the largest neighborhood and moving systematically towards the smallest neighborhood is a better strategy to get a better heuristic. Thus, in order to get a comprehensive picture of the new algorithms performance, a set of large industrial instances is used. The results indicate that the proposed variable neighborhood strategy can enhance the convergence behavior of the Walksat algorithm. It appears clearly from the results that the performance of both WS and VNS-WS is fairly close with a slight edge in favor of VNS-WS for small problems. However, for larger problems, VNS-WS can find excellent solutions compared to those of WS at a faster convergence rate. The difference lies between 30% and 93%. The larger the problem, the larger the size of the neighborhood needed, and consequently the more efficient the WS at different neighborhoods. The results have shown that VNS-WS consistently delivers better solutions than Optimax while requiring the least amount of time. When compared to CCLS, VNS-WS was capable of providing similar results in 74% of the studied cases; however, the time invested is several orders of magnitude slower than CCLS. The author aims at submitting this solver for the next MAX-SAT competition after having improved its performance. For the time being, further work is mainly conducted on improving the solution quality of VNS-WS. In particular, during the construction of the different neighborhoods, the random merging scheme does not exploit the information structure of the problem. The author believes that VNS-WS might benefit from further research into merging strategies used to construct the neighborhoods. A better strategy would be to construct the different neighborhoods based on merging variables by exploiting the number of clauses they have in common rather randomly.

The author declares that there is no conflict of interests regarding the publication of this paper. In addition the author does not have a direct financial relation that might lead to a conflict of interests.