Searching a three-wise independent sample space for MAX-SAT #
Number the variables of a list vs by their positions j < n = |vs|, and let d = ⌈log₂ n⌉. A
seed t ∈ {0,1}^(d+1) gives the variable at position j the value t ⬝ (1, bin_d(j)) over
GF(2), where bin_d(j) are the d low binary digits of j
(Cslib.Logic.PL.paritySample_ofFn). Over a uniformly random seed these values are three-wise
independent and uniform: the family x ↦ t ⬝ (1, x) on {0,1}^d is the one-row Boolean affine
hash family (Cslib.BitString.LinearHash.isKWiseIndependentHash_dotProduct_cons_true), and the
variables have distinct binary numbers. This is the case k = 3 of the small sample spaces of
k-wise independent bits of Alon, Babai and Itai [ABI86]; it has 2 ^ (d + 1) < 4 n
points (Cslib.Logic.PL.length_parityCandidates_lt).
By Cslib.Logic.PL.exists_two_pow_mul_countUnsat_le, if every clause of φ has at least
k ≤ 3 distinct literals and vs lists the variables of φ, one of the seeds falsifies at most
2 ^ -k of the clauses (Cslib.Logic.PL.exists_mem_parityCandidates_two_pow_mul_countUnsat_le).
The candidate assignments, as the lists Cslib.Logic.PL.parityCandidates vs of variables set to
true, depend only on vs and not on the clauses: the same < 4 n assignments serve every
formula on these variables. The deterministic algorithm Cslib.Logic.PL.paritySearch tries them
all on the distinct variables of φ and keeps one falsifying the fewest clauses; it satisfies at
least 7 / 8 of the clauses of every formula with three distinct variables per clause
(Cslib.Logic.PL.CNF.IsExactThreeDistinct.eight_mul_countUnsat_paritySearchAssignment_le). This is
the guarantee of Johnson's algorithm (Cslib.Logic.PL.johnson), obtained by exhaustive search of a
small sample space instead of the method of conditional expectations
Alon and Spencer, Section 16.2.
The polynomial running time is proved in
CslibFrontier.Logics.Propositional.CNF.ParitySearch.PolyTime.
Main definitions #
Cslib.Logic.PL.paritySample: the value a seed gives a variable.Cslib.Logic.PL.parityCandidates: the assignments of the sample space, as lists of variables set totrue.Cslib.Logic.PL.betterCandidate,Cslib.Logic.PL.paritySearch,Cslib.Logic.PL.paritySearchAssignment: exhaustive search of the sample space.
Main results #
Cslib.Logic.PL.length_parityCandidates,Cslib.Logic.PL.length_parityCandidates_lt: the sample space has2 ^ (⌈log₂ n⌉ + 1) < 4 npoints.Cslib.Logic.PL.exists_mem_parityCandidates_two_pow_mul_countUnsat_le: some point of the sample space falsifies at most2 ^ -kof the clauses when every clause hask ≤ 3distinct literals.Cslib.Logic.PL.two_pow_mul_countUnsat_paritySearchAssignment_le,Cslib.Logic.PL.CNF.IsExactThreeDistinct.eight_mul_countUnsat_paritySearchAssignment_le,Cslib.Logic.PL.two_mul_countUnsat_paritySearchAssignment_le: the guarantees of the search.Cslib.Logic.PL.CNF.IsExactThreeDistinct.seven_div_eight_mul_le_paritySearchAssignment: the7 / 8approximation ratio against1 - unsatVal.
References #
The sample space #
The value that the seed t ∈ {0,1}^(d+1) gives the variable at position j of vs: the
parity of the bits of t selected by 1 followed by the d low binary digits of j.
The points of the sample space for the variables vs: for each seed of ⌈log₂ |vs|⌉ + 1
bits, the variables of vs that it sets to true.
Of the current choice best and a candidate T, both lists of variables set to true, the
one falsifying fewer clauses of φ, keeping best on ties.
Exhaustive search of the three-wise independent sample space: the point of the sample space
for the distinct variables of φ that falsifies the fewest clauses, as the list of variables set to
true. The search starts from the all-false assignment, which is itself the point of the zero
seed.
The assignment computed by Cslib.Logic.PL.paritySearch.
The sample space has one point per seed.
The sample space is small: fewer than 4 n points for n ≥ 1 variables.
Binary positions #
On a seed of d + 1 bits, Cslib.Logic.PL.paritySample is the dot product of the seed with
1 followed by the d low binary digits of the position.
Correctness #
A good point of the sample space: if vs contains the variables of φ and every clause
has at least k ≤ 3 distinct literals, some point of the sample space for vs falsifies at most
2 ^ -k of the clauses.
Folding Cslib.Logic.PL.betterCandidate finds a list falsifying no more clauses than the
starting list and than every candidate.
Correctness of the search: if every clause of φ has at least k ≤ 3 distinct literals,
Cslib.Logic.PL.paritySearch falsifies at most 2 ^ -k of the clauses.
The 7 / 8 guarantee: on a formula with three distinct variables per clause,
Cslib.Logic.PL.paritySearch falsifies at most 1 / 8 of the clauses.
The 1 / 2 guarantee: on a formula without empty clauses, Cslib.Logic.PL.paritySearch
falsifies at most half of the clauses.
The 7 / 8 approximation ratio for MAX-E3SAT with three distinct variables per clause:
Cslib.Logic.PL.paritySearch satisfies at least 7 / 8 times the largest proportion of the clauses
that an assignment satisfies.