Gsat with Adaptive Score Function

Creative Commons Attribution License, which permits unrestricted use, distribution, and reproduction in any medium, provided the original work is properly cited. Abstract GSAT is a well-known satisfiability search algorithm. In this paper we consider a modification of GSAT. In particular, we consider an adaptive score function. Investigation of efficient satisfiability algorithms and encoding different hard problems as instances of satisfiability has caused considerable interest recently (see e.g. [1, 2]). GSAT is a well-known satisfiability algorithm [3]. Note that GSAT applies only to clausal formulas. The notion of score plays a key role in GSAT. Although, some modification of the score function are considered , usually, the score function is the number of clauses of formula which are falsified by the truth assignment (see e.g. [4]). In this paper we consider a modification of the score function for clausal formulas with different types of clauses. At first, we consider a general schema for standard GSAT (see Figure 1). We use the notation from [5]. Let f (z[1],. .. , z[n]) be a CNF. Let T be a truth assignment for the variables of f. The function score(T, f) is the number of clauses of f which are falsified by T. GSAT performs an search for a satisfying truth assignment for the variables of f , starting from a random assignment provided by initial(f). The successive assignment is obtained by inverting the truth value of one single variable V in T. The value of V is chosen to minimize

Investigation of efficient satisfiability algorithms and encoding different hard problems as instances of satisfiability has caused considerable interest recently (see e.g.[1,2]).GSAT is a well-known satisfiability algorithm [3].Note that GSAT applies only to clausal formulas.The notion of score plays a key role in GSAT.Although, some modification of the score function are considered, usually, the score function is the number of clauses of formula which are falsified by the truth assignment (see e.g.[4]).In this paper we consider a modification of the score function for clausal formulas with different types of clauses.
At first, we consider a general schema for standard GSAT (see Figure 1).We use the notation from [5].Let f (z [1], . . ., z[n]) be a CNF.Let T be a truth assignment for the variables of f .The function score(T, f ) is the number of clauses of f which are falsified by T .GSAT performs an search for a satisfying truth assignment for the variables of f , starting from a random assignment provided by initial(f ).The successive assignment is obtained by inverting the truth value of one single variable V in T .The value of V is chosen to minimize the score.Let T i be the sequence obtained from T by inverting the value of ith variable V i .The function hill − climb(f, T ) returns the set P oss − f lips of the variables V r which minimize score(T r , f).The function pick(P oss − f lips) chooses randomly one of elements of P oss − f lips.The function f lip(V, T ) returns T with V 's value inverted.The function UpdateScores(f, V ) updates score.
procedure GSAT(f ) UpdateScores(f, V ) end end return "no satisfying assignment found".The function score(T, f ) is the number of clauses of f which are falsified by T .In general, there are a number of different types of clauses.For instance, there is some difference between clauses x and y ∨ z.But, without additional infirmation, we can not give reasonable score of such difference.In particular, then we need modify two values of variables (u and v) for x and only one value of variable (u) for y ∨ z in formula ( 1), but we need modify two values of variables (u and v) for y ∨ z and only one value of variable (u) for x in formula (2).So, we can assume that the score of x higher than the score of y ∨ z, for formula (1), and the score of x lower than the score of y ∨ z, for formula (2).
Let #occ(k, f, z[i]) be the number of positive occurrences of z Let S(T, f ) be the set of clauses of f which are falsified by T .We assume that score(T, f ) = We use a genetic algorithm for prediction of values of α and β.Now, we consider a special class of formulas 3-2-CNF.We assume that any clause of formula from this class belongs the set Theorem.For any 3-CNF f , there is a formula g such that any clause of g belongs the set (3) and f is satisfiable if and only if g is satisfiable.
Proof.It is easy to see that In view of theorem, we can be sure that the class 3-2-CNF is sufficiently general.In our experiments, we consider GSAT with standard score function and GSAT with our score function (GSAT-ASF) for CNFs, 3-CNFs, and 3-2-CNFs.Selected experimental results are given in Table 1.

Figure 1 :
Figure 1: A general schema for GSAT.

Table 1 :
A number of solved formulas for GSAT and GSAT-ASF where G is a number of generations of genetic algorithm.