1 Introduction
Given a propositional formula in conjunctive normal form (CNF), the satisfiability problem (SAT) [2] is finding an assignment to the variables of the formula that satisfies every clause. SAT is a core problem in theoretical computer science because of its central position in complexity theory [7]. Moreover, numerous NPhard practical problems have been successfully solved using SAT [11].
When there is no satisfying assignment it might still be useful to find a truth assignment that satisfies as many clauses as possible, this is the Boolean maximum satisfiability problem (MaxSAT), which is a famous generalization of SAT. There has been great advancements in developing efficient MaxSAT solvers in recent years [12, 9] and because of that, many practical NPhard optimization problems have been efficiently solved using MaxSAT [6, 1].
The counterpart of SAT in fuzzy logic (and Łukasiewicz logic specifically) exists, although, less attention has been paid to developing efficient solvers for the problem. One of the recent attempts [5] consists of enhancing the startoftheart Covariance Matrix Adaptation Evolution Strategy (CMAES) algorithm. This was done by having multiple CMAES populations running in parallel and then recombining their distributions if this leads to improvements. Another recent finding [4] showed that a hillclimber approach outperformed CMAES on some problem classes. A different idea was recently proposed which involves encoding the formula as an Satisfiability Modulo Theories (SMT) program then employing flattening methods and CNF conversion algorithms to derive an equivalent Boolean CNF SAT instance [14].
In this paper, we shall focus on defining the MaxSAT problem for a particular class of Łukasiewicz formulas, called Łclausal forms. This type of formulas resembles CNF in the classical Boolean logic. In addition, SAT, , for Łclausal forms has been shown to be NPcomplete [3]. First, we prove that MaxSAT for Łclausal forms is NPcomplete. Second, we build a formula generator to produce benchmarks with selected properties. The aim is to provide insights into the relationship between the number of falsified clauses and the different input parameters of our model. Finally, we solve the MaxSAT instance by augmenting fresh variables to each clause then encode and solve the new formula as an SMT program using Z3^{1}^{1}1
Z3 is an SMT solver from Microsoft Research that appeared in 2007. It is used to check the satisfiability of logical formulas over one or more theories. Supported theories include bitvectors, arrays, propositional logic, among others.
[8]. Our experimental investigation showed that the number of falsified clauses increases exponentially as the frequency of occurrence of negated terms in the formula increases.The paper is structured as follows. Firstly, we present some preliminaries and definitions regarding Łclausal forms and Lukasiewicz logic in general. Secondly, we define MaxSAT for Łclausal forms, prove that it is NPcomplete and then introduce an algorithm to solve it. Thirdly, the generation and construction of Łclausal forms is presented. Finally, we report on empirical investigation regarding the cost of formulas generated with different parameter values.
2 Preliminaries
The basic connectives of Łukasiewicz logic are defined in Table 1. We will be dealing with five operations, namely negation (), the strong and weak disjunction ( and respectively) and the strong and weak conjunction ( and respectively).
Name  Definition 

Negation  
Strong disjunction  
Strong conjunction  
Weak disjunction  
Weak conjunction  
Implication 
It is important to note that one can generalize Boolean CNF by replacing the Boolean negation with the Łukasiewicz negation and the Boolean disjunction with the strong disjunction. The resulting form is
and is referred to as simple Łclausal form.
It has been shown [3] that the satisfiability problem for any simple Łclausal form is solvable in linear time, contrary to its counterpart in Boolean logic which is NPcomplete in the general case. In addition, the expressiveness of simple Łclausal forms is limited. That is, not every Łukasiewicz formula has an equivalent simple Łclausal form. To remedy this matter, Botfill et al. proposed another form called Łclausal forms (Definition 1), for which the 3SAT problem is NPcomplete^{2}^{2}2The proof involves reducing Boolean 3SAT to the SAT problem for Łclausal forms..
Definition 1.
Let be a set of variables. A literal is either a variable or . A term is a literal or an expression of the form , where are literals. An Łclause is disjunction of terms. An Łclausal form is a weak conjunction of Łclauses.
The authors also showed that 2SAT is solvable in linear time for Łclausal forms. The difference between simple Łclausal forms and Łclausal forms is that in the latter, negations are allowed to be present above the literal level.
3 Maximizing the number of satisfied Łclauses
In Boolean MaxSAT, the problem can be stated in different ways. One definition is to find the cost (minimum number of falsified clauses). Another definition is to find an assignment that satisfies the maximum number of clauses (i.e., minimize the cost). In the Łukasiewicz version, we are going to go with the first problem definition.
Definition 2.
Given a set of propositional clauses or Łclauses , is the maximum number of satisfiable clauses in by any assignment.
Now we prove that maximizing the number of satisfied Łclauses is NPcomplete.
Theorem 1.
Given a set of Łclauses and an integer , deciding whether there exists an assignment that satisfies at least Łclauses is NPcomplete.
Proof.
It is easy to see that the problem is in NP. Indeed, given an assignment to the variables, we can check whether or not it satisfies at least clauses in polynomial time. For the completeness part, we reduce from Boolean Max2SAT (i.e., MaxSAT instances with at most two literals per clause, which is NPcomplete [10]).
Let be a Boolean Max2SAT instance of clauses over variables . We will create a set of Łclauses such that if and only if . The construction of is as follows:

