Documentation

CslibFrontier.Logics.Propositional.CNF.ParitySearch.PolyTime

Searching the three-wise independent sample space runs in polynomial time #

Exhaustive search of the three-wise independent sample space (Cslib.Logic.PL.paritySearch) is polynomial-time for any encoding of the variables, with literals encoded by encPair and clauses and formulas by encList (Cslib.Logic.PL.computableInPolyTime_paritySearch). A sample bit is a Boolean fold over the seed and the low binary digits of a position, computed in unary by idxOf and converted to binary. The seeds of ⌈log₂ n⌉ + 1 bits are enumerated by bitsEnumList; there are at most 4 n + 4 of them (Nat.two_pow_clog_two_le), so the enumeration has polynomial size. Counting falsified clauses is polynomial-time, and the search is a fold over the candidates whose step reads the input formula. Every candidate is a sublist of the distinct variables (Cslib.Logic.PL.sublist_of_mem_parityCandidates), which bounds the state.

Main results #

References #

Every point of the sample space lists some of the variables, in order.

Searching the three-wise independent sample space is polynomial-time, for any encoding of the variables.