Linear-size parity queries for the two-query reduction to #2SAT #
The queries adapt the parity counter of [BannachDemaineGomezHecher2026, §3.1–3.2]. A selector names a pair of consecutive parity states, eliminating the separate clause indicator. This changes the queries in (3.2) and can change their individual counts. The proof recovers the difference identity of (3.3) using a signed sum over paths. At each step, the difference between the numbers of extensions that keep or flip the state is one for a satisfied clause and zero for a falsified clause.
The output is an ordinary CNF with binary natural-variable labels. Both queries count assignments over their occurring variables, which include all source and auxiliary variables. The size and model-count results supply the combinatorial part of the #SH transfer in [MITHardnessGroup2026SH, §6, Corollary 6.1].
Main results #
Cslib.Complexity.SharpTwoSATParity.sharpSAT_eq_parityQuery_sub: the exact difference identity.Cslib.Complexity.SharpTwoSATParity.size_parityQuery_le: a linear bound for width-three inputs.Cslib.Complexity.SharpTwoSATParity.computableInPolyTime_parityQuery: the multitape certificate.
The even or odd parity query, with the original variables and the chain auxiliaries assigned
disjoint natural-variable labels. false chooses even parity and true chooses odd parity.
Each parity query is computable in polynomial time on multitape machines with binary CNF variable labels. Only positions introduced by the list traversal use unary counters.
Every clause of a parity query has width at most two.
Subtracting the odd query's exact count from the even query's exact count recovers the original count. The integer difference is nonnegative, so natural subtraction is exact.
Both queries to count a width-three formula have linearly many vertices of the incidence graph, measured as occurring variables plus clauses. The additive constant covers empty inputs.