Exact MAX-SAT score distributions and optimum #
The threshold counter gives the number of assignments satisfying at least q clauses. Querying
all cutoffs from 0 through m + 1, for m clauses, gives the exact score distribution by
adjacent differences. The number of positive threshold counts, minus one, is the exact optimum.
Repeated and empty clauses retain their original contribution to the score.
Both outputs have native algorithms using
2 ^ O(N / √log N) poly(L) time and polynomial space, where N is literal occurrences plus
clauses and L is the complete encoded input length. The generic native query and postprocessing
theorems preserve the threshold counter's exponential factor. A bound in the declared variable
count requires a density hypothesis; this module does not discard clauses or multiplicities.
For the general propositional weighted partial MaxSAT definition and its bridge to optimum, see
Cslib.Logic.PL.MaxSAT (toLogicMaxSAT, optimum_eq_logic_maxSatisfiedWeight).
Main results #
MaxSAT.histogramFromCounts_thresholdCounts: adjacent differences recover every exact count.MaxSAT.optimumFromCounts_thresholdCounts: positive threshold counts recover the optimum.MaxSAT.exists_histogram_algorithm,MaxSAT.exists_optimum_algorithm: native resource bounds.MaxSAT.exists_sparse_histogram_algorithm,MaxSAT.exists_sparse_optimum_algorithm: the rate in declared variables under fixed width and density bounds.MaxSAT.toLogicMaxSAT,MaxSAT.optimum_eq_toLogicMaxSAT_maxSatisfiedWeight,MaxSAT.toLogicMaxSAT_optimum_eq,MaxSAT.optimum_eq_logic_maxSatisfiedWeight,MaxSAT.logic_optimum_unweighted_eq: bridges to propositional MaxSAT (Cslib.Logic.PL.MaxSAT).
Number of assignments satisfying exactly q clauses.
The complete score distribution, including the zero-score coefficient.
Maximum number of simultaneously satisfied clauses.
Threshold counts with one trailing zero at cutoff m + 1.
The number of feasible score cutoffs, minus the always-feasible zero cutoff.
Differences of consecutive tail counts give the exact score count.
Adjacent differences preserve the increasing order of score indices.
The returned histogram contains every exact assignment count.
The optimum is at most the number of clauses.
The feasible thresholds are exactly the integers from zero through the optimum.
Number of naturals below m that are at most q.
Counting positive threshold counts returns the exact maximum score.
Differences are polynomial-time on binary counts.
Recovering the optimum is polynomial-time in the list of binary counts.
Native runtime bounds #
The complete threshold list is computed at the same contraction rate. The number of queries and the materialized answer list contribute only polynomial factors.
A native algorithm returns all exact score counts, in increasing order from 0 through m,
within the threshold counter's exponential rate and polynomial space.
A native algorithm returns the exact MAX-SAT optimum at the contraction rate, with polynomial space. This is uniform in clause width and in the input's declared variable count.
Sparse fixed-width instances #
Width at most k and at most c (n+1) clauses on n declared variables. References retain
the total evaluation convention of Instance; well-formed instances have all references below
n. Both resource parameters are fixed before the input.
The declared variable count of a sparse instance.
Sparse instances use the same complete encoding as their underlying formulas.
Exact score distributions for sparse MAX-k-SAT in 2 ^ O(n / √log n) poly(L) time and
polynomial space, for fixed width k and density c. Every one of the 2^n canonical declared
assignments is counted, including assignments to unused variables.
The exact ordinary clause-count optimum for sparse MAX-k-SAT has the same native rate and
polynomial workspace. The input may contain duplicate and empty clauses.
Bridge to propositional MaxSAT #
Propositional weighted partial MaxSAT counterpart of F : Instance: variable references at
or above F.1 are constrained to false by hard unit clauses, matching assignment F.1 x, and
every clause of F.2 has soft weight 1.
MaxSAT.optimum F coincides with the maximum satisfied weight of toLogicMaxSAT F.
The propositional MaxSAT cost optimum of toLogicMaxSAT F is F.2.length - optimum F.
For well-formed instances (all variables < F.1), MaxSAT.optimum F equals the maximum
satisfied weight of Cslib.Logic.PL.MaxSAT.unweighted F.2.
For well-formed instances (all variables < F.1), the propositional unweighted MaxSAT cost
optimum of F.2 is F.2.length - optimum F.