Polynomial-time verification of a Restricted 1-in-3-SAT assignment mask
ProvedNQueensComp.NPC.assignmentMask_polytimeone-in-three-satpolynomial-time
Given bit strings and , decode as a valid Restricted 1-in-3-SAT instance. Reject malformed or invalid codes. For a valid instance with clause list , let be the set of indices carrying a true bit in . Accept precisely when , every element of occurs in , and every clause contains exactly one element of .
A fixed CookLevin multitape machine decides this Boolean test in time polynomial in . This isolates the machine construction in the membership half of Theorem 4. Unary variable labels permit lookup of a witness bit by scanning the certificate. Clause validity, bounded occurrence, and the condition on unused indices can all be checked by repeated scans of the two strings.
Preamble
import Definitions.Def_NQueensComp_NPC_CodeReduction36 import Definitions.Def_CookLevin_Complexity open NQueensComp.NPC
Formal statement
theorem NQueensComp.NPC.assignmentMask_polytime :
CookLevin.PolyTimeDecidable (fun x w =>
match decodeValid6 x with
| none => false
| some cs =>
let T := (Finset.range w.length).filter fun i => w[i]? = some true
decide (w.length = x.length ∧ T ⊆ vars cs ∧ ∀ c ∈ cs, (c ∩ T).card = 1)) := by sorrySource
Gent, Jefferson and Nightingale, Complexity of n-Queens Completion, JAIR 59 (2017), 815–848, Problem 6 and Theorem 4 on p. 820. Machine-level formulation of the assignment check for the membership direction. https://doi.org/10.1613/jair.5512