SARRIGUREN, a new complete algorithm for SAT based on counting clauses (which is valid also for Unique-SAT and #SAT) is described, analyzed and tested. Although existing complete algorithms for SAT perform slower with clauses with many literals, that is an advantage for SARRIGUREN, because the more literals are in the clauses the bigger is the probability of overlapping among clauses, a property that makes the clause counting process more efficient. Actually, it provides a $O(m^2 \times n/k)$ time complexity for random $k$-SAT instances of $n$ variables and $m$ relatively dense clauses, where that density level is relative to the number of variables $n$, that is, clauses are relatively dense when $k\geq7\sqrt{n}$. Although theoretically there could be worst-cases with exponential complexity, the probability of those cases to happen in random $k$-SAT with relatively dense clauses is practically zero. The algorithm has been empirically tested and that polynomial time complexity maintains also for $k$-SAT instances with less dense clauses ($k\geq5\sqrt{n}$). That density could, for example, be of only 0.049 working with $n=20000$ variables and $k=989$ literals. In addition, they are presented two more complementary algorithms that provide the solutions to $k$-SAT instances and valuable information about number of solutions for each literal. Although this algorithm does not solve the NP=P problem (it is not a polynomial algorithm for 3-SAT), it broads the knowledge about that subject, because $k$-SAT with $k>3$ and dense clauses is not harder than 3-SAT. Moreover, the Python implementation of the algorithms, and all the input datasets and obtained results in the experiments are made available.
在这项工作中,我们提出并分析了一个简单的随机算法,以找到一个可满足的分配的布尔公式在合取范式(CNF)在每个子句中有最多3个文字。给定n个变量的k-CNF公式phi,{0,1}^n中的alpha满足phi,如果在赋值alpha下恰好满足该子句的一个文字,则phi子句是关键的。Paturi et.等人(Chicago Journal of Theoretical计算机科学1999)提出了一种用于k-SAT的简单随机算法(PPZ),其成功概率随着关键子句的数量(相对于输入公式的固定可满足解)而增加。在这里,我们首先描述另一个简单的随机算法DEL的执行更好,如果关键条款的数量较少(相对于一个固定的可满足的解决方案的输入公式)。随后,我们结合这两个简单的算法,使得组合算法的成功概率是PPZ和DEL在每个输入实例上的成功概率的最大值。我们发现,当出现在一个或多个关键条款中的一个或多个关键条款中的每个变量的条款的平均数量在1和1.9317之间时,组合算法的性能优于PPZ算法。