English

SARRIGUREN: a polynomial-time complete algorithm for random $k$-SAT with relatively dense clauses

Data Structures and Algorithms 2025-04-08 v2 Computational Complexity

Abstract

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(m2×n/k)O(m^2 \times n/k) time complexity for random kk-SAT instances of nn variables and mm relatively dense clauses, where that density level is relative to the number of variables nn, that is, clauses are relatively dense when k7nk\geq7\sqrt{n}. Although theoretically there could be worst-cases with exponential complexity, the probability of those cases to happen in random kk-SAT with relatively dense clauses is practically zero. The algorithm has been empirically tested and that polynomial time complexity maintains also for kk-SAT instances with less dense clauses (k5nk\geq5\sqrt{n}). That density could, for example, be of only 0.049 working with n=20000n=20000 variables and k=989k=989 literals. In addition, they are presented two more complementary algorithms that provide the solutions to kk-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 kk-SAT with k>3k>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.

Keywords

Cite

@article{arxiv.2401.09234,
  title  = {SARRIGUREN: a polynomial-time complete algorithm for random $k$-SAT with relatively dense clauses},
  author = {Alfredo Goñi Sarriguren},
  journal= {arXiv preprint arXiv:2401.09234},
  year   = {2025}
}

Comments

24 pages, 2 figures, 8 tables, algorithms, results and data in https://goo.su/zV3Pt6E

R2 v1 2026-06-28T14:19:19.925Z