For each variable appearing in , add copies of the Łclause to .

For each clause , add one copy of the Łclause to .
Thus, , where such that are identical copies of , and .
Let and be the corresponding assignment. For every , the copies are satisfied, because evaluates every to either 0 or 1. Hence, clauses are satisfied in . In addition, since and are equivalent when restricted to 0 and 1, thus, if are the clauses that are satisfied in , then are satisfied in .
Let and be the corresponding assignment. Since there are copies of every and there is only one copy of every clause of the other type, then satisfies . Hence, every appearing in is evaluated to either 0 or 1. Let be the clauses that satisfies. Now, we have , and since are also satisfied in , then .
Therefore, if and only if and thus deciding whether there is an assignment that satisfies at least Łclausal forms is NPcomplete. ∎
One way to solve MaxSAT for Łclausal forms is as follows. Given a set of Łclauses, replace each by , , where each is a new variable that does not appear in . A cardinality constraint is added to minimize the sum of . Augmenting each with a new variable ensures that is satisfied. Adding the cardinality constraint ensures that the minimum number of ’s are true and thus the maximum number of Łclauses are satisfied.
4 Construction of Łclausal forms
We have carried out a similar experiment to the one done by Bofill et al. in [3] on 3valued Łclausal forms. The instances used were generated in the following manner: given the number of variables and the number of clauses , each clause is generated from three variables and picked uniformly at random. Then, one of the following eleven Łclauses is drawn uniformly at random , , , , , , , , , and . As can be seen in Figure 1, phase transition occurs from clauses to variables ratio 1.71 to 2.0.
Our model generates Łclausal forms with parameters , where is the number of Łclauses, is the number of variables, is the number of variables appearing in each Łclause and is the degree of absence of negated terms. The decision of whether or not to put a negated term in a clause is made as follows: Given , we generate a random integer , and if , then we add a negated term. The length of the negated term is a random integer between , where is the current length of the Łclause, i.e., we have literals left to add.
So, as increases, the number of negated terms in each clause decreases. For example, when approaches 1, the sum of the lengths of negated terms in each Łclause approaches , and when approaches , the sum approaches 0. In the next section, we will discuss the relationship between and the cost.
5 Results
In this section, we introduce and discuss our findings. We are interested in the relationship between the cost and clauses to variables ratio, and . The results below are obtained from 3valued, uniformly generated formulas at random. The machine has 16GB of RAM and an Intel^{®} Xeon^{®} E51650 (12MB Cache, 3.20GHz) processor. No time limits were set for any of the experiments.
First we discuss the relationship between the cost and . All formulas used have 50 variables, and to investigate the relationship over instances with different clauses to variables ratio, we generated three sets of formulas having 100, 150 and 200 Łclauses. As Figure 2 shows, a threshold phenomena between and the cost exists. When increases, the cost decreases exponentially regardless of the clauses to variables ratio.
A near linear relationship can be seen in Figure 3 between cost and the clauses to variables ratio, regardless of the degree of absence of negated terms (). The formulas used have 4 literals in each Łclause (), 50 variables, and degrees of absence of negated terms () of 1, 2, 5, 10, 15 and 20. As can be seen, the phase transition happens at earlier clauses to variables ratio as decreases. Moreover, the results show a near linear trend overall across the different values.
Finally, we explore the relationship between the number of literals in each clause () and the cost, illustrated in Figure 4. Our experiment was carried out on formulas with 50 variables, , and 200, 150, 100 and 50 Łclauses. A different value of is chosen and fixed for each subplot of Figure 4. The value of in all subplots ranges from 3 to 20. Regardless of the clauses to variables ratio or , the results show a decline in cost as increases. Moreover, it can be seen that the drop in cost becomes more apparent as increases from 2 to 10. This can be justified by the observation in Figure 2. The increase in gives more possibilities to satisfy each Łclause. However, as Figure 2 suggests, the cost increases exponentially as becomes lower, which takes precedence over the number of possibilities for satisfying Łclauses offered by higher values.
6 Conclusion and Future Work
In this paper, we have proved that maximizing the number of satisfied Łclauses is NPcomplete by reduction from Max2SAT. Also, we have designed a formula generator for Łclausal forms with four essential parameters which is able to generate formulas having the same clauses to variables ratio but with different costs. Such a model is important for producing benchmarks that can be used to test solvers of Łclausal forms and study their properties. One important parameter is the degree of absence of negated terms, . As we have shown, with the increases in , the number of falsified Łclauses decreases exponentially.
We plan to extend our study to different types of formulas in Łukasiewicz logic, generated using different probability distributions (e.g., power law and exponential distributions). This is useful since formulas generated from applications tend to have nonuniform distributions when it comes to variable occurrences.
In classical Boolean logic, there have been various studies on predicting the satisfiability of instances at the phase transition [15, 16, 13]. All of them rely on generating polynomiallycomputable features to increase the accuracy of predicting the satisfiability. Thus, we will investigate how our model parameters can be used to learn the satisfiability of Łclausal forms generated near the phase transition area.
References
 [1] Roberto Asín Achá and Robert Nieuwenhuis. Curriculumbased course timetabling with sat and maxsat. Annals of Operations Research, 218(1):71–91, 2014.
 [2] Armin Biere, Marijn Heule, and Hans van Maaren. Handbook of satisfiability, volume 185. IOS press, 2009.
 [3] Miquel Bofill, Felip Manya, Amanda Vidal, and Mateu Villaret. Finding hard instances of satisfiability in lukasiewicz logics. In MultipleValued Logic (ISMVL), 2015 IEEE International Symposium on, pages 30–35. IEEE, 2015.
 [4] Tim Brys, Madalina M Drugan, Peter AN Bosman, Martine De Cock, and Ann Nowé. Local search and restart strategies for satisfiability solving in fuzzy logics. In Genetic and Evolutionary Fuzzy Systems (GEFS), 2013 IEEE International Workshop on, pages 52–59. IEEE, 2013.

[5]
Tim Brys, Madalina M Drugan, Peter AN Bosman, Martine De Cock, and Ann
Nowé.
Solving satisfiability in fuzzy logics by mixing cmaes.
In
Proceedings of the 15th annual conference on Genetic and evolutionary computation
, pages 1125–1132. ACM, 2013.  [6] Kerstin Bunte, Matti Järvisalo, Jeremias Berg, Petri Myllymäki, Jaakko Peltonen, and Samuel Kaski. Optimal neighborhood preserving visualization by maximum satisfiability. In AAAI, pages 1694–1700, 2014.

[7]
Stephen A Cook.
The complexity of theoremproving procedures.
In
Proceedings of the third annual ACM symposium on Theory of computing
, pages 151–158. ACM, 1971.  [8] Leonardo De Moura and Nikolaj Bjørner. Z3: An efficient smt solver. In International conference on Tools and Algorithms for the Construction and Analysis of Systems, pages 337–340. Springer, 2008.
 [9] Mohamed El Halaby. Solving maxsat by successive calls to a sat solver. In Proceedings of SAI Intelligent Systems Conference, pages 428–452. Springer, 2016.
 [10] Michael R Garey, David S. Johnson, and Larry Stockmeyer. Some simplified npcomplete graph problems. Theoretical computer science, 1(3):237–267, 1976.
 [11] Joao MarquesSilva. Practical applications of boolean satisfiability. In Discrete Event Systems, 2008. WODES 2008. 9th International Workshop on, pages 74–80. IEEE, 2008.
 [12] Antonio Morgado, Federico Heras, Mark Liffiton, Jordi Planes, and Joao MarquesSilva. Iterative and coreguided maxsat solving: A survey and assessment. Constraints, 18(4):478–534, 2013.
 [13] Eugene Nudelman, Kevin LeytonBrown, Holger H Hoos, Alex Devkar, and Yoav Shoham. Understanding random sat: Beyond the clausestovariables ratio. In International Conference on Principles and Practice of Constraint Programming, pages 438–452. Springer, 2004.
 [14] Joan Ramon Soler and Felip Manyà. A bitvector approach to satisfiability testing in finitelyvalued logics. In MultipleValued Logic (ISMVL), 2016 IEEE 46th International Symposium on, pages 270–275. IEEE, 2016.

[15]
Haoze Wu.
Improving satsolving with machine learning.
In Proceedings of the 2017 ACM SIGCSE Technical Symposium on Computer Science Education, pages 787–788. ACM, 2017.  [16] Lin Xu, Holger H Hoos, and Kevin LeytonBrown. Predicting satisfiability at the phase transition. In AAAI, 2012.
Comments
There are no comments yet.